From d42c969c1a7466c53479285efcf3640e0dc1098d Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 8 Aug 2024 23:33:42 +0200 Subject: [PATCH] Make Domination capture message easier to translate (only the second part of the message is translatable). Also update notification argument descriptions --- qcsrc/common/notifications/all.inc | 2 +- qcsrc/common/notifications/all.qh | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/qcsrc/common/notifications/all.inc b/qcsrc/common/notifications/all.inc index 89a4dbfbb..a57a516fd 100644 --- a/qcsrc/common/notifications/all.inc +++ b/qcsrc/common/notifications/all.inc @@ -361,7 +361,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input != MULTITEAM_INFO(DEATH_TEAMKILL, N_CONSOLE, 3, 1, "s1 s2 s3loc spree_end", "s2 s1", "notify_teamkill_%s", _("^BG%s^K1 was betrayed by ^BG%s^K1%s%s"), "", NAME) - MSG_INFO_NOTIF(DOMINATION_CAPTURE_TIME, N_CONSOLE, 2, 2, "s1 s2 f1 f1points f2", "", "", _("^BG%s^BG%s^BG (%s %s every %s seconds)"), "") + MSG_INFO_NOTIF(DOMINATION_CAPTURE_TIME, N_CONSOLE, 2, 2, "s1 s2 f1points f2", "", "", strcat("^BG%s^BG%s^BG ", _("(%s every %s seconds)")), "") // example for translators: Red Team has captured the Strength control point (2 points every 5 seconds) MSG_INFO_NOTIF(FREEZETAG_FREEZE, N_CONSOLE, 2, 0, "s1 s2", "", "", _("^BG%s^K1 was frozen by ^BG%s"), "") MSG_INFO_NOTIF(FREEZETAG_REVIVED, N_CONSOLE, 2, 0, "s1 s2", "", "", _("^BG%s^K3 was revived by ^BG%s"), "") diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index 7c7a6e93a..ffda57cc3 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -352,8 +352,8 @@ float autocvar_notification_show_sprees_center_specialonly = true; s2loc: s2 string of locations of deaths or other events s3loc: s3 string of locations of deaths or other events f1-f4: float arguments expanded into strings to be swapped into sprintf - f1p2dec: f1 float to string with 2 decimal places - f2p2dec: f2 float to string with 2 decimal places + f1dtime: f1 float to string with 2 decimal places + f2dtime: f2 float to string with 2 decimal places f2primsec: f2 float primary or secondary selection for weapons f3primsec: f3 float primary or secondary selection for weapons f1secs: count_seconds of f1 @@ -362,11 +362,13 @@ float autocvar_notification_show_sprees_center_specialonly = true; f1time: process_time of f1 f1race_time: TIME_ENCODED_TOSTRING of f1 f2race_time: TIME_ENCODED_TOSTRING of f2 + f3race_time: TIME_ENCODED_TOSTRING of f3 race_col: color of race time/position (i.e. good or bad) race_diff: show time difference between f2 and f3 missing_teams: show which teams still need players pass_key: find the keybind for "passing" or "dropping" in CTF game mode nade_key: find the keybind for nade throwing + join_key: find the keybind for joining the game frag_ping: show the ping of a player frag_stats: show health/armor/ping of a player frag_pos: show score status and position in the match of a player @@ -377,7 +379,8 @@ float autocvar_notification_show_sprees_center_specialonly = true; item_wepname: return full name of a weapon from weaponid item_wepammo: ammo display for weapon from f1 and f2 item_centime: amount of time to display weapon message in centerprint - item_buffname: return full name of a buff from buffid + item_buffname: return full name of a buff from buffid f1 + f3buffname: return full name of a buff from buffid f3 death_team: show the full name of the team a player is switching from minigame1_name: return human readable name of a minigame from its id(s1) minigame1_d: return descriptor name of a minigame from its id(s1) @@ -429,7 +432,7 @@ string BUFF_NAME(int i); ARG_CASE(ARG_CS, "f2primsec", (f2 ? _("secondary") : _("primary"))) \ ARG_CASE(ARG_CS, "f3primsec", (f3 ? _("secondary") : _("primary"))) \ ARG_CASE(ARG_CS, "f1secs", count_seconds(f1)) \ - ARG_CASE(ARG_CS, "f1points", (f1 == 1 ? _("point") : _("points"))) \ + ARG_CASE(ARG_CS, "f1points", (f1 == 1 ? _("1 point") : sprintf(_("%d points"), f1))) \ ARG_CASE(ARG_CS_SV, "f1ord", count_ordinal(f1)) \ ARG_CASE(ARG_CS_SV, "f1time", process_time(2, f1)) \ ARG_CASE(ARG_CS_SV_HA, "f1race_time", TIME_ENCODED_TOSTRING(f1, true)) \ -- 2.39.2