Fix removal of some empty translation files
Change-Id: I07714f7d92c88dab8eb7245da402148e21fe496e
diff --git a/cm_crowdin_sync.py b/cm_crowdin_sync.py
index 7642a45..32282c8 100755
--- a/cm_crowdin_sync.py
+++ b/cm_crowdin_sync.py
@@ -164,7 +164,6 @@
a_line = a_line.replace('l10n.add(\'en\'', 'l10n.add(\'' + lang + '\'')
# Now write the line
file_write.write(a_line)
-
# Create XML file structure
if sync_type == 'upload':
@@ -306,7 +305,10 @@
os.remove(xml_file)
elif '<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"/>' in open(xml_file).read():
print ('Removing ' + xml_file)
- os.remove(xml_file)
+ os.remove(xml_file)
+ elif '<resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"/>' in open(xml_file).read():
+ print ('Removing ' + xml_file)
+ os.remove(xml_file)
print('\nSTEP 5: Push translations to Git')
# Get all files that Crowdin pushed