Skip to content

Commit

Permalink
Fix empty string translation
Browse files Browse the repository at this point in the history
It was my first idea, but I couldn't make it work with *L"", this time I copied the way wgettext returns a string and it seems to work
It needs to be tested, I could only do it in linux and travis CI
  • Loading branch information
minduser00 authored and SmallJoker committed Apr 9, 2018
1 parent 6257c7f commit be64901
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/guiKeyChangeMenu.cpp
Expand Up @@ -153,8 +153,9 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 120, offset.Y - 5);
k->button = Environment->addButton(rect, this, k->id,
k->key.name()[0] ? wgettext(k->key.name()) : L"");
const wchar_t *text = k->key.name()[0] ? wgettext(k->key.name()) : utf8_to_wide_c("");
k->button = Environment->addButton(rect, this, k->id, text);
delete[] text;
}
if ((i + 1) % KMaxButtonPerColumns == 0) {
offset.X += 230;
Expand Down

0 comments on commit be64901

Please sign in to comment.