Return the string ID if it's not found

Instead of returning an empty string, we can return the non-translated
string ID, so it's more visible that something needs to be translated
yet.
This commit is contained in:
David Capello 2016-12-21 17:08:49 -03:00
parent 42b48cfed2
commit bd4e5cfa50

View File

@ -63,7 +63,11 @@ Strings::Strings()
const std::string& Strings::translate(const char* id)
{
return m_strings[id];
auto it = m_strings.find(id);
if (it != m_strings.end())
return it->second;
else
return m_strings[id] = id;
}
} // namespace app