rosetta
rosetta copied to clipboard
System strings messed up when changing BaseLocale, requires app uninstall to fix.
So I noticed a sort-of-bug : Suppose I have my Rosetta config defined as:
Locale firstLaunchLocale = Locale.getDefault();
Locale baseLocale = Locale.US;
HashSet<Locale> supportedLocales = new HashSet<>();
supportedLocales.add(new Locale("ml"));
supportedLocales.add(new Locale("ar"));
supportedLocales.add(new Locale("hi"));
supportedLocales.add(baseLocale);
LanguageSwitcher ls = new LanguageSwitcher(this,firstLaunchLocale,baseLocale);
ls.setSupportedLocales(supportedLocales);
and I publish the app.
Later, I noticed that the language switcher dialog was showing English(US)
, but I preferred to show just English
. So I changed the baseLocale
to Locale.ENGLISH
.
Now, the issue is when I change the firstLaunchLocale
and/or baseLocale
, and then push an update, users who update the app from the previous version experience this in most of the system provided strings:

The only solution I found is to uninstall the older version and do a fresh install of the new version.
So is there any way to rectify this?
Thank you @shahimclt for flagging this. The current design pattern of the library seems a bit buggy as it causes some problems it shouldn't do. I'm trying now to revisit the code again and to redo it later.