<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40032 >

Probably should attach the patch as applied to trunk for posterity!
(Also in 2.2, an update-po and vigorous line-by-line po massaging.)

Index: server/citytools.c
===================================================================
--- server/citytools.c  (revision 14336)
+++ server/citytools.c  (working copy)
@@ -730,7 +730,6 @@
 Create a palace in a random city. Used when the capital was conquered.
 **************************************************************************/
 static void build_free_small_wonders(struct player *pplayer,
-                                    const char *const old_capital_name,
                                     bv_imprs *had_small_wonders)
 {
   int size = city_list_size(pplayer->cities);
@@ -742,12 +741,11 @@
 
   improvement_iterate(pimprove) {
     if (BV_ISSET(*had_small_wonders, improvement_index(pimprove))) {
-      struct city *pnew_city;
+      /* FIXME: instead, find central city */
+      struct city *pnew_city = city_list_get(pplayer->cities, myrand(size));
 
       assert(find_city_from_small_wonder(pplayer, pimprove) == NULL);
 
-      pnew_city = city_list_get(pplayer->cities, myrand(size));
-
       city_add_improvement(pnew_city, pimprove);
       pplayer->small_wonders[improvement_index(pimprove)] = pnew_city->id;
 
@@ -757,9 +755,10 @@
        */
       send_player_cities(pplayer);
 
-      notify_player(pplayer, pnew_city->tile, E_CITY_LOST,
-                   _("You lost %s. A new %s was built in %s."),
-                   old_capital_name,
+      notify_player(pplayer, pnew_city->tile, E_IMP_BUILD,
+                   /* FIXME: should already be notified about city loss? */
+                   /* TRANS: <building> ... <city> */
+                   _("A replacement %s was built in %s."),
                    improvement_name_translation(pimprove),
                    city_name(pnew_city));
       /* 
@@ -938,7 +937,7 @@
   /* Build a new palace for free if the player lost her capital and
      savepalace is on. */
   if (game.info.savepalace) {
-    build_free_small_wonders(pgiver, city_name(pcity), &had_small_wonders);
+    build_free_small_wonders(pgiver, &had_small_wonders);
   }
 
   /* Remove the sight points from the giver...and refresh the city's
@@ -1096,7 +1095,6 @@
   struct player *pplayer = city_owner(pcity);
   struct tile *ptile = pcity->tile;
   bv_imprs had_small_wonders;
-  char *cityname = mystrdup(city_name(pcity));
   struct vision *old_vision;
   int id = pcity->id; /* We need this even after memory has been freed */
 
@@ -1214,11 +1212,9 @@
   /* Build a new palace for free if the player lost her capital and
      savepalace is on. */
   if (game.info.savepalace) {
-    build_free_small_wonders(pplayer, cityname, &had_small_wonders);
+    build_free_small_wonders(pplayer, &had_small_wonders);
   }
 
-  free(cityname);
-
   sync_cities();
 }
 
Index: server/plrhand.c
===================================================================
--- server/plrhand.c    (revision 14336)
+++ server/plrhand.c    (working copy)
@@ -1666,8 +1666,9 @@
 
   if (player_count() >= MAX_NUM_PLAYERS) {
     /* No space to make additional player */
-    freelog(LOG_NORMAL, _("Could not throw %s into civil war - too many "
-            "players"), player_name(pplayer));
+    freelog(LOG_NORMAL,
+            _("Could not throw %s into civil war - too many players"),
+            nation_plural_for_player(pplayer));
     return;
   }
 
@@ -1682,14 +1683,18 @@
   /* Now split the empire */
 
   freelog(LOG_VERBOSE,
-         "%s nation is thrust into civil war, created AI player %s",
+         "%s civil war; created AI %s",
          nation_rule_name(nation_of_player(pplayer)),
-         player_name(cplayer));
+         nation_rule_name(nation_of_player(cplayer)));
   notify_player(pplayer, NULL, E_CIVIL_WAR,
-                  _("Your nation is thrust into civil war, "
-                    " %s is declared the leader of the rebel states."),
-                  player_name(cplayer));
+                _("Your nation is thrust into civil war."));
 
+  notify_player(pplayer, NULL, E_FIRST_CONTACT,
+                /* TRANS: <leader> ... the Poles. */
+                _("%s is the rebellious leader of the %s."),
+                player_name(cplayer),
+                nation_plural_for_player(cplayer));
+
   i = city_list_size(pplayer->cities)/2;   /* number to flip */
   j = city_list_size(pplayer->cities);     /* number left to process */
   city_list_iterate(pplayer->cities, pcity) {
@@ -1703,35 +1708,35 @@
         resolved stack conflicts for each city we would teleport the first
         of the units we met since the other would have another owner */
        transfer_city(cplayer, pcity, -1, FALSE, FALSE, FALSE);
-       freelog(LOG_VERBOSE, "%s declares allegiance to %s",
+       freelog(LOG_VERBOSE, "%s declares allegiance to the %s.",
                city_name(pcity),
-               player_name(cplayer));
+               nation_rule_name(nation_of_player(cplayer)));
        notify_player(pplayer, pcity->tile, E_CITY_LOST,
-                        _("%s declares allegiance to %s."),
-                        city_name(pcity),
-                        player_name(cplayer));
+                      /* TRANS: <city> ... the Poles. */
+                      _("%s declares allegiance to the %s."),
+                      city_name(pcity),
+                      nation_plural_for_player(cplayer));
        i--;
       }
     }
     j--;
-  }
-  city_list_iterate_end;
+  } city_list_iterate_end;
 
-  i = 0;
-
   resolve_unit_stacks(pplayer, cplayer, FALSE);
 
+  i = city_list_size(cplayer->cities);
+
   notify_player(NULL, NULL, E_CIVIL_WAR,
-               _("Capture of the %s capital and destruction "
-                 "of the empire's administrative\n"
-                 "      structures have sparked a civil war.  "
-                 "Opportunists have flocked to the rebel cause,\n"
-                 "      and the upstart %s now holds power in %d "
-                 "rebel provinces."),
-               nation_adjective_for_player(pplayer),
-               player_name(cplayer),
-               city_list_size(cplayer->cities));
-}  
+               /* TRANS: ... Danes ... Poles ... <7> cities. */
+               PL_("Civil war partitions the %s;"
+                   " the %s now hold %d city.",
+                   "Civil war partitions the %s;"
+                   " the %s now hold %d cities.",
+                   i),
+               nation_plural_for_player(pplayer),
+               nation_plural_for_player(cplayer),
+               i);
+}
 
 /**************************************************************************
  The client has send as a chunk of the attribute block.
Index: client/helpdata.c
===================================================================
--- client/helpdata.c   (revision 14336)
+++ client/helpdata.c   (working copy)
@@ -847,6 +847,7 @@
     CATLSTR(buf, bufsz, _("* May not be disbanded.\n"));
   } else {
     CATLSTR(buf, bufsz,
+           /* xgettext:no-c-format */
            _("* May be disbanded in a city to recover 50% of the"
              " production cost.\n"));
   }
@@ -895,7 +896,9 @@
     CATLSTR(buf, bufsz, _("* Can transform tiles.\n"));
   }
   if (is_ground_unittype(utype) && !utype_has_flag(utype, F_SETTLERS)) {
-    CATLSTR(buf, bufsz, _("* May fortify, granting a 50% defensive bonus.\n"));
+    CATLSTR(buf, bufsz,
+            /* xgettext:no-c-format */
+            _("* May fortify, granting a 50% defensive bonus.\n"));
   }
   if (is_ground_unittype(utype)) {
     CATLSTR(buf, bufsz, _("* May pillage to destroy infrastructure from 
tiles.\n"));
@@ -1042,6 +1045,7 @@
   }
   if (utype_has_flag(utype, F_TRIREME)) {
     CATLSTR(buf, bufsz,
+           /* xgettext:no-c-format */
            _("* Must end turn in a city or next to land,"
              " or has a 50% risk of being lost at sea.\n"));
   }
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to