Remove () from language names. (#14771)

This commit is contained in:
zoltanvb 2022-12-27 21:42:00 +01:00 committed by GitHub
parent 3092fda58b
commit 357ebc154b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,8 @@ with open("crowdin.yaml", 'r') as config_file:
lang_name = res2.json()['data']['name']
output += '/* ' + lang_name + ' */\n'
escaped_name = lang_name.replace(', ', '_').replace(' ', '_').upper()
replacements = lang_name.maketrans(' ', '_', ',()')
escaped_name = lang_name.translate(replacements).upper()
output += '#define LANGUAGE_PROGRESS_' + escaped_name + '_TRANSLATED ' + str(lang['data']['translationProgress']) + '\n'
output += '#define LANGUAGE_PROGRESS_' + escaped_name + '_APPROVED ' + str(lang['data']['approvalProgress']) + '\n\n'
with open("progress.h", 'w') as output_file: