Author: jtn
Date: Wed Jun  1 23:03:09 2016
New Revision: 32788

URL: http://svn.gna.org/viewcvs/freeciv?rev=32788&view=rev
Log:
Fix broken sentence "Can do the action 'You're Fired' to some it self."

Also s/it self/itself in various comments and strings.

See gna bug #24717.

Modified:
    trunk/client/gui-gtk-2.0/action_dialog.c
    trunk/client/gui-gtk-3.0/action_dialog.c
    trunk/client/gui-gtk-3.x/action_dialog.c
    trunk/client/gui-qt/dialogs.cpp
    trunk/client/gui-sdl2/action_dialog.c
    trunk/client/helpdata.c
    trunk/common/actions.c
    trunk/common/actions.h
    trunk/server/unithand.c

Modified: trunk/client/gui-gtk-2.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/action_dialog.c?rev=32788&r1=32787&r2=32788&view=diff
==============================================================================
--- trunk/client/gui-gtk-2.0/action_dialog.c    (original)
+++ trunk/client/gui-gtk-2.0/action_dialog.c    Wed Jun  1 23:03:09 2016
@@ -1217,7 +1217,7 @@
   [ACTION_FOUND_CITY] = (GCallback)found_city_callback,
   [ACTION_NUKE] = (GCallback)nuke_callback,
 
-  /* Unit acting with no target except it self. */
+  /* Unit acting with no target except itself. */
   [ACTION_DISBAND_UNIT] = (GCallback)disband_unit_callback,
 };
 
@@ -1446,7 +1446,7 @@
     }
   } action_iterate_end;
 
-  /* Unit acting against it self. */
+  /* Unit acting against itself. */
 
   action_iterate(act) {
     if (action_get_actor_kind(act) == AAK_UNIT

Modified: trunk/client/gui-gtk-3.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/action_dialog.c?rev=32788&r1=32787&r2=32788&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.0/action_dialog.c    (original)
+++ trunk/client/gui-gtk-3.0/action_dialog.c    Wed Jun  1 23:03:09 2016
@@ -1227,7 +1227,7 @@
   [ACTION_FOUND_CITY] = (GCallback)found_city_callback,
   [ACTION_NUKE] = (GCallback)nuke_callback,
 
-  /* Unit acting with no target except it self. */
+  /* Unit acting with no target except itself. */
   [ACTION_DISBAND_UNIT] = (GCallback)disband_unit_callback,
 };
 
@@ -1456,7 +1456,7 @@
     }
   } action_iterate_end;
 
-  /* Unit acting against it self. */
+  /* Unit acting against itself. */
 
   action_iterate(act) {
     if (action_get_actor_kind(act) == AAK_UNIT

Modified: trunk/client/gui-gtk-3.x/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.x/action_dialog.c?rev=32788&r1=32787&r2=32788&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.x/action_dialog.c    (original)
+++ trunk/client/gui-gtk-3.x/action_dialog.c    Wed Jun  1 23:03:09 2016
@@ -1221,7 +1221,7 @@
   [ACTION_FOUND_CITY] = (GCallback)found_city_callback,
   [ACTION_NUKE] = (GCallback)nuke_callback,
 
-  /* Unit acting with no target except it self. */
+  /* Unit acting with no target except itself. */
   [ACTION_DISBAND_UNIT] = (GCallback)disband_unit_callback,
 };
 
@@ -1450,7 +1450,7 @@
     }
   } action_iterate_end;
 
-  /* Unit acting against it self. */
+  /* Unit acting against itself. */
 
   action_iterate(act) {
     if (action_get_actor_kind(act) == AAK_UNIT

Modified: trunk/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.cpp?rev=32788&r1=32787&r2=32788&view=diff
==============================================================================
--- trunk/client/gui-qt/dialogs.cpp     (original)
+++ trunk/client/gui-qt/dialogs.cpp     Wed Jun  1 23:03:09 2016
@@ -155,7 +155,7 @@
   action_function[ACTION_FOUND_CITY] = found_city;
   action_function[ACTION_NUKE] = nuke;
 
-  /* Unit acting with no target except it self. */
+  /* Unit acting with no target except itself. */
   action_function[ACTION_DISBAND_UNIT] = disband_unit;
 
   return action_function;
@@ -1502,7 +1502,7 @@
     }
   } action_iterate_end;
 
-  /* Unit acting against it self */
+  /* Unit acting against itself */
 
   /* Set the correct target for the following actions. */
   qv2 = cd->target_id[ATK_SELF];

Modified: trunk/client/gui-sdl2/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/action_dialog.c?rev=32788&r1=32787&r2=32788&view=diff
==============================================================================
--- trunk/client/gui-sdl2/action_dialog.c       (original)
+++ trunk/client/gui-sdl2/action_dialog.c       Wed Jun  1 23:03:09 2016
@@ -1045,7 +1045,7 @@
   [ACTION_FOUND_CITY] = found_city_callback,
   [ACTION_NUKE] = nuke_callback,
 
-  /* Unit acting with no target except it self. */
+  /* Unit acting with no target except itself. */
   [ACTION_DISBAND_UNIT] = disband_unit_callback,
 };
 
@@ -1302,7 +1302,7 @@
     }
   } action_iterate_end;
 
-  /* Unit acting against it self. */
+  /* Unit acting against itself. */
 
   action_iterate(act) {
     if (action_get_actor_kind(act) == AAK_UNIT

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=32788&r1=32787&r2=32788&view=diff
==============================================================================
--- trunk/client/helpdata.c     (original)
+++ trunk/client/helpdata.c     Wed Jun  1 23:03:09 2016
@@ -4339,6 +4339,7 @@
     if (utype_can_do_action(utype, act)) {
       switch (act) {
       case ACTION_HELP_WONDER:
+        fc_assert(action_get_target_kind(act) != ATK_SELF);
         cat_snprintf(buf, bufsz,
                      /* TRANS: the first %s is the ruleset defined ui
                       * name of the "Help Wonder" action, the next %s is
@@ -4357,6 +4358,7 @@
                      utype_build_shield_cost(utype));
         break;
       case ACTION_FOUND_CITY:
+        fc_assert(action_get_target_kind(act) != ATK_SELF);
         cat_snprintf(buf, bufsz,
                      /* TRANS: the first %s is the ruleset defined ui
                       * name of the "Found City" action, the next %s is
@@ -4381,6 +4383,7 @@
                        "");
         break;
       case ACTION_JOIN_CITY:
+        fc_assert(action_get_target_kind(act) != ATK_SELF);
         cat_snprintf(buf, bufsz,
                      /* TRANS: the first %s is the ruleset defined ui
                       * name of the "Join City" action, the next %s is
@@ -4423,14 +4426,24 @@
         break;
       default:
         /* Generic action information. */
-        cat_snprintf(buf, bufsz,
-                     /* TRANS: the first %s is the action's ruleset
-                      * defined ui name and the next %s is the name of
-                      * its target kind. */
-                     _("* Can do the action \'%s\' to some %s.\n"),
-                     action_get_ui_name(act),
-                     _(action_target_kind_name(
-                         action_get_target_kind(act))));
+        switch (action_get_target_kind(act)) {
+        case ATK_SELF:
+          cat_snprintf(buf, bufsz,
+                       /* TRANS: %s is the action's ruleset defined ui name */
+                       _("* Can do the action \'%s\'.\n"),
+                       action_get_ui_name(act));
+          break;
+        default:
+          cat_snprintf(buf, bufsz,
+                       /* TRANS: the first %s is the action's ruleset
+                        * defined ui name and the next %s is the name of
+                        * its target kind. */
+                       _("* Can do the action \'%s\' to some %s.\n"),
+                       action_get_ui_name(act),
+                       _(action_target_kind_name(
+                           action_get_target_kind(act))));
+          break;
+        }
         break;
       }
     }

Modified: trunk/common/actions.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=32788&r1=32787&r2=32788&view=diff
==============================================================================
--- trunk/common/actions.c      (original)
+++ trunk/common/actions.c      Wed Jun  1 23:03:09 2016
@@ -302,7 +302,7 @@
   action->requires_details = requires_details;
   action->rare_pop_up = rare_pop_up;
 
-  /* The distance between the actor and him self is always 0. */
+  /* The distance between the actor and itself is always 0. */
   fc_assert(target_kind != ATK_SELF
             || (min_distance == 0 && max_distance == 0));
 
@@ -1924,7 +1924,7 @@
 }
 
 /**************************************************************************
-  Returns TRUE if actor_unit can do wanted_action to it self as far as
+  Returns TRUE if actor_unit can do wanted_action to itself as far as
   action enablers are concerned.
 
   See note in is_action_enabled() for why the action still may be
@@ -2636,7 +2636,7 @@
 
 /**************************************************************************
   Get the actor unit's probability of successfully performing the chosen
-  action on it self.
+  action on itself.
 **************************************************************************/
 action_probability action_prob_self(const struct unit* actor_unit,
                                     const int action_id)

Modified: trunk/common/actions.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.h?rev=32788&r1=32787&r2=32788&view=diff
==============================================================================
--- trunk/common/actions.h      (original)
+++ trunk/common/actions.h      Wed Jun  1 23:03:09 2016
@@ -38,9 +38,9 @@
 #define SPECENUM_VALUE2NAME N_("unit stacks")
 #define SPECENUM_VALUE3 ATK_TILE
 #define SPECENUM_VALUE3NAME N_("tiles")
-/* No target except the actor it self. */
+/* No target except the actor itself. */
 #define SPECENUM_VALUE4 ATK_SELF
-#define SPECENUM_VALUE4NAME N_("it self")
+#define SPECENUM_VALUE4NAME N_("itself")
 #define SPECENUM_COUNT ATK_COUNT
 #include "specenum_gen.h"
 

Modified: trunk/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=32788&r1=32787&r2=32788&view=diff
==============================================================================
--- trunk/server/unithand.c     (original)
+++ trunk/server/unithand.c     Wed Jun  1 23:03:09 2016
@@ -589,7 +589,7 @@
     }
     break;
   case ATK_SELF:
-    /* Can't declare war on it self. */
+    /* Can't declare war on itself. */
     return NULL;
     break;
   case ATK_COUNT:
@@ -747,7 +747,7 @@
       }
       break;
     case ATK_SELF:
-      /* A unit acting against it self. */
+      /* A unit acting against itself. */
       tgt_player = unit_owner(punit);
       break;
     case ATK_COUNT:


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to