Author: sveinung
Date: Wed Dec 23 15:57:05 2015
New Revision: 31161

URL: http://svn.gna.org/viewcvs/freeciv?rev=31161&view=rev
Log:
Use the ruleset defined action name in messages.

See bug #24221

Modified:
    trunk/client/control.c
    trunk/server/actiontools.c
    trunk/server/unithand.c

Modified: trunk/client/control.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/control.c?rev=31161&r1=31160&r2=31161&view=diff
==============================================================================
--- trunk/client/control.c      (original)
+++ trunk/client/control.c      Wed Dec 23 15:57:05 2015
@@ -1046,7 +1046,7 @@
                          * Nuclear. */
                        _("Only %s can do %s."),
                        astr_str(&astr),
-                       gen_action_translated_name(action_id));
+                       action_get_ui_name(action_id));
 
           astr_free(&astr);
         } else {
@@ -1054,7 +1054,7 @@
                        /* TRANS: Spy can't do Explode Nuclear. */
                        _("%s can't do %s."),
                        unit_name_translation(punit),
-                       gen_action_translated_name(action_id));
+                       action_get_ui_name(action_id));
         }
 
         return;

Modified: trunk/server/actiontools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/actiontools.c?rev=31161&r1=31160&r2=31161&view=diff
==============================================================================
--- trunk/server/actiontools.c  (original)
+++ trunk/server/actiontools.c  Wed Dec 23 15:57:05 2015
@@ -203,7 +203,7 @@
                   /* TRANS: Suitcase Nuke ... San Francisco */
                   _("You have caused an incident getting caught"
                     " trying to do %s to %s."),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   victim_link);
     break;
   case ATK_UNIT:
@@ -213,7 +213,7 @@
                   /* Bribe Enemy Unit ... American ... Partisan */
                   _("You have caused an incident getting caught"
                     " trying to do %s to %s %s."),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   nation_adjective_for_player(victim_player),
                   victim_link);
     break;
@@ -223,7 +223,7 @@
                   E_DIPLOMATIC_INCIDENT, ftc_server,
                   _("You have caused an incident getting caught"
                     " trying to do %s at %s."),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   victim_link);
     break;
   case ATK_SELF:
@@ -260,7 +260,7 @@
                   _("The %s have caused an incident getting caught"
                     " trying to do %s to %s."),
                   nation_plural_for_player(offender),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   victim_link);
     break;
   case ATK_UNIT:
@@ -271,7 +271,7 @@
                   _("The %s have caused an incident getting caught"
                     " trying to do %s to your %s."),
                   nation_plural_for_player(offender),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   victim_link);
     break;
   case ATK_TILE:
@@ -281,7 +281,7 @@
                   _("The %s have caused an incident getting caught"
                     " trying to do %s at %s."),
                   nation_plural_for_player(offender),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   victim_link);
     break;
   case ATK_SELF:
@@ -310,14 +310,14 @@
                   /* TRANS: Suitcase Nuke */
                   _("Getting caught while trying to do %s gives "
                     "everyone a casus belli against you."),
-                  gen_action_translated_name(action_id));
+                  action_get_ui_name(action_id));
   } else if (receiver == victim_player) {
     notify_player(receiver, victim_tile,
                   E_DIPLOMATIC_INCIDENT, ftc_server,
                   /* TRANS: Suitcase Nuke ... Europeans */
                   _("Getting caught while trying to do %s to you gives "
                     "everyone a casus belli against the %s."),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   nation_plural_for_player(offender));
   } else if (victim_player == NULL) {
     notify_player(receiver, victim_tile,
@@ -326,7 +326,7 @@
                   _("You now have a casus belli against the %s. "
                     "They got caught trying to do %s."),
                   nation_plural_for_player(offender),
-                  gen_action_translated_name(action_id));
+                  action_get_ui_name(action_id));
   } else {
     notify_player(receiver, victim_tile,
                   E_DIPLOMATIC_INCIDENT, ftc_server,
@@ -334,7 +334,7 @@
                   _("You now have a casus belli against the %s. "
                     "They got caught trying to do %s to the %s."),
                   nation_plural_for_player(offender),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   nation_plural_for_player(victim_player));
   }
 }
@@ -383,7 +383,7 @@
                   E_DIPLOMATIC_INCIDENT, ftc_server,
                   /* TRANS: Suitcase Nuke ... San Francisco */
                   _("You have caused an incident doing %s to %s."),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   victim_link);
     break;
   case ATK_UNIT:
@@ -392,7 +392,7 @@
                   E_DIPLOMATIC_INCIDENT, ftc_server,
                   /* Bribe Enemy Unit ... American ... Partisan */
                   _("You have caused an incident doing %s to %s %s."),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   nation_adjective_for_player(victim_player),
                   victim_link);
     break;
@@ -401,7 +401,7 @@
                   E_DIPLOMATIC_INCIDENT, ftc_server,
                   /* Explode Nuclear ... (54, 26) */
                   _("You have caused an incident doing %s at %s."),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   victim_link);
     break;
   case ATK_SELF:
@@ -437,7 +437,7 @@
                   /* TRANS: Europeans ... Suitcase Nuke ... San Francisco */
                   _("The %s have caused an incident doing %s to %s."),
                   nation_plural_for_player(offender),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   victim_link);
     break;
   case ATK_UNIT:
@@ -448,7 +448,7 @@
                   _("The %s have caused an incident doing "
                     "%s to your %s."),
                   nation_plural_for_player(offender),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   victim_link);
     break;
   case ATK_TILE:
@@ -457,7 +457,7 @@
                   /* Europeans ... Explode Nuclear ... (54, 26) */
                   _("The %s have caused an incident doing %s at %s."),
                   nation_plural_for_player(offender),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   victim_link);
     break;
   case ATK_SELF:
@@ -485,14 +485,14 @@
                   E_DIPLOMATIC_INCIDENT, ftc_server,
                   /* TRANS: Suitcase Nuke */
                   _("Doing %s gives everyone a casus belli against you."),
-                  gen_action_translated_name(action_id));
+                  action_get_ui_name(action_id));
   } else if (receiver == victim_player) {
     notify_player(receiver, victim_tile,
                   E_DIPLOMATIC_INCIDENT, ftc_server,
                   /* TRANS: Suitcase Nuke ... Europeans */
                   _("Doing %s to you gives everyone a casus belli against "
                     "the %s."),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   nation_plural_for_player(offender));
   } else if (victim_player == NULL) {
     notify_player(receiver, victim_tile,
@@ -501,7 +501,7 @@
                   _("You now have a casus belli against the %s. "
                     "They did %s."),
                   nation_plural_for_player(offender),
-                  gen_action_translated_name(action_id));
+                  action_get_ui_name(action_id));
   } else {
     notify_player(receiver, victim_tile,
                   E_DIPLOMATIC_INCIDENT, ftc_server,
@@ -509,7 +509,7 @@
                   _("You now have a casus belli against the %s. "
                     "They did %s to the %s."),
                   nation_plural_for_player(offender),
-                  gen_action_translated_name(action_id),
+                  action_get_ui_name(action_id),
                   nation_plural_for_player(victim_player));
   }
 }

Modified: trunk/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=31161&r1=31160&r2=31161&view=diff
==============================================================================
--- trunk/server/unithand.c     (original)
+++ trunk/server/unithand.c     Wed Dec 23 15:57:05 2015
@@ -1109,7 +1109,7 @@
                       /* TRANS: Only Diplomat or Spy can do Steal Gold. */
                       _("Only %s can do %s."),
                       astr_str(&astr),
-                      gen_action_translated_name(stopped_action));
+                      action_get_ui_name(stopped_action));
         astr_free(&astr);
       } else {
         notify_player(pplayer, unit_tile(actor),
@@ -1117,7 +1117,7 @@
                       /* TRANS: Spy can't do Capture Units. */
                       _("%s can't do %s."),
                       unit_name_translation(actor),
-                      gen_action_translated_name(stopped_action));
+                      action_get_ui_name(stopped_action));
       }
     }
     break;
@@ -1126,7 +1126,7 @@
                   event, ftc_server,
                   _("Your %s can't do %s from %s."),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action),
+                  action_get_ui_name(stopped_action),
                   terrain_name_translation(expl->cant_act_from));
     break;
   case ANEK_IS_TRANSPORTED:
@@ -1134,14 +1134,14 @@
                   event, ftc_server,
                   _("Your %s can't do %s while being transported."),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action));
+                  action_get_ui_name(stopped_action));
     break;
   case ANEK_IS_NOT_TRANSPORTED:
     notify_player(pplayer, unit_tile(actor),
                   event, ftc_server,
                   _("Your %s can't do %s while not being transported."),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action));
+                  action_get_ui_name(stopped_action));
     break;
   case ANEK_NO_WAR:
     notify_player(pplayer, unit_tile(actor),
@@ -1149,7 +1149,7 @@
                   _("Your %s can't do %s while you"
                     " aren't at war with %s."),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action),
+                  action_get_ui_name(stopped_action),
                   player_name(expl->no_war_with));
     break;
   case ANEK_DOMESTIC:
@@ -1157,7 +1157,7 @@
                   event, ftc_server,
                   _("Your %s can't do %s to domestic %s."),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action),
+                  action_get_ui_name(stopped_action),
                   action_target_kind_translated_name(
                     action_get_target_kind(stopped_action)));
     break;
@@ -1166,7 +1166,7 @@
                   event, ftc_server,
                   _("Your %s can't do %s to foreign %s."),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action),
+                  action_get_ui_name(stopped_action),
                   action_target_kind_translated_name(
                     action_get_target_kind(stopped_action)));
     break;
@@ -1175,42 +1175,42 @@
                   event, ftc_server,
                   _("Your %s has too few moves left to %s."),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action));
+                  action_get_ui_name(stopped_action));
     break;
   case ANEK_IS_CITY_CENTER:
     notify_player(pplayer, unit_tile(actor),
                   event, ftc_server,
                   _("Your %s can't do %s to city centers."),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action));
+                  action_get_ui_name(stopped_action));
     break;
   case ANEK_IS_NOT_CITY_CENTER:
     notify_player(pplayer, unit_tile(actor),
                   event, ftc_server,
                   _("Your %s can only do %s to city centers."),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action));
+                  action_get_ui_name(stopped_action));
     break;
   case ANEK_TGT_IS_CLAIMED:
     notify_player(pplayer, unit_tile(actor),
                   event, ftc_server,
                   _("Your %s can't do %s to claimed tiles."),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action));
+                  action_get_ui_name(stopped_action));
     break;
   case ANEK_TGT_IS_UNCLAIMED:
     notify_player(pplayer, unit_tile(actor),
                   event, ftc_server,
                   _("Your %s can't do %s to unclaimed tiles."),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action));
+                  action_get_ui_name(stopped_action));
     break;
   case ANEK_SCENARIO_DISABLED:
     notify_player(pplayer, unit_tile(actor),
                   event, ftc_server,
                   /* TRANS: Can't do Build City in this scenario. */
                   _("Can't do %s in this scenario."),
-                  gen_action_translated_name(stopped_action));
+                  action_get_ui_name(stopped_action));
     break;
   case ANEK_CITY_TOO_BIG:
     notify_player(pplayer, unit_tile(actor),
@@ -1218,7 +1218,7 @@
                   /* TRANS: Settlers ... Join City ... London */
                   _("%s can't do %s to %s. It is too big."),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action),
+                  action_get_ui_name(stopped_action),
                   city_name(target_city));
     break;
   case ANEK_CITY_POP_LIMIT:
@@ -1229,7 +1229,7 @@
                     "%s cannot do %s."),
                   city_name(target_city),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action));
+                  action_get_ui_name(stopped_action));
     break;
   case ANEK_ACTION_BLOCKS:
     notify_player(pplayer, unit_tile(actor),
@@ -1237,15 +1237,15 @@
                   /* TRANS: Freight ... Recycle Unit ... Help Wonder ... */
                   _("Your %s can't do %s when %s is legal."),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action),
-                  gen_action_translated_name(expl->blocker->id));
+                  action_get_ui_name(stopped_action),
+                  action_get_ui_name(expl->blocker->id));
     break;
   case ANEK_UNKNOWN:
     notify_player(pplayer, unit_tile(actor),
                   event, ftc_server,
                   _("Your %s was unable to %s."),
                   unit_name_translation(actor),
-                  gen_action_translated_name(stopped_action));
+                  action_get_ui_name(stopped_action));
     break;
   }
 


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

Reply via email to