mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-08-18 12:07:02 +08:00
fix(i18n): extract new Chinese keys and implement dynamic localization for footer/updates/tray menu
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user