change content from en_US to zh_TW

This commit is contained in:
2017-07-04 21:48:57 +08:00
parent e74f7b2854
commit ab20bedd5a
5 changed files with 127 additions and 163 deletions

View File

@ -34,8 +34,7 @@ def show_settings(bot, update):
if update.message.chat.type != 'private':
send_async(bot, chat.id,
text=_("Please edit your settings in a private chat with "
"the bot."))
text=_("請私訊我來修改你的設定"))
return
us = UserSetting.get(id=update.message.from_user.id)
@ -44,12 +43,12 @@ def show_settings(bot, update):
us = UserSetting(id=update.message.from_user.id)
if not us.stats:
stats = Emoji.BAR_CHART + ' ' + _("Enable statistics")
stats = Emoji.BAR_CHART + ' ' + _("啟用統計資料")
else:
stats = Emoji.CROSS_MARK + ' ' + _("Delete all statistics")
stats = Emoji.CROSS_MARK + ' ' + _("刪除所有統計資料")
kb = [[stats], [Emoji.EARTH_GLOBE_EUROPE_AFRICA + ' ' + _("Language")]]
send_async(bot, chat.id, text=Emoji.WRENCH + ' ' + _("Settings"),
kb = [[stats], [Emoji.EARTH_GLOBE_EUROPE_AFRICA + ' ' + _("語言")]]
send_async(bot, chat.id, text=Emoji.WRENCH + ' ' + _("設定"),
reply_markup=ReplyKeyboardMarkup(keyboard=kb,
one_time_keyboard=True))
@ -63,13 +62,13 @@ def kb_select(bot, update, groups):
if option == Emoji.BAR_CHART:
us = UserSetting.get(id=user.id)
us.stats = True
send_async(bot, chat.id, text=_("Enabled statistics!"))
send_async(bot, chat.id, text=_("已啟用統計資料!"))
elif option == Emoji.EARTH_GLOBE_EUROPE_AFRICA:
kb = [[locale + ' - ' + descr]
for locale, descr
in sorted(available_locales.items())]
send_async(bot, chat.id, text=_("Select locale"),
send_async(bot, chat.id, text=_("選擇語言"),
reply_markup=ReplyKeyboardMarkup(keyboard=kb,
one_time_keyboard=True))
@ -79,7 +78,7 @@ def kb_select(bot, update, groups):
us.first_places = 0
us.games_played = 0
us.cards_played = 0
send_async(bot, chat.id, text=_("Deleted and disabled statistics!"))
send_async(bot, chat.id, text=_("已停用並刪除統計資料!"))
@user_locale
@ -92,7 +91,7 @@ def locale_select(bot, update, groups):
us = UserSetting.get(id=user.id)
us.lang = option
_.push(option)
send_async(bot, chat.id, text=_("Set locale!"))
send_async(bot, chat.id, text=_("已設定所選擇的語言"))
_.pop()