waybetter/packages/shell/src/panel/languageModel.ts
CRT a41ea542a7 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.
2026-09-30 08:48:11 +00:00

10 lines
516 B
TypeScript

// Settings → Language: how the app's languages are grouped. Supported ones come first; community
// translations (machine drafts nobody has reviewed) are listed apart below them.
import type { PanelLanguage } from './site.ts';
export function groupLanguages(list: readonly PanelLanguage[]): { supported: PanelLanguage[]; community: PanelLanguage[] } {
return {
supported: list.filter(language => language.tier !== 'community'),
community: list.filter(language => language.tier === 'community'),
};
}