diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-08-22 15:31:20 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-08-22 15:31:20 +0200 |
commit | fff7bc606fc30f02ebc6ad3f429035243383a754 (patch) | |
tree | 0fd27a6022114499a32ad27af0612cc7f4c47462 /src/main/kotlin/pl/treksoft/kvision/i18n/I18n.kt | |
parent | 9838b31b28c77cdbe878ca8db982f13fc883f43b (diff) | |
download | kvision-fff7bc606fc30f02ebc6ad3f429035243383a754.tar.gz kvision-fff7bc606fc30f02ebc6ad3f429035243383a754.tar.bz2 kvision-fff7bc606fc30f02ebc6ad3f429035243383a754.zip |
Style warnings fixes.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/i18n/I18n.kt')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/i18n/I18n.kt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/i18n/I18n.kt b/src/main/kotlin/pl/treksoft/kvision/i18n/I18n.kt index ee7bad86..343c18ef 100644 --- a/src/main/kotlin/pl/treksoft/kvision/i18n/I18n.kt +++ b/src/main/kotlin/pl/treksoft/kvision/i18n/I18n.kt @@ -66,6 +66,7 @@ object I18n { Promise.all(promises).then { initCallback() } } + @Suppress("MagicNumber") private fun readMessages(language: String): Promise<Jed> { return Promise { resolve, _ -> val xmlHttpRequest = XMLHttpRequest() @@ -137,6 +138,7 @@ object I18n { gettext(text.substring(I18N_SINGLE_DELIMITER.length)) } else if (text.startsWith(I18N_PLURAL_DELIMITER)) { val tab = text.substring(I18N_PLURAL_DELIMITER.length).split(I18N_PLURAL_DELIMITER) + @Suppress("MagicNumber") if (tab.size == 3) { ngettext(tab[0], tab[1], tab[2].toIntOrNull() ?: 1) } else { |