From 626e2fc2c8d857c50a7d47974f6baf1fd561d90c Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Thu, 29 Jan 2015 15:13:53 +0100 Subject: [PATCH] Make the button on the screenshot popup translatable --- UI/PauseScreen.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index a8893b86b7..7c9fd1762b 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -109,7 +109,8 @@ void AsyncImageFileView::Draw(UIContext &dc) { class ScreenshotViewScreen : public PopupScreen { public: - ScreenshotViewScreen(std::string filename, std::string title, int slot) : PopupScreen(title, "Load State", "Back"), filename_(filename), slot_(slot) {} + ScreenshotViewScreen(std::string filename, std::string title, int slot, I18NCategory *i18n) + : PopupScreen(title, i18n->T("Load State"), i18n->T("Back")), filename_(filename), slot_(slot) {} int GetSlot() const { return slot_; @@ -334,7 +335,8 @@ UI::EventReturn GamePauseScreen::OnScreenshotClicked(UI::EventParams &e) { SaveSlotView *v = (SaveSlotView *)e.v; std::string fn = v->GetScreenshotFilename(); std::string title = v->GetScreenshotTitle(); - Screen *screen = new ScreenshotViewScreen(fn, title, v->GetSlot()); + I18NCategory *p = GetI18NCategory("Pause"); + Screen *screen = new ScreenshotViewScreen(fn, title, v->GetSlot(), p); screenManager()->push(screen); return UI::EVENT_DONE; }