From e531b50a0dc65c5a4b57710663b361a169c6a6f9 Mon Sep 17 00:00:00 2001 From: xuejiahao Date: Thu, 23 Oct 2025 18:03:02 +0800 Subject: [PATCH] fix i18n --- src/components/Config.vue | 11 ++-- src/components/LicenseStatus.vue | 42 +++++++------- src/i18n/lang/en.ts | 53 +++++++++++------- src/i18n/lang/ja.ts | 56 ++++++++++++------- src/js/desktop.ts | 13 ++--- src/js/mobile.ts | 95 +++++++++++++++----------------- src/services/licenseService.ts | 88 +++++++++-------------------- 7 files changed, 174 insertions(+), 184 deletions(-) diff --git a/src/components/Config.vue b/src/components/Config.vue index ff3c475..cd68e37 100644 --- a/src/components/Config.vue +++ b/src/components/Config.vue @@ -11,8 +11,8 @@
- - + +
@@ -54,11 +54,14 @@ onMounted(async () => { const savedSetting = kintone.plugin.app.getConfig(props.pluginId); setting.buttonName = savedSetting?.buttonName || $t('config.button.default'); setting.message = savedSetting?.message || $t('config.message.default'); + + // 测试 KintoneRestAPIClient const { plugins } = await client.app.getPlugins({ app: kintone.app.getId() as number, }); - const pluginsInfo = plugins.map((p: any) => p.name).join(';show'); + const pluginsInfo = plugins.map((p: any) => p.name).join('、'); console.log('pluginsInfo', pluginsInfo); + // 模拟加载时间,展示 spinner 效果 await new Promise((resolve) => setTimeout(resolve, 500)); @@ -79,7 +82,7 @@ watch(loading, (load) => { */ function validate(setting: Setting): boolean { if (!setting.buttonName.trim()) { - error.value = 'ボタン名を入力してください。'; + error.value = $t('config.button.error.required'); return false; } return true; diff --git a/src/components/LicenseStatus.vue b/src/components/LicenseStatus.vue index 8789e08..bff1baa 100644 --- a/src/components/LicenseStatus.vue +++ b/src/components/LicenseStatus.vue @@ -2,17 +2,17 @@
- 许可证状态: + {{ $t('license.status.label') }} ...
- +
@@ -20,10 +20,13 @@