]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make the strings translatable, plus add a cvar for controlling the decimal
authorSamual Lenks <samual@xonotic.org>
Sun, 2 Dec 2012 19:15:32 +0000 (14:15 -0500)
committerSamual Lenks <samual@xonotic.org>
Sun, 2 Dec 2012 19:15:32 +0000 (14:15 -0500)
places to display (2 was too many, and just simply unnecessary)

defaultXonotic.cfg
qcsrc/client/autocvars.qh
qcsrc/client/scoreboard.qc

index 88a0d0ca5df447875e4206714e491d21226a25f2..9796e60027f44f1ca3308e856c002e03dc1f17a9 100644 (file)
@@ -963,6 +963,7 @@ seta scoreboard_offset_left 0.15 "how far (by percent) the scoreboard is offset
 seta scoreboard_offset_right 0.15 "how far (by percent) the scoreboard is offset from the right screen edge"
 seta scoreboard_offset_vertical 0.05 "how far (by percent) the scoreboard is offset from the top and bottom of the screen"
 seta scoreboard_bg_scale 0.25 "scale for the tiled scoreboard background"
+seta scoreboard_respawntime_decimals 1 "decimal places to show for the respawntime countdown display on the scoreboard"
 
 seta accuracy_color_levels "0 20 100" "accuracy values at which a specified color (accuracy_color<X>) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order"
 seta accuracy_color0 "1 0 0"
index 0d4513f92b802a351f83883eecd5ed8e430d1d2f..5d5637473a1ad69bc1dc00c4f1ba20bbb83ff54e 100644 (file)
@@ -367,6 +367,7 @@ var float autocvar_scoreboard_highlight_alpha_self = 0.25;
 float autocvar_scoreboard_offset_left;
 float autocvar_scoreboard_offset_right;
 float autocvar_scoreboard_offset_vertical;
+float autocvar_scoreboard_respawntime_decimals;
 float autocvar_v_flipped;
 float autocvar_vid_conheight;
 float autocvar_vid_conwidth;
index 913a0bfb34b2eef4d87dc640ae0636b9e199681b..364f9e969e27aeee9a5ca91c3a3310f2b4ee3740 100644 (file)
@@ -1386,14 +1386,14 @@ void HUD_DrawScoreboard()
                        // a negative number means we are awaiting respawn, time value is still the same
                        respawn_time *= -1; // remove mark now that we checked it
                        if(time >= respawn_time) // don't show a negative value while the server is respawning the player (lag)
-                               str = strcat("^1Respawning...");
+                               str = _("^1Respawning...");
                        else
-                               str = strcat("^1Respawning in ^3", ftos_decimals(respawn_time - time, 2), "^1 seconds...");
+                               str = sprintf(_("^1Respawning in ^3%s^1 seconds..."), ftos_decimals(respawn_time - time, autocvar_scoreboard_respawntime_decimals));
                }
                else if(time < respawn_time)
-                       str = strcat("You are dead, wait ^3", ftos_decimals(respawn_time - time, 2), "^7 seconds before respawning");
+                       str = sprintf(_("You are dead, wait ^3%s^7 seconds before respawning"), ftos_decimals(respawn_time - time, autocvar_scoreboard_respawntime_decimals));
                else if(time >= respawn_time)
-                       str = strcat("You are dead, press ^2", getcommandkey("primary fire", "+fire"), "^7 to respawn");
+                       str = sprintf(_("You are dead, press ^2%s^7 to respawn"), getcommandkey("jump", "+jump"));
 
                pos_y += 1.2 * hud_fontsize_y;
                drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - stringwidth(str, TRUE, hud_fontsize)), str, hud_fontsize, scoreboard_alpha_fg, DRAWFLAG_NORMAL);