FullscreenUI: More localization fixes

This commit is contained in:
Stenzek 2023-11-29 23:11:28 +10:00
parent 4ac4388b08
commit dfb27c14be
No known key found for this signature in database
3 changed files with 5 additions and 3 deletions

View file

@ -13,7 +13,7 @@ with open(src_file, "r") as f:
full_source = f.read() full_source = f.read()
strings = set() 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) token_len = len(token)
last_pos = 0 last_pos = 0
while True: while True:

View file

@ -138,7 +138,7 @@ std::vector<std::pair<std::string, std::string>> Controller::GetControllerTypeNa
{ {
std::vector<std::pair<std::string, std::string>> ret; std::vector<std::pair<std::string, std::string>> ret;
for (const ControllerInfo* info : s_controller_info) 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; return ret;
} }

View file

@ -3380,7 +3380,7 @@ void FullscreenUI::DrawControllerSettingsPage()
const std::string type(bsi->GetStringValue(section.c_str(), "Type", Controller::GetDefaultPadType(global_slot))); const std::string type(bsi->GetStringValue(section.c_str(), "Type", Controller::GetDefaultPadType(global_slot)));
const Controller::ControllerInfo* ci = Controller::GetControllerInfo(type); const Controller::ControllerInfo* ci = Controller::GetControllerInfo(type);
if (MenuButton(TinyString::from_fmt("{}##type{}", FSUI_ICONSTR(ICON_FA_GAMEPAD, "Controller Type"), global_slot), 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<std::pair<std::string, std::string>> raw_options(Controller::GetControllerTypeNames()); std::vector<std::pair<std::string, std::string>> raw_options(Controller::GetControllerTypeNames());
ImGuiFullscreen::ChoiceDialogOptions options; ImGuiFullscreen::ChoiceDialogOptions options;
@ -7127,6 +7127,8 @@ TRANSLATE_NOOP("FullscreenUI", "Resume Game");
TRANSLATE_NOOP("FullscreenUI", "Rewind Save Frequency"); TRANSLATE_NOOP("FullscreenUI", "Rewind Save Frequency");
TRANSLATE_NOOP("FullscreenUI", "Rewind Save Slots"); 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 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", "Rich presence inactive or unsupported.");
TRANSLATE_NOOP("FullscreenUI", "Runahead"); TRANSLATE_NOOP("FullscreenUI", "Runahead");
TRANSLATE_NOOP("FullscreenUI", "Runahead/Rewind"); TRANSLATE_NOOP("FullscreenUI", "Runahead/Rewind");