From 3d1f396467e1cfe021e014e03d39364d8a5c62f5 Mon Sep 17 00:00:00 2001 From: The Dax Date: Sat, 19 Oct 2013 23:22:21 -0400 Subject: [PATCH] Make non-image Choices translatable from the MappableControls section. --- UI/TouchControlVisibilityScreen.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/UI/TouchControlVisibilityScreen.cpp b/UI/TouchControlVisibilityScreen.cpp index 8077d3c472..ce75a74a9d 100644 --- a/UI/TouchControlVisibilityScreen.cpp +++ b/UI/TouchControlVisibilityScreen.cpp @@ -19,6 +19,7 @@ #include "Common/KeyMap.h" #include "Core/Config.h" #include "ui/ui_atlas.h" +#include "i18n/i18n.h" #include #include @@ -68,6 +69,8 @@ void TouchControlVisibilityScreen::CreateViews() { std::map::iterator imageFinder; + I18NCategory *mc = GetI18NCategory("MappableControls"); + for (auto i = keyToggles.begin(); i != keyToggles.end(); ++i) { LinearLayout *row = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); row->SetSpacing(0); @@ -78,7 +81,7 @@ void TouchControlVisibilityScreen::CreateViews() { if (imageFinder != keyImages.end()) { row->Add(new Choice(keyImages[imageFinder->first], new LinearLayoutParams(1.0f))); } else { - row->Add(new Choice(i->first, new LinearLayoutParams(1.0f))); + row->Add(new Choice(mc->T(i->first.c_str()), new LinearLayoutParams(1.0f))); } grid->Add(row); }