Legacy: Fix pluralization on old localization (#6894)

This commit is contained in:
zubiden 2026-04-27 14:29:18 +02:00 committed by Alexander Zinchuk
parent d2edb93340
commit d5ec8153db

View File

@ -215,7 +215,7 @@ async function fetchRemote(langCode: string): Promise<ApiOldLangPack | undefined
}
function getPluralOption(amount: number) {
const langCode = currentLangCode || FALLBACK_LANG_CODE;
const langCode = currentLangCode?.replace('-raw', '') || FALLBACK_LANG_CODE;
const optionIndex = PLURAL_RULES[langCode as keyof typeof PLURAL_RULES]
? PLURAL_RULES[langCode as keyof typeof PLURAL_RULES](amount)
: 0;