From: terencehill Date: Fri, 26 Apr 2019 18:18:56 +0000 (+0200) Subject: Make "missing a checkpoint" translatable X-Git-Tag: xonotic-v0.8.5~1523 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=357d1a9e93b6b478da29b381deece19817c1abb9;p=xonotic%2Fxonotic-data.pk3dir.git Make "missing a checkpoint" translatable --- diff --git a/qcsrc/client/hud/panel/racetimer.qc b/qcsrc/client/hud/panel/racetimer.qc index 7d09cf1ff..06d0c3b75 100644 --- a/qcsrc/client/hud/panel/racetimer.qc +++ b/qcsrc/client/hud/panel/racetimer.qc @@ -151,7 +151,7 @@ void HUD_RaceTimer () s = _("^1Intermediate 1 (+15.42)"); str_pos = pos + vec2(0.5 * (mySize.x - stringwidth(s, true, '1 1 0' * 0.2 * mySize.y)), 0.6 * mySize.y); drawcolorcodedstring(str_pos, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL); - s = sprintf(_("^1PENALTY: %.1f (%s)"), 2, "missing a checkpoint"); + s = sprintf(_("^1PENALTY: %.1f (%s)"), 2, _("missing a checkpoint")); str_pos = pos + vec2(0.5 * (mySize.x - stringwidth(s, true, '1 1 0' * 0.2 * mySize.y)), 0.8 * mySize.y); drawcolorcodedstring(str_pos, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL); } diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 026db91f5..04cafebbd 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -1124,7 +1124,10 @@ NET_HANDLE(TE_CSQC_RACE, bool isNew) case RACE_NET_PENALTY_QUALIFYING: race_penaltyeventtime = time; race_penaltytime = ReadShort(); - strcpy(race_penaltyreason, ReadString()); + string reason = ReadString(); + if (reason == "missing a checkpoint") + reason = _("missing a checkpoint"); + strcpy(race_penaltyreason, reason); if (b == RACE_NET_PENALTY_QUALIFYING) race_penaltyaccumulator += race_penaltytime; break;