diff --git a/feature/settings/src/main/java/com/sadellie/unitto/feature/settings/language/LanguageScreen.kt b/feature/settings/src/main/java/com/sadellie/unitto/feature/settings/language/LanguageScreen.kt index 6836a10e..8c155881 100644 --- a/feature/settings/src/main/java/com/sadellie/unitto/feature/settings/language/LanguageScreen.kt +++ b/feature/settings/src/main/java/com/sadellie/unitto/feature/settings/language/LanguageScreen.kt @@ -53,21 +53,6 @@ import com.sadellie.unitto.core.ui.common.UnittoScreenWithLargeTopBar import com.sadellie.unitto.core.ui.common.squashable import com.sadellie.unitto.core.ui.openLink -private val languages = mapOf( - "" to R.string.system, - "en" to R.string.locale_en, - "en-GB" to R.string.locale_en_rGB, - "de" to R.string.locale_de, - "es" to R.string.locale_es, - "fr" to R.string.locale_fr, - "hu" to R.string.locale_hu, - "id" to R.string.locale_in, - "it" to R.string.locale_it, - "nl" to R.string.locale_nl, - "ru" to R.string.locale_ru, - "tr" to R.string.locale_tr, -) - @Composable internal fun LanguageRoute( navigateUp: () -> Unit, diff --git a/feature/settings/src/main/java/com/sadellie/unitto/feature/settings/language/Languages.kt b/feature/settings/src/main/java/com/sadellie/unitto/feature/settings/language/Languages.kt new file mode 100644 index 00000000..cae737d6 --- /dev/null +++ b/feature/settings/src/main/java/com/sadellie/unitto/feature/settings/language/Languages.kt @@ -0,0 +1,38 @@ +/* + * Unitto is a unit converter for Android + * Copyright (c) 2023 Elshan Agaev + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.sadellie.unitto.feature.settings.language + +import com.sadellie.unitto.core.base.R + +internal val languages by lazy { + mapOf( + "" to R.string.system, + "en" to R.string.locale_en, + "en-GB" to R.string.locale_en_rGB, + "de" to R.string.locale_de, + "es" to R.string.locale_es, + "fr" to R.string.locale_fr, + "hu" to R.string.locale_hu, + "id" to R.string.locale_in, + "it" to R.string.locale_it, + "nl" to R.string.locale_nl, + "ru" to R.string.locale_ru, + "tr" to R.string.locale_tr, + ) +}