mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-15 20:42:40 +00:00
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:
parent
42b48cfed2
commit
bd4e5cfa50
@ -63,7 +63,11 @@ Strings::Strings()
|
|||||||
|
|
||||||
const std::string& Strings::translate(const char* id)
|
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
|
} // namespace app
|
||||||
|
Loading…
x
Reference in New Issue
Block a user