2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-10 09:02:10 +00:00

[minor] update get languages

This commit is contained in:
Rushabh Mehta 2016-08-30 10:16:01 +05:30
parent 317cc26c2c
commit b07de2683a

View File

@ -573,12 +573,10 @@ def download_translations():
update_translations(app, lang) update_translations(app, lang)
def get_langs(): def get_langs():
lang_file = 'apps/frappe/frappe/data/languages.txt' lang_file = 'apps/frappe/frappe/geo/languages.json'
with open(lang_file) as f: with open(lang_file) as f:
lang_data = f.read() langs = json.loads(f.read())
langs = [line.split()[0] for line in lang_data.splitlines()] return [d['code'] for d in langs]
langs.remove('en')
return langs
def update_translations(app, lang): def update_translations(app, lang):
translations_dir = os.path.join('apps', app, app, 'translations') translations_dir = os.path.join('apps', app, app, 'translations')