mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1065523 - Part 1: locale picker screen displays short locale display name, not capitalized region-decorated name. r=nalexander
What I think was happening here: we were taking a locale *tag* ("en-US") and giving it to the Java Locale constructor to parse. It parsed that as "en" (because it expects _ not -), so we'd get "English". And because it was the display string from the locale, in e.g., French we'd get "français", lowercase. The fix is to just use the same code path that we use for the list picker itself -- make a descriptor from the tag, and ask it for its display string.
This commit is contained in:
parent
6c6be7170a
commit
8985e6d29b
@ -269,8 +269,7 @@ public class LocaleListPreference extends ListPreference {
|
||||
|
||||
// We can't trust super.getSummary() across locale changes,
|
||||
// apparently, so let's do the same work.
|
||||
final Locale loc = new Locale(value);
|
||||
return loc.getDisplayName(loc);
|
||||
return new LocaleDescriptor(value).getDisplayName();
|
||||
}
|
||||
|
||||
private void buildList() {
|
||||
|
Loading…
Reference in New Issue
Block a user