OPENGLSDL: Make some OSD messages translatable

Also change some OSD messages to be the same or similar to
messages used by the Surface SDL code.
This commit is contained in:
Thierry Crozat 2016-10-13 01:15:25 +01:00
parent a333f3c44c
commit d0b2770243
2 changed files with 9 additions and 7 deletions

View File

@ -612,9 +612,9 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
#ifdef USE_OSD #ifdef USE_OSD
if (getFeatureState(OSystem::kFeatureFullscreenMode)) { if (getFeatureState(OSystem::kFeatureFullscreenMode)) {
displayMessageOnOSD("Fullscreen mode"); displayMessageOnOSD(_("Fullscreen mode"));
} else { } else {
displayMessageOnOSD("Windowed mode"); displayMessageOnOSD(_("Windowed mode"));
} }
#endif #endif
return true; return true;
@ -707,7 +707,7 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
#ifdef USE_OSD #ifdef USE_OSD
int windowWidth = 0, windowHeight = 0; int windowWidth = 0, windowHeight = 0;
getWindowDimensions(&windowWidth, &windowHeight); getWindowDimensions(&windowWidth, &windowHeight);
const Common::String osdMsg = Common::String::format("Resolution: %dx%d", windowWidth, windowHeight); const Common::String osdMsg = Common::String::format(_("Resolution: %dx%d"), windowWidth, windowHeight);
displayMessageOnOSD(osdMsg.c_str()); displayMessageOnOSD(osdMsg.c_str());
#endif #endif
@ -727,9 +727,10 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
assert(!_ignoreLoadVideoMode); assert(!_ignoreLoadVideoMode);
#ifdef USE_OSD #ifdef USE_OSD
Common::String osdMsg = "Aspect ratio correction: "; if (getFeatureState(OSystem::kFeatureAspectRatioCorrection))
osdMsg += getFeatureState(OSystem::kFeatureAspectRatioCorrection) ? "enabled" : "disabled"; displayMessageOnOSD(_("Enabled aspect ratio correction"));
displayMessageOnOSD(osdMsg.c_str()); else
displayMessageOnOSD(_("Disabled aspect ratio correction"));
#endif #endif
return true; return true;
@ -773,7 +774,7 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
assert(!_ignoreLoadVideoMode); assert(!_ignoreLoadVideoMode);
#ifdef USE_OSD #ifdef USE_OSD
const Common::String osdMsg = Common::String::format("Graphics mode: %s", _(modeDesc->description)); const Common::String osdMsg = Common::String::format(_("Graphics mode: %s"), _(modeDesc->description));
displayMessageOnOSD(osdMsg.c_str()); displayMessageOnOSD(osdMsg.c_str());
#endif #endif

View File

@ -57,6 +57,7 @@ backends/events/openpandora/op-events.cpp
backends/events/symbiansdl/symbiansdl-events.cpp backends/events/symbiansdl/symbiansdl-events.cpp
backends/events/webossdl/webossdl-events.cpp backends/events/webossdl/webossdl-events.cpp
backends/graphics/opengl/opengl-graphics.cpp backends/graphics/opengl/opengl-graphics.cpp
backends/graphics/openglsdl/openglsdl-graphics.cpp
backends/graphics/surfacesdl/surfacesdl-graphics.cpp backends/graphics/surfacesdl/surfacesdl-graphics.cpp
backends/graphics/wincesdl/wincesdl-graphics.cpp backends/graphics/wincesdl/wincesdl-graphics.cpp
backends/keymapper/remap-dialog.cpp backends/keymapper/remap-dialog.cpp