If change the app display language before login, the AppLanguage code will be added to languagePrefs.contentLanguages array, instead of add LANGUAGES
AppLanguage is manage by lingui, and it use BCP 47 which can contain region code (for example zh-TW)
LANGUAGES is set of ISO 639 (in this case it will only have zh)
That will make (for this example) zh-TW stuck in contentLanguages and settings in UI will neither show nor be able to removing it.
And
if (!preferredLangsCode2.length || preferredLangsCode2.length === 0) {
return slices
}
this code will take no effect in src\lib\api\feed-manip.ts, since there is always one string in array (for this example zh-TW)
The only possible way to remove (for this example) zh-TW is to reset all settings
Details
Platform: Web are tested, other platform would also be affected
Describe the bug
If change the app display language before login, the
AppLanguage
code will be added tolanguagePrefs.contentLanguages
array, instead of addLANGUAGES
AppLanguage
is manage bylingui
, and it useBCP 47
which can contain region code (for examplezh-TW
)LANGUAGES
is set ofISO 639
(in this case it will only have zh)That will make (for this example)
zh-TW
stuck incontentLanguages
and settings in UI will neither show nor be able to removing it.And
this code will take no effect in
src\lib\api\feed-manip.ts
, since there is always one string in array (for this examplezh-TW
)The only possible way to remove (for this example)
zh-TW
is to reset all settingsDetails