X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fstatslist.qc;h=7d19516cf01673cfd38f150a63ab4678de6612ca;hb=edc2fb3a9154824714501378e520ccd255e81b88;hp=3f9dc410b3c53ceb17b0e931997ab3ca6b30a837;hpb=95a5a2479a35e264473e8ba3fc4e584553da42b3;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/statslist.qc b/qcsrc/menu/xonotic/statslist.qc index 3f9dc410b..7d19516cf 100644 --- a/qcsrc/menu/xonotic/statslist.qc +++ b/qcsrc/menu/xonotic/statslist.qc @@ -41,12 +41,11 @@ string XonoticStatsList_convertDate(string input) default: return input; // failed, why? } - return sprintf( - "%s %s, %d", - monthname, - count_ordinal(stof(substring(input, 8, 2))), - stof(substring(input, 0, 4)) - ); + string date = ZCTX(_("DATE^%m %d, %Y")); + date = strreplace("%Y", substring(input, 0, 4), date); + date = strreplace("%d", ftos(stof(substring(input, 8, 2))), date); // ftos-stof removes leading 0 + date = strreplace("%m", monthname, date); + return date; } void XonoticStatsList_getStats(entity me) @@ -100,7 +99,7 @@ void XonoticStatsList_getStats(entity me) case "overall/last_seen_dt": { order = 1; - outstr = _("Last seen:"); + outstr = _("Last match:"); data = XonoticStatsList_convertDate(car(data)); break; } @@ -270,8 +269,10 @@ void XonoticStatsList_resizeNotify(entity me, vector relOrigin, vector relSize, me.itemAbsSize = '0 0 0'; SUPER(XonoticStatsList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); - me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight)); - me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth))); + me.itemAbsSize.y = absSize.y * me.itemHeight; + me.itemAbsSize.x = absSize.x * (1 - me.controlWidth); + me.realFontSize.y = me.fontSize / me.itemAbsSize.y; + me.realFontSize.x = me.fontSize / me.itemAbsSize.x; me.realUpperMargin = 0.5 * (1 - me.realFontSize.y); #if 0