]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Get rid of 6 redundant translatable strings
authorterencehill <piuntn@gmail.com>
Tue, 9 Jun 2020 08:28:15 +0000 (10:28 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 9 Jun 2020 08:28:15 +0000 (10:28 +0200)
qcsrc/client/main.qc
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc

index a049b98f2137ce3a772cbf12b3ab53ce1202c25a..2d2a5c4fbf3427d1555b274ff089919ac3cfaba7 100644 (file)
@@ -978,16 +978,11 @@ float GetSpeedUnitFactor(int speed_unit)
        switch(speed_unit)
        {
                default:
-               case 1:
-                       return 1.0;
-               case 2:
-                       return 0.0254;
-               case 3:
-                       return 0.0254 * 3.6;
-               case 4:
-                       return 0.0254 * 3.6 * 0.6213711922;
-               case 5:
-                       return 0.0254 * 1.943844492; // 1 m/s = 1.943844492 knots, because 1 knot = 1.852 km/h
+               case 1: return 1.0;
+               case 2: return 0.0254;
+               case 3: return 0.0254 * 3.6;
+               case 4: return 0.0254 * 3.6 * 0.6213711922;
+               case 5: return 0.0254 * 1.943844492; // 1 m/s = 1.943844492 knots, because 1 knot = 1.852 km/h
        }
 }
 
@@ -995,17 +990,13 @@ string GetSpeedUnit(int speed_unit)
 {
        switch(speed_unit)
        {
+               // translator-friendly strings without the initial space
                default:
-               case 1:
-                       return _(" qu/s");
-               case 2:
-                       return _(" m/s");
-               case 3:
-                       return _(" km/h");
-               case 4:
-                       return _(" mph");
-               case 5:
-                       return _(" knots");
+               case 1: return strcat(" ", _("qu/s"));
+               case 2: return strcat(" ", _("m/s"));
+               case 3: return strcat(" ", _("km/h"));
+               case 4: return strcat(" ", _("mph"));
+               case 5: return strcat(" ", _("knots"));
        }
 }
 
index 1244ee86b2433e7e2aa231331d9fe522b4e830d3..7473e8e8da66619524e0abdfefd2592f6fb85c36 100644 (file)
@@ -208,7 +208,7 @@ void XonoticMutatorsDialog_fill(entity me)
                me.TD(me, 1, 2, makeXonoticTextLabel(0, _("Weapon & item mutators:")));
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_grappling_hook", _("Grappling hook"),
+               me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_grappling_hook", _("Grappling Hook"),
                        _("Players spawn with the grappling hook. Press the 'hook' key to use it")));
        me.TR(me);
                me.TDempty(me, 0.2);