-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement app language change on settings (#252)
* Implement multiplatform strings on FolderInsert * Implement multiplatform strings on Settings * Implement multiplatform strings on FolderList * Implement multiplatform strings on FolderPreview * Implement multiplatform strings on Android App * Implement multiplatform strings on Search * Implement multiplatform strings on Monster Content * Implement multiplatform strings on Monster Detail * Fix ioS monster detail state changes * iOS: Remove localizable strings * Improve ios flow * Make iosFlow internal * Implement multiplatform strings on Monster Registration
- Loading branch information
1 parent
74d142c
commit d5bd39d
Showing
194 changed files
with
3,378 additions
and
2,967 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
app/src/main/kotlin/br/alexandregpereira/hunter/app/MainStrings.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package br.alexandregpereira.hunter.app | ||
|
||
import br.alexandregpereira.hunter.localization.Language | ||
|
||
interface MainStrings { | ||
val compendium: String | ||
val search: String | ||
val folders: String | ||
val menu: String | ||
} | ||
|
||
internal data class MainEnStrings( | ||
override val compendium: String = "Compendium", | ||
override val search: String = "Search", | ||
override val folders: String = "Folders", | ||
override val menu: String = "Menu", | ||
) : MainStrings | ||
|
||
internal data class MainPtStrings( | ||
override val compendium: String = "Compêndio", | ||
override val search: String = "Buscar", | ||
override val folders: String = "Pastas", | ||
override val menu: String = "Menu", | ||
) : MainStrings | ||
|
||
internal data class MainEmptyStrings( | ||
override val compendium: String = "", | ||
override val search: String = "", | ||
override val folders: String = "", | ||
override val menu: String = "", | ||
) : MainStrings | ||
|
||
internal fun Language.getStrings(): MainStrings { | ||
return when (this) { | ||
Language.ENGLISH -> MainEnStrings() | ||
Language.PORTUGUESE -> MainPtStrings() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 27 additions & 3 deletions
30
...calization/src/commonMain/kotlin/br/alexandregpereira/hunter/localization/Localization.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.