diff --git a/src/tools/ulid-generator/index.ts b/src/tools/ulid-generator/index.ts index 6a5408dd..c12679a7 100644 --- a/src/tools/ulid-generator/index.ts +++ b/src/tools/ulid-generator/index.ts @@ -1,10 +1,11 @@ import { SortDescendingNumbers } from '@vicons/tabler'; import { defineTool } from '../tool'; +import { translate } from '@/plugins/i18n.plugin'; export const tool = defineTool({ - name: 'ULID generator', + name: translate('tools.ulid-generator.title'), path: '/ulid-generator', - description: 'Generate random Universally Unique Lexicographically Sortable Identifier (ULID).', + description: translate('tools.ulid-generator.description'), keywords: ['ulid', 'generator', 'random', 'id', 'alphanumeric', 'identity', 'token', 'string', 'identifier', 'unique'], component: () => import('./ulid-generator.vue'), icon: SortDescendingNumbers, diff --git a/src/tools/ulid-generator/locales/en.yml b/src/tools/ulid-generator/locales/en.yml new file mode 100644 index 00000000..ca0831ba --- /dev/null +++ b/src/tools/ulid-generator/locales/en.yml @@ -0,0 +1,11 @@ +tools: + ulid-generator: + title: 'ULID generator' + description: 'Generate random Universally Unique Lexicographically Sortable Identifier (ULID).' + + copied: 'ULIDs copied to the clipboard' + quantity: 'Quantity' + formatLabel: 'Format' + button: + copy: Copy + refresh: Refresh \ No newline at end of file diff --git a/src/tools/ulid-generator/ulid-generator.vue b/src/tools/ulid-generator/ulid-generator.vue index 06e695ef..4a690613 100644 --- a/src/tools/ulid-generator/ulid-generator.vue +++ b/src/tools/ulid-generator/ulid-generator.vue @@ -7,7 +7,7 @@ import { useCopy } from '@/composable/copy'; const amount = useStorage('ulid-generator-amount', 1); const formats = [{ label: 'Raw', value: 'raw' }, { label: 'JSON', value: 'json' }] as const; const format = useStorage('ulid-generator-format', formats[0].value); - +const { t } = useI18n(); const [ulids, refreshUlids] = computedRefreshable(() => { const ids = _.times(amount.value, () => ulid()); @@ -18,17 +18,17 @@ const [ulids, refreshUlids] = computedRefreshable(() => { return ids.join('\n'); }); -const { copy } = useCopy({ source: ulids, text: 'ULIDs copied to the clipboard' }); +const { copy } = useCopy({ source: ulids, text: t('tools.ulid-generator.copied') });