Feat/translate all content (#121)

* feat: add script to extract strings

* feat: extract many strings (html, attr, label)

* feat(extract string): extract html only for .vue and single file mode

* fix: __i18n_ally_root__

* feat: nestify en.yml + extract tab attributes

* feat: add script to extract strings

* feat: extract many strings (html, attr, label)

* feat(extract string): extract html only for .vue and single file mode

* fix: __i18n_ally_root__

* feat: nestify en.yml + extract tab attributes

* fix: lint

* feat: add vue-i18n-extract to check missing keys

* fix: unit tests

* fix: update vue i18n plugin
This commit is contained in:
sharevb authored and ShareVB committed 2025-07-20 21:01:01 +02:00
1 parent 0d4267e356
commit a8c6ebc81b
347 files changed
+10245 -4533

No files matched your search

+8 -5
View File
@@ -1,10 +1,13 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n';
import JSON5 from 'json5';
import DiffsViewer from './diff-viewer/diff-viewer.vue';
import { withDefaultOnError } from '@/utils/defaults';
import { isNotThrowing } from '@/utils/boolean';
const { t } = useI18n();
const rawLeftJson = ref('');
const rawRightJson = ref('');
@@ -14,7 +17,7 @@ const rightJson = computed(() => withDefaultOnError(() => JSON5.parse(rawRightJs
const jsonValidationRules = [
{
validator: (value: string) => value === '' || isNotThrowing(() => JSON5.parse(value)),
message: 'Invalid JSON format',
message: t('tools.json-diff.texts.message-invalid-json-format'),
},
];
</script>
@@ -23,8 +26,8 @@ const jsonValidationRules = [
<c-input-text
v-model:value="rawLeftJson"
:validation-rules="jsonValidationRules"
label="Your first JSON"
placeholder="Paste your first JSON here..."
:label="t('tools.json-diff.texts.label-your-first-json')"
:placeholder="t('tools.json-diff.texts.placeholder-paste-your-first-json-here')"
rows="20"
multiline
test-id="leftJson"
@@ -35,8 +38,8 @@ const jsonValidationRules = [
<c-input-text
v-model:value="rawRightJson"
:validation-rules="jsonValidationRules"
label="Your JSON to compare"
placeholder="Paste your JSON to compare here..."
:label="t('tools.json-diff.texts.label-your-json-to-compare')"
:placeholder="t('tools.json-diff.texts.placeholder-paste-your-json-to-compare-here')"
rows="20"
multiline
test-id="rightJson"