From 015eeb2378c5fa9866efcfaa6f50c43e95d04cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0tefan=20Baebler?= Date: Tue, 22 Jul 2014 19:14:05 +0200 Subject: [PATCH 1/2] Code formatting Each locale in new line for easier diff --- .../activities/SettingsGeneralActivity.java | 44 +++++++++++++++++-- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java index 22cafc60db..9491e12fdc 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java @@ -169,9 +169,47 @@ public class SettingsGeneralActivity extends SettingsBaseActivity { String incompleteSuffix = " (" + getString(R.string.incomplete_locale) + ")"; //getResources().getAssets().getLocales(); - entrieValues = new String[] { "", "en", "af", "hy", "eu", "be", "bs", "bg", "ca", "cs", "da", "nl", "fi", "fr", - "ka", "de", "el", "iw", "he", "hi", "hu", "id", "it", "ja", "ko", "lv", "lt", "mr", "no", "pl", "pt", - "ro", "ru", "sk", "sl", "es", "sv", "tr", "uk", "vi", "cy" }; + entrieValues = new String[] { "", + "en", + "af", + "hy", + "eu", + "be", + "bs", + "bg", + "ca", + "cs", + "da", + "nl", + "fi", + "fr", + "ka", + "de", + "el", + "iw", + "he", + "hi", + "hu", + "id", + "it", + "ja", + "ko", + "lv", + "lt", + "mr", + "no", + "pl", + "pt", + "ro", + "ru", + "sk", + "sl", + "es", + "sv", + "tr", + "uk", + "vi", + "cy"}; entries = new String[] { getString(R.string.system_locale), getString(R.string.lang_en), getString(R.string.lang_af), From f06c416c9da1e83bb258a51708be76fb76b263ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0tefan=20Baebler?= Date: Tue, 22 Jul 2014 19:38:02 +0200 Subject: [PATCH 2/2] Fixed Norwegian & added 8 new languages: Albanian, Arabic, Croatian, Persian, Sardinian, Serbian, Simplified Chinese, Traditional Chinese from https://hosted.weblate.org/projects/osmand/main/ --- OsmAnd/res/values/strings.xml | 7 +++++ .../activities/SettingsGeneralActivity.java | 29 +++++++++++++++---- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 3974235bca..5529870c52 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -212,12 +212,15 @@ Portuguese (Brazil) English Afrikaans + Albanian + Arabic Armenian Basque Belarusian Bosnian Bulgarian Catalan + Croatian Czech Danish Dutch @@ -242,10 +245,14 @@ Portuguese Romanian Russian + Sardinian + Serbian + Simplified Chinese Slovak Slovenian Spanish Swedish + Traditional Chinese Turkish Ukrainian Vietnamese diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java index 9491e12fdc..e6eb29ab21 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java @@ -167,17 +167,21 @@ public class SettingsGeneralActivity extends SettingsBaseActivity { } 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) + ")"; //getResources().getAssets().getLocales(); entrieValues = new String[] { "", "en", "af", + "al", + "ar", "hy", "eu", "be", "bs", "bg", "ca", + "hr", "cs", "da", "nl", @@ -197,15 +201,20 @@ public class SettingsGeneralActivity extends SettingsBaseActivity { "lv", "lt", "mr", - "no", + "nb", + "fa", "pl", "pt", "ro", "ru", + "sc", + "sr", + "zh-rCN", "sk", "sl", "es", "sv", + "zh-rTW", "tr", "uk", "vi", @@ -213,12 +222,15 @@ public class SettingsGeneralActivity extends SettingsBaseActivity { entries = new String[] { getString(R.string.system_locale), getString(R.string.lang_en), getString(R.string.lang_af), + getString(R.string.lang_al) + incompleteSuffix, + getString(R.string.lang_ar) + incompleteSuffix, getString(R.string.lang_hy) + incompleteSuffix, getString(R.string.lang_eu) + incompleteSuffix, - getString(R.string.lang_be) + incompleteSuffix, + getString(R.string.lang_be), getString(R.string.lang_bs) + incompleteSuffix, getString(R.string.lang_bg) + incompleteSuffix, 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), @@ -228,28 +240,33 @@ public class SettingsGeneralActivity extends SettingsBaseActivity { getString(R.string.lang_de), getString(R.string.lang_el), getString(R.string.lang_iw), - getString(R.string.lang_he) , + getString(R.string.lang_he), 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) + incompleteSuffix, - getString(R.string.lang_ko) + incompleteSuffix, + getString(R.string.lang_ko), getString(R.string.lang_lv), getString(R.string.lang_lt), - getString(R.string.lang_mr), + getString(R.string.lang_mr) + incompleteSuffix, getString(R.string.lang_no) + incompleteSuffix, + getString(R.string.lang_fa), getString(R.string.lang_pl), getString(R.string.lang_pt), getString(R.string.lang_ro), getString(R.string.lang_ru), + getString(R.string.lang_sc) + incompleteSuffix, + getString(R.string.lang_sr) + incompleteSuffix, + getString(R.string.lang_zh_CN) + incompleteSuffix, getString(R.string.lang_sk), getString(R.string.lang_sl), getString(R.string.lang_es), getString(R.string.lang_sv), + getString(R.string.lang_zh_TW), getString(R.string.lang_tr), getString(R.string.lang_uk), - getString(R.string.lang_vi), + getString(R.string.lang_vi) + incompleteSuffix, getString(R.string.lang_cy) + incompleteSuffix,}; registerListPreference(settings.PREFERRED_LOCALE, screen, entries, entrieValues); }