From 97562205a91e24bb7154c780ad6010459d4550b1 Mon Sep 17 00:00:00 2001 From: Christian Jensen Date: Tue, 2 Apr 2019 13:40:09 +0200 Subject: [PATCH 1/4] Started work on adding Danish --- .../main/res/layout/fragment_introduction.xml | 1 + .../java/com/hbb20/CountryCodePicker.java | 1 + ccp/src/main/res/raw/danish.xml | 1221 +++++++++++++++++ ccp/src/main/res/values/attrs.xml | 47 +- 4 files changed, 1247 insertions(+), 23 deletions(-) create mode 100644 ccp/src/main/res/raw/danish.xml diff --git a/app/src/main/res/layout/fragment_introduction.xml b/app/src/main/res/layout/fragment_introduction.xml index 57191d33..9278a5f0 100644 --- a/app/src/main/res/layout/fragment_introduction.xml +++ b/app/src/main/res/layout/fragment_introduction.xml @@ -115,6 +115,7 @@ android:id="@+id/ccp" android:layout_width="wrap_content" android:layout_height="wrap_content" + app:ccp_defaultLanguage="DANISH" app:ccpDialog_keyboardAutoPopup="false" app:ccp_autoDetectCountry="true" app:ccp_hintExampleNumber="true" /> diff --git a/ccp/src/main/java/com/hbb20/CountryCodePicker.java b/ccp/src/main/java/com/hbb20/CountryCodePicker.java index ae974da3..eaed67f4 100644 --- a/ccp/src/main/java/com/hbb20/CountryCodePicker.java +++ b/ccp/src/main/java/com/hbb20/CountryCodePicker.java @@ -2309,6 +2309,7 @@ public enum Language { CHINESE_SIMPLIFIED("zh", "CN", "Hans"), CHINESE_TRADITIONAL("zh", "TW", "Hant"), CZECH("cs"), + DANISH("da"), DUTCH("nl"), ENGLISH("en"), FARSI("fa"), diff --git a/ccp/src/main/res/raw/danish.xml b/ccp/src/main/res/raw/danish.xml new file mode 100644 index 00000000..5d760234 --- /dev/null +++ b/ccp/src/main/res/raw/danish.xml @@ -0,0 +1,1221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ccp/src/main/res/values/attrs.xml b/ccp/src/main/res/values/attrs.xml index 6b4be447..b0a81cc2 100644 --- a/ccp/src/main/res/values/attrs.xml +++ b/ccp/src/main/res/values/attrs.xml @@ -76,29 +76,30 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + From 33496f3c76691d1af5fa82b6c2d22e48d98602f9 Mon Sep 17 00:00:00 2001 From: Christian Jensen Date: Tue, 2 Apr 2019 14:24:56 +0200 Subject: [PATCH 2/4] Translated countries --- ccp/src/main/res/raw/danish.xml | 98 ++++++++++++++++----------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/ccp/src/main/res/raw/danish.xml b/ccp/src/main/res/raw/danish.xml index 5d760234..2f053e2c 100644 --- a/ccp/src/main/res/raw/danish.xml +++ b/ccp/src/main/res/raw/danish.xml @@ -33,12 +33,12 @@ name_code="ai" phone_code="1" /> @@ -48,7 +48,7 @@ name_code="ao" phone_code="244" /> @@ -63,12 +63,12 @@ name_code="as" phone_code="1" /> @@ -78,7 +78,7 @@ name_code="aw" phone_code="297" /> @@ -103,7 +103,7 @@ name_code="bd" phone_code="880" /> @@ -113,7 +113,7 @@ name_code="bf" phone_code="226" /> @@ -233,7 +233,7 @@ name_code="cm" phone_code="237" /> @@ -268,17 +268,17 @@ name_code="cx" phone_code="61" /> @@ -288,7 +288,7 @@ name_code="dj" phone_code="253" /> @@ -303,7 +303,7 @@ name_code="do" phone_code="1" /> @@ -313,12 +313,12 @@ name_code="ec" phone_code="593" /> @@ -328,12 +328,12 @@ name_code="er" phone_code="291" /> @@ -363,7 +363,7 @@ name_code="fo" phone_code="298" /> @@ -373,7 +373,7 @@ name_code="ga" phone_code="241" /> @@ -383,7 +383,7 @@ name_code="gd" phone_code="1" /> @@ -408,7 +408,7 @@ name_code="gi" phone_code="350" /> @@ -433,7 +433,7 @@ name_code="gq" phone_code="240" /> @@ -468,7 +468,7 @@ name_code="hn" phone_code="504" /> @@ -478,17 +478,17 @@ name_code="ht" phone_code="509" /> @@ -503,7 +503,7 @@ name_code="im" phone_code="44" /> @@ -518,7 +518,7 @@ name_code="io" phone_code="246" /> @@ -528,7 +528,7 @@ name_code="ir" phone_code="98" /> @@ -583,12 +583,12 @@ name_code="kn" phone_code="1" /> @@ -643,7 +643,7 @@ name_code="ls" phone_code="266" /> @@ -653,12 +653,12 @@ name_code="lu" phone_code="352" /> @@ -713,7 +713,7 @@ name_code="mm" phone_code="95" /> @@ -753,7 +753,7 @@ name_code="mu" phone_code="230" /> @@ -808,12 +808,12 @@ name_code="ni" phone_code="505" /> @@ -873,7 +873,7 @@ name_code="pk" phone_code="92" /> @@ -893,7 +893,7 @@ name_code="pr" phone_code="1" /> @@ -923,12 +923,12 @@ name_code="re" phone_code="262" /> @@ -943,7 +943,7 @@ name_code="rw" phone_code="250" /> @@ -963,7 +963,7 @@ name_code="sd" phone_code="249" /> @@ -978,12 +978,12 @@ name_code="sh" phone_code="290" /> @@ -1083,7 +1083,7 @@ name_code="tm" phone_code="993" /> @@ -1093,7 +1093,7 @@ name_code="to" phone_code="676" /> From 701ab098985d3320fbc5c0b94d2d8de2a3693fe4 Mon Sep 17 00:00:00 2001 From: Christian Jensen Date: Tue, 2 Apr 2019 15:17:27 +0200 Subject: [PATCH 3/4] Even more translations (this time Google Translate) --- ccp/src/main/res/raw/danish.xml | 44 ++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/ccp/src/main/res/raw/danish.xml b/ccp/src/main/res/raw/danish.xml index 2f053e2c..8984a4f2 100644 --- a/ccp/src/main/res/raw/danish.xml +++ b/ccp/src/main/res/raw/danish.xml @@ -13,7 +13,7 @@ name_code="ad" phone_code="376" /> @@ -23,7 +23,7 @@ name_code="af" phone_code="93" /> @@ -58,7 +58,7 @@ name_code="ar" phone_code="54" /> @@ -88,7 +88,7 @@ name_code="az" phone_code="994" /> @@ -148,12 +148,12 @@ name_code="bn" phone_code="673" /> @@ -173,7 +173,7 @@ name_code="bw" phone_code="267" /> @@ -188,12 +188,12 @@ name_code="ca" phone_code="1" /> @@ -208,17 +208,17 @@ name_code="cg" phone_code="242" /> @@ -228,7 +228,7 @@ name_code="cl" phone_code="56" /> @@ -263,7 +263,7 @@ name_code="cw" phone_code="599" /> @@ -298,7 +298,7 @@ name_code="dm" phone_code="1" /> @@ -348,17 +348,17 @@ name_code="fj" phone_code="679" /> @@ -388,7 +388,7 @@ name_code="ge" phone_code="995" /> @@ -428,7 +428,7 @@ name_code="gp" phone_code="590" /> @@ -523,7 +523,7 @@ name_code="iq" phone_code="964" /> @@ -733,7 +733,7 @@ name_code="mq" phone_code="596" /> From 0107472aa9eb8dd380397f57d057b91bd87170b7 Mon Sep 17 00:00:00 2001 From: Christian Jensen Date: Wed, 3 Apr 2019 09:44:48 +0200 Subject: [PATCH 4/4] Removed default language from sample app --- app/src/main/res/layout/fragment_introduction.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/res/layout/fragment_introduction.xml b/app/src/main/res/layout/fragment_introduction.xml index 9278a5f0..57191d33 100644 --- a/app/src/main/res/layout/fragment_introduction.xml +++ b/app/src/main/res/layout/fragment_introduction.xml @@ -115,7 +115,6 @@ android:id="@+id/ccp" android:layout_width="wrap_content" android:layout_height="wrap_content" - app:ccp_defaultLanguage="DANISH" app:ccpDialog_keyboardAutoPopup="false" app:ccp_autoDetectCountry="true" app:ccp_hintExampleNumber="true" />