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
|
||||
rules?: RuleExpression<string[]>
|
||||
}>()
|
||||
const { t } = useI18n()
|
||||
const { value, setValue, errorMessage } = useField<string[]>(props.name, props?.rules)
|
||||
</script>
|
||||
|
||||
@@ -30,7 +31,7 @@ const { value, setValue, errorMessage } = useField<string[]>(props.name, props?.
|
||||
</div>
|
||||
<Button class="self-start" size="sm" @click="() => setValue([...(value || []), ''])">
|
||||
<LucidePlus class="size-4" />
|
||||
添加
|
||||
{{ t('common.add') }}
|
||||
</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -31,6 +31,7 @@ const props = defineProps<{
|
||||
config?: KvInputConfig
|
||||
}>()
|
||||
|
||||
const { t } = useI18n()
|
||||
const config = computed(() => {
|
||||
return {
|
||||
key: { ...defaultConfig.key, ...(props.config?.key ?? {}) },
|
||||
@@ -95,7 +96,7 @@ const updateKey = (index: number, nextKey: string | number) => {
|
||||
</div>
|
||||
<Button type="button" class="self-start" size="sm" @click="() => setValue([...(value ?? []), ['', '']])">
|
||||
<LucidePlus class="size-4" />
|
||||
添加
|
||||
{{ t('common.add') }}
|
||||
</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -170,7 +170,7 @@ const expandedAdvanced = ref<Set<number>>(new Set())
|
||||
"
|
||||
>
|
||||
<LucidePlus class="size-4" />
|
||||
添加
|
||||
{{ t('common.add') }}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"backToHome": "Zurück zur Startseite"
|
||||
},
|
||||
"common": {
|
||||
"add": "Hinzufügen",
|
||||
"copySuccess": "Erfolgreich kopiert"
|
||||
},
|
||||
"page": {
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"backToHome": "Back to Home"
|
||||
},
|
||||
"common": {
|
||||
"add": "Add",
|
||||
"copySuccess": "Copy Success"
|
||||
},
|
||||
"page": {
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"backToHome": "Retour à l'accueil"
|
||||
},
|
||||
"common": {
|
||||
"add": "Ajouter",
|
||||
"copySuccess": "Copié avec succès"
|
||||
},
|
||||
"page": {
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"backToHome": "ホームに戻る"
|
||||
},
|
||||
"common": {
|
||||
"add": "追加",
|
||||
"copySuccess": "コピーしました"
|
||||
},
|
||||
"page": {
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"backToHome": "홈으로 돌아가기"
|
||||
},
|
||||
"common": {
|
||||
"add": "추가",
|
||||
"copySuccess": "복사되었습니다"
|
||||
},
|
||||
"page": {
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"backToHome": "返回首页"
|
||||
},
|
||||
"common": {
|
||||
"add": "添加",
|
||||
"copySuccess": "复制成功"
|
||||
},
|
||||
"page": {
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"backToHome": "返回首頁"
|
||||
},
|
||||
"common": {
|
||||
"add": "新增",
|
||||
"copySuccess": "複製成功"
|
||||
},
|
||||
"page": {
|
||||
|
||||
Reference in New Issue
Block a user