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

+10 -7
View File
@@ -1,9 +1,12 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n';
import JSON5 from 'json5';
import { convert } from './json-to-java.service';
import type { UseValidationRule } from '@/composable/validation';
import TextareaCopyable from '@/components/TextareaCopyable.vue';
const { t } = useI18n();
const jsonInput = ref('');
const clazzInput = ref('Result');
const goOutput = computed(() => {
@@ -13,18 +16,18 @@ const goOutput = computed(() => {
const rules: UseValidationRule<string>[] = [
{
validator: (v: string) => v === '' || JSON5.parse(v),
message: 'Provided JSON is not valid.',
message: t('tools.json-to-java.texts.message-provided-json-is-not-valid'),
},
];
</script>
<template>
<c-card title="JSON to Java Entity">
<c-card :title="t('tools.json-to-java.texts.title-json-to-java-entity')">
<c-input-text
v-model:value="clazzInput"
placeholder="Custom class name"
:placeholder="t('tools.json-to-java.texts.placeholder-custom-class-name')"
raw-text
label="classname"
:label="t('tools.json-to-java.texts.label-classname')"
label-position="left"
label-width="50px"
mb-2
@@ -32,15 +35,15 @@ const rules: UseValidationRule<string>[] = [
<c-input-text
v-model:value="jsonInput"
multiline
placeholder="Put your josn string here..."
:placeholder="t('tools.json-to-java.texts.placeholder-put-your-josn-string-here')"
rows="20"
label="JSON to Java"
:label="t('tools.json-to-java.texts.label-json-to-java')"
:validation-rules="rules"
raw-text
mb-5
/>
</c-card>
<c-card title="You Java String">
<c-card :title="t('tools.json-to-java.texts.title-you-java-string')">
<TextareaCopyable
:value="goOutput"
language="json"