mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 05:09:53 +01:00
Hardcode unsupported native language names
This commit is contained in:
@@ -300,13 +300,21 @@ public class SettingsFragment extends PreferenceFragmentCompat
|
|||||||
LOG.info("Skipping unsupported locale " + tag);
|
LOG.info("Skipping unsupported locale " + tag);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String nativeName = locale.getDisplayName(locale);
|
String nativeName;
|
||||||
// Fallback to English if the name is unknown in both native and
|
// Unsupported languages won't be translated to their native name.
|
||||||
// current locale.
|
if (locale.getLanguage().equals("ast")) {
|
||||||
if (nativeName.equals(tag)) {
|
nativeName = "Asturianu";
|
||||||
String tmp = locale.getDisplayLanguage(Locale.ENGLISH);
|
} else if (locale.getLanguage().equals("oc")) {
|
||||||
if (!tmp.isEmpty() && !tmp.equals(nativeName))
|
nativeName = "Occitan";
|
||||||
nativeName = tmp;
|
} else {
|
||||||
|
nativeName = locale.getDisplayName(locale);
|
||||||
|
// Fallback to English if the name is unknown in both native and
|
||||||
|
// current locale.
|
||||||
|
if (nativeName.equals(tag)) {
|
||||||
|
String tmp = locale.getDisplayLanguage(Locale.ENGLISH);
|
||||||
|
if (!tmp.isEmpty() && !tmp.equals(nativeName))
|
||||||
|
nativeName = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Prefix with LRM marker to prevent any RTL direction
|
// Prefix with LRM marker to prevent any RTL direction
|
||||||
entries.add("\u200E" + nativeName.substring(0, 1).toUpperCase()
|
entries.add("\u200E" + nativeName.substring(0, 1).toUpperCase()
|
||||||
|
|||||||
Reference in New Issue
Block a user