]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make "missing a checkpoint" translatable
authorterencehill <piuntn@gmail.com>
Fri, 26 Apr 2019 18:18:56 +0000 (20:18 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 26 Apr 2019 18:18:56 +0000 (20:18 +0200)
qcsrc/client/hud/panel/racetimer.qc
qcsrc/client/main.qc

index 7d09cf1ff5430276df551fe95c2025ab33258371..06d0c3b7583dc0ef92c6b2998bf8ef9df62f1ac3 100644 (file)
@@ -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);
        }
index 026db91f5edc84e519b6ceb71a41cd3a88c8e111..04cafebbd3a341786d40a29acc313c9b321620c0 100644 (file)
@@ -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;