Added the ability to fix the old apostrophe thing

This commit is contained in:
Ciaran Gultnieks 2011-03-03 20:25:18 +00:00
parent 3b1ad02d01
commit 263e4c4e7b
2 changed files with 32 additions and 15 deletions

View file

@ -252,8 +252,20 @@ for app in apps:
if thisbuild.has_key('rm'):
os.remove(os.path.join(build_dir, thisbuild['rm']))
# Fix apostrophes translation files if necessary...
if thisbuild.get('fixapos', 'no') == 'yes':
for root, dirs, files in os.walk(os.path.join(root_dir,'res')):
for filename in files:
if filename.endswith('.xml'):
if subprocess.call(['sed','-i','s@' +
r"\([^\\]\)'@\1\\'" +
'@g',
os.path.join(root, filename)]) != 0:
print "Failed to amend " + filename
sys.exit(1)
# Fix translation files if necessary...
if thisbuild.has_key('fixtrans') and thisbuild['fixtrans'] == 'yes':
if thisbuild.get('fixtrans', 'no') == 'yes':
for root, dirs, files in os.walk(os.path.join(root_dir,'res')):
for filename in files:
if filename.endswith('.xml'):