diff --git a/src/tools/ascii-text-drawer/ascii-text-drawer.vue b/src/tools/ascii-text-drawer/ascii-text-drawer.vue
index 9a6520a4..946f1954 100644
--- a/src/tools/ascii-text-drawer/ascii-text-drawer.vue
+++ b/src/tools/ascii-text-drawer/ascii-text-drawer.vue
@@ -8,6 +8,7 @@ const width = useStorage('ascii-text-drawer:width', 80);
const output = ref('');
const errored = ref(false);
const processing = ref(false);
+const { t } = useI18n();
figlet.defaults({ fontPath: '//unpkg.com/figlet@1.6.0/fonts/' });
@@ -44,8 +45,8 @@ const fonts = ['1Row', '3-D', '3D Diagonal', '3D-ASCII', '3x5', '4Max', '5 Line
-
+
@@ -75,14 +76,14 @@ const fonts = ['1Row', '3-D', '3D Diagonal', '3D-ASCII', '3x5', '4Max', '5 Line
- Loading font...
+ {{ t('tools.ascii-text-drawer.loading') }}
- Current settings resulted in error.
+ {{ t('tools.ascii-text-drawer.error') }}
-
+
import('./ascii-text-drawer.vue'),
icon: Artboard,
diff --git a/src/tools/basic-auth-generator/basic-auth-generator.vue b/src/tools/basic-auth-generator/basic-auth-generator.vue
index a8946127..81e09dee 100644
--- a/src/tools/basic-auth-generator/basic-auth-generator.vue
+++ b/src/tools/basic-auth-generator/basic-auth-generator.vue
@@ -5,17 +5,25 @@ import { textToBase64 } from '@/utils/base64';
const username = ref('');
const password = ref('');
const header = computed(() => `Authorization: Basic ${textToBase64(`${username.value}:${password.value}`)}`);
+const { t } = useI18n();
-const { copy } = useCopy({ source: header, text: 'Header copied to the clipboard' });
+const { copy } = useCopy({ source: header, text: t('tools.basic-auth-generator.copied') });
-
+
- Copy header
+ {{ t('tools.basic-auth-generator.button.copy') }}
diff --git a/src/tools/chronometer/chronometer.vue b/src/tools/chronometer/chronometer.vue
index 9ed6fead..91276f7d 100644
--- a/src/tools/chronometer/chronometer.vue
+++ b/src/tools/chronometer/chronometer.vue
@@ -5,6 +5,7 @@ import { formatMs } from './chronometer.service';
const isRunning = ref(false);
const counter = ref(0);
+const { t } = useI18n();
let previousRafDate = Date.now();
const { pause: pauseRaf, resume: resumeRaf } = useRafFn(
@@ -37,14 +38,14 @@ function pause() {
- Start
+ {{ t('tools.chronometer.button.start') }}
- Stop
+ {{ t('tools.chronometer.button.stop') }}
- Reset
+ {{ t('tools.chronometer.button.reset') }}
diff --git a/src/tools/email-normalizer/email-normalizer.vue b/src/tools/email-normalizer/email-normalizer.vue
index eae97c4e..e4285c84 100644
--- a/src/tools/email-normalizer/email-normalizer.vue
+++ b/src/tools/email-normalizer/email-normalizer.vue
@@ -3,6 +3,7 @@ import { normalizeEmail } from 'email-normalizer';
import { withDefaultOnError } from '@/utils/defaults';
import { useCopy } from '@/composable/copy';
+const { t } = useI18n();
const emails = ref('');
const normalizedEmails = computed(() => {
if (!emails.value) {
@@ -17,17 +18,17 @@ const normalizedEmails = computed(() => {
.join('\n');
});
-const { copy } = useCopy({ source: normalizedEmails, text: 'Normalized emails copied to the clipboard', createToast: true });
+const { copy } = useCopy({ source: normalizedEmails, text: t('tools.email-normalizer.copied'), createToast: true });
- Raw emails to normalize:
+ {{ t('tools.email-normalizer.input') }}
- Normalized emails:
+ {{ t('tools.email-normalizer.output') }}
- Clear emails
+ {{ t('tools.email-normalizer.button.clear') }}
- Copy normalized emails
+ {{ t('tools.email-normalizer.button.copy') }}
diff --git a/src/tools/email-normalizer/index.ts b/src/tools/email-normalizer/index.ts
index 299a30f7..b5110a12 100644
--- a/src/tools/email-normalizer/index.ts
+++ b/src/tools/email-normalizer/index.ts
@@ -1,10 +1,11 @@
import { Mail } from '@vicons/tabler';
import { defineTool } from '../tool';
+import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
- name: 'Email normalizer',
+ name: translate('tools.email-normalizer.title'),
path: '/email-normalizer',
- description: 'Normalize email addresses to a standard format for easier comparison. Useful for deduplication and data cleaning.',
+ description: translate('tools.email-normalizer.description'),
keywords: ['email', 'normalizer'],
component: () => import('./email-normalizer.vue'),
icon: Mail,
diff --git a/src/tools/json-to-xml/index.ts b/src/tools/json-to-xml/index.ts
index c35ace2b..0a3daa4b 100644
--- a/src/tools/json-to-xml/index.ts
+++ b/src/tools/json-to-xml/index.ts
@@ -1,10 +1,11 @@
import { Braces } from '@vicons/tabler';
import { defineTool } from '../tool';
+import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
- name: 'JSON to XML',
+ name: translate('tools.json-to-xml.title'),
path: '/json-to-xml',
- description: 'Convert JSON to XML',
+ description: translate('tools.json-to-xml.description'),
keywords: ['json', 'xml'],
component: () => import('./json-to-xml.vue'),
icon: Braces,
diff --git a/src/tools/json-to-xml/json-to-xml.vue b/src/tools/json-to-xml/json-to-xml.vue
index 96a7cf16..fcde22e6 100644
--- a/src/tools/json-to-xml/json-to-xml.vue
+++ b/src/tools/json-to-xml/json-to-xml.vue
@@ -4,6 +4,7 @@ import JSON5 from 'json5';
import { withDefaultOnError } from '@/utils/defaults';
import type { UseValidationRule } from '@/composable/validation';
+const { t } = useI18n();
const defaultValue = '{"a":{"_attributes":{"x":"1.234","y":"It\'s"}}}';
function transformer(value: string) {
return withDefaultOnError(() => {
@@ -14,17 +15,17 @@ function transformer(value: string) {
const rules: UseValidationRule[] = [
{
validator: (v: string) => v === '' || JSON5.parse(v),
- message: 'Provided JSON is not valid.',
+ message: t('tools.json-to-xml.error'),
},
];
import('./markdown-to-html.vue'),
icon: Markdown,
diff --git a/src/tools/markdown-to-html/markdown-to-html.vue b/src/tools/markdown-to-html/markdown-to-html.vue
index c84d44ec..0eaa3a41 100644
--- a/src/tools/markdown-to-html/markdown-to-html.vue
+++ b/src/tools/markdown-to-html/markdown-to-html.vue
@@ -7,6 +7,7 @@ const outputHtml = computed(() => {
const md = markdownit();
return md.render(inputMarkdown.value);
});
+const { t } = useI18n();
function printHtml() {
const w = window.open();
@@ -23,21 +24,21 @@ function printHtml() {
-
+
- Print as PDF
+ {{ t('tools.markdown-to-html.button.print') }}
diff --git a/src/tools/qr-code-generator/qr-code-generator.vue b/src/tools/qr-code-generator/qr-code-generator.vue
index 8bc9f740..842196a4 100644
--- a/src/tools/qr-code-generator/qr-code-generator.vue
+++ b/src/tools/qr-code-generator/qr-code-generator.vue
@@ -3,6 +3,7 @@ import type { QRCodeErrorCorrectionLevel } from 'qrcode';
import { useQRCode } from './useQRCode';
import { useDownloadFileFromBase64 } from '@/composable/downloadBase64';
+const { t } = useI18n();
const foreground = ref('#000000ff');
const background = ref('#ffffffff');
const errorCorrectionLevel = ref