diff --git a/translation/convert_translation.py b/translation/convert_translation.py index 00d8c45fa..43510f901 100644 --- a/translation/convert_translation.py +++ b/translation/convert_translation.py @@ -11,6 +11,9 @@ 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'] prefix_apps = '../apps/' @@ -40,6 +43,7 @@ for i in range(len(app_names)): arr = strSplit(lines[k]) if len(arr) > 0: str_apps.append(arr[0]) + str_apps.sort(key=sortByAlphabet) for l in range(len(langs)): lang = langs[l].split('.')[0] f = io.open(locale_path + lang+ '.json', mode='r', encoding='utf-8')