summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael W <baddaemon87@gmail.com>2020-03-28 20:49:37 +0100
committerMichael W <baddaemon87@gmail.com>2020-03-28 21:30:00 +0100
commitb8394d824afdb1d47f7f3888f8a2d84a912eefcb (patch)
treef433b9dca2794482d5066edbbd2b8384c04fbc02
parentba72bd55496ca21563a359499839377effc0bb1b (diff)
downloadcm_crowdin-b8394d824afdb1d47f7f3888f8a2d84a912eefcb.tar.gz
cm_crowdin-b8394d824afdb1d47f7f3888f8a2d84a912eefcb.tar.bz2
cm_crowdin-b8394d824afdb1d47f7f3888f8a2d84a912eefcb.zip
crowdin: Fix console-output on download
* When we have errors or messages during cleanup, the string is currently in the wrong line Change-Id: Ic06509019f96c02f9602330908e612d7a77deb01
-rwxr-xr-xcrowdin_sync.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/crowdin_sync.py b/crowdin_sync.py
index f64e1d4..924c7c1 100755
--- a/crowdin_sync.py
+++ b/crowdin_sync.py
@@ -137,7 +137,7 @@ def clean_xml_file(base_path, project_path, filename, repo):
try:
fh = open(path, 'r+')
except:
- print('Something went wrong while opening file %s' % (path))
+ print('\nSomething went wrong while opening file %s' % (path))
return
XML = fh.read()
@@ -173,8 +173,8 @@ def clean_xml_file(base_path, project_path, filename, repo):
# Every occurance of the string has to be removed when no string with the same name and
# 'product=default' (or no product attribute) was found
if not hasProductDefault:
- print("{0}: Found string '{1}' with missing 'product=default' attribute"
- .format(path, stringName))
+ print("\n{0}: Found string '{1}' with missing 'product=default' attribute"
+ .format(path, stringName), end='')
for string in stringsWithSameName:
tree.remove(string)
alreadyRemoved.append(string)
@@ -213,7 +213,7 @@ def clean_xml_file(base_path, project_path, filename, repo):
# Remove files which don't have any translated strings
contentList = list(tree)
if len(contentList) == 0:
- print('Removing ' + path)
+ print('\nRemoving ' + path)
os.remove(path)
@@ -246,7 +246,7 @@ def reset_file(filepath, repo):
def push_as_commit(config_files, base_path, path, name, branch, username):
- print('Committing %s on branch %s: ' % (name, branch), end='')
+ print('\nCommitting %s on branch %s: ' % (name, branch), end='')
# Get path
project_path = path