]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/statslist.qc
Merge branch 'master' into Lyberta/WaypointIcons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / statslist.qc
index 2c600b6f5289e6d92a03569a0c2dabf03cab3ca7..d1edd5948e8a91ecce5dbf522a3bfb30eff27641 100644 (file)
@@ -41,12 +41,13 @@ 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))
-       );
+       // without no-c-format this string looks messed up in Transifex since only %d is a valid c placeholder
+       /* xgettext:no-c-format */
+       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)