Skip to content

Commit 03297ac

Browse files
committedMar 13, 2014
Fix special characters in pause and message menu
1 parent 18577f2 commit 03297ac

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed
 

‎src/game.cpp

+9-8
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ static void show_chat_menu(FormspecFormSource* current_formspec,
976976
std::string formspec =
977977
"size[11,5.5,true]"
978978
"field[3,2.35;6,0.5;f_text;;" + text + "]"
979-
"button_exit[4,3;3,0.5;btn_send;" + std::string(gettext("Proceed")) + "]"
979+
"button_exit[4,3;3,0.5;btn_send;" + wide_to_narrow(wstrgettext("Proceed")) + "]"
980980
;
981981

982982
/* Create menu */
@@ -998,7 +998,8 @@ static void show_pause_menu(FormspecFormSource* current_formspec,
998998
TextDest* current_textdest, IWritableTextureSource* tsrc,
999999
IrrlichtDevice * device)
10001000
{
1001-
const char* control_text = gettext("Default Controls:\n"
1001+
1002+
std::string control_text = wide_to_narrow(wstrgettext("Default Controls:\n"
10021003
"- WASD: move\n"
10031004
"- Space: jump/climb\n"
10041005
"- Shift: sneak/go down\n"
@@ -1009,7 +1010,7 @@ static void show_pause_menu(FormspecFormSource* current_formspec,
10091010
"- Mouse right: place/use\n"
10101011
"- Mouse wheel: select item\n"
10111012
"- T: chat\n"
1012-
);
1013+
));
10131014

10141015
std::ostringstream os;
10151016
os<<"Minetest\n";
@@ -1018,11 +1019,11 @@ static void show_pause_menu(FormspecFormSource* current_formspec,
10181019

10191020
std::string formspec =
10201021
"size[11,5.5,true]"
1021-
"button_exit[4,1;3,0.5;btn_continue;" + std::string(gettext("Continue")) + "]"
1022-
"button_exit[4,2;3,0.5;btn_sound;" + std::string(gettext("Sound Volume")) + "]"
1023-
"button_exit[4,3;3,0.5;btn_exit_menu;" + std::string(gettext("Exit to Menu")) + "]"
1024-
"button_exit[4,4;3,0.5;btn_exit_os;" + std::string(gettext("Exit to OS")) + "]"
1025-
"textarea[7.5,0.25;3.75,6;;" + std::string(control_text) + ";]"
1022+
"button_exit[4,1;3,0.5;btn_continue;" + wide_to_narrow(wstrgettext("Continue")) + "]"
1023+
"button_exit[4,2;3,0.5;btn_sound;" + wide_to_narrow(wstrgettext("Sound Volume")) + "]"
1024+
"button_exit[4,3;3,0.5;btn_exit_menu;" + wide_to_narrow(wstrgettext("Exit to Menu")) + "]"
1025+
"button_exit[4,4;3,0.5;btn_exit_os;" + wide_to_narrow(wstrgettext("Exit to OS")) + "]"
1026+
"textarea[7.5,0.25;3.75,6;;" + control_text + ";]"
10261027
"textarea[0.4,0.25;3.5,6;;" + os.str() + ";]"
10271028
;
10281029

0 commit comments

Comments
 (0)
Please sign in to comment.