Skip to content

Commit

Permalink
Move locales from file to array
Browse files Browse the repository at this point in the history
To fix line separator bugs.
  • Loading branch information
wyskoj committed Sep 9, 2023
1 parent f697e04 commit c404b0a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,17 @@ object I18n {

private var _strings: MutableState<ResourceBundle> = mutableStateOf(getStringsFromResourceBundle(_currentLocale))

private val supportedLocales =
I18n::class.java.getResource("/supported-i18n.txt")!!.readText().split(System.lineSeparator()).map { Locale(it) }
private val supportedLocales = arrayOf(
"en",
"es",
"fi",
"fr",
"no",
"ru",
"th",
"tl",
"zh",
).map { Locale(it) }

/**
* Gets the string associated with the given key.
Expand Down
9 changes: 0 additions & 9 deletions src/main/resources/supported-i18n.txt

This file was deleted.

0 comments on commit c404b0a

Please sign in to comment.