Author: jtn
Date: Thu Feb  5 01:22:12 2015
New Revision: 27981

URL: http://svn.gna.org/viewcvs/freeciv?rev=27981&view=rev
Log:
In government help, replace hardcoded "fanatics" with list of unit types.

See gna bug #23240.

Modified:
    branches/S2_5/client/helpdata.c

Modified: branches/S2_5/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/helpdata.c?rev=27981&r1=27980&r2=27981&view=diff
==============================================================================
--- branches/S2_5/client/helpdata.c     (original)
+++ branches/S2_5/client/helpdata.c     Thu Feb  5 01:22:12 2015
@@ -3911,7 +3911,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

Reply via email to