0.5.6 - Android Auto updates, option to disable nomedia, shuffle fix, minor fixes
This commit is contained in:
parent
11d93482ff
commit
e775e74d8e
35 changed files with 433 additions and 153 deletions
40
translations/crowdin.py
Normal file
40
translations/crowdin.py
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import zipfile
|
||||
import json
|
||||
|
||||
lang_crowdin = {
|
||||
'ar': 'ar_ar',
|
||||
'de': 'de_de',
|
||||
'el': 'el_gr',
|
||||
'es-ES': 'es_es',
|
||||
'fa': 'fa_ir',
|
||||
'fil': 'fil_ph',
|
||||
'fr': 'fr_fr',
|
||||
'he': 'he_il',
|
||||
'hr': 'hr_hr',
|
||||
'id': 'id_id',
|
||||
'it': 'it_id',
|
||||
'ko': 'ko_ko',
|
||||
'pt-BR': 'pt_br',
|
||||
'ro': 'ro_ro',
|
||||
'ru': 'ru_ru',
|
||||
'tr': 'tr_tr',
|
||||
'pl': 'pl_pl'
|
||||
}
|
||||
|
||||
def generate_dart():
|
||||
out = {}
|
||||
with zipfile.ZipFile('translations.zip') as zip:
|
||||
for file in zip.namelist():
|
||||
if 'freezer.json' in file:
|
||||
data = zip.open(file).read()
|
||||
lang = file.split('/')[0]
|
||||
out[lang_crowdin[lang]] = json.loads(data)
|
||||
|
||||
with open('crowdin.dart', 'w') as f:
|
||||
data = json.dumps(out, ensure_ascii=False).replace('$', '\\$')
|
||||
out = f'const crowdin = {data};'
|
||||
f.write(out)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
generate_dart()
|
||||
Loading…
Add table
Add a link
Reference in a new issue