fix: 完善平台国际化覆盖
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
"viewFile": "View file"
|
||||
},
|
||||
"privacy": {
|
||||
"note": "Privacy: for anti-counterfeit risk control and query statistics, this visit's necessary info (time, IP, region and device) is recorded."
|
||||
"note": "Privacy: for anti-counterfeit risk control and query statistics, this visit's necessary info (time, IP and device) is recorded."
|
||||
},
|
||||
"state": {
|
||||
"loading": "Loading…",
|
||||
@@ -64,5 +64,5 @@
|
||||
"next": "Next"
|
||||
},
|
||||
"artist": "Artist",
|
||||
"lang": { "zh": "中文", "en": "EN", "switch": "Switch language" }
|
||||
"lang": { "zh": "Simplified Chinese", "en": "English", "switch": "Switch language" }
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ const KEY = 'artveris_client_locale';
|
||||
|
||||
// 支持的语言列表(后续新增语言只需在此追加)
|
||||
export const SUPPORTED_LOCALES = [
|
||||
{ value: 'zh-CN', label: '中文' },
|
||||
{ value: 'zh-CN', label: '简体中文' },
|
||||
{ value: 'en-US', label: 'English' },
|
||||
];
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
"viewFile": "查看文件"
|
||||
},
|
||||
"privacy": {
|
||||
"note": "隐私说明:为防伪风控与查询统计,系统会记录本次访问的必要信息(如访问时间、IP、地区与设备信息)。"
|
||||
"note": "隐私说明:为防伪风控与查询统计,系统会记录本次访问的必要信息(如访问时间、IP 与设备信息)。"
|
||||
},
|
||||
"state": {
|
||||
"loading": "正在查询…",
|
||||
@@ -64,5 +64,5 @@
|
||||
"next": "下一个"
|
||||
},
|
||||
"artist": "艺术家",
|
||||
"lang": { "zh": "中文", "en": "EN", "switch": "切换语言" }
|
||||
"lang": { "zh": "简体中文", "en": "English", "switch": "切换语言" }
|
||||
}
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { fetchAppInfo } from '@/api';
|
||||
import { setLocale } from '@/locales';
|
||||
import { setLocale, SUPPORTED_LOCALES } from '@/locales';
|
||||
import { resolveAppIcon, setFavicon } from '@/utils/appIcon';
|
||||
|
||||
const { t, locale } = useI18n();
|
||||
const appName = ref('');
|
||||
const appIconUrl = ref(resolveAppIcon());
|
||||
const filingInfo = ref('');
|
||||
const otherLangLabel = computed(() => (locale.value === 'zh-CN' ? 'EN' : '中文'));
|
||||
const otherLangLabel = computed(() => SUPPORTED_LOCALES.find((item) => item.value !== locale.value)?.label || 'English');
|
||||
function toggleLang() {
|
||||
setLocale(locale.value === 'zh-CN' ? 'en-US' : 'zh-CN');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user