diff --git a/locales/de.yml b/locales/de.yml index 0636eafc..097ab44c 100644 --- a/locales/de.yml +++ b/locales/de.yml @@ -487,9 +487,17 @@ tools: json-to-xml: title: JSON zu XML description: JSON in XML konvertieren + input: Dein JSON-Inhalt + input-placeholder: Füge hier deinen JSON-Inhalt ein... + output: Konvertiertes XML + error: Bereitgestelltes JSON ist ungültig. xml-to-json: title: XML zu JSON description: XML in JSON konvertieren + input: Dein XML-Inhalt + input-placeholder: Füge hier deinen XML-Inhalt ein... + output: Konvertiertes JSON + error: Bereitgestelltes XML ist ungültig. email-normalizer: title: E-Mail-Normalisierung description: >- diff --git a/locales/en.yml b/locales/en.yml index fd9303d6..0dbd4dc0 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -456,9 +456,17 @@ tools: json-to-xml: title: JSON to XML description: Convert JSON to XML + input: Your JSON content + input-placeholder: Paste your JSON content here... + output: Converted XML + error: Provided JSON is not valid. xml-to-json: title: XML to JSON description: Convert XML to JSON + input: Your XML content + input-placeholder: Paste your XML content here... + output: Converted JSON + error: Provided XML is not valid. email-normalizer: title: Email normalizer description: >- 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'), }, ];