]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove trailing space and " %s^BG" used for connecting different sentences from trans...
authorterencehill <piuntn@gmail.com>
Thu, 8 Aug 2024 15:52:18 +0000 (17:52 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 8 Aug 2024 15:53:27 +0000 (17:53 +0200)
qcsrc/common/notifications/all.inc
qcsrc/common/notifications/all.qh

index 4e363d55e9fe520b177c14101de159dc0d334370..89a4dbfbb3018e9dba195a6d886f9ba9d3ff9c4f 100644 (file)
@@ -721,7 +721,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input !=
     MSG_CENTER_NOTIF(ITEM_WEAPON_DROP,                  N_ENABLE,    0, 2, "item_wepname item_wepammo",          CPID_ITEM, "item_centime 0", _("^BGYou dropped the ^F1%s^BG%s"), "")
     MSG_CENTER_NOTIF(ITEM_WEAPON_GOT,                   N_ENABLE,    0, 1, "item_wepname",                       CPID_ITEM, "item_centime 0", _("^BGYou got the ^F1%s"), "")
     MSG_CENTER_NOTIF(ITEM_WEAPON_NOAMMO,                N_ENABLE,    0, 1, "item_wepname",                       CPID_ITEM, "item_centime 0", _("^BGYou don't have enough ammo for the ^F1%s"), "")
-    MSG_CENTER_NOTIF(ITEM_WEAPON_PRIMORSEC,             N_ENABLE,    0, 3, "item_wepname f2primsec f3primsec",   CPID_ITEM, "item_centime 0", _("^F1%s %s^BG is unable to fire, but its ^F1%s^BG can"), "")
+    MSG_CENTER_NOTIF(ITEM_WEAPON_PRIMORSEC,             N_ENABLE,    0, 3, "item_wepname f2primsec f3primsec",   CPID_ITEM, "item_centime 0", _("^F1%s %s^BG is unable to fire, but its ^F1%s^BG can"), "") // example for translators: Electro primary is unable to fire, but its secondary can
     MSG_CENTER_NOTIF(ITEM_WEAPON_UNAVAILABLE,           N_ENABLE,    0, 1, "item_wepname",                       CPID_ITEM, "item_centime 0", _("^F1%s^BG is ^F4not available^BG on this map"), "")
 
     MSG_CENTER_NOTIF(JOIN_PREVENT_VERSIONMISMATCH,      N_ENABLE,    0, 0, "",               CPID_PREVENT_JOIN,      "0 0",  _("^K1Your Xonotic version is incompatible with the server's version!"), "")
index e7e26a48e711eafadf6e0ab6d9a198f62ca651b5..461253fa6588364663af9f16fb8a2d446215a989 100644 (file)
@@ -465,13 +465,13 @@ MACRO_END
 #define NOTIF_HIT_UNKNOWN(token,funcname) { backtrace(sprintf("%s: Hit unknown token in selected string! '%s'\n", funcname, selected)); break; }
 
 #define KILL_SPREE_LIST \
-       SPREE_ITEM(3, 03, _("TRIPLE FRAG! "), _("%s^K1 made a TRIPLE FRAG! %s^BG"), _("%s^K1 made a TRIPLE SCORE! %s^BG")) \
-       SPREE_ITEM(5, 05, _("RAGE! "), _("%s^K1 unlocked RAGE! %s^BG"), _("%s^K1 made FIVE SCORES IN A ROW! %s^BG")) \
-       SPREE_ITEM(10, 10, _("MASSACRE! "), _("%s^K1 started a MASSACRE! %s^BG"), _("%s^K1 made TEN SCORES IN A ROW! %s^BG")) \
-       SPREE_ITEM(15, 15, _("MAYHEM! "), _("%s^K1 executed MAYHEM! %s^BG"), _("%s^K1 made FIFTEEN SCORES IN A ROW! %s^BG")) \
-       SPREE_ITEM(20, 20, _("BERSERKER! "), _("%s^K1 is a BERSERKER! %s^BG"), _("%s^K1 made TWENTY SCORES IN A ROW! %s^BG")) \
-       SPREE_ITEM(25, 25, _("CARNAGE! "), _("%s^K1 inflicts CARNAGE! %s^BG"), _("%s^K1 made TWENTY FIVE SCORES IN A ROW! %s^BG")) \
-       SPREE_ITEM(30, 30, _("ARMAGEDDON! "), _("%s^K1 unleashes ARMAGEDDON! %s^BG"), _("%s^K1 made THIRTY SCORES IN A ROW! %s^BG"))
+       SPREE_ITEM(3,  03, _("TRIPLE FRAG!"), _("%s^K1 made a TRIPLE FRAG!"),   _("%s^K1 made a TRIPLE SCORE!")) \
+       SPREE_ITEM(5,  05, _("RAGE!"),        _("%s^K1 unlocked RAGE!"),        _("%s^K1 made FIVE SCORES IN A ROW!")) \
+       SPREE_ITEM(10, 10, _("MASSACRE!"),    _("%s^K1 started a MASSACRE!"),   _("%s^K1 made TEN SCORES IN A ROW!")) \
+       SPREE_ITEM(15, 15, _("MAYHEM!"),      _("%s^K1 executed MAYHEM!"),      _("%s^K1 made FIFTEEN SCORES IN A ROW!")) \
+       SPREE_ITEM(20, 20, _("BERSERKER!"),   _("%s^K1 is a BERSERKER!"),       _("%s^K1 made TWENTY SCORES IN A ROW!")) \
+       SPREE_ITEM(25, 25, _("CARNAGE!"),     _("%s^K1 inflicts CARNAGE!"),     _("%s^K1 made TWENTY FIVE SCORES IN A ROW!")) \
+       SPREE_ITEM(30, 30, _("ARMAGEDDON!"),  _("%s^K1 unleashes ARMAGEDDON!"), _("%s^K1 made THIRTY SCORES IN A ROW!"))
 
 #ifdef CSQC
 string notif_arg_frag_ping(bool newline, float fping)
@@ -510,7 +510,8 @@ string notif_arg_spree_cen(float spree)
                if(spree > 1)
                {
                        #define SPREE_ITEM(counta,countb,center,normal,gentle) \
-                               case counta: { return normal_or_gentle(center, sprintf(_("%d score spree! "), spree)); }
+                               case counta: \
+                                       return strcat(normal_or_gentle(center, sprintf(_("%d score spree!"), spree)), " ");
 
                        switch(spree)
                        {
@@ -521,10 +522,10 @@ string notif_arg_spree_cen(float spree)
                                        {
                                                return
                                                        sprintf(
-                                                               normal_or_gentle(
-                                                                       _("%d frag spree! "),
-                                                                       _("%d score spree! ")
-                                                               ),
+                                                               strcat(normal_or_gentle(
+                                                                       _("%d frag spree!"),
+                                                                       _("%d score spree!")
+                                                                       ), " "),
                                                                spree);
                                        }
                                        else { return ""; } // don't show spree information if it isn't an achievement
@@ -535,11 +536,11 @@ string notif_arg_spree_cen(float spree)
                }
                else if(spree == -1) // first blood
                {
-                       return normal_or_gentle(_("First blood! "), _("First score! "));
+                       return strcat(normal_or_gentle(_("First blood!"), _("First score!")), " ");
                }
                else if(spree == -2) // first victim
                {
-                       return normal_or_gentle(_("First victim! "), _("First casualty! "));
+                       return strcat(normal_or_gentle(_("First victim!"), _("First casualty!")), " ");
                }
        }
        return "";
@@ -568,7 +569,9 @@ string notif_arg_spree_inf(float type, string input, string player, float spree)
                                if(spree > 1)
                                {
                                        #define SPREE_ITEM(counta,countb,center,normal,gentle) \
-                                               case counta: { return sprintf(CCR(normal_or_gentle(normal, gentle)), player, spree_newline); }
+                                               case counta: \
+                                                       return sprintf(CCR(strcat(normal_or_gentle(normal, gentle), " %s^BG")), \
+                                                               player, spree_newline);
 
                                        switch(spree)
                                        {
@@ -579,10 +582,10 @@ string notif_arg_spree_inf(float type, string input, string player, float spree)
                                                        {
                                                                return
                                                                        sprintf(
-                                                                               CCR(normal_or_gentle(
-                                                                                       _("%s^K1 has %d frags in a row! %s^BG"),
-                                                                                       _("%s^K1 made %d scores in a row! %s^BG")
-                                                                               )),
+                                                                               CCR(strcat(normal_or_gentle(
+                                                                                       _("%s^K1 has %d frags in a row!"),
+                                                                                       _("%s^K1 made %d scores in a row!")
+                                                                                       ), " %s^BG")),
                                                                                player,
                                                                                spree,
                                                                                spree_newline
@@ -598,10 +601,10 @@ string notif_arg_spree_inf(float type, string input, string player, float spree)
                                {
                                        return
                                                sprintf(
-                                                       CCR(normal_or_gentle(
-                                                               _("%s^K1 drew first blood! %s^BG"),
-                                                               _("%s^K1 got the first score! %s^BG")
-                                                       )),
+                                                       CCR(strcat(normal_or_gentle(
+                                                               _("%s^K1 drew first blood!"),
+                                                               _("%s^K1 got the first score!")
+                                                               ), " %s^BG")),
                                                        player,
                                                        spree_newline
                                                );
@@ -658,6 +661,7 @@ string notif_arg_item_wepammo(float f1, float f2)
                case RES_FUEL:    ammotype = ITEM_JetpackFuel.m_name; break;
                default: return ""; // doesn't use ammo
        }
+       // example for translators: You dropped the Vortex with 5 cells
        return sprintf(_(" with %d %s"), f2, strtolower(ammotype));
 }