]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix #2339 "LMS rank is not translated"
authorterencehill <piuntn@gmail.com>
Wed, 6 Nov 2019 23:52:12 +0000 (00:52 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 6 Nov 2019 23:52:12 +0000 (00:52 +0100)
qcsrc/common/util.qc
qcsrc/menu/xonotic/dialog_disconnect.qc
qcsrc/menu/xonotic/dialog_disconnect.qh

index 7713679f3ce57a2cbaa1deb6cd9f663a3245e6d0..d9b9efcde36444c8d06b804b5dd60ad80c0ec237 100644 (file)
@@ -316,20 +316,7 @@ string ScoreString(int pFlags, float pValue)
        if((pValue == 0) && (pFlags & (SFL_HIDE_ZERO | SFL_RANK | SFL_TIME)))
                valstr = "";
        else if(pFlags & SFL_RANK)
-       {
-               valstr = ftos(pValue);
-               l = strlen(valstr);
-               if((l >= 2) && (substring(valstr, l - 2, 1) == "1"))
-                       valstr = strcat(valstr, "th");
-               else if(substring(valstr, l - 1, 1) == "1")
-                       valstr = strcat(valstr, "st");
-               else if(substring(valstr, l - 1, 1) == "2")
-                       valstr = strcat(valstr, "nd");
-               else if(substring(valstr, l - 1, 1) == "3")
-                       valstr = strcat(valstr, "rd");
-               else
-                       valstr = strcat(valstr, "th");
-       }
+               valstr = count_ordinal(pValue);
        else if(pFlags & SFL_TIME)
                valstr = TIME_ENCODED_TOSTRING(pValue);
        else
index b50f4bd83a043a0cc281e34c7c0d918783cd7954..df19ef2784b5dd5c9c95d913b7e15fbb4ac53994 100644 (file)
@@ -22,4 +22,4 @@ void XonoticDisconnectDialog_fill(entity me)
                me.TD(me, 1, 1, e = makeXonoticButton_T(_("No"), '0 1 0', _("I would play more!")));
                        e.onClick = Dialog_Close;
                        e.onClickEntity = me;
-}
\ No newline at end of file
+}
index e4ea22be0b0a4320d9cd2641f45615bc0d29127f..a61dd775526527a7b7e374f5a311e2afe1c48f76 100644 (file)
@@ -10,4 +10,4 @@ CLASS(XonoticDisconnectDialog, XonoticDialog)
        ATTRIB(XonoticDisconnectDialog, rows, float, 3);
        ATTRIB(XonoticDisconnectDialog, colums, float, 2);
        ATTRIB(XonoticDisconnectDialog, name, string, "Disconnect");
-ENDCLASS(XonoticDisconnectDialog)
\ No newline at end of file
+ENDCLASS(XonoticDisconnectDialog)