Author: jtn Date: Sat Mar 14 17:49:28 2015 New Revision: 28532 URL: http://svn.gna.org/viewcvs/freeciv?rev=28532&view=rev Log: Fix pluralisation issue in technology help.
Reported by Konstantin Vedeneev (konved@gna). See gna bug #23333. Modified: trunk/client/helpdata.c Modified: trunk/client/helpdata.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=28532&r1=28531&r2=28532&view=diff ============================================================================== --- trunk/client/helpdata.c (original) +++ trunk/client/helpdata.c Sat Mar 14 17:49:28 2015 @@ -4125,22 +4125,34 @@ if (research_invention_state(presearch, i) != TECH_KNOWN) { if (research_invention_state(presearch, i) == TECH_PREREQS_KNOWN) { - cat_snprintf(buf, bufsz, - _("Starting now, researching %s would need %d bulbs."), - advance_name_translation(vap), - research_total_bulbs_required(presearch, i, FALSE)); + int bulbs = research_total_bulbs_required(presearch, i, FALSE); + + cat_snprintf(buf, bufsz, + PL_("Starting now, researching %s would need %d bulb.", + "Starting now, researching %s would need %d bulbs.", + bulbs), + advance_name_translation(vap), bulbs); } else if (research_invention_reachable(presearch, i)) { - cat_snprintf(buf, bufsz, + /* Split string into two to allow localization of two pluralizations. */ + char buf2[MAX_LEN_MSG]; + int bulbs = research_goal_bulbs_required(presearch, i); + + fc_snprintf(buf2, ARRAY_SIZE(buf2), + /* TRANS: appended to another sentence. Preserve the + * leading space. */ + PL_(" The whole project will require %d bulb to complete.", + " The whole project will require %d bulbs to complete.", + bulbs), + bulbs); + cat_snprintf(buf, bufsz, + /* TRANS: last %s is a sentence pluralized separately. */ PL_("To reach %s you need to obtain %d other" - " technology first. The whole project" - " will require %d bulbs to complete.", + " technology first.%s", "To reach %s you need to obtain %d other" - " technologies first. The whole project" - " will require %d bulbs to complete.", + " technologies first.%s", research_goal_unknown_techs(presearch, i) - 1), advance_name_translation(vap), - research_goal_unknown_techs(presearch, i) - 1, - research_goal_bulbs_required(presearch, i)); + research_goal_unknown_techs(presearch, i) - 1, buf2); } else { CATLSTR(buf, bufsz, _("You cannot research this technology.")); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits