Author: jtn Date: Thu Feb 5 01:21:24 2015 New Revision: 27976 URL: http://svn.gna.org/viewcvs/freeciv?rev=27976&view=rev Log: In government help, replace hardcoded "fanatics" with list of unit types.
See gna bug #23240. Modified: branches/S2_6/client/helpdata.c Modified: branches/S2_6/client/helpdata.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/helpdata.c?rev=27976&r1=27975&r2=27976&view=diff ============================================================================== --- branches/S2_6/client/helpdata.c (original) +++ branches/S2_6/client/helpdata.c Thu Feb 5 01:21:24 2015 @@ -4955,7 +4955,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, UTYF_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