]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make messages translatable for trigger_hurt, target_kill, various movers
authorbones_was_here <bones_was_here@xonotic.au>
Sun, 4 Dec 2022 16:41:36 +0000 (02:41 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Sun, 4 Dec 2022 16:41:36 +0000 (02:41 +1000)
Closes #2778

qcsrc/common/mapobjects/func/bobbing.qc
qcsrc/common/mapobjects/func/door.qc
qcsrc/common/mapobjects/func/fourier.qc
qcsrc/common/mapobjects/func/pendulum.qc
qcsrc/common/mapobjects/func/plat.qc
qcsrc/common/mapobjects/func/rotating.qc
qcsrc/common/mapobjects/func/train.qc
qcsrc/common/mapobjects/func/vectormamamam.qc
qcsrc/common/mapobjects/target/kill.qc
qcsrc/common/mapobjects/trigger/hurt.qc

index d010a87583fa9925e5a9c55229739eb97d2e748f..ffbd363f970db3fa4a9621e3ef239213981af0c4 100644 (file)
@@ -53,9 +53,9 @@ spawnfunc(func_bobbing)
        // damage when blocked
        setblocked(this, generic_plat_blocked);
        if(this.dmg && (this.message == ""))
-               this.message = " was squished";
+               this.message = _(" was squished");
        if(this.dmg && (this.message2 == ""))
-               this.message2 = "was squished by";
+               this.message2 = _("was squished by");
        if(this.dmg && (!this.dmgtime))
                this.dmgtime = 0.25;
        this.dmgtime2 = time;
index 2dcd2333d214f3137a0de938a1fe9582524b9906..424e33382750f81b996a308d6c27024016dcc95e 100644 (file)
@@ -649,11 +649,11 @@ void door_init_shared(entity this)
 
        if((this.dmg || (this.spawnflags & DOOR_CRUSH)) && (this.message == ""))
        {
-               this.message = "was squished";
+               this.message = _("was squished");
        }
        if((this.dmg || (this.spawnflags & DOOR_CRUSH)) && (this.message2 == ""))
        {
-               this.message2 = "was squished by";
+               this.message2 = _("was squished by");
        }
 
        // TODO: other soundpacks
index 2aad3f3bff832748b72220f136cca69c120b94d2..be7d525b14832d5c11e4a0d75e25fe16e70af6ba 100644 (file)
@@ -58,9 +58,9 @@ spawnfunc(func_fourier)
 
        setblocked(this, generic_plat_blocked);
        if(this.dmg && (this.message == ""))
-               this.message = " was squished";
+               this.message = _(" was squished");
        if(this.dmg && (this.message2 == ""))
-               this.message2 = "was squished by";
+               this.message2 = _("was squished by");
        if(this.dmg && (!this.dmgtime))
                this.dmgtime = 0.25;
        this.dmgtime2 = time;
index b470640006a9f6d72b24f4faf049516b2c808827..c843b90e81da4bf21fa2adafc5f0000bcd40d0d8 100644 (file)
@@ -40,9 +40,9 @@ spawnfunc(func_pendulum)
        // not initializing this.dmg to 2, to allow damageless pendulum
 
        if(this.dmg && (this.message == ""))
-               this.message = " was squished";
+               this.message = _(" was squished");
        if(this.dmg && (this.message2 == ""))
-               this.message2 = "was squished by";
+               this.message2 = _("was squished by");
        if(this.dmg && (!this.dmgtime))
                this.dmgtime = 0.25;
        this.dmgtime2 = time;
index 2376c5956de1adbdc227654e30b819c8d5137b0f..d68d4b5311562dd02ad2deb7d77bd26957189265 100644 (file)
@@ -63,11 +63,11 @@ spawnfunc(func_plat)
 
        if (this.dmg && (this.message == ""))
        {
-               this.message = "was squished";
+               this.message = _("was squished");
        }
        if (this.dmg && (this.message2 == ""))
        {
-               this.message2 = "was squished by";
+               this.message2 = _("was squished by");
        }
 
        if (this.sounds == 1)
index cf1710249b0f30b70cf86aef2106a0f031246956..efb07a6c9b8fd0005a3050b73050598dd2d3ada0 100644 (file)
@@ -80,9 +80,9 @@ spawnfunc(func_rotating)
        this.pos1 = this.avelocity;
 
     if(this.dmg && (this.message == ""))
-        this.message = " was squished";
+        this.message = _(" was squished");
     if(this.dmg && (this.message2 == ""))
-               this.message2 = "was squished by";
+               this.message2 = _("was squished by");
 
 
     if(this.dmg && (!this.dmgtime))
index 4ee741d580b6ccfa18abfe502645f67f1aeb815e..4cf25a65c08e1842be70cc03823e741db25ad241 100644 (file)
@@ -256,9 +256,9 @@ spawnfunc(func_train)
 
        setblocked(this, generic_plat_blocked);
        if(this.dmg && (this.message == ""))
-               this.message = " was squished";
+               this.message = _(" was squished");
     if(this.dmg && (this.message2 == ""))
-               this.message2 = "was squished by";
+               this.message2 = _("was squished by");
        if(this.dmg && (!this.dmgtime))
                this.dmgtime = 0.25;
        this.dmgtime2 = time;
index 53226a3c628cf2ef9c1679589fbd627e77add0a0..ad576e67c5dfcb73b457f897b26e02566a65ba37 100644 (file)
@@ -162,9 +162,9 @@ spawnfunc(func_vectormamamam)
 
        setblocked(this, generic_plat_blocked);
        if(this.dmg && (!this.message || this.message == ""))
-               this.message = " was squished";
+               this.message = _(" was squished");
     if(this.dmg && (!this.message2 || this.message2 == ""))
-               this.message2 = "was squished by";
+               this.message2 = _("was squished by");
        if(this.dmg && (!this.dmgtime))
                this.dmgtime = 0.25;
        this.dmgtime2 = time;
index b10400c7e1e7de5c3b6f161226d74d914e42d795..6fcae23261ca9f36cc8b4e8298e795348fa31e75 100644 (file)
@@ -23,10 +23,10 @@ void target_kill_reset(entity this)
 spawnfunc(target_kill)
 {
     if (this.message == "")
-               this.message = "was in the wrong place";
+               this.message = _("was in the wrong place");
 
        if (this.message2 == "")
-               this.message2 = "was thrown into a world of hurt by";
+               this.message2 = _("was thrown into a world of hurt by");
 
     this.use = target_kill_use;
     this.reset = target_kill_reset;
index 20c08feb1c052a7737eeedb602c9744c1795ad97..f861977bf03d307810106c0468a02e7792bd2c3e 100644 (file)
@@ -64,9 +64,9 @@ spawnfunc(trigger_hurt)
        if (!this.dmg)
                this.dmg = ((q3compat) ? 5 : 10000);
        if (this.message == "")
-               this.message = "was in the wrong place";
+               this.message = _("was in the wrong place");
        if (this.message2 == "")
-               this.message2 = "was thrown into a world of hurt by";
+               this.message2 = _("was thrown into a world of hurt by");
        // this.message = "someone like %s always gets wrongplaced";
 
        if(!trigger_hurt_first)