Skip to content

Commit

Permalink
feat(i18n): Add Ukrainian Language
Browse files Browse the repository at this point in the history
  • Loading branch information
xz-dev committed Apr 24, 2023
1 parent 07f9564 commit 952b672
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/net/xzos/upgradeall/data/PreferencesMap.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import net.xzos.upgradeall.data.constants.DEFAULT_REPO_URL
import net.xzos.upgradeall.server.update.UpdateServiceBroadcastReceiver
import net.xzos.upgradeall.ui.home.MainActivity
import net.xzos.upgradeall.utils.file.SDK_CACHE_DIR
import java.util.*
import java.util.Locale


object PreferencesMap {
Expand Down Expand Up @@ -123,7 +123,7 @@ object PreferencesMap {
get() {
return if (locale_custom) {
val (language, country) = prefs.getString(LANGUAGE_LOCALE_CODE_KEY, null)
?.split("_", "-") // 兼容旧版本错误的下划线语言代码格式
?.split("_", "-")?.plus("") // 兼容旧版本错误的下划线语言代码格式
?: return null
Locale(language, country)
} else {
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,8 @@
<item>
tr-TR
</item>
<item>
uk_UA
</item>
</string-array>
</resources>

0 comments on commit 952b672

Please sign in to comment.