app labels do not update when the device's language changes
If I switch my device to Spanish, I can see that a number of the apps switch their name to the Spanish version, for example "Calculadora" or "Calendario". But looking at the app listing in the Swap flow, it still shows the English app names, while showing the Spanish text.
I looked into it a bit, and the problem is structural in FDroid. The app is built on top of the assumption of a single language. So there is only one field provided for the name of the app: InstalledAppProvider.DataColumns.APPLICATION_LABEL
. The swap stuff reuses this structure, and therefore is not set up to handle a separate @string/app_name
per language. This only really shows up in the swap flow since with apps coming from f-droid.org, there is only ever a single @string/app_name
per app.
So we could do a quick workaround for the swap flow by resolving the @string/app_name
for the current Locale in SelectedAppsFragment.AppListAdapter.bindView()
using this kind of code:
https://stackoverflow.com/a/18271197
@pserwylo will probably have something to say here :)