i18n: Use language code instead of locale.

We have been assigning locale to language code. Mostly code and locale
are same but for languages like zh-Hans, locale is zh_Hans and code is
zh-hans.

After this commit, compilemessages command should be run.
This commit is contained in:
Umair Khan
2017-10-20 11:16:18 +05:00
committed by Tim Abbott
parent df13ac570a
commit 2db1cba9cc
4 changed files with 13 additions and 7 deletions

View File

@@ -89,6 +89,7 @@ class Command(compilemessages.Command):
'name': 'English',
'name_local': 'English',
'code': 'en',
'locale': 'en',
})
continue
@@ -111,7 +112,8 @@ class Command(compilemessages.Command):
info['name'] = name
info['name_local'] = name_local
info['code'] = locale
info['code'] = code
info['locale'] = locale
info['percent_translated'] = percentage
data['languages'].append(info)