From 3357ce9ee2ae4b963918d16416a8540ae4fcd80b Mon Sep 17 00:00:00 2001 From: NotMyWing Date: Sat, 12 Jun 2021 16:23:40 +1100 Subject: [PATCH] Rework splash.text in Russian i18n Closes #92 --- .../amongus/gamemode/lang/au_default_ru.moon | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/gamemodes/amongus/gamemode/lang/au_default_ru.moon b/src/gamemodes/amongus/gamemode/lang/au_default_ru.moon index 17c3420..84ea874 100644 --- a/src/gamemodes/amongus/gamemode/lang/au_default_ru.moon +++ b/src/gamemodes/amongus/gamemode/lang/au_default_ru.moon @@ -122,14 +122,18 @@ with GM.Lang\Get "ru" ["splash.text"] = (isPlaying, imposterCount) -> amongSubtext = isPlaying and "нас" or "них" - return string.format (switch remaining % 10 - when 1 - "%s Предатель среди #{amongSubtext}" - when 2, 3, 4 - "%s Предателя среди #{amongSubtext}" - else - "%s Предателей среди #{amongSubtext}" - ), imposterCount + imposterWord = "Предателей" + + imposterCountMod = imposterCount % 100 + if imposterCountMod <= 10 or imposterCountMod >= 20 + imposterCountMod %= 10 + + imposterWord = if imposterCountMod > 1 and imposterCountMod < 5 + "Предателя" + elseif imposterCountMod == 1 + "Предатель" + + string.format "%s %s среди %s", imposterCount, imposterWord, amongSubtext ["hud.sabotageAndKill"] = "Устраивай саботажи и убивай всех." ["hud.countdown"] = "Начало через %d"