]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make translatable some remaining minigame messages and 2 radar messages
authorterencehill <piuntn@gmail.com>
Tue, 23 Apr 2019 18:18:29 +0000 (20:18 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 23 Apr 2019 18:18:29 +0000 (20:18 +0200)
qcsrc/client/hud/panel/radar.qc
qcsrc/common/minigames/cl_minigames_hud.qc
qcsrc/common/minigames/minigame/bd.qc
qcsrc/common/minigames/minigame/c4.qc
qcsrc/common/minigames/minigame/nmm.qc
qcsrc/common/minigames/minigame/pp.qc
qcsrc/common/minigames/minigame/ps.qc
qcsrc/common/minigames/minigame/ttt.qc

index ca1cb2a0655097c04d6b378445e66fd529d791a5..612dc12e98ada6183ca03d1ed8712f63f8ae0aaa 100644 (file)
@@ -370,11 +370,11 @@ void HUD_Radar()
 
        if ( hud_panel_radar_mouse )
        {
-               string message = "Click to select teleport destination";
+               string message = _("Click to select teleport destination");
 
                if ( STAT(HEALTH) <= 0 )
                {
-                       message = "Click to select spawn location";
+                       message = _("Click to select spawn location");
                }
 
                drawcolorcodedstring(pos + '0.5 0 0' * (mySize_x - stringwidth(message, true, hud_fontsize)) - '0 1 0' * hud_fontsize_y * 2,
index 8cfe69c0bb7acf20681e9c797a514e5c84b2aa3e..1608f471da24f10c4e09e32bcb8a8e1ef0345e71 100644 (file)
@@ -564,7 +564,7 @@ void HUD_MinigameHelp()
                help_message = active_minigame.message;
        }
        else
-               help_message = "Minigame message";
+               help_message = _("Minigame message");
 
        if ( !help_message )
                return;
index 8ab37af13c8d26ad260238805cf2d4a287f431de..16e56e8c51000796245640a7e8c2282d6ebdfb8f 100644 (file)
@@ -1089,22 +1089,20 @@ void bd_hud_board(vector pos, vector mySize)
        if ( (active_minigame.minigame_flags & BD_TURN_LOSS) || (active_minigame.minigame_flags & BD_TURN_WIN) )
        {
                vector winfs = hud_fontsize*2;
-               string victory_text = "Game over!";
+               string victory_text = _("Game over!");
 
                if(active_minigame.minigame_flags & BD_TURN_WIN)
-                       victory_text = "Well done! Click 'Next Level' to continue";
+                       victory_text = _("Well done! Click 'Next Level' to continue");
 
                vector win_pos = pos+eY*(mySize_y-winfs_y)/2;
                vector win_sz;
                win_sz = minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos,
-                       sprintf("%s", victory_text),
-                       winfs, 0, DRAWFLAG_NORMAL, 0.5);
+                       victory_text, winfs, 0, DRAWFLAG_NORMAL, 0.5);
 
                drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'0.3 0.3 1',0.8,DRAWFLAG_ADDITIVE);
 
                minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos,
-                       sprintf("%s", victory_text),
-                       winfs, panel_fg_alpha, DRAWFLAG_NORMAL, 0.5);
+                       victory_text, winfs, panel_fg_alpha, DRAWFLAG_NORMAL, 0.5);
        }
 }
 
index c8f8184f5b0bd019862d1b73ecc631faea5084f1..e29e7a5e97736ea51af3381f02da66ec3335bc2b 100644 (file)
@@ -308,13 +308,13 @@ void c4_hud_board(vector pos, vector mySize)
                vector win_pos = pos+eY*(mySize_y-winfs_y)/2;
                vector win_sz;
                win_sz = minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos,
-                       sprintf("%s^7 won the game!",pname),
+                       sprintf(_("%s^7 won the game!"), pname),
                        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("%s^7 won the game!",pname),
+                       sprintf(_("%s^7 won the game!"), pname),
                        winfs, panel_fg_alpha, DRAWFLAG_NORMAL, 0.5);
        }
 }
index 65ac9dee01db2940a47d53fc9e8ebf37eb55483c..e1377c6a665c3020d9d4c771df8371a0248f54b6 100644 (file)
@@ -488,13 +488,13 @@ void nmm_hud_board(vector pos, vector mySize)
                vector win_pos = pos+eY*(mySize_y-winfs_y)/2;
                vector win_sz;
                win_sz = minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos,
-                       sprintf("%s^7 won the game!",pname),
+                       sprintf(_("%s^7 won the game!"), pname),
                        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("%s^7 won the game!",pname),
+                       sprintf(_("%s^7 won the game!"), pname),
                        winfs, panel_fg_alpha, DRAWFLAG_NORMAL, 0.5);
        }
 }
index 0b1d74344e93f09fbe00877ecc2c8e6818c328ed..e59318f0d6607f86621818ad6894dd6486f83d08 100644 (file)
@@ -359,13 +359,13 @@ void pp_hud_board(vector pos, vector mySize)
                vector win_pos = pos+eY*(mySize_y-winfs_y)/2;
                vector win_sz;
                win_sz = minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos,
-                       sprintf("%s^7 won the game!",pname),
+                       sprintf(_("%s^7 won the game!"), pname),
                        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("%s^7 won the game!",pname),
+                       sprintf(_("%s^7 won the game!"), pname),
                        winfs, panel_fg_alpha, DRAWFLAG_NORMAL, 0.5);
        }
 }
@@ -440,8 +440,8 @@ string pp_turn_to_string(int turnflags)
        if ( turnflags & PP_TURN_WIN )
        {
                if ( (turnflags&PP_TURN_TEAM) != minigame_self.team )
-                       return _("You lost the game!\nSelect \"^1Next Match^7\" on the menu for a rematch!");
-               return _("You win!\nSelect \"^1Next Match^7\" on the menu to start a new match!");
+                       return strcat(_("You lost the game!"), "\n", _("Select \"^1Next Match^7\" on the menu for a rematch!"));
+               return strcat(_("You win!"), "\n", _("Select \"^1Next Match^7\" on the menu to start a new match!"));
        }
 
        if ( turnflags & PP_TURN_NEXT )
index 6850bd834ba40b0f3d4d3cd2af530e2670a6f354..540d0a16036f166cdb6c846832aebccc29757f3f 100644 (file)
@@ -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);
        }
 }
index a6cc50237736f010c2dab9500fa552426d974829..7cb4a2f75bff7df3ce8e85f2b321bd95a6595b3e 100644 (file)
@@ -321,8 +321,8 @@ string ttt_turn_to_string(int turnflags)
        if ( turnflags & TTT_TURN_WIN )
        {
                if ( (turnflags&TTT_TURN_TEAM) != minigame_self.team )
-                       return _("You lost the game!\nSelect \"^1Next Match^7\" on the menu for a rematch!");
-               return _("You win!\nSelect \"^1Next Match^7\" on the menu to start a new match!");
+                       strcat(_("You lost the game!"), "\n", _("Select \"^1Next Match^7\" on the menu for a rematch!"));
+               return strcat(_("You win!"), "\n", _("Select \"^1Next Match^7\" on the menu to start a new match!"));
        }
 
        if ( turnflags & TTT_TURN_NEXT )