Skip to content

Commit

Permalink
add portuguese translator
Browse files Browse the repository at this point in the history
  • Loading branch information
Razeeman committed Feb 3, 2024
1 parent 4abe584 commit bfd10c6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/src/main/res/xml/locales_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<locale android:name="@string/settings_korean_tag"/>
<locale android:name="@string/settings_dutch_tag"/>
<locale android:name="@string/settings_portuguese_tag"/>
<locale android:name="@string/settings_portuguese_portugal_tag"/>
<locale android:name="@string/settings_russian_tag"/>
<locale android:name="@string/settings_swedish_tag"/>
<locale android:name="@string/settings_vietnamese_tag"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class LanguageInteractor @Inject constructor(
is AppLanguage.Korean -> R.string.settings_korean_language
is AppLanguage.Dutch -> R.string.settings_dutch_language
is AppLanguage.Portuguese -> R.string.settings_portuguese_language
is AppLanguage.PortuguesePortugal -> R.string.settings_portuguese_portugal_language
is AppLanguage.Russian -> R.string.settings_russian_language
is AppLanguage.Swedish -> R.string.settings_swedish_language
is AppLanguage.Vietnamese -> R.string.settings_vietnamese_language
Expand Down Expand Up @@ -66,6 +67,7 @@ class LanguageInteractor @Inject constructor(
is AppLanguage.Korean -> R.string.settings_korean_tag
is AppLanguage.Dutch -> R.string.settings_dutch_tag
is AppLanguage.Portuguese -> R.string.settings_portuguese_tag
is AppLanguage.PortuguesePortugal -> R.string.settings_portuguese_portugal_tag
is AppLanguage.Russian -> R.string.settings_russian_tag
is AppLanguage.Swedish -> R.string.settings_swedish_tag
is AppLanguage.Vietnamese -> R.string.settings_vietnamese_tag
Expand All @@ -79,7 +81,8 @@ class LanguageInteractor @Inject constructor(
fun getTranslators(language: AppLanguage): String {
return when (language) {
is AppLanguage.System,
is AppLanguage.English -> return ""
is AppLanguage.English,
-> return ""

is AppLanguage.Arabic -> R.string.settings_arabic_translators
is AppLanguage.Catalan -> R.string.settings_catalan_translators
Expand All @@ -94,6 +97,7 @@ class LanguageInteractor @Inject constructor(
is AppLanguage.Korean -> R.string.settings_korean_translators
is AppLanguage.Dutch -> R.string.settings_dutch_translators
is AppLanguage.Portuguese -> R.string.settings_portuguese_translators
is AppLanguage.PortuguesePortugal -> R.string.settings_portuguese_portugal_translators
is AppLanguage.Russian -> R.string.settings_russian_translators
is AppLanguage.Swedish -> R.string.settings_swedish_translators
is AppLanguage.Vietnamese -> R.string.settings_vietnamese_translators
Expand Down Expand Up @@ -130,6 +134,7 @@ class LanguageInteractor @Inject constructor(
AppLanguage.Korean,
AppLanguage.Dutch,
AppLanguage.Portuguese,
AppLanguage.PortuguesePortugal,
AppLanguage.Russian,
AppLanguage.Swedish,
AppLanguage.Vietnamese,
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions core/src/main/res/values/translators.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
<string name="settings_portuguese_language" translatable="false">Português</string>
<string name="settings_portuguese_tag" translatable="false">pt</string>

<string name="settings_portuguese_portugal_translators" translatable="false">Flávio Correia Marta</string>
<string name="settings_portuguese_portugal_language" translatable="false">Português (Portugal)</string>
<string name="settings_portuguese_portugal_tag" translatable="false">pt-Pt</string>

<string name="settings_russian_translators" translatable="false">Геннадий Щерба</string>
<string name="settings_russian_language" translatable="false">Русский</string>
<string name="settings_russian_tag" translatable="false">ru</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ sealed interface AppLanguage {
object Korean : AppLanguage
object Dutch : AppLanguage
object Portuguese : AppLanguage
object PortuguesePortugal : AppLanguage
object Russian : AppLanguage
object Swedish : AppLanguage
object Vietnamese : AppLanguage
Expand Down

0 comments on commit bfd10c6

Please sign in to comment.