From fff7bc606fc30f02ebc6ad3f429035243383a754 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 22 Aug 2018 15:31:20 +0200 Subject: Style warnings fixes. --- src/main/kotlin/pl/treksoft/kvision/i18n/I18n.kt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/kotlin/pl/treksoft/kvision/i18n') 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 { 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 { -- cgit