Author: sveinung
Date: Sun Mar 13 01:45:35 2016
New Revision: 32238

URL: http://svn.gna.org/viewcvs/freeciv?rev=32238&view=rev
Log:
Make extra flag names translatable.

See patch #7054

Modified:
    branches/S2_6/common/extras.h
    branches/S2_6/common/requirements.c
    branches/S2_6/server/cityturn.c
    branches/S2_6/translations/freeciv/POTFILES.in

Modified: branches/S2_6/common/extras.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/extras.h?rev=32238&r1=32237&r2=32238&view=diff
==============================================================================
--- branches/S2_6/common/extras.h       (original)
+++ branches/S2_6/common/extras.h       Sun Mar 13 01:45:35 2016
@@ -27,34 +27,34 @@
 #define SPECENUM_NAME extra_flag_id
 /* Tile with this extra is considered native for units in tile. */
 #define SPECENUM_VALUE0 EF_NATIVE_TILE
-#define SPECENUM_VALUE0NAME "NativeTile"
+#define SPECENUM_VALUE0NAME N_("?extraflag:NativeTile")
 /* Refuel native units */
 #define SPECENUM_VALUE1 EF_REFUEL
-#define SPECENUM_VALUE1NAME "Refuel"
+#define SPECENUM_VALUE1NAME N_("?extraflag:Refuel")
 #define SPECENUM_VALUE2 EF_TERR_CHANGE_REMOVES
-#define SPECENUM_VALUE2NAME "TerrChangeRemoves"
+#define SPECENUM_VALUE2NAME N_("?extraflag:TerrChangeRemoves")
 /* Extra will be built in cities automatically */
 #define SPECENUM_VALUE3 EF_AUTO_ON_CITY_CENTER
-#define SPECENUM_VALUE3NAME "AutoOnCityCenter"
+#define SPECENUM_VALUE3NAME N_("?extraflag:AutoOnCityCenter")
 /* Extra is always present in cities */
 #define SPECENUM_VALUE4 EF_ALWAYS_ON_CITY_CENTER
-#define SPECENUM_VALUE4NAME "AlwaysOnCityCenter"
+#define SPECENUM_VALUE4NAME N_("?extraflag:AlwaysOnCityCenter")
 /* Road style gfx from ocean extra connects to nearby land */
 #define SPECENUM_VALUE5 EF_CONNECT_LAND
-#define SPECENUM_VALUE5NAME "ConnectLand"
+#define SPECENUM_VALUE5NAME N_("?extraflag:ConnectLand")
 /* Counts towards Global Warming */
 #define SPECENUM_VALUE6 EF_GLOBAL_WARMING
-#define SPECENUM_VALUE6NAME "GlobalWarming"
+#define SPECENUM_VALUE6NAME N_("?extraflag:GlobalWarming")
 /* Counts towards Nuclear Winter */
 #define SPECENUM_VALUE7 EF_NUCLEAR_WINTER
-#define SPECENUM_VALUE7NAME "NuclearWinter"
+#define SPECENUM_VALUE7NAME N_("?extraflag:NuclearWinter")
 /* Owner's flag will be shown on the tile */
 #define SPECENUM_VALUE8 EF_SHOW_FLAG
-#define SPECENUM_VALUE8NAME "ShowFlag"
+#define SPECENUM_VALUE8NAME N_("?extraflag:ShowFlag")
 /* Extra's defense bonus will be counted to
  * separate "Natural" defense layer. */
 #define SPECENUM_VALUE9 EF_NATURAL_DEFENSE
-#define SPECENUM_VALUE9NAME "NaturalDefense"
+#define SPECENUM_VALUE9NAME N_("?extraflag:NaturalDefense")
 #define SPECENUM_COUNT EF_COUNT
 #define SPECENUM_BITVECTOR bv_extra_flags
 #include "specenum_gen.h"

Modified: branches/S2_6/common/requirements.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/requirements.c?rev=32238&r1=32237&r2=32238&view=diff
==============================================================================
--- branches/S2_6/common/requirements.c (original)
+++ branches/S2_6/common/requirements.c Sun Mar 13 01:45:35 2016
@@ -3375,8 +3375,7 @@
     cat_snprintf(buf, bufsz,
                  /* TRANS: Extra flag */
                  Q_("?extraflag:\"%s\" extra"),
-                 /* flag names are never translated */
-                 extra_flag_id_name(psource->value.extraflag));
+                 extra_flag_id_translated_name(psource->value.extraflag));
     return buf;
   case VUT_MINYEAR:
     cat_snprintf(buf, bufsz, _("After %s"),

Modified: branches/S2_6/server/cityturn.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/cityturn.c?rev=32238&r1=32237&r2=32238&view=diff
==============================================================================
--- branches/S2_6/server/cityturn.c     (original)
+++ branches/S2_6/server/cityturn.c     Sun Mar 13 01:45:35 2016
@@ -1725,7 +1725,7 @@
                                 "Postponing..."),
                               city_link(pcity),
                               city_improvement_name_translation(pcity, 
ptarget),
-                              
extra_flag_id_name(preq->source.value.extraflag));
+                              
extra_flag_id_translated_name(preq->source.value.extraflag));
                 script_server_signal_emit("building_cant_be_built", 3,
                                           API_TYPE_BUILDING_TYPE, ptarget,
                                           API_TYPE_CITY, pcity,
@@ -1738,7 +1738,7 @@
                                 "Postponing..."),
                               city_link(pcity),
                               city_improvement_name_translation(pcity, 
ptarget),
-                              
extra_flag_id_name(preq->source.value.extraflag));
+                              
extra_flag_id_translated_name(preq->source.value.extraflag));
                 script_server_signal_emit("building_cant_be_built", 3,
                                           API_TYPE_BUILDING_TYPE, ptarget,
                                           API_TYPE_CITY, pcity,

Modified: branches/S2_6/translations/freeciv/POTFILES.in
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/translations/freeciv/POTFILES.in?rev=32238&r1=32237&r2=32238&view=diff
==============================================================================
--- branches/S2_6/translations/freeciv/POTFILES.in      (original)
+++ branches/S2_6/translations/freeciv/POTFILES.in      Sun Mar 13 01:45:35 2016
@@ -206,6 +206,7 @@
 common/connection.c
 common/effects.c
 common/events.c
+common/extras.h
 common/fc_cmdhelp.c
 common/fc_types.h
 common/game.h


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

Reply via email to