2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-10 00:37:51 +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)
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:
lang_data = f.read()
langs = [line.split()[0] for line in lang_data.splitlines()]
langs.remove('en')
return langs
langs = json.loads(f.read())
return [d['code'] for d in langs]
def update_translations(app, lang):
translations_dir = os.path.join('apps', app, app, 'translations')