diff --git a/src/tools/ascii-text-drawer/ascii-text-drawer.vue b/src/tools/ascii-text-drawer/ascii-text-drawer.vue
index 8e208d3a..a691a3c4 100644
--- a/src/tools/ascii-text-drawer/ascii-text-drawer.vue
+++ b/src/tools/ascii-text-drawer/ascii-text-drawer.vue
@@ -10,6 +10,7 @@ const width = useStorage('ascii-text-drawer:width', 80);
const output = ref('');
const errored = ref(false);
const processing = ref(false);
+const { t } = useI18n();
const base = import.meta.env.BASE_URL ?? '/';
@@ -56,8 +57,8 @@ const fonts = ['1Row', '3-D', '3D Diagonal', '3D-ASCII', '3x5', '4Max', '5 Line
-
+
@@ -88,14 +89,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') }}
-
+
`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 189e1ec3..aeac053c 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 844dbc7b..658763bc 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 62dee79a..e3d2e321 100644
--- a/src/tools/markdown-to-html/markdown-to-html.vue
+++ b/src/tools/markdown-to-html/markdown-to-html.vue
@@ -30,6 +30,7 @@ const outputHtml = computed(() => {
}
return md.render(inputMarkdown.value);
});
+const { t } = useI18n();
function printHtml() {
const w = window.open();
@@ -46,10 +47,10 @@ function printHtml() {
@@ -74,7 +75,7 @@ function printHtml() {
-
+
diff --git a/src/tools/regex-memo/index.ts b/src/tools/regex-memo/index.ts
index 00db4811..f284e8ce 100644
--- a/src/tools/regex-memo/index.ts
+++ b/src/tools/regex-memo/index.ts
@@ -1,10 +1,11 @@
import { BrandJavascript } from '@vicons/tabler';
import { defineTool } from '../tool';
+import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
- name: 'Regex cheatsheet',
+ name: translate('tools.regex-memo.title'),
path: '/regex-memo',
- description: 'Javascript Regex/Regular Expression cheatsheet',
+ description: translate('tools.regex-memo.description'),
keywords: ['regex', 'regular', 'expression', 'javascript', 'memo', 'cheatsheet'],
component: () => import('./regex-memo.vue'),
icon: BrandJavascript,
diff --git a/src/tools/regex-tester/index.ts b/src/tools/regex-tester/index.ts
index 7cecddbb..d32078da 100644
--- a/src/tools/regex-tester/index.ts
+++ b/src/tools/regex-tester/index.ts
@@ -1,10 +1,11 @@
import { Language } from '@vicons/tabler';
import { defineTool } from '../tool';
+import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
- name: 'Regex Tester',
+ name: translate('tools.regex-tester.title'),
path: '/regex-tester',
- description: 'Test your regular expressions with sample text.',
+ description: translate('tools.regex-tester.description'),
keywords: ['regex', 'tester', 'sample', 'expression'],
component: () => import('./regex-tester.vue'),
icon: Language,
diff --git a/src/tools/regex-tester/regex-tester.vue b/src/tools/regex-tester/regex-tester.vue
index b9e0e296..20bda39b 100644
--- a/src/tools/regex-tester/regex-tester.vue
+++ b/src/tools/regex-tester/regex-tester.vue
@@ -15,6 +15,7 @@ const dotAll = ref(true);
const unicode = ref(true);
const unicodeSets = ref(false);
const visualizerSVG = ref();
+const { t } = useI18n();
const regexValidation = useValidation({
source: regex,
@@ -92,36 +93,36 @@ watchEffect(
-
+
- See Regular Expression Cheatsheet
+ {{ t('tools.regex-tester.link') }}
- Global search. (g)
+ Global search (g)
- Case-insensitive search. (i)
+ Case-insensitive search (i)
- Multiline(m)
+ Multiline (m)
- Singleline(s)
+ Singleline (s)
- Unicode(u)
+ Unicode (u)
- Unicode Sets (v)
+ Unicode Sets (v)
@@ -129,28 +130,28 @@ watchEffect(
-
+
|
- Index in text
+ {{ t('tools.regex-tester.text-index') }}
|
- Value
+ {{ t('tools.regex-tester.value') }}
|
- Captures
+ {{ t('tools.regex-tester.captures') }}
|
- Groups
+ {{ t('tools.regex-tester.groups') }}
|
@@ -176,15 +177,15 @@ watchEffect(
- No match
+ {{ t('tools.regex-tester.no-match') }}
-
+
{{ sample }}
-
+
diff --git a/src/tools/safelink-decoder/index.ts b/src/tools/safelink-decoder/index.ts
index aed4a61b..ba748e30 100644
--- a/src/tools/safelink-decoder/index.ts
+++ b/src/tools/safelink-decoder/index.ts
@@ -1,10 +1,11 @@
import { Mailbox } from '@vicons/tabler';
import { defineTool } from '../tool';
+import { translate } from '@/plugins/i18n.plugin';
export const tool = defineTool({
- name: 'Outlook Safelink decoder',
+ name: translate('tools.safelink-decoder.title'),
path: '/safelink-decoder',
- description: 'Decode Outlook SafeLink links',
+ description: translate('tools.safelink-decoder.description'),
keywords: ['outlook', 'safelink', 'decoder'],
component: () => import('./safelink-decoder.vue'),
icon: Mailbox,
diff --git a/src/tools/safelink-decoder/safelink-decoder.vue b/src/tools/safelink-decoder/safelink-decoder.vue
index 01337eb2..f8c1defd 100644
--- a/src/tools/safelink-decoder/safelink-decoder.vue
+++ b/src/tools/safelink-decoder/safelink-decoder.vue
@@ -2,6 +2,7 @@
import { decodeSafeLinksURL } from './safelink-decoder.service';
import TextareaCopyable from '@/components/TextareaCopyable.vue';
+const { t } = useI18n();
const inputSafeLinkUrl = ref('');
const outputDecodedUrl = computed(() => {
try {
@@ -18,14 +19,14 @@ const outputDecodedUrl = computed(() => {
-
+
diff --git a/src/tools/xml-to-json/index.ts b/src/tools/xml-to-json/index.ts
index 7c82706e..c79a4d93 100644
--- a/src/tools/xml-to-json/index.ts
+++ b/src/tools/xml-to-json/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: 'XML to Json',
+ name: translate('tools.xml-to-json.title'),
path: '/xml-to-json',
- description: 'Convert XML to JSON',
+ description: translate('tools.xml-to-json.description'),
keywords: ['xml', 'json'],
component: () => import('./xml-to-json.vue'),
icon: Braces,
diff --git a/src/tools/xml-to-json/xml-to-json.vue b/src/tools/xml-to-json/xml-to-json.vue
index e1e5a477..4e9c3cfa 100644
--- a/src/tools/xml-to-json/xml-to-json.vue
+++ b/src/tools/xml-to-json/xml-to-json.vue
@@ -4,6 +4,7 @@ import { isValidXML } from '../xml-formatter/xml-formatter.service';
import { withDefaultOnError } from '@/utils/defaults';
import type { UseValidationRule } from '@/composable/validation';
+const { t } = useI18n();
const defaultValue = '';
function transformer(value: string) {
return withDefaultOnError(() => {
@@ -14,17 +15,17 @@ function transformer(value: string) {
const rules: UseValidationRule[] = [
{
validator: isValidXML,
- message: 'Provided XML is not valid.',
+ message: t('tools.xml-to-json.error'),
},
];