Author: jtn
Date: Thu Feb  5 01:14:49 2015
New Revision: 27971

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

See gna bug #23240.

Modified:
    trunk/client/helpdata.c

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=27971&r1=27970&r2=27971&view=diff
==============================================================================
--- trunk/client/helpdata.c     (original)
+++ trunk/client/helpdata.c     Thu Feb  5 01:14:49 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

Reply via email to