From dc6baa32c44fb1b81f88339d95674948d0d97c26 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 22 Jan 2011 20:53:54 +0100 Subject: [PATCH] make weapon death messages translatable --- qcsrc/server/w_crylink.qc | 8 ++++---- qcsrc/server/w_electro.qc | 14 +++++++------- qcsrc/server/w_fireball.qc | 16 ++++++++-------- qcsrc/server/w_grenadelauncher.qc | 10 +++++----- qcsrc/server/w_hagar.qc | 6 +++--- qcsrc/server/w_hlac.qc | 4 ++-- qcsrc/server/w_hook.qc | 4 ++-- qcsrc/server/w_laser.qc | 6 +++--- qcsrc/server/w_minelayer.qc | 8 ++++---- qcsrc/server/w_minstanex.qc | 4 ++-- qcsrc/server/w_nex.qc | 4 ++-- qcsrc/server/w_porto.qc | 4 ++-- qcsrc/server/w_rocketlauncher.qc | 8 ++++---- qcsrc/server/w_seeker.qc | 6 +++--- qcsrc/server/w_shotgun.qc | 6 +++--- qcsrc/server/w_sniperrifle.qc | 14 +++++++------- qcsrc/server/w_tuba.qc | 4 ++-- qcsrc/server/w_uzi.qc | 6 +++--- 18 files changed, 66 insertions(+), 66 deletions(-) diff --git a/qcsrc/server/w_crylink.qc b/qcsrc/server/w_crylink.qc index aa98e2de87..8a3380eae4 100644 --- a/qcsrc/server/w_crylink.qc +++ b/qcsrc/server/w_crylink.qc @@ -634,16 +634,16 @@ float w_crylink(float req) } else if (req == WR_SUICIDEMESSAGE) { - w_deathtypestring = "%s succeeded at self-destructing themself with the Crylink"; + w_deathtypestring = _("%s succeeded at self-destructing themself with the Crylink"); } else if (req == WR_KILLMESSAGE) { if(w_deathtype & HITTYPE_BOUNCE) - w_deathtypestring = "%s could not hide from %s's Crylink"; // unchecked: SPLASH (SECONDARY can't be) + w_deathtypestring = _("%s could not hide from %s's Crylink"); // unchecked: SPLASH (SECONDARY can't be) else if(w_deathtype & HITTYPE_SPLASH) - w_deathtypestring = "%s was too close to %s's Crylink"; // unchecked: SECONDARY + w_deathtypestring = _("%s was too close to %s's Crylink"); // unchecked: SECONDARY else - w_deathtypestring = "%s took a close look at %s's Crylink"; // unchecked: SECONDARY + w_deathtypestring = _("%s took a close look at %s's Crylink"); // unchecked: SECONDARY } return TRUE; } diff --git a/qcsrc/server/w_electro.qc b/qcsrc/server/w_electro.qc index 15e31c8f41..f5491f39aa 100644 --- a/qcsrc/server/w_electro.qc +++ b/qcsrc/server/w_electro.qc @@ -500,27 +500,27 @@ float w_electro(float req) else if (req == WR_SUICIDEMESSAGE) { if(w_deathtype & HITTYPE_SECONDARY) - w_deathtypestring = "%s could not remember where they put plasma"; + w_deathtypestring = _("%s could not remember where they put plasma"); else - w_deathtypestring = "%s played with plasma"; + w_deathtypestring = _("%s played with plasma"); } else if (req == WR_KILLMESSAGE) { if(w_deathtype & HITTYPE_SECONDARY) { if(w_deathtype & HITTYPE_SPLASH) // unchecked: BOUNCE - w_deathtypestring = "%s just noticed %s's blue ball"; + w_deathtypestring = _("%s just noticed %s's blue ball"); else // unchecked: BOUNCE - w_deathtypestring = "%s got in touch with %s's blue ball"; + w_deathtypestring = _("%s got in touch with %s's blue ball"); } else { if(w_deathtype & HITTYPE_BOUNCE) // combo - w_deathtypestring = "%s felt the electrifying air of %s's combo"; + w_deathtypestring = _("%s felt the electrifying air of %s's combo"); else if(w_deathtype & HITTYPE_SPLASH) - w_deathtypestring = "%s got too close to %s's blue beam"; + w_deathtypestring = _("%s got too close to %s's blue beam"); else - w_deathtypestring = "%s was blasted by %s's blue beam"; + w_deathtypestring = _("%s was blasted by %s's blue beam"); } } return TRUE; diff --git a/qcsrc/server/w_fireball.qc b/qcsrc/server/w_fireball.qc index 727018815f..73ff1595a7 100644 --- a/qcsrc/server/w_fireball.qc +++ b/qcsrc/server/w_fireball.qc @@ -389,32 +389,32 @@ float w_fireball(float req) else if (req == WR_SUICIDEMESSAGE) { if(w_deathtype & HITTYPE_SECONDARY) - w_deathtypestring = "%s forgot about some firemine"; + w_deathtypestring = _("%s forgot about some firemine"); else - w_deathtypestring = "%s should have used a smaller gun"; + w_deathtypestring = _("%s should have used a smaller gun"); } else if (req == WR_KILLMESSAGE) { if(w_deathtype & HITTYPE_SECONDARY) { if(w_deathtype & HITTYPE_HEADSHOT) - w_deathtypestring = "%s tried to catch %s's firemine"; + w_deathtypestring = _("%s tried to catch %s's firemine"); else - w_deathtypestring = "%s fatefully ignored %s's firemine"; + w_deathtypestring = _("%s fatefully ignored %s's firemine"); } else { if(w_deathtype & HITTYPE_BOUNCE) { if(w_deathtype & HITTYPE_SPLASH) // BFG effect - w_deathtypestring = "%s could not hide from %s's fireball"; + w_deathtypestring = _("%s could not hide from %s's fireball"); else // laser - w_deathtypestring = "%s saw the pretty lights of %s's fireball"; + w_deathtypestring = _("%s saw the pretty lights of %s's fireball"); } else if(w_deathtype & HITTYPE_SPLASH) - w_deathtypestring = "%s got too close to %s's fireball"; + w_deathtypestring = _("%s got too close to %s's fireball"); else - w_deathtypestring = "%s tasted %s's fireball"; + w_deathtypestring = _("%s tasted %s's fireball"); } } return TRUE; diff --git a/qcsrc/server/w_grenadelauncher.qc b/qcsrc/server/w_grenadelauncher.qc index 73e2d13bf1..d5f6c5d682 100644 --- a/qcsrc/server/w_grenadelauncher.qc +++ b/qcsrc/server/w_grenadelauncher.qc @@ -354,19 +354,19 @@ float w_glauncher(float req) else if (req == WR_SUICIDEMESSAGE) { if(w_deathtype & HITTYPE_SECONDARY) - w_deathtypestring = "%s tried out his own grenade"; + w_deathtypestring = _("%s tried out his own grenade"); else - w_deathtypestring = "%s detonated"; + w_deathtypestring = _("%s detonated"); } else if (req == WR_KILLMESSAGE) { if(w_deathtype & HITTYPE_SPLASH) if(w_deathtype & HITTYPE_BOUNCE) // (must be secondary then) - w_deathtypestring = "%s didn't see %s's grenade"; + w_deathtypestring = _("%s didn't see %s's grenade"); else // unchecked: SECONDARY - w_deathtypestring = "%s almost dodged %s's grenade"; + w_deathtypestring = _("%s almost dodged %s's grenade"); else // unchecked: SECONDARY, BOUNCE - w_deathtypestring = "%s ate %s's grenade"; + w_deathtypestring = _("%s ate %s's grenade"); } return TRUE; } diff --git a/qcsrc/server/w_hagar.qc b/qcsrc/server/w_hagar.qc index 0ec88961d1..5fb25642e2 100644 --- a/qcsrc/server/w_hagar.qc +++ b/qcsrc/server/w_hagar.qc @@ -182,13 +182,13 @@ float w_hagar(float req) precache_sound("weapons/hagexp3.wav"); } else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = "%s played with tiny rockets"; + w_deathtypestring = _("%s played with tiny rockets"); else if (req == WR_KILLMESSAGE) { if(w_deathtype & HITTYPE_BOUNCE) // must be secondary; unchecked: SPLASH - w_deathtypestring = "%s hoped %s's missiles wouldn't bounce"; + w_deathtypestring = _("%s hoped %s's missiles wouldn't bounce"); else // unchecked: SPLASH, SECONDARY - w_deathtypestring = "%s was pummeled by %s"; + w_deathtypestring = _("%s was pummeled by %s"); } return TRUE; } diff --git a/qcsrc/server/w_hlac.qc b/qcsrc/server/w_hlac.qc index 8c85ffddc5..4bba3b8051 100644 --- a/qcsrc/server/w_hlac.qc +++ b/qcsrc/server/w_hlac.qc @@ -220,9 +220,9 @@ float w_hlac(float req) precache_sound("weapons/laserimpact.wav"); } else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = "%s should have used a smaller gun"; + w_deathtypestring = _("%s should have used a smaller gun"); else if (req == WR_KILLMESSAGE) - w_deathtypestring = "%s was cut down by %s"; + w_deathtypestring = _("%s was cut down by %s"); return TRUE; } #endif diff --git a/qcsrc/server/w_hook.qc b/qcsrc/server/w_hook.qc index 4a25b871d8..da5e3f9423 100644 --- a/qcsrc/server/w_hook.qc +++ b/qcsrc/server/w_hook.qc @@ -264,9 +264,9 @@ float w_hook(float req) precache_sound("weapons/hookbomb_impact.wav"); } else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = "%s did the impossible"; + w_deathtypestring = _("%s did the impossible"); else if (req == WR_KILLMESSAGE) - w_deathtypestring = "%s has run into %s's gravity bomb"; + w_deathtypestring = _("%s has run into %s's gravity bomb"); return TRUE; } #endif diff --git a/qcsrc/server/w_laser.qc b/qcsrc/server/w_laser.qc index 736c7a8dbd..4ce1331931 100644 --- a/qcsrc/server/w_laser.qc +++ b/qcsrc/server/w_laser.qc @@ -282,13 +282,13 @@ float w_laser(float req) precache_sound("weapons/laserimpact.wav"); } else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = "%s lasered themself to hell"; + w_deathtypestring = _("%s lasered themself to hell"); else if (req == WR_KILLMESSAGE) { if(w_deathtype & HITTYPE_SECONDARY) - w_deathtypestring = "%s was cut in half by %s's gauntlet"; // unchecked: SPLASH + w_deathtypestring = _("%s was cut in half by %s's gauntlet"); // unchecked: SPLASH else - w_deathtypestring = "%s was lasered to death by %s"; // unchecked: SPLASH + w_deathtypestring = _("%s was lasered to death by %s"); // unchecked: SPLASH } return TRUE; } diff --git a/qcsrc/server/w_minelayer.qc b/qcsrc/server/w_minelayer.qc index 73682ad40d..07589cf0d4 100644 --- a/qcsrc/server/w_minelayer.qc +++ b/qcsrc/server/w_minelayer.qc @@ -435,15 +435,15 @@ float w_minelayer(float req) precache_sound("weapons/mine_exp.wav"); } else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = "%s exploded"; + w_deathtypestring = _("%s exploded"); else if (req == WR_KILLMESSAGE) { if(w_deathtype & HITTYPE_BOUNCE) // (remote detonation) - w_deathtypestring = "%s got too close to %s's mine"; + w_deathtypestring = _("%s got too close to %s's mine"); else if(w_deathtype & HITTYPE_SPLASH) - w_deathtypestring = "%s almost dodged %s's mine"; + w_deathtypestring = _("%s almost dodged %s's mine"); else - w_deathtypestring = "%s stepped on %s's mine"; + w_deathtypestring = _("%s stepped on %s's mine"); } return TRUE; } diff --git a/qcsrc/server/w_minstanex.qc b/qcsrc/server/w_minstanex.qc index 4b9560787f..89f209937a 100644 --- a/qcsrc/server/w_minstanex.qc +++ b/qcsrc/server/w_minstanex.qc @@ -254,9 +254,9 @@ float w_minstanex(float req) precache_sound("weapons/neximpact.wav"); } else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = "%s did the impossible"; + w_deathtypestring = _("%s did the impossible"); else if (req == WR_KILLMESSAGE) - w_deathtypestring = "%s has been vaporized by %s"; + w_deathtypestring = _("%s has been vaporized by %s"); return TRUE; } #endif diff --git a/qcsrc/server/w_nex.qc b/qcsrc/server/w_nex.qc index f8f31dcdc8..4bc8130290 100644 --- a/qcsrc/server/w_nex.qc +++ b/qcsrc/server/w_nex.qc @@ -221,9 +221,9 @@ float w_nex(float req) precache_sound("weapons/neximpact.wav"); } else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = "%s did the impossible"; + w_deathtypestring = _("%s did the impossible"); else if (req == WR_KILLMESSAGE) - w_deathtypestring = "%s has been vaporized by %s"; + w_deathtypestring = _("%s has been vaporized by %s"); return TRUE; } #endif diff --git a/qcsrc/server/w_porto.qc b/qcsrc/server/w_porto.qc index 95dc8bb530..4e9a2cd706 100644 --- a/qcsrc/server/w_porto.qc +++ b/qcsrc/server/w_porto.qc @@ -290,9 +290,9 @@ float w_porto(float req) // nothing to do } else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = "%s did the impossible"; + w_deathtypestring = _("%s did the impossible"); else if (req == WR_KILLMESSAGE) - w_deathtypestring = "%s felt %s doing the impossible to him"; + w_deathtypestring = _("%s felt %s doing the impossible to him"); return TRUE; } #endif diff --git a/qcsrc/server/w_rocketlauncher.qc b/qcsrc/server/w_rocketlauncher.qc index 86da9f457d..21874b7905 100644 --- a/qcsrc/server/w_rocketlauncher.qc +++ b/qcsrc/server/w_rocketlauncher.qc @@ -477,15 +477,15 @@ float w_rlauncher(float req) precache_sound("weapons/rocket_impact.wav"); } else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = "%s exploded"; + w_deathtypestring = _("%s exploded"); else if (req == WR_KILLMESSAGE) { if(w_deathtype & HITTYPE_BOUNCE) // (remote detonation) - w_deathtypestring = "%s got too close to %s's rocket"; + w_deathtypestring = _("%s got too close to %s's rocket"); else if(w_deathtype & HITTYPE_SPLASH) - w_deathtypestring = "%s almost dodged %s's rocket"; + w_deathtypestring = _("%s almost dodged %s's rocket"); else - w_deathtypestring = "%s ate %s's rocket"; + w_deathtypestring = _("%s ate %s's rocket"); } return TRUE; } diff --git a/qcsrc/server/w_seeker.qc b/qcsrc/server/w_seeker.qc index d9ab65b06a..81d55a2265 100644 --- a/qcsrc/server/w_seeker.qc +++ b/qcsrc/server/w_seeker.qc @@ -520,13 +520,13 @@ float w_seeker(float req) precache_sound("weapons/tag_impact.wav"); } else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = "%s played with tiny rockets"; + w_deathtypestring = _("%s played with tiny rockets"); else if (req == WR_KILLMESSAGE) { if(w_deathtype & HITTYPE_SECONDARY) - w_deathtypestring = "%s ran into %s's flac"; + w_deathtypestring = _("%s ran into %s's flac"); else - w_deathtypestring = "%s was tagged by %s"; + w_deathtypestring = _("%s was tagged by %s"); } return TRUE; } diff --git a/qcsrc/server/w_shotgun.qc b/qcsrc/server/w_shotgun.qc index e5ab80ae33..6d0d094eb4 100644 --- a/qcsrc/server/w_shotgun.qc +++ b/qcsrc/server/w_shotgun.qc @@ -176,13 +176,13 @@ float w_shotgun(float req) precache_sound("weapons/ric3.wav"); } else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = "%s did the impossible"; + w_deathtypestring = _("%s did the impossible"); else if (req == WR_KILLMESSAGE) { if(w_deathtype & HITTYPE_SECONDARY) - w_deathtypestring = "%2$s ^7slapped %1$s ^7around a bit with a large ^2shotgun"; + w_deathtypestring = _("%2$s ^7slapped %1$s ^7around a bit with a large ^2shotgun"); else - w_deathtypestring = "%s was gunned by %s"; + w_deathtypestring = _("%s was gunned by %s"); } return TRUE; } diff --git a/qcsrc/server/w_sniperrifle.qc b/qcsrc/server/w_sniperrifle.qc index 68dec352d9..a03a9b6108 100644 --- a/qcsrc/server/w_sniperrifle.qc +++ b/qcsrc/server/w_sniperrifle.qc @@ -318,32 +318,32 @@ float w_sniperrifle(float req) else if (req == WR_SUICIDEMESSAGE) { if(w_deathtype & HITTYPE_SECONDARY) - w_deathtypestring = "%s shot themself automatically"; + w_deathtypestring = _("%s shot themself automatically"); else - w_deathtypestring = "%s sniped themself somehow"; + w_deathtypestring = _("%s sniped themself somehow"); } else if (req == WR_KILLMESSAGE) { if(w_deathtype & HITTYPE_SECONDARY) { if(w_deathtype & HITTYPE_BOUNCE) - w_deathtypestring = "%s failed to hide from %s's bullet hail"; + w_deathtypestring = _("%s failed to hide from %s's bullet hail"); else - w_deathtypestring = "%s died in %s's bullet hail"; + w_deathtypestring = _("%s died in %s's bullet hail"); } else { if(w_deathtype & HITTYPE_BOUNCE) { // TODO special headshot message here too? - w_deathtypestring = "%s failed to hide from %s's rifle"; + w_deathtypestring = _("%s failed to hide from %s's rifle"); } else { if(w_deathtype & HITTYPE_HEADSHOT) - w_deathtypestring = "%s got hit in the head by %s"; + w_deathtypestring = _("%s got hit in the head by %s"); else - w_deathtypestring = "%s was sniped by %s"; + w_deathtypestring = _("%s was sniped by %s"); } } } diff --git a/qcsrc/server/w_tuba.qc b/qcsrc/server/w_tuba.qc index 47e6465cd0..98767516ae 100644 --- a/qcsrc/server/w_tuba.qc +++ b/qcsrc/server/w_tuba.qc @@ -257,11 +257,11 @@ float w_tuba(float req) } else if (req == WR_SUICIDEMESSAGE) { - w_deathtypestring = "%s hurt his own ears with the @!#%%'n Tuba"; + w_deathtypestring = _("%s hurt his own ears with the @!#%%'n Tuba"); } else if (req == WR_KILLMESSAGE) { - w_deathtypestring = "%s died of %s's great playing on the @!#%%'n Tuba"; + w_deathtypestring = _("%s died of %s's great playing on the @!#%%'n Tuba"); } return TRUE; } diff --git a/qcsrc/server/w_uzi.qc b/qcsrc/server/w_uzi.qc index 01d76821bb..0e563405a1 100644 --- a/qcsrc/server/w_uzi.qc +++ b/qcsrc/server/w_uzi.qc @@ -284,13 +284,13 @@ float w_uzi(float req) precache_sound("weapons/ric3.wav"); } else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = "%s did the impossible"; + w_deathtypestring = _("%s did the impossible"); else if (req == WR_KILLMESSAGE) { if(w_deathtype & HITTYPE_SECONDARY) - w_deathtypestring = "%s was sniped by %s"; + w_deathtypestring = _("%s was sniped by %s"); else - w_deathtypestring = "%s was riddled full of holes by %s"; + w_deathtypestring = _("%s was riddled full of holes by %s"); } return TRUE; } -- 2.39.2