mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 06:39:54 +01:00
Hardcode unsupported native language names
This commit is contained in:
@@ -300,7 +300,14 @@ 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;
|
||||||
|
// Unsupported languages won't be translated to their native name.
|
||||||
|
if (locale.getLanguage().equals("ast")) {
|
||||||
|
nativeName = "Asturianu";
|
||||||
|
} else if (locale.getLanguage().equals("oc")) {
|
||||||
|
nativeName = "Occitan";
|
||||||
|
} else {
|
||||||
|
nativeName = locale.getDisplayName(locale);
|
||||||
// Fallback to English if the name is unknown in both native and
|
// Fallback to English if the name is unknown in both native and
|
||||||
// current locale.
|
// current locale.
|
||||||
if (nativeName.equals(tag)) {
|
if (nativeName.equals(tag)) {
|
||||||
@@ -308,6 +315,7 @@ public class SettingsFragment extends PreferenceFragmentCompat
|
|||||||
if (!tmp.isEmpty() && !tmp.equals(nativeName))
|
if (!tmp.isEmpty() && !tmp.equals(nativeName))
|
||||||
nativeName = tmp;
|
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()
|
||||||
+ nativeName.substring(1));
|
+ nativeName.substring(1));
|
||||||
|
|||||||
Reference in New Issue
Block a user