Return to Project-GC

Welcome to Project-GC Q&A. Ask questions and get answers from other Project-GC users.

If you get a good answer, click the checkbox on the left to select it as the best answer.

Upvote answers or questions that have helped you.

If you don't get clear answers, edit your question to make it clearer.

+1 vote
392 views

A little niggle, but it's something that annoys me whenever I see it:

My Badgegen tab currently reads "Optimist on the run has received 23 badge rewards (1 gemstones)" (my emphasis). Is it possible to tweak it so that it has the singular if there's only one? This also may apply to other points, badges, etc. I imagine it's an easy fix (if x=1 then "gemstone" else "gemstones"), and improves the readability. Thanks.

PS Glad to see the stats back up and running smiley
 

in Bug reports by Optimist on the run (Expert) (20.5k points)

2 Answers

0 votes
 
Best answer
This is actually fairly easy to fix, and I have therefore had this bookmarked since May.

In this case, and it's most often this easy, it's just to rewrite from

printf(_(%d gemstone), $gemstoneCnt);

to

printf(ngettext('(%d gemstone)', '(%d gemstones)', $gemstoneCnt), $gemstoneCnt);

 

This has the side effect that the translations will be removed meanwhile though.
by magma1447 (Admin) (243k points)
selected by Optimist on the run (Expert)
+1 vote
May be nice to have one category, may with sub category for each language to group all these tweaks not related to basic engine. Some typo also in french but I consider this site very good compared to some others!
by Pepegeo (11.1k points)
...