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

 If there is just one visible building in a city, tile popup does not
show it. Fix attached.


 - ML

diff -Nurd -X.diff_ignore freeciv/client/text.c freeciv/client/text.c
--- freeciv/client/text.c       2008-08-15 16:14:29.000000000 +0300
+++ freeciv/client/text.c       2008-08-15 23:32:37.000000000 +0300
@@ -181,27 +181,25 @@
     improvement_iterate(pimprove) {
       if (is_improvement_visible(pimprove)
        && city_has_building(pcity, pimprove)) {
-        if (NULL != prev_impr) {
-          if (has_improvements++ > 0) {
-            /* TRANS: continue list, in case comma is not the separator of 
choice. */
-            astr_add(&str, Q_("?clistmore:, %s"),
-                    improvement_name_translation(prev_impr));
-          } else {
-           /* TRANS: previous lines gave other information about the city. */
-            astr_add(&str, Q_("?clistbegin: with %s"),
-                    improvement_name_translation(prev_impr));
-          }
+        if (has_improvements++ > 1) {
+          /* TRANS: continue list, in case comma is not the separator of 
choice. */
+          astr_add(&str, Q_("?clistmore:, %s"),
+                   improvement_name_translation(prev_impr));
+        } else if (has_improvements == 1) {
+          /* TRANS: previous lines gave other information about the city. */
+          astr_add(&str, Q_("?clistbegin: with %s"),
+                   improvement_name_translation(pimprove));
         }
         prev_impr = pimprove;
       }
     } improvement_iterate_end;
 
     if (NULL != prev_impr) {
-      if (has_improvements > 1) {
+      if (has_improvements > 2) {
         /* TRANS: This appears with two or more previous entries in the list */
         astr_add(&str, Q_("?clistlast:, and %s"),
                 improvement_name_translation(prev_impr));
-      } else if (has_improvements > 0) {
+      } else if (has_improvements > 1) {
         /* TRANS: This appears with only one previous entry in the list */
         astr_add(&str, Q_("?clistlast: and %s"),
                 improvement_name_translation(prev_impr));
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to