mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-07-18 23:28:11 +00:00
Implement RMLUI string translation via LCE StringTable
Replace hardcoded English strings in RML UI files with {IDS_XXX}
placeholders that are translated at runtime via RmlUi's TranslateString
override, which looks up keys in the LCE StringTable.
- Override SystemInterface_Win64::TranslateString to scan for {KEY}
patterns and resolve them via StringTable::getString(wstring)
- Add GetLCEStringTable() accessor to CConsoleMinecraftApp
- Update PauseMenu.rml, SettingsMenu.rml, HelpOptions.rml with IDS_XXX keys
- Update dynamic dialog SetInnerRML calls in UIScene_PauseMenu.cpp
- Fix CMakePresets.json: remove hardcoded VS2022 ml64.exe path
This commit is contained in:
@@ -303,11 +303,11 @@ void UIScene_PauseMenu::ShowSaveDialog(bool show)
|
||||
|
||||
if (!ProfileManager.IsFullVersion())
|
||||
{
|
||||
if (saveText) saveText->SetInnerRML("You need to unlock the full game to save.");
|
||||
if (saveText) saveText->SetInnerRML("{IDS_UNLOCK_TOSAVE_TEXT}");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (saveText) saveText->SetInnerRML("Overwrite existing save?");
|
||||
if (saveText) saveText->SetInnerRML("{IDS_CONFIRM_SAVE_GAME}");
|
||||
}
|
||||
|
||||
m_document->GetElementById("save_cancel")->Focus();
|
||||
@@ -395,11 +395,11 @@ void UIScene_PauseMenu::ShowExitDialog(bool show)
|
||||
|
||||
if (g_NetworkManager.GetPlayerCount() > 1)
|
||||
{
|
||||
if (exitText) exitText->SetInnerRML("Exit Game (disconnect other players)?");
|
||||
if (exitText) exitText->SetInnerRML("{IDS_CONFIRM_EXIT_GAME_CONFIRM_DISCONNECT_SAVE}");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (exitText) exitText->SetInnerRML("Exit Game?");
|
||||
if (exitText) exitText->SetInnerRML("{IDS_CONFIRM_EXIT_GAME}");
|
||||
}
|
||||
if (exitCancel) exitCancel->Focus();
|
||||
}
|
||||
@@ -408,8 +408,8 @@ void UIScene_PauseMenu::ShowExitDialog(bool show)
|
||||
// Trial version: simple OK/Cancel, "progress will be lost"
|
||||
if (exitSave) exitSave->SetProperty("display", "none");
|
||||
if (exitNosave) exitNosave->SetProperty("display", "inline-block");
|
||||
if (exitNosave) exitNosave->SetInnerRML("Yes");
|
||||
if (exitText) exitText->SetInnerRML("Exit Game (progress will be lost)?");
|
||||
if (exitNosave) exitNosave->SetInnerRML("{IDS_YES}");
|
||||
if (exitText) exitText->SetInnerRML("{IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST}");
|
||||
if (exitCancel) exitCancel->Focus();
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ void UIScene_PauseMenu::ShowExitDialog(bool show)
|
||||
auto* exitSave = m_document->GetElementById("exit_save");
|
||||
auto* exitNosave = m_document->GetElementById("exit_nosave");
|
||||
if (exitSave) exitSave->SetProperty("display", "inline-block");
|
||||
if (exitNosave) exitNosave->SetInnerRML("Exit without Saving");
|
||||
if (exitNosave) exitNosave->SetInnerRML("{IDS_EXIT_GAME_NO_SAVE}");
|
||||
if (exitNosave) exitNosave->SetProperty("display", "inline-block");
|
||||
|
||||
m_document->GetElementById("exit_game")->Focus();
|
||||
|
||||
Reference in New Issue
Block a user