i18n: supported and community language tiers

Automatic language choices resolve only to supported languages; community
translations are listed apart in Settings and offered as a one-click switch.
waybetter i18n check reads `supported` and generates `tier` into languages.json.
This commit is contained in:
CRTkafa 2026-09-30 15:48:11 +07:00
parent eb496a795b
commit a8dd727612
64 changed files with 426 additions and 26 deletions

View file

@ -113,13 +113,15 @@ export type PanelLanguage = {
englishName: string;
dir: 'ltr' | 'rtl';
status: 'source' | 'machine' | 'reviewed';
/** `community` languages are listed apart and never chosen automatically. */
tier: 'supported' | 'community';
coverage: number;
};
/** The app's language state (frame/language.ts `createLanguage`). */
export type PanelLanguages = {
list: readonly PanelLanguage[];
state(): { preference: string; siteLang: string | null; system: readonly string[]; locale: string };
state(): { preference: string; siteLang: string | null; system: readonly string[]; locale: string; community: string | null };
subscribe(listener: () => void): () => void;
set(preference: string): Promise<void>;
/** The contributor guide ("Help translate"), opened in the system browser. */