Skip to content

Commit

Permalink
Iconving
Browse files Browse the repository at this point in the history
Needs Iconv to make the format fit for XCode.
  • Loading branch information
gamma committed Jan 4, 2013
1 parent a6015dd commit d85f90c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions merge.py
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit d85f90c

Please sign in to comment.