дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 09:11:10 +02:00
Adds 繁體中文 to the UI languages. The catalogs are converted from the Simplified ones with OpenCC (s2twp) plus a Taiwan IT terminology pass keyed on the English source (column → 欄, undo → 復原). zh-TW, zh-HK, zh-MO and zh-Hant* resolve to it; other zh tags stay Simplified. The update source picks CNB for every zh* locale, matching the backend. Co-authored-by: g4cj8498741 <[email protected]>
13 рядки
633 B
TypeScript
13 рядки
633 B
TypeScript
import { resolveLocale } from "@/platform/i18n";
|
|
import type { UpdateSource } from "@/platform/ipc";
|
|
import { useProject } from "@/platform/project";
|
|
|
|
/** System Settings > Updates > Update source; `auto` picks the CNB mirror for the Chinese UI. */
|
|
export function updateSource(): UpdateSource {
|
|
const { settings } = useProject.getState();
|
|
const chosen = settings?.general?.updateSource;
|
|
if (chosen === "github" || chosen === "cnb") return chosen;
|
|
// Matches the backend's UpdateSource::resolve, which picks CNB for every `zh*` tag.
|
|
return resolveLocale(settings?.appearance?.locale).startsWith("zh") ? "cnb" : "github";
|
|
}
|