Permalink
Browse files

Iconving

Needs Iconv to make the format fit for XCode.
  • Loading branch information...
1 parent a6015dd commit d85f90c9b43960515abab1b5b3083fe6551915a0 @gamma committed Jan 4, 2013
Showing with 8 additions and 3 deletions.
  1. +8 −3 merge.py
View
@@ -28,7 +28,8 @@ def mergeFiles(path, mergePath):
original = path + os.path.sep + language + os.path.sep + STRINGS_FILE
old = original + '.old'
-
+ new = original + '.new'
+
# There is no such language lproj
if not os.path.isdir(mergePath + os.path.sep + language ):
print >>sys.stderr, 'Did not find Language in mergePath: ', mergePath + os.path.sep + language
@@ -46,8 +47,12 @@ def mergeFiles(path, mergePath):
shutil.copyfileobj(open(toMergeWith, 'rb'), destination)
destination.close
- sortLocale(old, original)
- os.remove(old)
+ iconvFile(old, new)
+ sortLocale(new, original)
+ if os.path.isfile(old):
+ os.remove(old)
+ if os.path.isfile(new):
+ os.remove(new)
if __name__ == '__main__':
if len(sys.argv) < 3:

0 comments on commit d85f90c

Please sign in to comment.