From 6a1ddad8f8d9875fcd33c111af936338e0d642be Mon Sep 17 00:00:00 2001 From: Dav999-v Date: Wed, 7 Dec 2022 21:03:01 +0100 Subject: [PATCH] Add cases for intermission replay options, button fillers in editor The strings "Vitellary"/"Vermilion"/"Verdigris"/"Victoria" now have two cases to support changing them for the intermission replay menu options (like "with Vitellary"). Also, the string "< and > keys change tool" is now "{button1} and {button2} keys change tool", so it can be changed dynamically without having to retranslate the string. --- desktop_version/lang/en/strings.xml | 14 +++++++++----- desktop_version/lang/eo/strings.xml | 14 +++++++++----- desktop_version/lang/es/strings.xml | 14 +++++++++----- desktop_version/lang/nl/strings.xml | 14 +++++++++----- desktop_version/src/Editor.cpp | 7 ++++++- desktop_version/src/Game.cpp | 16 ++++++++-------- 6 files changed, 50 insertions(+), 29 deletions(-) diff --git a/desktop_version/lang/en/strings.xml b/desktop_version/lang/en/strings.xml index 79f47aff..57b2198d 100644 --- a/desktop_version/lang/en/strings.xml +++ b/desktop_version/lang/en/strings.xml @@ -555,7 +555,7 @@ - + @@ -653,10 +653,14 @@ You have found the secret lab!" translation="" explanation="" max="34*4"/> - - - - + + + + + + + + diff --git a/desktop_version/lang/eo/strings.xml b/desktop_version/lang/eo/strings.xml index 4f6f4a4a..cfce21ca 100644 --- a/desktop_version/lang/eo/strings.xml +++ b/desktop_version/lang/eo/strings.xml @@ -555,7 +555,7 @@ - + @@ -659,10 +659,14 @@ Vi trovis la sekretan labon!" explanation="" max="34*4"/> - - - - + + + + + + + + diff --git a/desktop_version/lang/es/strings.xml b/desktop_version/lang/es/strings.xml index 2018dbad..ea31c9d0 100644 --- a/desktop_version/lang/es/strings.xml +++ b/desktop_version/lang/es/strings.xml @@ -555,7 +555,7 @@ - + @@ -653,10 +653,14 @@ You have found the secret lab!" translation="" explanation="" max="34*4"/> - - - - + + + + + + + + diff --git a/desktop_version/lang/nl/strings.xml b/desktop_version/lang/nl/strings.xml index ef22fdd0..a312cba2 100644 --- a/desktop_version/lang/nl/strings.xml +++ b/desktop_version/lang/nl/strings.xml @@ -555,7 +555,7 @@ - + @@ -660,10 +660,14 @@ Je hebt het geheime lab gevonden!" explanation="" max="34*4"/> - - - - + + + + + + + + diff --git a/desktop_version/src/Editor.cpp b/desktop_version/src/Editor.cpp index 4d9c24ff..495a49bf 100644 --- a/desktop_version/src/Editor.cpp +++ b/desktop_version/src/Editor.cpp @@ -1392,7 +1392,12 @@ void editorrender(void) graphics.Print(4, 232, "2/2", 196, 196, 255 - help.glow, false); } - const char* changetooltext = loc::gettext("< and > keys change tool"); + char changetooltext[SCREEN_WIDTH_CHARS + 1]; + vformat_buf(changetooltext, sizeof(changetooltext), + loc::gettext("{button1} and {button2} keys change tool"), + "button1:str, button2:str", + ",", "." + ); graphics.Print(320-graphics.len(changetooltext), 232, changetooltext, 196, 196, 255 - help.glow, false); const char* toolname; diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index b7b3d188..29f65f47 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -6692,19 +6692,19 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ ) break; case Menu::playint1: start_translator_exploring = false; - option(loc::gettext("Vitellary")); - option(loc::gettext("Vermilion")); - option(loc::gettext("Verdigris")); - option(loc::gettext("Victoria")); + option(loc::gettext_case("Vitellary", 1)); + option(loc::gettext_case("Vermilion", 1)); + option(loc::gettext_case("Verdigris", 1)); + option(loc::gettext_case("Victoria", 1)); option(loc::gettext("return")); menuyoff = 10; break; case Menu::playint2: start_translator_exploring = false; - option(loc::gettext("Vitellary")); - option(loc::gettext("Vermilion")); - option(loc::gettext("Verdigris")); - option(loc::gettext("Victoria")); + option(loc::gettext_case("Vitellary", 1)); + option(loc::gettext_case("Vermilion", 1)); + option(loc::gettext_case("Verdigris", 1)); + option(loc::gettext_case("Victoria", 1)); option(loc::gettext("return")); menuyoff = 10; break;