mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-14 06:52:39 +03:00
Added the ability to fix the old apostrophe thing
This commit is contained in:
parent
3b1ad02d01
commit
263e4c4e7b
2 changed files with 32 additions and 15 deletions
14
build.py
14
build.py
|
@ -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'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue