]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/minigames/minigame/ps.qc
Make translatable minigame names
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / minigames / minigame / ps.qc
index 6850bd834ba40b0f3d4d3cd2af530e2670a6f354..8bf8cabe75738713164856171a1bc75b98817aa0 100644 (file)
@@ -1,5 +1,5 @@
 #include "ps.qh"
-REGISTER_MINIGAME(ps, "Peg Solitaire");
+REGISTER_MINIGAME(ps, _("Peg Solitaire"));
 
 const float PS_TURN_MOVE  = 0x0100; // player has to click on a piece on the board
 const float PS_TURN_WIN   = 0x0200; // player has won
@@ -411,20 +411,20 @@ void ps_hud_board(vector pos, vector mySize)
                vector winfs = hud_fontsize*2;
                string remaining_text;
                if(active_minigame.minigame_flags & PS_TURN_WIN)
-                       remaining_text = "All pieces cleared!";
+                       remaining_text = _("All pieces cleared!");
                else
-                       remaining_text = strcat("Remaining pieces: ", ftos(remaining));
+                       remaining_text = strcat(_("Remaining pieces:"), " ", ftos(remaining));
 
                vector win_pos = pos+eY*(mySize_y-winfs_y)/2;
                vector win_sz;
                win_sz = minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos,
-                       sprintf("Game over! %s", remaining_text),
+                       strcat(_("Game over!"), " ", remaining_text),
                        winfs, 0, DRAWFLAG_NORMAL, 0.5);
 
                drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'1 1 1',0.5,DRAWFLAG_ADDITIVE);
 
                minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos,
-                       sprintf("Game over! %s", remaining_text),
+                       strcat(_("Game over!"), " ", remaining_text),
                        winfs, panel_fg_alpha, DRAWFLAG_NORMAL, 0.5);
        }
 }