From: Mario Date: Wed, 5 Sep 2018 19:31:35 +0000 (+1000) Subject: Translate item names X-Git-Tag: xonotic-v0.8.5~1897^2~6 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=b0816500ed84f729dbdc890f9d1793576bb04045 Translate item names --- diff --git a/qcsrc/common/items/item/ammo.qh b/qcsrc/common/items/item/ammo.qh index 4c37464ad..3249f07bc 100644 --- a/qcsrc/common/items/item/ammo.qh +++ b/qcsrc/common/items/item/ammo.qh @@ -63,7 +63,7 @@ REGISTER_ITEM(Bullets, Bullets) { this.m_model = MDL_Bullets_ITEM; #endif this.netname = "bullets"; - this.m_name = "bullets"; + this.m_name = _("bullets"); this.m_icon = "ammo_bullets"; #ifdef SVQC this.m_botvalue = 1500; @@ -93,7 +93,7 @@ REGISTER_ITEM(Cells, Ammo) { this.m_model = MDL_Cells_ITEM; #endif this.netname = "cells"; - this.m_name = "cells"; + this.m_name = _("cells"); this.m_icon = "ammo_cells"; #ifdef SVQC this.m_botvalue = 1500; @@ -123,7 +123,7 @@ REGISTER_ITEM(Plasma, Ammo) { this.m_model = MDL_Plasma_ITEM; #endif this.netname = "plasma"; - this.m_name = "plasma"; + this.m_name = _("plasma"); this.m_icon = "ammo_plasma"; #ifdef SVQC this.m_botvalue = 1500; @@ -153,7 +153,7 @@ REGISTER_ITEM(Rockets, Ammo) { this.m_model = MDL_Rockets_ITEM; #endif this.netname = "rockets"; - this.m_name = "rockets"; + this.m_name = _("rockets"); this.m_icon = "ammo_rockets"; #ifdef SVQC this.m_botvalue = 1500; @@ -187,7 +187,7 @@ REGISTER_ITEM(Shells, Shells) { this.m_model = MDL_Shells_ITEM; #endif this.netname = "shells"; - this.m_name = "shells"; + this.m_name = _("shells"); this.m_icon = "ammo_shells"; #ifdef SVQC this.m_botvalue = 1000; diff --git a/qcsrc/common/items/item/armor.qh b/qcsrc/common/items/item/armor.qh index ee39aa592..326b0d3da 100644 --- a/qcsrc/common/items/item/armor.qh +++ b/qcsrc/common/items/item/armor.qh @@ -39,7 +39,7 @@ REGISTER_ITEM(ArmorSmall, Armor) { this.m_sound = SND_ArmorSmall; #endif this.netname = "armor_small"; - this.m_name = "5 Armor"; + this.m_name = _("small armor"); this.m_icon = "armor"; #ifdef SVQC this.m_itemid = IT_ARMOR_SHARD; @@ -77,7 +77,7 @@ REGISTER_ITEM(ArmorMedium, Armor) { this.m_sound = SND_ArmorMedium; #endif this.netname = "armor_medium"; - this.m_name = "25 Armor"; + this.m_name = _("medium armor"); this.m_icon = "armor"; #ifdef SVQC this.m_itemid = IT_ARMOR; @@ -115,7 +115,7 @@ REGISTER_ITEM(ArmorBig, Armor) { this.m_sound = SND_ArmorBig; #endif this.netname = "armor_big"; - this.m_name = "50 Armor"; + this.m_name = _("big armor"); this.m_icon = "armor"; this.m_color = '0 1 0'; this.m_waypoint = _("Big armor"); @@ -155,7 +155,7 @@ REGISTER_ITEM(ArmorMega, Armor) { this.m_sound = SND_ArmorMega; #endif this.netname = "armor_mega"; - this.m_name = "100 Armor"; + this.m_name = _("mega armor"); this.m_icon = "item_large_armor"; this.m_color = '0 1 0'; this.m_waypoint = _("Mega armor"); diff --git a/qcsrc/common/items/item/health.qh b/qcsrc/common/items/item/health.qh index bf515fe4d..96a98b55e 100644 --- a/qcsrc/common/items/item/health.qh +++ b/qcsrc/common/items/item/health.qh @@ -39,7 +39,7 @@ REGISTER_ITEM(HealthSmall, Health) { this.m_sound = SND_HealthSmall; #endif this.netname = "health_small"; - this.m_name = "5 Health"; + this.m_name = _("small health"); this.m_icon = "health"; #ifdef SVQC this.m_itemid = IT_5HP; @@ -77,7 +77,7 @@ REGISTER_ITEM(HealthMedium, Health) { this.m_sound = SND_HealthMedium; #endif this.netname = "health_medium"; - this.m_name = "25 Health"; + this.m_name = _("medium health"); this.m_icon = "health"; #ifdef SVQC this.m_itemid = IT_25HP; @@ -115,7 +115,7 @@ REGISTER_ITEM(HealthBig, Health) { this.m_sound = SND_HealthBig; #endif this.netname = "health_big"; - this.m_name = "50 Health"; + this.m_name = _("big health"); this.m_icon = "health"; this.m_color = '1 0 0'; this.m_waypoint = _("Big health"); @@ -155,7 +155,7 @@ REGISTER_ITEM(HealthMega, Health) { this.m_sound = SND_HealthMega; #endif this.netname = "health_mega"; - this.m_name = "100 Health"; + this.m_name = _("mega health"); this.m_icon = "item_mega_health"; this.m_color = '1 0 0'; this.m_waypoint = _("Mega health"); diff --git a/qcsrc/common/items/item/jetpack.qh b/qcsrc/common/items/item/jetpack.qh index 760033861..24d040d56 100644 --- a/qcsrc/common/items/item/jetpack.qh +++ b/qcsrc/common/items/item/jetpack.qh @@ -35,7 +35,7 @@ REGISTER_ITEM(Jetpack, Powerup) { this.m_itemid = IT_JETPACK; #endif this.netname = "jetpack"; - this.m_name = "Jetpack"; + this.m_name = _("Jetpack"); this.m_icon = "jetpack"; this.m_color = '0.5 0.5 0.5'; this.m_waypoint = _("Jetpack"); @@ -68,7 +68,7 @@ REGISTER_ITEM(JetpackFuel, Ammo) { this.m_model = MDL_JetpackFuel_ITEM; #endif this.netname = "fuel"; - this.m_name = "Fuel"; + this.m_name = _("fuel"); this.m_icon = "ammo_fuel"; #ifdef SVQC this.m_botvalue = 2000; @@ -93,7 +93,7 @@ REGISTER_ITEM(JetpackRegen, JetpackRegen) { this.m_model = MDL_JetpackRegen_ITEM; #endif this.netname = "fuel_regen"; - this.m_name = "Fuel regenerator"; + this.m_name = _("Fuel regenerator"); this.m_icon = "fuelregen"; this.m_color = '1 0.5 0'; this.m_waypoint = _("Fuel regen"); diff --git a/qcsrc/common/items/item/powerup.qh b/qcsrc/common/items/item/powerup.qh index 9de123536..43414b3d0 100644 --- a/qcsrc/common/items/item/powerup.qh +++ b/qcsrc/common/items/item/powerup.qh @@ -40,7 +40,7 @@ REGISTER_ITEM(Strength, Powerup) { this.m_respawnsound = SND_STRENGTH_RESPAWN; #endif this.netname = "strength"; - this.m_name = "Strength Powerup"; + this.m_name = _("Strength"); this.m_icon = "strength"; this.m_color = '0 0 1'; this.m_waypoint = _("Strength"); @@ -76,7 +76,7 @@ REGISTER_ITEM(Shield, Powerup) { this.m_respawnsound = SND_SHIELD_RESPAWN; #endif this.netname = "invincible"; - this.m_name = "Shield"; + this.m_name = _("Shield"); this.m_icon = "shield"; this.m_color = '1 0 1'; this.m_waypoint = _("Shield"); diff --git a/qcsrc/common/mutators/mutator/buffs/all.inc b/qcsrc/common/mutators/mutator/buffs/all.inc index 877d5c4ea..0c9b88901 100644 --- a/qcsrc/common/mutators/mutator/buffs/all.inc +++ b/qcsrc/common/mutators/mutator/buffs/all.inc @@ -12,8 +12,8 @@ string Buff_UndeprecateName(string buffname) } REGISTER_BUFF(AMMO) { - this.m_prettyName = _("Ammo"); - this.m_name = "ammo"; + this.m_name = _("Ammo"); + this.netname = "ammo"; this.m_skin = 3; this.m_color = '0.76 1 0.1'; } @@ -21,8 +21,8 @@ BUFF_SPAWNFUNCS(ammo, BUFF_AMMO) BUFF_SPAWNFUNC_Q3TA_COMPAT(ammoregen, BUFF_AMMO) REGISTER_BUFF(RESISTANCE) { - this.m_prettyName = _("Resistance"); - this.m_name = "resistance"; + this.m_name = _("Resistance"); + this.netname = "resistance"; this.m_skin = 0; this.m_color = '0.36 1 0.07'; } @@ -30,8 +30,8 @@ BUFF_SPAWNFUNCS(resistance, BUFF_RESISTANCE) BUFF_SPAWNFUNC_Q3TA_COMPAT(resistance, BUFF_RESISTANCE) REGISTER_BUFF(SPEED) { - this.m_prettyName = _("Speed"); - this.m_name = "speed"; + this.m_name = _("Speed"); + this.netname = "speed"; this.m_skin = 9; this.m_color = '0.1 1 0.84'; } @@ -40,8 +40,8 @@ BUFF_SPAWNFUNC_Q3TA_COMPAT(haste, BUFF_SPEED) BUFF_SPAWNFUNC_Q3TA_COMPAT(scout, BUFF_SPEED) REGISTER_BUFF(MEDIC) { - this.m_prettyName = _("Medic"); - this.m_name = "medic"; + this.m_name = _("Medic"); + this.netname = "medic"; this.m_skin = 1; this.m_color = '1 0.12 0'; } @@ -51,40 +51,40 @@ BUFF_SPAWNFUNC_Q3TA_COMPAT(regen, BUFF_MEDIC) BUFF_SPAWNFUNC_Q3TA_COMPAT(revival, BUFF_MEDIC) REGISTER_BUFF(BASH) { - this.m_prettyName = _("Bash"); - this.m_name = "bash"; + this.m_name = _("Bash"); + this.netname = "bash"; this.m_skin = 5; this.m_color = '1 0.39 0'; } BUFF_SPAWNFUNCS(bash, BUFF_BASH) REGISTER_BUFF(VAMPIRE) { - this.m_prettyName = _("Vampire"); - this.m_name = "vampire"; + this.m_name = _("Vampire"); + this.netname = "vampire"; this.m_skin = 2; this.m_color = '1 0 0.24'; } BUFF_SPAWNFUNCS(vampire, BUFF_VAMPIRE) REGISTER_BUFF(DISABILITY) { - this.m_prettyName = _("Disability"); - this.m_name = "disability"; + this.m_name = _("Disability"); + this.netname = "disability"; this.m_skin = 7; this.m_color = '0.94 0.3 1'; } BUFF_SPAWNFUNCS(disability, BUFF_DISABILITY) REGISTER_BUFF(VENGEANCE) { - this.m_prettyName = _("Vengeance"); - this.m_name = "vengeance"; + this.m_name = _("Vengeance"); + this.netname = "vengeance"; this.m_skin = 15; this.m_color = '1 0.23 0.61'; } BUFF_SPAWNFUNCS(vengeance, BUFF_VENGEANCE) REGISTER_BUFF(JUMP) { - this.m_prettyName = _("Jump"); - this.m_name = "jump"; + this.m_name = _("Jump"); + this.netname = "jump"; this.m_skin = 10; this.m_color = '0.24 0.78 1'; } @@ -92,8 +92,8 @@ BUFF_SPAWNFUNCS(jump, BUFF_JUMP) BUFF_SPAWNFUNC_Q3TA_COMPAT(jumper, BUFF_JUMP) REGISTER_BUFF(INVISIBLE) { - this.m_prettyName = _("Invisible"); - this.m_name = "invisible"; + this.m_name = _("Invisible"); + this.netname = "invisible"; this.m_skin = 12; this.m_color = '0.5 0.5 1'; } @@ -101,40 +101,40 @@ BUFF_SPAWNFUNCS(invisible, BUFF_INVISIBLE) BUFF_SPAWNFUNC_Q3TA_COMPAT(invis, BUFF_INVISIBLE) REGISTER_BUFF(INFERNO) { - this.m_prettyName = _("Inferno"); - this.m_name = "inferno"; + this.m_name = _("Inferno"); + this.netname = "inferno"; this.m_skin = 16; this.m_color = '1 0.62 0'; } BUFF_SPAWNFUNCS(inferno, BUFF_INFERNO) REGISTER_BUFF(SWAPPER) { - this.m_prettyName = _("Swapper"); - this.m_name = "swapper"; + this.m_name = _("Swapper"); + this.netname = "swapper"; this.m_skin = 17; this.m_color = '0.63 0.36 1'; } BUFF_SPAWNFUNCS(swapper, BUFF_SWAPPER) REGISTER_BUFF(MAGNET) { - this.m_prettyName = _("Magnet"); - this.m_name = "magnet"; + this.m_name = _("Magnet"); + this.netname = "magnet"; this.m_skin = 18; this.m_color = '1 0.95 0.18'; } BUFF_SPAWNFUNCS(magnet, BUFF_MAGNET) REGISTER_BUFF(LUCK) { - this.m_prettyName = _("Luck"); - this.m_name = "luck"; + this.m_name = _("Luck"); + this.netname = "luck"; this.m_skin = 19; this.m_color = '1 0.23 0.44'; } BUFF_SPAWNFUNCS(luck, BUFF_LUCK) REGISTER_BUFF(FLIGHT) { - this.m_prettyName = _("Flight"); - this.m_name = "flight"; + this.m_name = _("Flight"); + this.netname = "flight"; this.m_skin = 11; this.m_color = '0.23 0.44 1'; } diff --git a/qcsrc/common/mutators/mutator/buffs/buffs.qc b/qcsrc/common/mutators/mutator/buffs/buffs.qc index 8ef69aad9..4a5dcc82a 100644 --- a/qcsrc/common/mutators/mutator/buffs/buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/buffs.qc @@ -3,7 +3,7 @@ string BUFF_NAME(int i) { Buff b = Buffs_from(i); - return strcat(rgb_to_hexcolor(b.m_color), b.m_prettyName); + return strcat(rgb_to_hexcolor(b.m_color), b.m_name); } entity buff_FirstFromFlags(int _buffs) diff --git a/qcsrc/common/mutators/mutator/buffs/buffs.qh b/qcsrc/common/mutators/mutator/buffs/buffs.qh index 35005e7a8..7d4e58367 100644 --- a/qcsrc/common/mutators/mutator/buffs/buffs.qh +++ b/qcsrc/common/mutators/mutator/buffs/buffs.qh @@ -20,13 +20,13 @@ REGISTRY_CHECK(Buffs) CLASS(Buff, Pickup) /** bit index */ ATTRIB(Buff, m_itemid, int, 0); - ATTRIB(Buff, m_name, string, "buff"); + ATTRIB(Buff, netname, string, "buff"); ATTRIB(Buff, m_color, vector, '1 1 1'); - ATTRIB(Buff, m_prettyName, string, "Buff"); + ATTRIB(Buff, m_name, string, "Buff"); ATTRIB(Buff, m_skin, int, 0); ATTRIB(Buff, m_sprite, string, ""); METHOD(Buff, display, void(entity this, void(string name, string icon) returns)) { - returns(this.m_prettyName, sprintf("/gfx/hud/%s/buff_%s", cvar_string("menu_skin"), this.m_name)); + returns(this.m_name, sprintf("/gfx/hud/%s/buff_%s", cvar_string("menu_skin"), this.netname)); } #ifdef SVQC METHOD(Buff, m_time, float(Buff this)) @@ -36,9 +36,8 @@ ENDCLASS(Buff) STATIC_INIT(REGISTER_BUFFS) { FOREACH(Buffs, true, { - it.netname = it.m_name; \ it.m_itemid = BIT(it.m_id - 1); \ - it.m_sprite = strzone(strcat("buff-", it.m_name)); \ + it.m_sprite = strzone(strcat("buff-", it.netname)); \ }); } diff --git a/qcsrc/common/mutators/mutator/buffs/cl_buffs.qc b/qcsrc/common/mutators/mutator/buffs/cl_buffs.qc index f751eecff..790a10a86 100644 --- a/qcsrc/common/mutators/mutator/buffs/cl_buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/cl_buffs.qc @@ -5,7 +5,7 @@ MUTATOR_HOOKFUNCTION(cl_buffs, HUD_Powerups_add) { int allBuffs = STAT(BUFFS); FOREACH(Buffs, it.m_itemid & allBuffs, { - addPowerupItem(it.m_prettyName, strcat("buff_", it.m_name), it.m_color, bound(0, STAT(BUFF_TIME) - time, 99), 60); + addPowerupItem(it.m_name, strcat("buff_", it.netname), it.m_color, bound(0, STAT(BUFF_TIME) - time, 99), 60); }); } MUTATOR_HOOKFUNCTION(cl_buffs, WP_Format) @@ -16,8 +16,8 @@ MUTATOR_HOOKFUNCTION(cl_buffs, WP_Format) { Buff b = Buffs_from(this.wp_extra); M_ARGV(2, vector) = b.m_color; - M_ARGV(3, string) = b.m_prettyName; - M_ARGV(4, string) = strcat("buff_", b.m_name); + M_ARGV(3, string) = b.m_name; + M_ARGV(4, string) = strcat("buff_", b.netname); return true; } } diff --git a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc index 27f71b56c..b7cdbf05b 100644 --- a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc @@ -210,7 +210,7 @@ float buff_Available(entity buff) return false; if (buff == BUFF_VAMPIRE && cvar("g_vampire")) return false; - return cvar(strcat("g_buffs_", buff.m_name)); + return cvar(strcat("g_buffs_", buff.netname)); } .int buff_seencount; diff --git a/qcsrc/common/mutators/mutator/instagib/items.qh b/qcsrc/common/mutators/mutator/instagib/items.qh index 3f8d08716..42e3adbd7 100644 --- a/qcsrc/common/mutators/mutator/instagib/items.qh +++ b/qcsrc/common/mutators/mutator/instagib/items.qh @@ -30,7 +30,7 @@ REGISTER_ITEM(VaporizerCells, Ammo) { this.m_sound = SND_VaporizerCells; #endif this.netname = "vaporizer_cells"; - this.m_name = "Vaporizer Ammo"; + this.m_name = _("Vaporizer ammo"); this.m_icon = "ammo_supercells"; #ifdef SVQC this.m_botvalue = 2000; @@ -56,7 +56,7 @@ REGISTER_ITEM(ExtraLife, Powerup) { this.m_sound = SND_ExtraLife; #endif this.netname = "extralife"; - this.m_name = "Extra life"; + this.m_name = _("Extra life"); this.m_icon = "item_mega_health"; this.m_color = '1 0 0'; this.m_waypoint = _("Extra life"); @@ -88,7 +88,7 @@ REGISTER_ITEM(Invisibility, Powerup) { this.m_respawnsound = SND_STRENGTH_RESPAWN; #endif this.netname = "invisibility"; - this.m_name = "Invisibility"; + this.m_name = _("Invisibility"); this.m_icon = "strength"; this.m_color = '0 0 1'; this.m_waypoint = _("Invisibility"); @@ -123,7 +123,7 @@ REGISTER_ITEM(Speed, Powerup) { this.m_respawnsound = SND_SHIELD_RESPAWN; #endif this.netname = "speed"; - this.m_name = "Speed"; + this.m_name = _("Speed"); this.m_icon = "shield"; this.m_color = '1 0 1'; this.m_waypoint = _("Speed");