From dfb27c14bedf8b8a90b2fcd28fbdbfe70c63c08d Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 29 Nov 2023 23:11:28 +1000 Subject: [PATCH] FullscreenUI: More localization fixes --- scripts/generate_fullscreen_ui_translation_strings.py | 2 +- src/core/controller.cpp | 2 +- src/core/fullscreen_ui.cpp | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/generate_fullscreen_ui_translation_strings.py b/scripts/generate_fullscreen_ui_translation_strings.py index eed2af503..d589e84c2 100644 --- a/scripts/generate_fullscreen_ui_translation_strings.py +++ b/scripts/generate_fullscreen_ui_translation_strings.py @@ -13,7 +13,7 @@ with open(src_file, "r") as f: full_source = f.read() strings = set() -for token in ["FSUI_STR", "FSUI_CSTR", "FSUI_FSTR", "FSUI_NSTR", "FSUI_ICONSTR"]: +for token in ["FSUI_STR", "FSUI_CSTR", "FSUI_FSTR", "FSUI_NSTR", "FSUI_ICONSTR", "FSUI_VSTR"]: token_len = len(token) last_pos = 0 while True: diff --git a/src/core/controller.cpp b/src/core/controller.cpp index d8376b836..1ffa5a247 100644 --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -138,7 +138,7 @@ std::vector> Controller::GetControllerTypeNa { std::vector> ret; for (const ControllerInfo* info : s_controller_info) - ret.emplace_back(info->name, info->display_name); + ret.emplace_back(info->name, Host::TranslateToString(info->name, info->display_name)); return ret; } diff --git a/src/core/fullscreen_ui.cpp b/src/core/fullscreen_ui.cpp index f7734324f..b37e9b9f4 100644 --- a/src/core/fullscreen_ui.cpp +++ b/src/core/fullscreen_ui.cpp @@ -3380,7 +3380,7 @@ void FullscreenUI::DrawControllerSettingsPage() const std::string type(bsi->GetStringValue(section.c_str(), "Type", Controller::GetDefaultPadType(global_slot))); const Controller::ControllerInfo* ci = Controller::GetControllerInfo(type); if (MenuButton(TinyString::from_fmt("{}##type{}", FSUI_ICONSTR(ICON_FA_GAMEPAD, "Controller Type"), global_slot), - ci ? ci->display_name : FSUI_CSTR("Unknown"))) + ci ? Host::TranslateToCString(ci->name, ci->display_name) : FSUI_CSTR("Unknown"))) { std::vector> raw_options(Controller::GetControllerTypeNames()); ImGuiFullscreen::ChoiceDialogOptions options; @@ -7127,6 +7127,8 @@ TRANSLATE_NOOP("FullscreenUI", "Resume Game"); TRANSLATE_NOOP("FullscreenUI", "Rewind Save Frequency"); TRANSLATE_NOOP("FullscreenUI", "Rewind Save Slots"); TRANSLATE_NOOP("FullscreenUI", "Rewind for {0} frames, lasting {1:.2f} seconds will require up to {2} MB of RAM and {3} MB of VRAM."); +TRANSLATE_NOOP("FullscreenUI", "Rewind is disabled because runahead is enabled. Runahead will significantly increase system requirements."); +TRANSLATE_NOOP("FullscreenUI", "Rewind is not enabled. Please note that enabling rewind may significantly increase system requirements."); TRANSLATE_NOOP("FullscreenUI", "Rich presence inactive or unsupported."); TRANSLATE_NOOP("FullscreenUI", "Runahead"); TRANSLATE_NOOP("FullscreenUI", "Runahead/Rewind");