1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-01 14:32:54 +01:00

Mi Band 3/4: Use language list from coordinator, remove array

This commit is contained in:
Andreas Shimokawa 2021-10-07 14:52:21 +02:00
parent bef015b0c2
commit 588bcffaab
5 changed files with 55 additions and 57 deletions

View File

@ -109,8 +109,6 @@ public class AmazfitBipUCoordinator extends HuamiCoordinator {
public String[] getSupportedLanguageSettings(GBDevice device) {
return new String[]{
"auto",
"zh_CH",
"zh_TW",
"cs_CZ",
"de_DE",
"el_GR",
@ -126,9 +124,11 @@ public class AmazfitBipUCoordinator extends HuamiCoordinator {
"pt_BR",
"ru_RU",
"th_TH",
"tr_TR",
"uk_UA",
"vi_VN",
"tr_TR",
"zh_CH",
"zh_TW",
};
}

View File

@ -117,4 +117,30 @@ public class MiBand3Coordinator extends HuamiCoordinator {
R.xml.devicesettings_pairingkey
};
}
@Override
public String[] getSupportedLanguageSettings(GBDevice device) {
return new String[]{
"auto",
"ar_SA",
"de_DE",
"en_US",
"es_ES",
"fr_FR",
"id_ID",
"it_IT",
"ja_JP",
"ko_KO",
"pt_PT",
"nl_NL",
"pl_PL",
"ru_RU",
"th_TH",
"tr_TR",
"uk_UA",
"vi_VN",
"zh_CN",
"zh_TW",
};
}
}

View File

@ -105,6 +105,32 @@ public class MiBand4Coordinator extends HuamiCoordinator {
};
}
@Override
public String[] getSupportedLanguageSettings(GBDevice device) {
return new String[]{
"auto",
"ar_SA",
"de_DE",
"el_GR",
"en_US",
"es_ES",
"fr_FR",
"id_ID",
"it_IT",
"ja_JP",
"ko_KO",
"pt_PT",
"pl_PL",
"ru_RU",
"th_TH",
"tr_TR",
"uk_UA",
"vi_VN",
"zh_CN",
"zh_TW",
};
}
@Override
public int getBondingStyle() {
return BONDING_STYLE_REQUIRE_KEY;

View File

@ -1364,52 +1364,6 @@
<item>ru_RU</item>
</string-array>
<string-array name="pref_miband3_language">
<item name="auto">@string/automatic</item>
<item name="zh_CN">@string/simplified_chinese</item>
<item name="zh_TW">@string/traditional_chinese</item>
<item name="en_US">@string/english</item>
<item name="es_ES">@string/spanish</item>
<item name="de_DE">@string/german</item>
<item name="it_IT">@string/italian</item>
<item name="fr_FR">@string/french</item>
<item name="pt_PT">@string/portuguese</item>
<item name="nl_NL">@string/dutch</item>
<item name="pl_PL">@string/polish</item>
<item name="tr_TR">@string/turkish</item>
<item name="ru_RU">@string/russian</item>
<item name="uk_UA">@string/ukrainian</item>
<item name="ar_SA">@string/arabic</item>
<item name="id_ID">@string/indonesian</item>
<item name="th_TH">@string/thai</item>
<item name="vi_VN">@string/vietnamese</item>
<item name="ja_JP">@string/japanese</item>
<item name="ko_KO">@string/korean</item>
</string-array>
<string-array name="pref_miband3_language_values">
<item>auto</item>
<item>zh_CN</item>
<item>zh_TW</item>
<item>en_US</item>
<item>es_ES</item>
<item>de_DE</item>
<item>it_IT</item>
<item>fr_FR</item>
<item>pt_PT</item>
<item>nl_NL</item>
<item>pl_PL</item>
<item>tr_TR</item>
<item>ru_RU</item>
<item>uk_UA</item>
<item>ar_SA</item>
<item>id_ID</item>
<item>th_TH</item>
<item>vi_VN</item>
<item>ja_JP</item>
<item>ko_KO</item>
</string-array>
<string-array name="pref_miband5_language">
<item name="auto">@string/automatic</item>
<item name="zh_CN">@string/simplified_chinese</item>

View File

@ -10,12 +10,4 @@
android:persistent="true"
android:summary="@string/mi2_prefs_display_items_summary"
android:title="@string/mi2_prefs_display_items" />
<ListPreference
android:icon="@drawable/ic_language"
android:defaultValue="auto"
android:entries="@array/pref_miband3_language"
android:entryValues="@array/pref_miband3_language_values"
android:key="language"
android:summary="%s"
android:title="@string/pref_title_language" />
</androidx.preference.PreferenceScreen>