change content from en_US to zh_TW
This commit is contained in:
@ -25,42 +25,31 @@ from utils import send_async
|
||||
from shared_vars import dispatcher
|
||||
from internationalization import _, user_locale
|
||||
|
||||
help_text = ("Follow these steps:\n\n"
|
||||
"1. Add this bot to a group\n"
|
||||
"2. In the group, start a new game with /new or join an already"
|
||||
" running game with /join\n"
|
||||
"3. After at least two players have joined, start the game with"
|
||||
" /start\n"
|
||||
"4. Type <code>@unobot</code> into your chat box and hit "
|
||||
"<b>space</b>, or click the <code>via @unobot</code> text "
|
||||
"next to messages. You will see your cards (some greyed out), "
|
||||
"any extra options like drawing, and a <b>?</b> to see the "
|
||||
"current game state. The <b>greyed out cards</b> are those you "
|
||||
"<b>can not play</b> at the moment. Tap an option to execute "
|
||||
"the selected action.\n"
|
||||
"Players can join the game at any time. To leave a game, "
|
||||
"use /leave. If a player takes more than 90 seconds to play, "
|
||||
"you can use /skip to skip that player. Use /notify_me to "
|
||||
"receive a private message when a new game is started.\n\n"
|
||||
"<b>Language</b> and other settings: /settings\n"
|
||||
"Other commands (only game creator):\n"
|
||||
"/close - Close lobby\n"
|
||||
"/open - Open lobby\n"
|
||||
"/enable_translations - Translate relevant texts into all "
|
||||
"languages spoken in a game\n"
|
||||
"/disable_translations - Use English for those texts\n\n"
|
||||
"<b>Experimental:</b> Play in multiple groups at the same time. "
|
||||
"Press the <code>Current game: ...</code> button and select the "
|
||||
"group you want to play a card in.\n"
|
||||
"If you enjoy this bot, "
|
||||
"<a href=\"https://telegram.me/storebot?start=mau_mau_bot\">"
|
||||
"rate me</a>, join the "
|
||||
"<a href=\"https://telegram.me/unobotupdates\">update channel</a>"
|
||||
" and buy an UNO card game.")
|
||||
help_text = ("請跟隨以下指示:\n\n"
|
||||
"1. 將這個機器人新增到群組\n"
|
||||
"2. 輸入 /new 開始一個新遊戲或輸入 /join 加入一個運行中的遊戲\n"
|
||||
"3. 當有兩個或以上的玩家加入, 就可以用 /start 開始遊戲\n"
|
||||
"4. 輸入 <code>@unobot</code> 然後按<b>空白鍵</b> 或點一下"
|
||||
"<code>via @unobot</code>。之後你會看見你手上的牌或者其他選項例如 DRAW(抽牌),和"
|
||||
"<b>?</b>看其他玩家狀態。但<b>灰色的牌</b>就是<b>你現在不能使用的牌</b>,選擇其中一個"
|
||||
"選項來執行對應的操作。\n"
|
||||
"玩家可以在任何時間加入,如果想離開,請打 /leave 。如果玩家90秒後都沒有出牌"
|
||||
",你可以用 /skip 跳過他。輸入 /notify_me 以讓我在本群組遊戲開始時私訊你\n"
|
||||
"\n"
|
||||
"<b>語言</b>和其他設定: /settings\n"
|
||||
"遊戲創始人可以用以下的指令:\n"
|
||||
"/close - 令其他人不可以中途加入\n"
|
||||
"/open - 令其他人可以中途加入\n"
|
||||
"<b>試驗功能:</b> 同時在不同的群組中遊玩 請選擇 <code>目前遊戲:...</code>"
|
||||
"然後選擇你想在哪個群組玩。\n"
|
||||
"如果你喜歡這個 bot,你可以選擇買一副 UNO 牌來支持 UNO!")
|
||||
|
||||
source_text = ("This bot is Free Software and licensed under the AGPL. "
|
||||
"The code is available here: \n"
|
||||
"https://github.com/jh0ker/mau_mau_bot")
|
||||
source_text = ("這個 bot 是一個免費的軟體,根據 AGPL 授權 \n"
|
||||
"原始碼可以在這裡找到:\n"
|
||||
"https://github.com/PinLin/mau_mau_bot\n"
|
||||
"I fork from:\n"
|
||||
"https://github.com/jh0ker/mau_mau_bot\n"
|
||||
"Thanks very much!")
|
||||
attributions = ("Attributions:\n"
|
||||
'Draw icon by '
|
||||
'<a href="http://www.faithtoken.com/">Faithtoken</a>\n'
|
||||
@ -99,29 +88,29 @@ def stats(bot, update):
|
||||
us = UserSetting.get(id=user.id)
|
||||
if not us or not us.stats:
|
||||
send_async(bot, update.message.chat_id,
|
||||
text=_("You did not enable statistics. Use /settings in "
|
||||
"a private chat with the bot to enable them."))
|
||||
text=_("您尚未啟用統計資料,請私我 "
|
||||
"<code>/settings</code> 來啟用他"))
|
||||
else:
|
||||
stats_text = list()
|
||||
|
||||
n = us.games_played
|
||||
stats_text.append(
|
||||
_("{number} game played",
|
||||
"{number} games played",
|
||||
_("已遊玩 {number} 個遊戲",
|
||||
"已遊玩 {number} 個遊戲",
|
||||
n).format(number=n)
|
||||
)
|
||||
|
||||
n = us.first_places
|
||||
stats_text.append(
|
||||
_("{number} first place",
|
||||
"{number} first places",
|
||||
_("拿了 {number} 次第一名",
|
||||
"拿了 {number} 次第一名",
|
||||
n).format(number=n)
|
||||
)
|
||||
|
||||
n = us.cards_played
|
||||
stats_text.append(
|
||||
_("{number} card played",
|
||||
"{number} cards played",
|
||||
_("已遊玩 {number} 張牌",
|
||||
"已遊玩 {number} 張牌",
|
||||
n).format(number=n)
|
||||
)
|
||||
|
||||
@ -132,5 +121,5 @@ def stats(bot, update):
|
||||
def register():
|
||||
dispatcher.add_handler(CommandHandler('help', help))
|
||||
dispatcher.add_handler(CommandHandler('source', source))
|
||||
dispatcher.add_handler(CommandHandler('news', news))
|
||||
# dispatcher.add_handler(CommandHandler('news', news))
|
||||
dispatcher.add_handler(CommandHandler('stats', stats))
|
||||
|
Reference in New Issue
Block a user