Refactoring translation script

This commit is contained in:
Julia Radzhabova 2021-07-30 15:23:54 +03:00
parent dab0216a3b
commit 6962f3b42b

View file

@ -11,11 +11,13 @@ def strSplit(str):
indLast = str.rfind('"')
result.append(str[ind3+1:indLast])
return result
def sortByAlphabet(inputStr):
return inputStr.lower()
app_names = ['documenteditor', 'presentationeditor', 'spreadsheeteditor']
#app_types = ['embed', 'main', 'mobile']
app_types = ['embed', 'main']
prefix_apps = '../apps/'
prefix_src = 'src/'
@ -104,10 +106,10 @@ for i in range(len(app_names)):
print(' ' + lang + '.json - ' + changed)
if os.path.isdir(src_path):
add_langs = os.listdir(src_path)
for l in range(len(langs)):
if add_langs.count(langs[l])>0:
add_langs.remove(langs[l])
for l in range(len(add_langs)):
lang = add_langs[l]
for m in range(len(langs)):
if add_langs.count(langs[m]) > 0:
add_langs.remove(langs[m])
for m in range(len(add_langs)):
lang = add_langs[m]
shutil.copyfile(src_path + lang, dest_path + lang)
print(' ' + lang + ' - ' + 'added')