]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/campaign.qc
Allow translating "Level %s: " in campaign level descriptions
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / campaign.qc
index 0f64aefdbc1a207248f7d1b29e206610b8d7c18e..6f1d5111b84ea5c6c2af47e48e7430704293278a 100644 (file)
@@ -239,7 +239,9 @@ void XonoticCampaignList_drawListBoxItem(entity me, int i, vector absSize, bool
                s = campaign_shortdesc[i]; // fteqcc sucks
        else
                s = "???";
-       s = draw_TextShortenToWidth(sprintf(_("Level %d: %s"), i+1, s), me.columnNameSize, 0, me.realFontSize);
+       // NOTE the following string is equal to the one used in the campaign level notification
+       // (CAMPAIGN_MESSAGE) to avoid adding another duplicate string to translate
+       s = draw_TextShortenToWidth(strcat(sprintf(_("Level %s: "), itos(i+1)), s), me.columnNameSize, 0, me.realFontSize);
        draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, theColor, theAlpha, 0);
 
        if(i <= me.campaignIndex)