Skip to content

Commit 952b672

Browse files
committed
feat(i18n): Add Ukrainian Language
1 parent 07f9564 commit 952b672

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

app/src/main/java/net/xzos/upgradeall/data/PreferencesMap.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import net.xzos.upgradeall.data.constants.DEFAULT_REPO_URL
1818
import net.xzos.upgradeall.server.update.UpdateServiceBroadcastReceiver
1919
import net.xzos.upgradeall.ui.home.MainActivity
2020
import net.xzos.upgradeall.utils.file.SDK_CACHE_DIR
21-
import java.util.*
21+
import java.util.Locale
2222

2323

2424
object PreferencesMap {
@@ -123,7 +123,7 @@ object PreferencesMap {
123123
get() {
124124
return if (locale_custom) {
125125
val (language, country) = prefs.getString(LANGUAGE_LOCALE_CODE_KEY, null)
126-
?.split("_", "-") // 兼容旧版本错误的下划线语言代码格式
126+
?.split("_", "-")?.plus("") // 兼容旧版本错误的下划线语言代码格式
127127
?: return null
128128
Locale(language, country)
129129
} else {

app/src/main/res/values/arrays.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,8 @@
7878
<item>
7979
tr-TR
8080
</item>
81+
<item>
82+
uk_UA
83+
</item>
8184
</string-array>
8285
</resources>

0 commit comments

Comments
 (0)