From: bones_was_here Date: Sun, 4 Dec 2022 16:41:36 +0000 (+1000) Subject: Make messages translatable for trigger_hurt, target_kill, various movers X-Git-Tag: xonotic-v0.8.6~271 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a67a9c050b8e05e2f1b49b395c83a99d22ba5d78;p=xonotic%2Fxonotic-data.pk3dir.git Make messages translatable for trigger_hurt, target_kill, various movers Closes #2778 --- diff --git a/qcsrc/common/mapobjects/func/bobbing.qc b/qcsrc/common/mapobjects/func/bobbing.qc index d010a8758..ffbd363f9 100644 --- a/qcsrc/common/mapobjects/func/bobbing.qc +++ b/qcsrc/common/mapobjects/func/bobbing.qc @@ -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; diff --git a/qcsrc/common/mapobjects/func/door.qc b/qcsrc/common/mapobjects/func/door.qc index 2dcd2333d..424e33382 100644 --- a/qcsrc/common/mapobjects/func/door.qc +++ b/qcsrc/common/mapobjects/func/door.qc @@ -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 diff --git a/qcsrc/common/mapobjects/func/fourier.qc b/qcsrc/common/mapobjects/func/fourier.qc index 2aad3f3bf..be7d525b1 100644 --- a/qcsrc/common/mapobjects/func/fourier.qc +++ b/qcsrc/common/mapobjects/func/fourier.qc @@ -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; diff --git a/qcsrc/common/mapobjects/func/pendulum.qc b/qcsrc/common/mapobjects/func/pendulum.qc index b47064000..c843b90e8 100644 --- a/qcsrc/common/mapobjects/func/pendulum.qc +++ b/qcsrc/common/mapobjects/func/pendulum.qc @@ -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; diff --git a/qcsrc/common/mapobjects/func/plat.qc b/qcsrc/common/mapobjects/func/plat.qc index 2376c5956..d68d4b531 100644 --- a/qcsrc/common/mapobjects/func/plat.qc +++ b/qcsrc/common/mapobjects/func/plat.qc @@ -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) diff --git a/qcsrc/common/mapobjects/func/rotating.qc b/qcsrc/common/mapobjects/func/rotating.qc index cf1710249..efb07a6c9 100644 --- a/qcsrc/common/mapobjects/func/rotating.qc +++ b/qcsrc/common/mapobjects/func/rotating.qc @@ -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)) diff --git a/qcsrc/common/mapobjects/func/train.qc b/qcsrc/common/mapobjects/func/train.qc index 4ee741d58..4cf25a65c 100644 --- a/qcsrc/common/mapobjects/func/train.qc +++ b/qcsrc/common/mapobjects/func/train.qc @@ -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; diff --git a/qcsrc/common/mapobjects/func/vectormamamam.qc b/qcsrc/common/mapobjects/func/vectormamamam.qc index 53226a3c6..ad576e67c 100644 --- a/qcsrc/common/mapobjects/func/vectormamamam.qc +++ b/qcsrc/common/mapobjects/func/vectormamamam.qc @@ -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; diff --git a/qcsrc/common/mapobjects/target/kill.qc b/qcsrc/common/mapobjects/target/kill.qc index b10400c7e..6fcae2326 100644 --- a/qcsrc/common/mapobjects/target/kill.qc +++ b/qcsrc/common/mapobjects/target/kill.qc @@ -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; diff --git a/qcsrc/common/mapobjects/trigger/hurt.qc b/qcsrc/common/mapobjects/trigger/hurt.qc index 20c08feb1..f861977bf 100644 --- a/qcsrc/common/mapobjects/trigger/hurt.qc +++ b/qcsrc/common/mapobjects/trigger/hurt.qc @@ -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)