← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~miroslavr256/widelands/buildcat-fixes into lp:widelands

 

Miroslav Remák has proposed merging lp:~miroslavr256/widelands/buildcat-fixes into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~miroslavr256/widelands/buildcat-fixes/+merge/280529

This merge proposal renames every map directory that contains spaces to use underscores instead. This is to prevent the msguniq utility from splitting occurrences containing spaces.

Furthermore, maps.pot is now sorted properly.

Relevant discussion: https://code.launchpad.net/~miroslavr256/widelands/official-lua-xgettext/+merge/279224
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~miroslavr256/widelands/buildcat-fixes into lp:widelands.
=== renamed directory 'maps/Comet Island.wmf' => 'maps/Comet_Island.wmf'
=== renamed directory 'maps/Crossing the Horizon.wmf' => 'maps/Crossing_the_Horizon.wmf'
=== renamed directory 'maps/Desert Tournament.wmf' => 'maps/Desert_Tournament.wmf'
=== renamed directory 'maps/Dry Riverbed.wmf' => 'maps/Dry_Riverbed.wmf'
=== renamed directory 'maps/Elven Forests.wmf' => 'maps/Elven_Forests.wmf'
=== renamed directory 'maps/Finnish Lakes.wmf' => 'maps/Finnish_Lakes.wmf'
=== renamed directory 'maps/Four Castles.wmf' => 'maps/Four_Castles.wmf'
=== renamed directory 'maps/Four Mountains.wmf' => 'maps/Four_Mountains.wmf'
=== renamed directory 'maps/Glacier Lake.wmf' => 'maps/Glacier_Lake.wmf'
=== renamed directory 'maps/Golden Peninsula.wmf' => 'maps/Golden_Peninsula.wmf'
=== renamed directory 'maps/Ice wars.wmf' => 'maps/Ice_wars.wmf'
=== renamed directory 'maps/Islands at war.wmf' => 'maps/Islands_at_war.wmf'
=== renamed directory 'maps/Kings and Queens.wmf' => 'maps/Kings_and_Queens.wmf'
=== renamed directory 'maps/Lake of Tranquility.wmf' => 'maps/Lake_of_Tranquility.wmf'
=== renamed directory 'maps/Last Bastion.wmf' => 'maps/Last_Bastion.wmf'
=== renamed directory 'maps/Long, long way.wmf' => 'maps/Long,_long_way.wmf'
=== renamed directory 'maps/MP Scenarios' => 'maps/MP_Scenarios'
=== renamed directory 'maps/MP Scenarios/Island Hopping.wmf' => 'maps/MP_Scenarios/Island_Hopping.wmf'
=== renamed directory 'maps/Mystical Maze.wmf' => 'maps/Mystical_Maze.wmf'
=== renamed directory 'maps/River Explorers.wmf' => 'maps/River_Explorers.wmf'
=== renamed directory 'maps/Sun of fire.wmf' => 'maps/Sun_of_fire.wmf'
=== renamed directory 'maps/Swamp Island.wmf' => 'maps/Swamp_Island.wmf'
=== renamed directory 'maps/Swamp Monks.wmf' => 'maps/Swamp_Monks.wmf'
=== renamed directory 'maps/The Big Lake.wmf' => 'maps/The_Big_Lake.wmf'
=== renamed directory 'maps/The Far North.wmf' => 'maps/The_Far_North.wmf'
=== renamed directory 'maps/The Green Plateau.wmf' => 'maps/The_Green_Plateau.wmf'
=== renamed directory 'maps/The Nile.wmf' => 'maps/The_Nile.wmf'
=== renamed directory 'maps/The Oasis Triangle.wmf' => 'maps/The_Oasis_Triangle.wmf'
=== renamed directory 'maps/The Pass Through the Mountains.wmf' => 'maps/The_Pass_Through_the_Mountains.wmf'
=== renamed directory 'maps/The Thaw.wmf' => 'maps/The_Thaw.wmf'
=== renamed directory 'maps/The long way.wmf' => 'maps/The_long_way.wmf'
=== renamed directory 'maps/Three Warriors.wmf' => 'maps/Three_Warriors.wmf'
=== renamed directory 'maps/Together We’re Strong.wmf' => 'maps/Together_We’re_Strong.wmf'
=== renamed directory 'maps/Trident of Fire.wmf' => 'maps/Trident_of_Fire.wmf'
=== renamed directory 'maps/Twin Lagoons.wmf' => 'maps/Twin_Lagoons.wmf'
=== renamed directory 'maps/Twinkling Waves.wmf' => 'maps/Twinkling_Waves.wmf'
=== renamed directory 'maps/Two frontiers.wmf' => 'maps/Two_frontiers.wmf'
=== renamed directory 'maps/Volcanic Winter.wmf' => 'maps/Volcanic_Winter.wmf'
=== renamed directory 'maps/War of the Valleys.wmf' => 'maps/War_of_the_Valleys.wmf'
=== renamed directory 'maps/Wisent Valley.wmf' => 'maps/Wisent_Valley.wmf'
=== modified file 'src/wui/mapdata.h'
--- src/wui/mapdata.h	2015-10-02 09:26:57 +0000
+++ src/wui/mapdata.h	2015-12-14 23:27:30 +0000
@@ -125,7 +125,7 @@
 	/// Create a subdirectory
 	static MapData create_directory(const std::string& directory) {
 		std::string localized_name;
-		if (boost::equals(directory, "maps/MP Scenarios")) {
+		if (boost::equals(directory, "maps/MP_Scenarios")) {
 			/** TRANSLATORS: Directory name for MP Scenarios in map selection */
 			localized_name = _("Multiplayer Scenarios");
 		} else {

=== modified file 'utils/buildcat.py'
--- utils/buildcat.py	2015-12-12 05:29:22 +0000
+++ utils/buildcat.py	2015-12-14 23:27:30 +0000
@@ -107,8 +107,8 @@
     ("map_%(name)s/map_%(name)s", "maps/",
          [ "../../maps/%(name)s/scripting/*.lua", ]
     ),
-    ("mp_scenario_%(name)s/mp_scenario_%(name)s", "maps/MP Scenarios/",
-         [ "../../maps/MP Scenarios/%(name)s/scripting/*.lua", ]
+    ("mp_scenario_%(name)s/mp_scenario_%(name)s", "maps/MP_Scenarios/",
+         [ "../../maps/MP_Scenarios/%(name)s/scripting/*.lua", ]
     ),
 ]
 
@@ -216,7 +216,13 @@
             potout.writelines(potin)
 
         return True
-
+    
+def run_msguniq(potfile):
+    msguniq_rv = os.system("msguniq \"%s\" -F --output-file=\"%s\"" % (potfile, potfile))
+    if (msguniq_rv):
+        sys.stderr.write("msguniq exited with errorcode %i\n" % msguniq_rv)
+        return False
+    return True
 
 def do_compile( potfile, srcfiles ):
     """
@@ -274,13 +280,15 @@
             with open(potfile, "at") as p:
                 p.write("\n" + conf.toString())
                 
-            msguniq_rv = os.system("msguniq \"%s\" -F --output-file=\"%s\"" % (potfile, potfile))
-            if (msguniq_rv):
-                sys.stderr.write("msguniq exited with errorcode %i\n" % msguniq_rv)
+            if not run_msguniq(potfile):
                 return False
     elif (conf.found_something_to_translate):
         with open(potfile, "wt") as p:
             p.write(HEAD + conf.toString())
+            
+        # Msguniq is run here only to sort POT entries by file
+        if not run_msguniq(potfile):
+            return False
 
     return True
     


Follow ups