From: terencehill Date: Wed, 6 Nov 2019 23:52:12 +0000 (+0100) Subject: Fix #2339 "LMS rank is not translated" X-Git-Tag: xonotic-v0.8.5~1232 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a8ad68a7f11f12bb5665e85e7eac885346e53478;p=xonotic%2Fxonotic-data.pk3dir.git Fix #2339 "LMS rank is not translated" --- diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index 7713679f3..d9b9efcde 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -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 diff --git a/qcsrc/menu/xonotic/dialog_disconnect.qc b/qcsrc/menu/xonotic/dialog_disconnect.qc index b50f4bd83..df19ef278 100644 --- a/qcsrc/menu/xonotic/dialog_disconnect.qc +++ b/qcsrc/menu/xonotic/dialog_disconnect.qc @@ -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 +} diff --git a/qcsrc/menu/xonotic/dialog_disconnect.qh b/qcsrc/menu/xonotic/dialog_disconnect.qh index e4ea22be0..a61dd7755 100644 --- a/qcsrc/menu/xonotic/dialog_disconnect.qh +++ b/qcsrc/menu/xonotic/dialog_disconnect.qh @@ -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)