Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
Hardcode Asturian (Asturianu) name (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahunt committed May 25, 2017
1 parent ba7582a commit 0c379d1
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,18 @@ public LocaleDescriptor(String tag) {
public LocaleDescriptor(Locale locale, String tag) {
this.tag = tag;

final String displayName = locale.getDisplayName(locale);
final String displayName;

if (locale.getLanguage().equals("ast")) {
// Only ICU 57 actually contains the Asturian name for Asturian, even Android 7.1 is still
// shipping with ICU 56, so we need to override the Asturian name (otherwise displayName will
// be the current locales version of Asturian, see:
// https://github.com/mozilla-mobile/focus-android/issues/634#issuecomment-303886118
displayName = "Asturianu";
} else {
displayName = locale.getDisplayName(locale);
}

if (TextUtils.isEmpty(displayName)) {
// There's nothing sane we can do.
Log.w(LOG_TAG, "Display name is empty. Using " + locale.toString());
Expand Down

0 comments on commit 0c379d1

Please sign in to comment.