David Keegan avatar David Keegan committed 53c115e

*fixing bug where '.xib.xib' was added to the 'to language' nibs
*if the 'to language' nib does not exist the whole ibtools task is run to generate it. This is to fix a bug where in a fresh checkout there are no 'to language' nibs, but the md5 checksum is valid, so the nibs are never generated.

Comments (0)

Files changed (1)

         jsonData = {}
         
     fromLangLproj = fromLang+'.lproj'
-    for eachNib in nibs:
-        eachNib = eachNib.strip()
-        if not(eachNib.endswith('.xib')):
-            eachNib += '.xib'
-        fromNib = os.path.join(fromLangLproj, eachNib)
-        #if the fromFile is not in the jsonData or the md5 is different
-        fromNibMd5 = md5(fromNib)
-        if not(fromNib in jsonData) or jsonData[fromNib] != fromNibMd5:
-            for eachToLang in toLangs:
-                toLangLproj = eachToLang.strip()+'.lproj'
-                toNib =  os.path.join(toLangLproj, eachNib+'.xib')
+    for eachToLang in toLangs:
+        toLangLproj = eachToLang.strip()+'.lproj'
+        for eachNib in nibs:
+            eachNib = eachNib.strip()
+            if not(eachNib.endswith('.xib')):
+                eachNib += '.xib'
+            fromNib = os.path.join(fromLangLproj, eachNib)
+            toNib =  os.path.join(toLangLproj, eachNib)
+            fromNibMd5 = md5(fromNib)
+            
+            #if the 'to nib' does not exist, or the 'from nib' is not in the json data, or the checksum does not match
+            if not(os.path.isfile(toNib)) or not(fromNib in jsonData) or jsonData[fromNib] != fromNibMd5:
                 generateStringsFile(fromNib, utf8)
                 writeNib(fromNib, toNib, utf8)
                 jsonData[fromNib] = fromNibMd5
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.