Author: jtn Date: Thu Feb 5 01:26:39 2015 New Revision: 27985 URL: http://svn.gna.org/viewcvs/freeciv?rev=27985&view=rev Log: In government help, replace hardcoded "fanatics" with list of unit types.
See gna bug #23240. Modified: branches/S2_4/client/helpdata.c Modified: branches/S2_4/client/helpdata.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_4/client/helpdata.c?rev=27985&r1=27984&r2=27985&view=diff ============================================================================== --- branches/S2_4/client/helpdata.c (original) +++ branches/S2_4/client/helpdata.c Thu Feb 5 01:26:39 2015 @@ -3104,7 +3104,20 @@ break; case EFT_FANATICS: if (playerwide && net_value > 0) { - CATLSTR(buf, bufsz, _("* Pays no upkeep for fanatics.\n")); + struct strvec *fanatics = strvec_new(); + struct astring fanaticstr = ASTRING_INIT; + + unit_type_iterate(putype) { + if (utype_has_flag(putype, F_FANATIC)) { + strvec_append(fanatics, utype_name_translation(putype)); + } + } unit_type_iterate_end; + cat_snprintf(buf, bufsz, + /* TRANS: %s is list of unit types separated by 'or' */ + _("* Pays no upkeep for %s.\n"), + strvec_to_or_list(fanatics, &fanaticstr)); + strvec_destroy(fanatics); + astr_free(&fanaticstr); } break; case EFT_NO_UNHAPPY: _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits