From b07de2683ac526a766ef4697a0019a18988515b2 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 30 Aug 2016 10:16:01 +0530 Subject: [PATCH] [minor] update get languages --- bench/utils.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bench/utils.py b/bench/utils.py index 62268fba..5fed8246 100755 --- a/bench/utils.py +++ b/bench/utils.py @@ -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')