fix(i18n): extract new Chinese keys and implement dynamic localization for footer/updates/tray menu

This commit is contained in:
philau2512
2026-07-15 17:53:42 +07:00
parent 12c7973a06
commit 319bd3d7d8
9 changed files with 1171 additions and 300 deletions
+6
View File
@@ -6,6 +6,7 @@ import HomeMetricsCard from "@/components/HomeMetricsCard.vue";
import { useMessage } from "@/composables/useMessage";
import { showModal } from "@/composables/useModal";
import { getAdRuntime } from "@/services/clientApi";
import { useLocale } from "@/i18n/runtime";
import {
appState,
appViewState,
@@ -42,7 +43,12 @@ function asBoolean(value) {
return value === true || value === "true" || value === 1 || value === "1";
}
const { locale } = useLocale();
const homeAds = computed(() => {
if (locale.value !== "zh-CN") {
return [];
}
const runtime = adRuntime.value && typeof adRuntime.value === "object" ? adRuntime.value : {};
const slots = Array.isArray(runtime.slots) && runtime.slots.length > 0 ? runtime.slots : [runtime];
return slots