mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 07:08:02 +00:00
feat(i18n): add 'add' translation in multiple languages and update InputGroupField, KvInputGroupField, and NotifyConfigField components to use localized text for button labels
This commit is contained in:
@@ -6,6 +6,7 @@ const props = defineProps<{
|
|||||||
label?: string
|
label?: string
|
||||||
rules?: RuleExpression<string[]>
|
rules?: RuleExpression<string[]>
|
||||||
}>()
|
}>()
|
||||||
|
const { t } = useI18n()
|
||||||
const { value, setValue, errorMessage } = useField<string[]>(props.name, props?.rules)
|
const { value, setValue, errorMessage } = useField<string[]>(props.name, props?.rules)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -30,7 +31,7 @@ const { value, setValue, errorMessage } = useField<string[]>(props.name, props?.
|
|||||||
</div>
|
</div>
|
||||||
<Button class="self-start" size="sm" @click="() => setValue([...(value || []), ''])">
|
<Button class="self-start" size="sm" @click="() => setValue([...(value || []), ''])">
|
||||||
<LucidePlus class="size-4" />
|
<LucidePlus class="size-4" />
|
||||||
添加
|
{{ t('common.add') }}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ const props = defineProps<{
|
|||||||
config?: KvInputConfig
|
config?: KvInputConfig
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
const config = computed(() => {
|
const config = computed(() => {
|
||||||
return {
|
return {
|
||||||
key: { ...defaultConfig.key, ...(props.config?.key ?? {}) },
|
key: { ...defaultConfig.key, ...(props.config?.key ?? {}) },
|
||||||
@@ -95,7 +96,7 @@ const updateKey = (index: number, nextKey: string | number) => {
|
|||||||
</div>
|
</div>
|
||||||
<Button type="button" class="self-start" size="sm" @click="() => setValue([...(value ?? []), ['', '']])">
|
<Button type="button" class="self-start" size="sm" @click="() => setValue([...(value ?? []), ['', '']])">
|
||||||
<LucidePlus class="size-4" />
|
<LucidePlus class="size-4" />
|
||||||
添加
|
{{ t('common.add') }}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ const expandedAdvanced = ref<Set<number>>(new Set())
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<LucidePlus class="size-4" />
|
<LucidePlus class="size-4" />
|
||||||
添加
|
{{ t('common.add') }}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
"backToHome": "Zurück zur Startseite"
|
"backToHome": "Zurück zur Startseite"
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
|
"add": "Hinzufügen",
|
||||||
"copySuccess": "Erfolgreich kopiert"
|
"copySuccess": "Erfolgreich kopiert"
|
||||||
},
|
},
|
||||||
"page": {
|
"page": {
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
"backToHome": "Back to Home"
|
"backToHome": "Back to Home"
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
|
"add": "Add",
|
||||||
"copySuccess": "Copy Success"
|
"copySuccess": "Copy Success"
|
||||||
},
|
},
|
||||||
"page": {
|
"page": {
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
"backToHome": "Retour à l'accueil"
|
"backToHome": "Retour à l'accueil"
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
|
"add": "Ajouter",
|
||||||
"copySuccess": "Copié avec succès"
|
"copySuccess": "Copié avec succès"
|
||||||
},
|
},
|
||||||
"page": {
|
"page": {
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
"backToHome": "ホームに戻る"
|
"backToHome": "ホームに戻る"
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
|
"add": "追加",
|
||||||
"copySuccess": "コピーしました"
|
"copySuccess": "コピーしました"
|
||||||
},
|
},
|
||||||
"page": {
|
"page": {
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
"backToHome": "홈으로 돌아가기"
|
"backToHome": "홈으로 돌아가기"
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
|
"add": "추가",
|
||||||
"copySuccess": "복사되었습니다"
|
"copySuccess": "복사되었습니다"
|
||||||
},
|
},
|
||||||
"page": {
|
"page": {
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
"backToHome": "返回首页"
|
"backToHome": "返回首页"
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
|
"add": "添加",
|
||||||
"copySuccess": "复制成功"
|
"copySuccess": "复制成功"
|
||||||
},
|
},
|
||||||
"page": {
|
"page": {
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
"backToHome": "返回首頁"
|
"backToHome": "返回首頁"
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
|
"add": "新增",
|
||||||
"copySuccess": "複製成功"
|
"copySuccess": "複製成功"
|
||||||
},
|
},
|
||||||
"page": {
|
"page": {
|
||||||
|
|||||||
Reference in New Issue
Block a user