mail[Wesnoth-commits] r28936 - /trunk/data/multiplayer/scenarios/ANL_utils/


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by benoit . timbert on August 24, 2008 - 17:37:
Author: noyga
Date: Sun Aug 24 17:37:32 2008
New Revision: 28936

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28936&view=rev
Log:
- No more macro inside translatable strings (which were a *wrong* thing)
- Strip the color codes from the translatable strings

Modified:
    trunk/data/multiplayer/scenarios/ANL_utils/ANL_help.cfg
    trunk/data/multiplayer/scenarios/ANL_utils/ANL_leader_options.cfg
    trunk/data/multiplayer/scenarios/ANL_utils/ANL_research_options.cfg
    trunk/data/multiplayer/scenarios/ANL_utils/ANL_worker_options.cfg

Modified: trunk/data/multiplayer/scenarios/ANL_utils/ANL_help.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/multiplayer/scenarios/ANL_utils/ANL_help.cfg?rev=28936&r1=28935&r2=28936&view=diff
==============================================================================
--- trunk/data/multiplayer/scenarios/ANL_utils/ANL_help.cfg (original)
+++ trunk/data/multiplayer/scenarios/ANL_utils/ANL_help.cfg Sun Aug 24 
17:37:32 2008
@@ -110,49 +110,49 @@
                     [/option]
 
                     [option]
-                    message= _ "@Peasants"
+                    message="@" + _ "Peasants"
                         [command]
                         {ANL_HELP_PEASANTS}
                         [/command]
                     [/option]
 
                     [option]
-                    message= _ "@Mages"
+                    message="@" + _ "Mages"
                         [command]
                         {ANL_HELP_MAGES}
                         [/command]
                     [/option]
 
                     [option]
-                    message= _ "@Farms"
+                    message="@" + _ "Farms"
                         [command]
                         {ANL_HELP_FARMS}
                         [/command]
                     [/option]
 
                     [option]
-                    message= _ "@Villages"
+                    message="@" + _ "Villages"
                         [command]
                         {ANL_HELP_VILLAGES}
                         [/command]
                     [/option]
 
                     [option]
-                    message= _ "@Mines"
+                    message="@" + _ "Mines"
                         [command]
                         {ANL_HELP_MINES}
                         [/command]
                     [/option]
 
                     [option]
-                    message= _ "@Universities"
+                    message="@" + _ "Universities"
                         [command]
                         {ANL_HELP_UNIVERSITIES}
                         [/command]
                     [/option]
 
                     [option]
-                    message= _ "@Diplomacy"
+                    message="@" + _ "Diplomacy"
                         [command]
                         {ANL_HELP_DIPLOMACY}
                         [/command]

Modified: trunk/data/multiplayer/scenarios/ANL_utils/ANL_leader_options.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/multiplayer/scenarios/ANL_utils/ANL_leader_options.cfg?rev=28936&r1=28935&r2=28936&view=diff
==============================================================================
--- trunk/data/multiplayer/scenarios/ANL_utils/ANL_leader_options.cfg 
(original)
+++ trunk/data/multiplayer/scenarios/ANL_utils/ANL_leader_options.cfg Sun Aug 
24 17:37:32 2008
@@ -1,7 +1,6 @@
 #textdomain wesnoth-anl
 #define DONATE_FUNDS_OPTION TARGET_SIDE
 [option]
-    # don't try to translate this one
     message= "@$player_{TARGET_SIDE}.name"
     [show_if]
         {CONDITION leader.gold greater_than_equal_to 20}
@@ -36,9 +35,7 @@
 
 #define SHARE_FARMING_KNOWLEDGE_OPTION TARGET_SIDE
 [option]
-    # FIXME: need to fix this translatable string not using a macro inside it
-    message= {MENU_IMG_TXT "items/flower4.png" _"@$player_{TARGET_SIDE}.name
-Share knowledge of agriculture"}
+    message= {MENU_IMG_TXT "items/flower4.png" 
$diplo_msg[{TARGET_SIDE}].farming}
     [show_if]
         {CONDITION player_$side_number|.farming.target greater_than 
$player_{TARGET_SIDE}.farming.target}
         [have_unit]
@@ -70,9 +67,7 @@
 
 #define SHARE_MINING_KNOWLEDGE_OPTION TARGET_SIDE
 [option]
-    # FIXME: need to fix this translatable string not using a macro inside it
-    message= {MENU_IMG_TXT "items/gold-coins-small.png" 
_"@$player_{TARGET_SIDE}.name
-Share knowledge of mining"}
+    message= {MENU_IMG_TXT "items/gold-coins-small.png" 
$diplo_msg[{TARGET_SIDE}].mining}
     [show_if]
         {CONDITION player_$side_number|.mining.target greater_than 
$player_{TARGET_SIDE}.mining.target}
         [have_unit]
@@ -104,9 +99,7 @@
 
 #define SHARE_WARFARE_KNOWLEDGE_OPTION TARGET_SIDE
 [option]
-    # FIXME: need to fix this translatable string not using a macro inside it
-    message= {MENU_IMG_TXT "wesnoth-icon.png" _"@$player_{TARGET_SIDE}.name
-Share knowledge of warfare"}
+    message= {MENU_IMG_TXT "wesnoth-icon.png" 
$diplo_msg[{TARGET_SIDE}].warfare}
     [show_if]
         {CONDITION player_$side_number|.warfare.target greater_than 
$player_{TARGET_SIDE}.warfare.target}
         [have_unit]
@@ -172,7 +165,48 @@
         [/filter]
         variable=unit
     [/store_unit]
-
+    # build the translated messages for diplomatic options
+    [set_variable]
+       name=side_i
+       value=0
+    [/set_variable]
+    [while]
+       [variable]
+          name=side_i
+         less_than=4
+       [/variable]
+       [do]
+          [set_variable]
+            name=side_i
+            add=1
+          [/set_variable]
+          [set_variable]
+            name=player_name
+            to_variable="player_$side_i|.name"
+          [/set_variable]
+          [set_variable]
+            name=diplo_msg[$side_i].farming
+            value="@" + _ "$player_name
+Share knowledge of agriculture"
+          [/set_variable]
+          [set_variable]
+            name=diplo_msg[$side_i].mining
+            value="@" + _ "$player_name
+Share knowledge of mining"
+          [/set_variable]
+          [set_variable]
+            name=diplo_msg[$side_i].warfare
+            value="@" + _ "$player_name
+Share knowledge of warfare"
+          [/set_variable]
+          [clear_variable]
+            name=player_name
+          [/clear_variable]
+       [/do]
+    [/while]
+    [clear_variable]
+       name=side_i
+    [/clear_variable]
             {VARIABLE_OP side format $unit.side}
             {VARIABLE finished_options no}
             [while]
@@ -197,8 +231,8 @@
                         # Giving Money
 
                         [option]
-                            message= {MENU_IMG_TXT 
"items/gold-coins-small.png" _"@Donate Funds
-Give 20 gold to another player"}
+                            message= {MENU_IMG_TXT 
"items/gold-coins-small.png" ("@"+_"Donate Funds
+Give 20 gold to another player")}
                             [command]
                                 {VARIABLE finished_suboptions no}
                                 [while]
@@ -231,8 +265,8 @@
                         # Sharing Knowledge
 
                         [option]
-                            message= {MENU_IMG_TXT "items/book4.png" 
_"@Share Knowledge
-Help an ally with their research"}
+                            message= {MENU_IMG_TXT "items/book4.png" 
("@"+_"Share Knowledge
+Help an ally with their research")}
                             [command]
                                 {VARIABLE finished_suboptions no}
                                 [while]
@@ -279,9 +313,9 @@
     # Dwarves
 
     [option]
-        message= {MENU_IMG_TXT "units/dwarves/lord.png~TC(1,magenta)" 
_"@Negotiate with the Dwarves
+        message= {MENU_IMG_TXT "units/dwarves/lord.png~TC(1,magenta)" 
("@"+_"Negotiate with the Dwarves
 Lets you recruit a Dwarvish unit
-Negotiation Progress: 
$player_$side_number|.leader_option_1.progress|/$player_$side_number|.leader_option_1.target"}
+Negotiation Progress: 
$player_$side_number|.leader_option_1.progress|/$player_$side_number|.leader_option_1.target")}
     [show_if]
         {CONDITION player_$side_number|.ally_1 equals no}
         [or]
@@ -305,9 +339,9 @@
     # Elves
 
     [option]
-        message= {MENU_IMG_TXT "units/elves-wood/marshal.png~TC(1,magenta)" 
_"@Negotiate with the Elves
+        message= {MENU_IMG_TXT "units/elves-wood/marshal.png~TC(1,magenta)" 
("@"+_"Negotiate with the Elves
 Lets you recruit an Elvish unit
-Negotiation Progress: 
$player_$side_number|.leader_option_2.progress|/$player_$side_number|.leader_option_2.target"}
+Negotiation Progress: 
$player_$side_number|.leader_option_2.progress|/$player_$side_number|.leader_option_2.target")}
     [show_if]
         {CONDITION player_$side_number|.ally_5 equals no}
         [or]

Modified: trunk/data/multiplayer/scenarios/ANL_utils/ANL_research_options.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/multiplayer/scenarios/ANL_utils/ANL_research_options.cfg?rev=28936&r1=28935&r2=28936&view=diff
==============================================================================
--- trunk/data/multiplayer/scenarios/ANL_utils/ANL_research_options.cfg 
(original)
+++ trunk/data/multiplayer/scenarios/ANL_utils/ANL_research_options.cfg Sun 
Aug 24 17:37:32 2008
@@ -110,9 +110,9 @@
                     # Farming
 
                     [option]
-                        message= {MENU_IMG_TXT "items/flower4.png" 
_"@Agriculture
+                        message= {MENU_IMG_TXT "items/flower4.png" 
("@"+_"Agriculture
 Farmers produce +1 gold
-Study Progress: 
$player_$side_number|.farming.progress|/$player_$side_number|.farming.target"}
+Study Progress: 
$player_$side_number|.farming.progress|/$player_$side_number|.farming.target")}
                         [command]
                             {VARIABLE 
player_$side_number|.research.current_target "agriculture"}
                             {VARIABLE finished_options yes}
@@ -124,9 +124,9 @@
                     # Mining
 
                     [option]
-                        message= {MENU_IMG_TXT "items/gold-coins-small.png" 
_"@Mining
+                        message= {MENU_IMG_TXT "items/gold-coins-small.png" 
("@"+_"Mining
 Miners produce +1 gold
-Study Progress: 
$player_$side_number|.mining.progress|/$player_$side_number|.mining.target"}
+Study Progress: 
$player_$side_number|.mining.progress|/$player_$side_number|.mining.target")}
                         [command]
                             {VARIABLE 
player_$side_number|.research.current_target "mining"}
                             {VARIABLE finished_options yes}
@@ -138,9 +138,9 @@
                     #Warfare
 
                     [option]
-                        message= {MENU_IMG_TXT "wesnoth-icon.png" _"@Warfare
+                        message= {MENU_IMG_TXT "wesnoth-icon.png" 
("@"+_"Warfare
 Allows you to recruit a new type of unit
-Study Progress: 
$player_$side_number|.warfare.progress|/$player_$side_number|.warfare.target"}
+Study Progress: 
$player_$side_number|.warfare.progress|/$player_$side_number|.warfare.target")}
                         [show_if]
                             {CONDITION player_$side_number|.troop_1 equals 
no}
                             [or]

Modified: trunk/data/multiplayer/scenarios/ANL_utils/ANL_worker_options.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/multiplayer/scenarios/ANL_utils/ANL_worker_options.cfg?rev=28936&r1=28935&r2=28936&view=diff
==============================================================================
--- trunk/data/multiplayer/scenarios/ANL_utils/ANL_worker_options.cfg 
(original)
+++ trunk/data/multiplayer/scenarios/ANL_utils/ANL_worker_options.cfg Sun Aug 
24 17:37:32 2008
@@ -59,7 +59,7 @@
 # Convert to grassland
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Convert to Grassland" 
_"`Cost: 0g"}
+message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" ("@"+_"Convert to 
Grassland") ("`"+_"Cost: 0g")}
     {ANL_SHOW_IF ("Peasant") "Re"}
     [command]
         {COMPLETE_ACTION 0}
@@ -74,7 +74,7 @@
 # Plant Farm
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/flat/farm-veg-spring-icon.png" _"@Plant 
Farm" _"`Cost: 0g"}
+message= {MENU_IMG_TXT2 "terrain/flat/farm-veg-spring-icon.png" ("@"+_"Plant 
Farm") ("`"+_"Cost: 0g")}
     {ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
     [command]
         {COMPLETE_ACTION 0}
@@ -86,7 +86,7 @@
 # Build Village
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/village/human-tile.png" _"@Build Village" 
_"`Cost: 15g"}
+message= {MENU_IMG_TXT2 "terrain/village/human-tile.png" ("@"+_"Build 
Village") ("`"+_"Cost: 15g")}
     {ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
     [command]
         [if]
@@ -104,7 +104,7 @@
 # Build Castle
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/castle/castle-tile.png" _"@Build Castle" 
_"`Cost: 6g"}
+message= {MENU_IMG_TXT2 "terrain/castle/castle-tile.png" ("@"+_"Build 
Castle") ("`"+_"Cost: 6g")}
     {ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
     [command]
         [if]
@@ -121,7 +121,7 @@
 # Flood
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/water/coast.png" _"@Flood the Field" 
_"`Cost: 4g"}
+message= {MENU_IMG_TXT2 "terrain/water/coast.png" ("@"+_"Flood the Field") 
("`"+_"Cost: 4g")}
     {ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
     [command]
         [if]
@@ -138,7 +138,7 @@
 # Plant Saplings
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/forest/pine-tile.png" _"@Plant Saplings" 
_"`Cost: 1g"}
+message= {MENU_IMG_TXT2 "terrain/forest/pine-tile.png" ("@"+_"Plant 
Saplings") ("`"+_"Cost: 1g")}
     {ANL_SHOW_IF ("Peasant") "Gg,Gs,Ggf"}
     [command]
         [if]
@@ -158,7 +158,7 @@
 # Chop Down Forest
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Chop Down Forest" 
_"`Earns: 1g"}
+message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" ("@"+_"Chop Down 
Forest") ("`"+_"Earns: 1g")}
     {ANL_SHOW_IF ("Peasant") "Gs^Fp,Gs^Ft,Aa^Fpa,Gg^Fet"}
     [command]
             {VARIABLE finished yes}
@@ -185,7 +185,7 @@
 # Build Gold Mine
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/village/human-hills-tile.png" _"@Build 
Mine" _"`Cost: 25g"}
+message= {MENU_IMG_TXT2 "terrain/village/human-hills-tile.png" ("@"+_"Build 
Mine") ("`"+_"Cost: 25g")}
     {ANL_SHOW_IF ("Peasant") "Hh"}
     [command]
         [if]
@@ -206,7 +206,7 @@
 # Build Gold Mine
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/village/human-mountain-tile.png" _"@Build 
Mine" _"`Cost: 25g"}
+message= {MENU_IMG_TXT2 "terrain/village/human-mountain-tile.png" 
("@"+_"Build Mine") ("`"+_"Cost: 25g")}
     {ANL_SHOW_IF ("Peasant") "Mm"}
     [command]
         [if]
@@ -227,7 +227,7 @@
 # Make a Ford
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/water/ford.png" _"@Make a Ford" _"`Cost: 
3g"}
+message= {MENU_IMG_TXT2 "terrain/water/ford.png" ("@"+_"Make a Ford") 
("`"+_"Cost: 3g")}
     {ANL_SHOW_IF ("Peasant") "Ww"}
     [command]
         [if]
@@ -245,7 +245,7 @@
 # Landfill
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Landfill" _"`Cost: 
5g"}
+message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" ("@"+_"Landfill") 
("`"+_"Cost: 5g")}
     {ANL_SHOW_IF ("Peasant") "Ww"}
     [command]
         [if]
@@ -266,7 +266,7 @@
 # Destroy the Ford
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/water/coast.png" _"@Destroy the Ford" 
_"`Cost: 0g"}
+message= {MENU_IMG_TXT2 "terrain/water/coast.png" ("@"+_"Destroy the Ford") 
("`"+_"Cost: 0g")}
     {ANL_SHOW_IF ("Peasant") "Wwf"}
     [command]
             {COMPLETE_ACTION 0}
@@ -281,7 +281,7 @@
 # Landfill
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Landfill" _"`Cost: 
1g"}
+message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" ("@"+_"Landfill") 
("`"+_"Cost: 1g")}
     {ANL_SHOW_IF ("Peasant") "Wwf"}
     [command]
         [if]
@@ -302,7 +302,7 @@
 # Break Up Cave
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Smash Cave Floor" 
_"`Cost: 2g"}
+message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" ("@"+_"Smash Cave 
Floor") ("`"+_"Cost: 2g")}
     {ANL_SHOW_IF ("Peasant") "Uu,Uu^Ii"}
     [command]
         [if]
@@ -319,7 +319,7 @@
 # Convert Cave To Hills
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/hills-variation2.png" _"@Smash Cave Floor" 
_"`Cost: 3g"}
+message= {MENU_IMG_TXT2 "terrain/hills-variation2.png" ("@"+_"Smash Cave 
Floor") ("`"+_"Cost: 3g")}
     {ANL_SHOW_IF ("Peasant") "Uh,Uh^Ii"}
     [command]
         [if]
@@ -336,7 +336,7 @@
 # Harvest Cave Mushrooms
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/cave/floor.png" _"@Harvest Mushrooms" 
_"`Earns: 3g"}
+message= {MENU_IMG_TXT2 "terrain/cave/floor.png" ("@"+_"Harvest Mushrooms") 
("`"+_"Earns: 3g")}
     {ANL_SHOW_IF ("Peasant") "Uu^Uf"}
     [command]
             {VARIABLE finished yes}
@@ -361,7 +361,7 @@
 # Build Keep
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/castle/keep-tile.png" _"@Build a Keep" 
_"`Cost: 6g"}
+message= {MENU_IMG_TXT2 "terrain/castle/keep-tile.png" ("@"+_"Build a Keep") 
("`"+_"Cost: 6g")}
     {ANL_SHOW_IF ("Peasant") "Ch,Ce,Cv,Cud,Chr,Chw,Chs"}
     [command]
         [if]
@@ -378,10 +378,10 @@
 # ----------------------------------------------
 # VILLAGE
 
-# Establish Univeristy
-
-[option]
-message= {MENU_IMG_TXT2 "terrain/village/elven-tile.png" _"@Establish 
University" _"`Cost: 7g"}
+# Establish University
+
+[option]
+message= {MENU_IMG_TXT2 "terrain/village/elven-tile.png" ("@"+_"Establish 
University") ("`"+_"Cost: 7g")}
     {ANL_SHOW_IF ("Peasant") "Gg^Vh,Aa^Vha"}
     [command]
         [if]
@@ -402,7 +402,7 @@
 # Clear Rubble
 
 [option]
-message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" _"@Clear the Ground" 
_"`Cost: 0g"}
+message= {MENU_IMG_TXT2 "terrain/flat/grass-r8.png" ("@"+_"Clear the 
Ground") ("`"+_"Cost: 0g")}
     {ANL_SHOW_IF ("Peasant") "Rd"}
     [command]
             {COMPLETE_ACTION (-0)}




Related Messages


Powered by MHonArc, Updated Sun Aug 24 18:21:24 2008