L10n (Pt): matches all Portuguese locales, not only bare pt (#2521)

359cb0a79a renamed the key from `pt_BR` to
`pt` but kept the exact-match guard, so only the literal string `pt`
matched. Every real Portuguese locale (`pt_BR`, `pt_PT` and their charset
and modifier variants) fell through to `goto error` and aborted.

Return the offset unconditionally, matching every other two-letter case.
This commit is contained in:
Hashing
2026-08-16 10:15:39 +03:00
committed by GitHub
parent 2de674ec9a
commit bbb906ba10
+1 -6
View File
@@ -71,12 +71,7 @@ static uint32_t optionParseLanguageString(FFstrbuf* language) {
case 'ja': return offsetof(FFModuleDisplayName, ja);
case 'ko': return offsetof(FFModuleDisplayName, ko);
case 'pl': return offsetof(FFModuleDisplayName, pl);
case 'pt': {
if (ffStrbufEqualS(language, "pt")) {
return offsetof(FFModuleDisplayName, pt);
}
goto error;
}
case 'pt': return offsetof(FFModuleDisplayName, pt);
case 'ru': return offsetof(FFModuleDisplayName, ru);
case 'zh': {
if (ffStrbufEqualS(language, "zh_cn")) {