maintenance on display language selection and "incomplete" status
This commit is contained in:
parent
56b5514f56
commit
21f25032d7
1 changed files with 16 additions and 20 deletions
|
@ -150,27 +150,28 @@ public class SettingsGeneralActivity extends SettingsBaseActivity implements OnR
|
|||
}
|
||||
registerListPreference(settings.METRIC_SYSTEM, screen, entries, mvls);
|
||||
|
||||
// See language list and statistics at: https://hosted.weblate.org/projects/osmand/main/
|
||||
String incompleteSuffix = " (" + getString(R.string.incomplete_locale) + ")";
|
||||
// Add this in Latin also so it can be more easily identified if foreign language has been selected by mistake
|
||||
// Add this string in Latin also so it can be more easily identified if foreign language has been selected by mistake
|
||||
String latinSystemDefaultSuffix = " (" + getString(R.string.system_locale_no_translate) + ")";
|
||||
|
||||
// See language list and statistics at: https://hosted.weblate.org/projects/osmand/main/
|
||||
// Hardy 2016-05-28:
|
||||
// - Include languages if their translation is >= ~10% (but any language will be visible if it is the device's system locale)
|
||||
// - Mark as "incomplete" unless > ~80%
|
||||
String incompleteSuffix = " (" + getString(R.string.incomplete_locale) + ")";
|
||||
//getResources().getAssets().getLocales();
|
||||
entrieValues = new String[]{"",
|
||||
"en",
|
||||
"af",
|
||||
"al",
|
||||
"ar",
|
||||
"hy",
|
||||
"eu",
|
||||
"be",
|
||||
"bs",
|
||||
"bg",
|
||||
"ca",
|
||||
"hr",
|
||||
"cs",
|
||||
"da",
|
||||
"nl",
|
||||
"eo",
|
||||
"fi",
|
||||
"fr",
|
||||
"gl",
|
||||
|
@ -178,9 +179,7 @@ public class SettingsGeneralActivity extends SettingsBaseActivity implements OnR
|
|||
"de",
|
||||
"el",
|
||||
"he",
|
||||
"hi",
|
||||
"hu",
|
||||
"id",
|
||||
"it",
|
||||
"ja",
|
||||
"ko",
|
||||
|
@ -206,28 +205,24 @@ public class SettingsGeneralActivity extends SettingsBaseActivity implements OnR
|
|||
entries = new String[]{getString(R.string.system_locale) + latinSystemDefaultSuffix,
|
||||
getString(R.string.lang_en),
|
||||
getString(R.string.lang_af) + incompleteSuffix,
|
||||
getString(R.string.lang_al) + incompleteSuffix,
|
||||
getString(R.string.lang_ar),
|
||||
getString(R.string.lang_hy) + incompleteSuffix,
|
||||
getString(R.string.lang_eu) + incompleteSuffix,
|
||||
getString(R.string.lang_ar) + incompleteSuffix,
|
||||
getString(R.string.lang_eu),
|
||||
getString(R.string.lang_be),
|
||||
getString(R.string.lang_bs) + incompleteSuffix,
|
||||
getString(R.string.lang_bg) + incompleteSuffix,
|
||||
getString(R.string.lang_bg),
|
||||
getString(R.string.lang_ca),
|
||||
getString(R.string.lang_hr) + incompleteSuffix,
|
||||
getString(R.string.lang_cs),
|
||||
getString(R.string.lang_da),
|
||||
getString(R.string.lang_nl),
|
||||
getString(R.string.lang_eo) + incompleteSuffix,
|
||||
getString(R.string.lang_fi) + incompleteSuffix,
|
||||
getString(R.string.lang_fr),
|
||||
getString(R.string.lang_gl),
|
||||
getString(R.string.lang_ka) + incompleteSuffix,
|
||||
getString(R.string.lang_de),
|
||||
getString(R.string.lang_el),
|
||||
getString(R.string.lang_el) + incompleteSuffix,
|
||||
getString(R.string.lang_he) + incompleteSuffix,
|
||||
getString(R.string.lang_hi) + incompleteSuffix,
|
||||
getString(R.string.lang_hu),
|
||||
getString(R.string.lang_id) + incompleteSuffix,
|
||||
getString(R.string.lang_it),
|
||||
getString(R.string.lang_ja),
|
||||
getString(R.string.lang_ko),
|
||||
|
@ -235,10 +230,10 @@ public class SettingsGeneralActivity extends SettingsBaseActivity implements OnR
|
|||
getString(R.string.lang_lt),
|
||||
getString(R.string.lang_mr) + incompleteSuffix,
|
||||
getString(R.string.lang_nb) + incompleteSuffix,
|
||||
getString(R.string.lang_fa),
|
||||
getString(R.string.lang_fa) + incompleteSuffix,
|
||||
getString(R.string.lang_pl),
|
||||
getString(R.string.lang_pt),
|
||||
getString(R.string.lang_ro),
|
||||
getString(R.string.lang_ro) + incompleteSuffix,
|
||||
getString(R.string.lang_ru),
|
||||
getString(R.string.lang_sc),
|
||||
getString(R.string.lang_sr) + incompleteSuffix,
|
||||
|
@ -246,11 +241,12 @@ public class SettingsGeneralActivity extends SettingsBaseActivity implements OnR
|
|||
getString(R.string.lang_sl),
|
||||
getString(R.string.lang_es),
|
||||
getString(R.string.lang_sv),
|
||||
getString(R.string.lang_tr) + incompleteSuffix,
|
||||
getString(R.string.lang_tr),
|
||||
getString(R.string.lang_uk),
|
||||
getString(R.string.lang_vi) + incompleteSuffix,
|
||||
getString(R.string.lang_cy) + incompleteSuffix,};
|
||||
registerListPreference(settings.PREFERRED_LOCALE, screen, entries, entrieValues);
|
||||
|
||||
// Display "Device language" in Latin for all non-en languages
|
||||
if (!getResources().getString(R.string.preferred_locale).equals(getResources().getString(R.string.preferred_locale_no_translate))) {
|
||||
((ListPreference) screen.findPreference(settings.PREFERRED_LOCALE.getId())).setTitle(getString(R.string.preferred_locale) + " (" + getString(R.string.preferred_locale_no_translate) + ")");
|
||||
|
|
Loading…
Reference in a new issue