add id_ID locale

This commit is contained in:
Jannes Höke
2016-05-23 13:08:43 +02:00
parent e7e3fbf4ce
commit ecc0b3adc7
4 changed files with 465 additions and 7 deletions

View File

@ -38,7 +38,7 @@ def flag(code):
available_locales = [['en_US - ' + flag('US') + ' English (US)'],
['de_DE - ' + flag('DE') + ' Deutsch (DE)'],
['es_ES - ' + flag('ES') + ' Español (ES)'],
# ['in_ID - ' + flag('ID') + ' Bahasa Indonesia'],
['id_ID - ' + flag('ID') + ' Bahasa Indonesia'],
['it_IT - ' + flag('IT') + ' Italiano'],
['pt_BR - ' + flag('BR') + ' Português Brasileiro'],
['zh_HK - ' + flag('HK') + ' 廣東話'],
@ -102,7 +102,9 @@ def locale_select(bot, update, groups):
user = update.message.from_user
option = groups[0]
if option in [locale.split()[0] for row in available_locales for locale in row]:
if option in [locale.split()[0]
for row in available_locales
for locale in row]:
us = UserSetting.get(id=user.id)
us.lang = option
_.push(option)