Use correct locale when uppercasing text.
Locale.getDefault() returns the default for the current JVM (or whatever runtime Android calls it these days). By asking the configuration, we will get the Locale that the user has selected from within the F-Droid preferences.
This commit is contained in:
parent
c059b83f2b
commit
80e0f84816
@ -416,8 +416,11 @@ public class AppDetailsRecyclerViewAdapter
|
||||
if (suggestedApk == null || TextUtils.isEmpty(suggestedApk.whatsNew)) {
|
||||
whatsNewView.setVisibility(View.GONE);
|
||||
} else {
|
||||
//noinspection deprecation Ignore deprecation because the suggested way is only available in API 24.
|
||||
Locale locale = context.getResources().getConfiguration().locale;
|
||||
|
||||
StringBuilder sbWhatsNew = new StringBuilder();
|
||||
sbWhatsNew.append(whatsNewView.getContext().getString(R.string.details_new_in_version, suggestedApk.versionName).toUpperCase(Locale.getDefault()));
|
||||
sbWhatsNew.append(whatsNewView.getContext().getString(R.string.details_new_in_version, suggestedApk.versionName).toUpperCase(locale));
|
||||
sbWhatsNew.append("\n\n");
|
||||
sbWhatsNew.append(suggestedApk.whatsNew);
|
||||
whatsNewView.setText(sbWhatsNew);
|
||||
|
Loading…
x
Reference in New Issue
Block a user