From e55e5ae806814b38cc26220f8b12150d46ff96dd Mon Sep 17 00:00:00 2001 From: twanvl Date: Thu, 29 Mar 2007 18:43:10 +0000 Subject: [PATCH] fixed default value for tr() git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@245 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/data/locale.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/data/locale.cpp b/src/data/locale.cpp index f4b155f5..252ee998 100644 --- a/src/data/locale.cpp +++ b/src/data/locale.cpp @@ -92,20 +92,20 @@ String tr(const SymbolFont& f, const String& key) { String tr(const Game& g, const String& key, const String& def) { - if (!the_locale) return key; // no locale loaded (yet) + if (!the_locale) return def; // no locale loaded (yet) SubLocaleP loc = the_locale->game_translations[g.name()]; - if (!loc) return key; // no information on this game + if (!loc) return def; // no information on this game return loc->tr(key, def); } String tr(const StyleSheet& s, const String& key, const String& def) { - if (!the_locale) return key; // no locale loaded (yet) + if (!the_locale) return def; // no locale loaded (yet) SubLocaleP loc = the_locale->stylesheet_translations[s.name()]; - if (!loc) return key; // no information on this stylesheet + if (!loc) return def; // no information on this stylesheet return loc->tr(key, def); } String tr(const SymbolFont& f, const String& key, const String& def) { - if (!the_locale) return key; // no locale loaded (yet) + if (!the_locale) return def; // no locale loaded (yet) SubLocaleP loc = the_locale->symbol_font_translations[f.name()]; - if (!loc) return key; // no information on this symbol font + if (!loc) return def; // no information on this symbol font return loc->tr(key, def); }