Skip to content

Commit

Permalink
FullscreenUI: More localization fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Nov 29, 2023
1 parent 4ac4388 commit dfb27c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/generate_fullscreen_ui_translation_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
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:
Expand Down
2 changes: 1 addition & 1 deletion src/core/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ std::vector<std::pair<std::string, std::string>> Controller::GetControllerTypeNa
{
std::vector<std::pair<std::string, std::string>> 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;
}
Expand Down
4 changes: 3 additions & 1 deletion src/core/fullscreen_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::pair<std::string, std::string>> raw_options(Controller::GetControllerTypeNames());
ImGuiFullscreen::ChoiceDialogOptions options;
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit dfb27c1

Please sign in to comment.