Merge pull request #72 from pan93412/pan93412-patch-1

feature, l10n, i18n: Add pipenv support, let more strings translatable and some improves.
This commit is contained in:
Jannes Höke 2019-10-07 12:28:39 +02:00 committed by GitHub
commit 8d0f8cf887
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 1066 additions and 782 deletions

View file

@ -7,6 +7,7 @@
The following wonderful people contributed directly or indirectly to this project: The following wonderful people contributed directly or indirectly to this project:
- [imlonghao](https://github.com/imlonghao) - [imlonghao](https://github.com/imlonghao)
- [pan93412](https://github.com/pan93412)
- [qubitnerd](https://github.com/qubitnerd) - [qubitnerd](https://github.com/qubitnerd)
- [SYHGroup](https://github.com/SYHGroup) - [SYHGroup](https://github.com/SYHGroup)

13
Pipfile Normal file
View file

@ -0,0 +1,13 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
python-telegram-bot = "==8.1.1"
pony = "*"
[requires]
python_version = "3.7"

49
Pipfile.lock generated Normal file
View file

@ -0,0 +1,49 @@
{
"_meta": {
"hash": {
"sha256": "de56c4d5f516205e99d141cd7d372f67b602b6f981306971c01ffe25a5abf5c6"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.7"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"certifi": {
"hashes": [
"sha256:046832c04d4e752f37383b628bc601a7ea7211496b4638f6514d0e5b9acc4939",
"sha256:945e3ba63a0b9f577b1395204e13c3a231f9bc0223888be653286534e5873695"
],
"version": "==2019.6.16"
},
"future": {
"hashes": [
"sha256:67045236dcfd6816dc439556d009594abf643e5eb48992e36beac09c2ca659b8"
],
"version": "==0.17.1"
},
"pony": {
"hashes": [
"sha256:55bb9d4d12029d8c2bbbc7a284970e72225035db7e6370c0a15ec93d1886fe88"
],
"index": "pypi",
"version": "==0.7.10"
},
"python-telegram-bot": {
"hashes": [
"sha256:238c4a88b09d93c52d413bcf7e7fe14dfeb02f5f9222ffe4cafd4bd3d55489a3",
"sha256:997983e5082dc6aa811bce3a6014731201fc64b0a9c02fdb26beac686029d94b"
],
"index": "pypi",
"version": "==8.1.1"
}
},
"develop": {}
}

View file

@ -11,6 +11,6 @@ The following awesome people contributed to this project by translating it:
| pt_BR | [João Rodrigo Couto de Oliveira](http://twitter.com/JoaoRodrigoJR) | | pt_BR | [João Rodrigo Couto de Oliveira](http://twitter.com/JoaoRodrigoJR) |
| zh_CN | [imlonghao](https://github.com/imlonghao) | | zh_CN | [imlonghao](https://github.com/imlonghao) |
| zh_HK | [Jed Cheng](https://www.facebook.com/profile.php?id=100002258388821) | | zh_HK | [Jed Cheng](https://www.facebook.com/profile.php?id=100002258388821) |
| zh_TW | [Eugene Lam](https://www.facebook.com/eugenelam1118), [jimchen5209](https://www.youtube.com/user/jimchen5209)| | zh_TW | [Eugene Lam](https://www.facebook.com/eugenelam1118), [jimchen5209](https://www.youtube.com/user/jimchen5209), [pan93412](https://www.github.com/pan93412)|
Please add yourself here alphabetically when you submit your first translation. Please add yourself here alphabetically when you submit your first translation.

View file

@ -45,13 +45,13 @@ def do_skip(bot, player, job_queue=None):
n = skipped_player.waiting_time n = skipped_player.waiting_time
send_async(bot, chat.id, send_async(bot, chat.id,
text="Waiting time to skip this player has " text=__("Waiting time to skip this player has "
"been reduced to {time} seconds.\n" "been reduced to {time} seconds.\n"
"Next player: {name}" "Next player: {name}", multi=game.translate)
.format(time=n, .format(time=n,
name=display_name(next_player.user)) name=display_name(next_player.user))
) )
logger.info("{player} was skipped!. " logger.info("{player} was skipped! "
.format(player=display_name(player.user))) .format(player=display_name(player.user)))
game.turn() game.turn()
if job_queue: if job_queue:
@ -61,21 +61,21 @@ def do_skip(bot, player, job_queue=None):
try: try:
gm.leave_game(skipped_player.user, chat) gm.leave_game(skipped_player.user, chat)
send_async(bot, chat.id, send_async(bot, chat.id,
text="{name1} ran out of time " text=__("{name1} ran out of time "
"and has been removed from the game!\n" "and has been removed from the game!\n"
"Next player: {name2}" "Next player: {name2}", multi=game.translate)
.format(name1=display_name(skipped_player.user), .format(name1=display_name(skipped_player.user),
name2=display_name(next_player.user))) name2=display_name(next_player.user)))
logger.info("{player} was skipped!. " logger.info("{player} was skipped! "
.format(player=display_name(player.user))) .format(player=display_name(player.user)))
if job_queue: if job_queue:
start_player_countdown(bot, game, job_queue) start_player_countdown(bot, game, job_queue)
except NotEnoughPlayersError: except NotEnoughPlayersError:
send_async(bot, chat.id, send_async(bot, chat.id,
text="{name} ran out of time " text=__("{name} ran out of time "
"and has been removed from the game!\n" "and has been removed from the game!\n"
"The game ended." "The game ended.", multi=game.translate)
.format(name=display_name(skipped_player.user))) .format(name=display_name(skipped_player.user)))
gm.end_game(chat, skipped_player.user) gm.end_game(chat, skipped_player.user)
@ -98,7 +98,7 @@ def do_play_card(bot, player, result_id):
us.cards_played += 1 us.cards_played += 1
if game.choosing_color: if game.choosing_color:
send_async(bot, chat.id, text=_("Please choose a color")) send_async(bot, chat.id, text=__("Please choose a color", multi=game.translate))
if len(player.cards) == 1: if len(player.cards) == 1:
send_async(bot, chat.id, text="UNO!") send_async(bot, chat.id, text="UNO!")

12
genpot.sh Normal file
View file

@ -0,0 +1,12 @@
#!/usr/bin/bash
currentVer='1.0'
xgettext *.py -o ./locales/unobot.pot --foreign-user \
--package-name="uno_bot" \
--package-version="$currentVer" \
--msgid-bugs-address='uno@jhoeke.de' \
--keyword=__ \
--keyword=_ \
--keyword=_:1,2 \
--keyword=__:1,2

View file

@ -1,63 +1,411 @@
# Telegram bot to play UNO in group chats # SOME DESCRIPTIVE TITLE.
# Copyright (c) 2016 Jannes Höke <uno@jhoeke.de> # This file is put in the public domain.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# #
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#: bot.py:224
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: uno_bot 0.1\n" "Project-Id-Version: uno_bot 1.0\n"
"Report-Msgid-Bugs-To: uno@jhoeke.de\n" "Report-Msgid-Bugs-To: uno@jhoeke.de\n"
"POT-Creation-Date: 2016-05-19 22:38+0200\n" "POT-Creation-Date: 2019-08-28 14:21+0800\n"
"PO-Revision-Date: 2016-05-19 22:38+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Jannes Höke <uno@jhoeke.de>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: en <uno@jhoeke.de>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: en_US\n" "Language: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: utf-8\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: actions.py:48
#, python-brace-format
msgid ""
"Waiting time to skip this player has been reduced to {time} seconds.\n"
"Next player: {name}"
msgstr ""
#: actions.py:54 actions.py:69
#, python-brace-format
msgid "{player} was skipped! "
msgstr ""
#: actions.py:64
#, python-brace-format
msgid ""
"{name1} ran out of time and has been removed from the game!\n"
"Next player: {name2}"
msgstr ""
#: actions.py:76
#, python-brace-format
msgid ""
"{name} ran out of time and has been removed from the game!\n"
"The game ended."
msgstr ""
#: actions.py:101
msgid "Please choose a color"
msgstr ""
#: actions.py:108
#, python-brace-format
msgid "{name} won!"
msgstr ""
#: actions.py:123 bot.py:119 bot.py:199 bot.py:261 bot.py:340
msgid "Game ended!"
msgstr ""
#: actions.py:141 actions.py:165 actions.py:179
msgid "There are no more cards in the deck."
msgstr ""
#: actions.py:157
#, python-brace-format
msgid "Bluff called! Giving 4 cards to {name}"
msgstr ""
#: actions.py:171
#, python-brace-format
msgid "{name1} didn't bluff! Giving 6 cards to {name2}"
msgstr ""
#: bot.py:60 #: bot.py:60
#, fuzzy msgid ""
msgid "Follow these steps:\n" "Send this command in a group to be notified when a new game is started there."
msgstr ""
#: bot.py:83
#, python-brace-format
msgid "A new game has been started in {title}"
msgstr ""
#: bot.py:93
msgid ""
"Created a new game! Join the game with /join and start the game with /start"
msgstr ""
#: bot.py:110 bot.py:433 bot.py:461 bot.py:488 bot.py:516
msgid "There is no running game in this chat."
msgstr ""
#: bot.py:123 bot.py:239
msgid ""
"The game is not started yet. Join the game with /join and start the game "
"with /start"
msgstr ""
#: bot.py:129 bot.py:281 bot.py:446 bot.py:473 bot.py:501 bot.py:530
#, python-brace-format
msgid "Only the game creator ({name}) and admin can do that."
msgstr ""
#: bot.py:146
msgid "The lobby is closed"
msgstr ""
#: bot.py:150 bot.py:232
msgid "No game is running at the moment. Create a new game with /new"
msgstr ""
#: bot.py:156
msgid "You already joined the game. Start the game with /start"
msgstr ""
#: bot.py:162
msgid "There are not enough cards left in the deck for new players to join."
msgstr ""
#: bot.py:168
msgid "Joined the game"
msgstr ""
#: bot.py:181 bot.py:193
msgid "You are not playing in a game in this group."
msgstr ""
#: bot.py:204 bot.py:274
#, python-brace-format
msgid "Okay. Next Player: {name}"
msgstr ""
#: bot.py:210
#, python-brace-format
msgid "{name} left the game before it started."
msgstr ""
#: bot.py:253
#, python-brace-format
msgid "Player {name} is not found in the current game."
msgstr ""
#: bot.py:260 bot.py:265
#, python-brace-format
msgid "{0} was kicked by {1}"
msgstr ""
#: bot.py:269
msgid "Please reply to the person you want to kick and type /kick again."
msgstr ""
#: bot.py:299
msgid "Game not found."
msgstr ""
#: bot.py:304
msgid "Back to last group"
msgstr ""
#: bot.py:307
msgid "Please switch to the group you selected!"
msgstr ""
#: bot.py:313
#, python-brace-format
msgid ""
"Selected group: {group}\n"
"<b>Make sure that you switch to the correct group!</b>"
msgstr ""
#: bot.py:343
#, python-brace-format
msgid "Removing {name} from the game"
msgstr ""
#: bot.py:360
msgid "There is no game running in this chat. Create a new one with /new"
msgstr ""
#: bot.py:365
msgid "The game has already started"
msgstr ""
#: bot.py:369
#, python-brace-format
msgid ""
"At least {minplayers} players must /join the game before you can start it"
msgstr ""
#: bot.py:380
#, python-brace-format
msgid ""
"First player: {name}\n"
"Use /close to stop people from joining the game.\n"
"Enable multi-translations with /enable_translations"
msgstr ""
#: bot.py:417
msgid "Please select the group you want to play in."
msgstr ""
#: bot.py:440
msgid "Closed the lobby. No more players can join this game."
msgstr ""
#: bot.py:468
msgid "Opened the lobby. New players may /join the game."
msgstr ""
#: bot.py:495
msgid "Enabled multi-translations. Disable with /disable_translations"
msgstr ""
#: bot.py:523
msgid ""
"Disabled multi-translations. Enable them again with /enable_translations"
msgstr ""
#: bot.py:546
msgid "You are not playing in a game in this chat."
msgstr ""
#: bot.py:561
#, python-brace-format
msgid "Please wait {time} second"
msgid_plural "Please wait {time} seconds"
msgstr[0] ""
msgstr[1] ""
#: bot.py:637
#, python-brace-format
msgid "Current game: {game}"
msgstr ""
#: bot.py:672
#, python-brace-format
msgid "Gamemode changed to {mode}"
msgstr ""
#: bot.py:678
#, python-brace-format
msgid "Cheat attempt by {name}"
msgstr ""
#: bot.py:697
#, python-brace-format
msgid "Next player: {name}"
msgstr ""
#: bot.py:709
#, python-brace-format
msgid "Waiting time for {name} has been reset to {time} seconds"
msgstr ""
#: results.py:39
msgid "Choose Color"
msgstr ""
#: results.py:53
msgid "Card (tap for game state):"
msgid_plural "Cards (tap for game state):"
msgstr[0] ""
msgstr[1] ""
#: results.py:64
#, python-brace-format
msgid "{name} ({number} card)"
msgid_plural "{name} ({number} cards)"
msgstr[0] ""
msgstr[1] ""
#: results.py:76
msgid "You are not playing"
msgstr ""
#: results.py:78
msgid ""
"Not playing right now. Use /new to start a game or /join to join the current "
"game in this group"
msgstr ""
#: results.py:90
msgid "The game wasn't started yet"
msgstr ""
#: results.py:92
msgid "Start the game with /start"
msgstr ""
#: results.py:102
msgid "🎻 Classic mode"
msgstr ""
#: results.py:104
msgid "Classic 🎻"
msgstr ""
#: results.py:114
msgid "🚀 Sanic mode"
msgstr ""
#: results.py:116
msgid "Gotta go fast! 🚀"
msgstr ""
#: results.py:126
msgid "🐉 Wild mode"
msgstr ""
#: results.py:128
msgid "Into the Wild~ 🐉"
msgstr ""
#: results.py:141
#, python-brace-format
msgid "Drawing {number} card"
msgid_plural "Drawing {number} cards"
msgstr[0] ""
msgstr[1] ""
#: results.py:167
msgid "Pass"
msgstr ""
#: results.py:180
msgid "I'm calling your bluff!"
msgstr ""
#: results.py:203
#, python-brace-format
msgid "Current player: {name}"
msgstr ""
#: results.py:206
#, python-brace-format
msgid "Last card: {card}"
msgstr ""
#: results.py:208
#, python-brace-format
msgid "Player: {player_list}"
msgid_plural "Players: {player_list}"
msgstr[0] ""
msgstr[1] ""
#: settings.py:37
msgid "Please edit your settings in a private chat with the bot."
msgstr ""
#: settings.py:47
msgid "Enable statistics"
msgstr ""
#: settings.py:49
msgid "Delete all statistics"
msgstr ""
#: settings.py:51
msgid "Language"
msgstr ""
#: settings.py:52
msgid "Settings"
msgstr ""
#: settings.py:66
msgid "Enabled statistics!"
msgstr ""
#: settings.py:72
msgid "Select locale"
msgstr ""
#: settings.py:82
msgid "Deleted and disabled statistics!"
msgstr ""
#: settings.py:95
msgid "Set locale!"
msgstr ""
#: simple_commands.py:31
msgid ""
"Follow these steps:\n"
"\n" "\n"
"1. Add this bot to a group\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 " "2. In the group, start a new game with /new or join an already running game "
"with /join\n" "with /join\n"
"3. After at least two players have joined, start the game with /start\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>, " "4. Type <code>@unobot</code> into your chat box and hit <b>space</b>, or "
"or click the <code>via @unobot</code> text next to messages. You will " "click the <code>via @unobot</code> text next to messages. You will see your "
"see your cards (some greyed out), any extra options like drawing, and a <b>?" "cards (some greyed out), any extra options like drawing, and a <b>?</b> to "
"</b> to see the current game state. The <b>greyed out cards</b> are those " "see the current game state. The <b>greyed out cards</b> are those you <b>can "
"you <b>can not play</b> at the moment. Tap an option to execute the selected " "not play</b> at the moment. Tap an option to execute the selected action.\n"
"action.\n"
"Players can join the game at any time. To leave a game, use /leave. If a " "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 takes more than 90 seconds to play, you can use /skip to skip that "
"player. " "player. Use /notify_me to receive a private message when a new game is "
"Use /notify_me to receive a private message when a new game is started.\n" "started.\n"
"\n" "\n"
"<b>Language</b> and other settings: /settings\n" "<b>Language</b> and other settings: /settings\n"
"Other commands (only game creator):\n" "Other commands (only game creator):\n"
"/close - Close lobby\n" "/close - Close lobby\n"
"/open - Open lobby\n" "/open - Open lobby\n"
"/enable_translations - Translate relevant texts into all " "/kill - Terminate the game\n"
"languages spoken in a game\n" "/kick - Select a player to kick by replying to him or her\n"
"/disable_translations - Use English for those texts\n\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 " "<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 " "<code>Current game: ...</code> button and select the group you want to play "
"a card in.\n" "a card in.\n"
@ -66,342 +414,84 @@ msgid "Follow these steps:\n"
"unobotupdates\">update channel</a> and buy an UNO card game." "unobotupdates\">update channel</a> and buy an UNO card game."
msgstr "" msgstr ""
#: bot.py:88 #: simple_commands.py:73
msgid "This bot is Free Software and licensed under the AGPL. The code is available " msgid ""
"This UNO bot has three game modes: Classic, Sanic and Wild.\n"
"\n"
" 🎻 The Classic mode uses the conventional UNO deck and there is no auto "
"skip.\n"
" 🚀 The Sanic mode uses the conventional UNO deck and the bot automatically "
"skips a player if he/she takes too long to play its turn\n"
" 🐉 The Wild mode uses a deck with more special cards, less number variety "
"and no auto skip.\n"
"\n"
"To change the game mode, the GAME CREATOR has to type the bot nickname and a "
"space, just like when playing a card, and all gamemode options should appear."
msgstr ""
#: simple_commands.py:85
msgid ""
"This bot is Free Software and licensed under the AGPL. The code is available "
"here: \n" "here: \n"
"https://github.com/jh0ker/mau_mau_bot" "https://github.com/jh0ker/mau_mau_bot"
msgstr "" msgstr ""
#: bot.py:133 #: simple_commands.py:88
msgid "Created a new game! Join the game with /join and start the game with /start" msgid ""
"Attributions:\n"
"Draw icon by <a href=\"http://www.faithtoken.com/\">Faithtoken</a>\n"
"Pass icon by <a href=\"http://delapouite.com/\">Delapouite</a>\n"
"Originals available on http://game-icons.net\n"
"Icons edited by ɳick"
msgstr "" msgstr ""
#: bot.py #: simple_commands.py:105
msgid "Send this command in a group to be notified when a new game is started there."
msgstr ""
#: bot.py
msgid "A new game has been started in {title}"
msgstr ""
#: bot.py:152
msgid "The lobby is closed"
msgstr ""
#: bot.py:156
msgid "No game is running at the moment. Create a new game with /new"
msgstr ""
#: bot.py:162
msgid "You already joined the game. Start the game with /start"
msgstr ""
#: bot.py:167
msgid "Joined the game"
msgstr ""
#: bot.py:179 bot.py:191
msgid "You are not playing in a game in this group."
msgstr ""
#: bot.py:197 bot.py:258 bot.py:595
msgid "Game ended!"
msgstr ""
#: bot.py:201
msgid "Okay. Next Player: {name}"
msgstr ""
#: bot.py:219
msgid "Game not found."
msgstr ""
#: bot.py:223
msgid "Back to last group"
msgstr ""
#: bot.py:227
msgid "Please switch to the group you selected!"
msgstr ""
#: bot.py:233
#, python-format
msgid "Selected group: {group}\n"
"<b>Make sure that you switch to the correct group!</b>"
msgstr ""
#: bot.py:260
#, python-format
msgid "Removing {name} from the game"
msgstr ""
#: bot.py:273
msgid "There is no game running in this chat. Create a new one with /new"
msgstr ""
#: bot.py:278
msgid "The game has already started"
msgstr ""
#: bot.py:281
msgid "At least two players must /join the game before you can start it"
msgstr ""
#: bot.py:297
#, python-format, fuzzy
msgid "First player: {name}\n"
"Use /close to stop people from joining the game.\n"
"Enable multi-translations with /enable_translations"
msgstr ""
#: bot.py:321
msgid "Please select the group you want to play in."
msgstr ""
#: bot.py:335 bot.py:361
msgid "There is no running game in this chat."
msgstr ""
#: bot.py:342
msgid "Closed the lobby. No more players can join this game."
msgstr ""
#: bot.py:348 bot.py:373
#, python-format
msgid "Only the game creator ({name}) can do that."
msgstr ""
#: bot.py:349
#, python-format
msgid "Enabled multi-translations. Disable with /disable_translations"
msgstr ""
#: bot.py:377
#, python-format
msgid "Disabled multi-translations. Enable them again with /enable_translations"
msgstr ""
#: bot.py:368
msgid "Opened the lobby. New players may /join the game."
msgstr ""
#: bot.py:386
msgid "You are not playing in a game in this chat."
msgstr ""
#: bot.py:400
#, python-format
msgid "Please wait {time} second"
msgid_plural "Please wait {time} seconds"
msgstr[0] ""
msgstr[1] ""
#: bot.py:413
#, python-format
msgid "Waiting time to skip this player has been reduced to {time} second.\n"
"Next player: {name}"
msgid_plural "Waiting time to skip this player has been reduced to {time} seconds.\n"
"Next player: {name}"
msgstr[0] ""
msgstr[1] ""
#: bot.py:424
#, python-format
msgid "{name1} was skipped four times in a row and has been removed from the game.\n"
"Next player: {name2}"
msgstr ""
#: bot.py:432
#, python-format
msgid "{name} was skipped four times in a row and has been removed from the game.\n"
"The game ended."
msgstr ""
#: bot.py:455
msgid "All news here: https://telegram.me/unobotupdates" msgid "All news here: https://telegram.me/unobotupdates"
msgstr "" msgstr ""
#: bot.py:513 #: simple_commands.py:115
#, python-format msgid ""
msgid "Current game: {group}" "You did not enable statistics. Use /settings in a private chat with the bot "
"to enable them."
msgstr "" msgstr ""
#: bot.py:545 #: simple_commands.py:122
#, python-format #, python-brace-format
msgid "Cheat attempt by {name}"
msgstr ""
#: bot.py:562
msgid "Next player: {name}"
msgstr ""
#: bot.py:572
#, python-format
msgid "Waiting time for {name} has been reset to 90 seconds"
msgstr ""
#: bot.py:585
msgid "Please choose a color"
msgstr ""
#: bot.py:591
#, python-format
msgid "{name} won!"
msgstr ""
#: bot.py:613 bot.py:635 bot.py:647
msgid "There are no more cards in the deck."
msgstr ""
#: bot.py:627
#, python-format
msgid "Bluff called! Giving 4 cards to {name}"
msgstr ""
#: bot.py:639
#, python-format
msgid "{name1} didn't bluff! Giving 6 cards to {name2}"
msgstr ""
#: results.py:38
msgid "Choose Color"
msgstr ""
#: results.py:56
msgid "Last card (tap for game state):"
msgid_plural "Cards (tap for game state):"
msgstr[0] ""
msgstr[1] ""
#: results.py:60 results.py:123 results.py:165
msgid "Current player: {name}"
msgstr ""
#: results.py:61 results.py:124 results.py:167
msgid "Last card: {card}"
msgstr ""
#: results.py:62 results.py:125 results.py:168
msgid "Player: {player_list}"
msgid_plural "Players: {player_list}"
msgstr[0] ""
msgstr[1] ""
#: results.py:72
#, python-format
msgid "{name} ({number} card)"
msgid_plural "{name} ({number} cards)"
msgstr[0] ""
msgstr[1] ""
#: results.py:81
msgid "You are not playing"
msgstr ""
#: results.py:83
msgid "Not playing right now. Use /new to start a game or /join to join the current "
"game in this group"
msgstr ""
#: results.py:95
msgid "The game wasn't started yet"
msgstr ""
#: results.py:97
msgid "Start the game with /start"
msgstr ""
#: results.py:108
#, python-format
msgid "Drawing {number} card"
msgid_plural "Drawing {number} cards"
msgstr[0] ""
msgstr[1] ""
#: results.py:136
msgid "Pass"
msgstr ""
#: results.py:148
msgid "I'm calling your bluff!"
msgstr ""
#: settings.py:39
msgid "Please edit your settings in a private chat with the bot."
msgstr ""
#: settings.py:49
msgid "Enable statistics"
msgstr ""
#: settings.py:51
msgid "Delete all statistics"
msgstr ""
#: settings.py:53
msgid "Language"
msgstr ""
#: settings.py:54
msgid "Settings"
msgstr ""
#: settings.py:68
msgid "Enabled statistics!"
msgstr ""
#: settings.py:70
msgid "Select locale"
msgstr ""
#: settings.py:81
msgid "Deleted and disabled statistics!"
msgstr ""
#: settings.py:94
msgid "Set locale!"
msgstr ""
#: simple_commands.py
msgid "You did not enable statistics. Use /settings in "
"a private chat with the bot to enable them."
msgstr ""
#: simple_commands.py
msgid "{number} game played" msgid "{number} game played"
msgid_plural "{number} games played" msgid_plural "{number} games played"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: simple_commands.py #: simple_commands.py:129
#, python-brace-format
msgid "{number} first place" msgid "{number} first place"
msgid_plural "{number} first places" msgid_plural "{number} first places"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: simple_commands.py #: simple_commands.py:136
#, python-brace-format
msgid "{number} card played" msgid "{number} card played"
msgid_plural "{number} cards played" msgid_plural "{number} cards played"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: utils.py:55 utils.py:67
#: utils.py #, python-brace-format
msgid "{emoji} Green"
msgstr ""
#: utils.py
msgid "{emoji} Red" msgid "{emoji} Red"
msgstr "" msgstr ""
#: utils.py #: utils.py:57 utils.py:70
#, python-brace-format
msgid "{emoji} Blue" msgid "{emoji} Blue"
msgstr "" msgstr ""
#: utils.py #: utils.py:59 utils.py:73
#, python-brace-format
msgid "{emoji} Green"
msgstr ""
#: utils.py:61 utils.py:76
#, python-brace-format
msgid "{emoji} Yellow" msgid "{emoji} Yellow"
msgstr "" msgstr ""

View file

@ -13,428 +13,550 @@
# #
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
#: bot.py:224
#, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: uno_bot 0.1\n" "Project-Id-Version: uno_bot 0.1\n"
"Report-Msgid-Bugs-To: uno@jhoeke.de\n" "Report-Msgid-Bugs-To: uno@jhoeke.de\n"
"POT-Creation-Date: 2016-05-19 22:38+0200\n" "POT-Creation-Date: 2019-08-28 14:21+0800\n"
"PO-Revision-Date: 2016-05-19 22:38+0200\n" "PO-Revision-Date: 2019-08-28 14:25+0800\n"
"Last-Translator: Jim Chen\n" "Last-Translator: pan93412 <pan93412@gmail.com>\n"
"Language-Team: en <uno@jhoeke.de>\n" "Language-Team: en <uno@jhoeke.de>\n"
"Language: zh_TW\n" "Language: zh_TW\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 2.2.3\n"
#: actions.py:48
#, python-brace-format
msgid ""
"Waiting time to skip this player has been reduced to {time} seconds.\n"
"Next player: {name}"
msgstr ""
"跳過此玩家的等待時間已縮短至 {time} 秒。\n"
"輪到: {name}"
#: actions.py:54 actions.py:69
#, python-brace-format
msgid "{player} was skipped! "
msgstr "{player} 已被跳過! "
#: actions.py:64
#, python-brace-format
msgid ""
"{name1} ran out of time and has been removed from the game!\n"
"Next player: {name2}"
msgstr ""
"{name1} 已逾時,且已將其從此場遊戲移除!\n"
"輪到: {name2}"
#: actions.py:76
#, python-brace-format
msgid ""
"{name} ran out of time and has been removed from the game!\n"
"The game ended."
msgstr ""
"{name} 已逾時,且已將其從此場遊戲移除!\n"
"遊戲結束。"
#: actions.py:101
msgid "Please choose a color"
msgstr "請選擇顏色。"
#: actions.py:108
#, python-brace-format
msgid "{name} won!"
msgstr "{name} 贏了!"
#: actions.py:123 bot.py:119 bot.py:199 bot.py:261 bot.py:340
msgid "Game ended!"
msgstr "遊戲結束!"
#: actions.py:141 actions.py:165 actions.py:179
msgid "There are no more cards in the deck."
msgstr "卡堆中已經沒牌了。"
#: actions.py:157
#, python-brace-format
msgid "Bluff called! Giving 4 cards to {name}"
msgstr "已確定為虛張聲勢! 給 {name} 4 張牌。"
#: actions.py:171
#, python-brace-format
msgid "{name1} didn't bluff! Giving 6 cards to {name2}"
msgstr "{name1} 並未虛張聲勢! 給 {name2} 6 張牌。"
#: bot.py:60 #: bot.py:60
#, fuzzy msgid ""
msgid "Follow these steps:\n" "Send this command in a group to be notified when a new game is started there."
msgstr "請將這個指令傳到群組中,以在新遊戲開始時通知您。"
#: bot.py:83
#, python-brace-format
msgid "A new game has been started in {title}"
msgstr "新遊戲已經在 {title} 開始!"
#: bot.py:93
msgid ""
"Created a new game! Join the game with /join and start the game with /start"
msgstr "已建立新遊戲! 使用 /join 加入遊戲,並使用 /start 開始遊戲。"
#: bot.py:110 bot.py:433 bot.py:461 bot.py:488 bot.py:516
msgid "There is no running game in this chat."
msgstr "此聊天室尚無進行中的遊戲。"
#: bot.py:123 bot.py:239
msgid ""
"The game is not started yet. Join the game with /join and start the game "
"with /start"
msgstr "遊戲尚未開始。請使用 /join 加入遊戲,並使用 /start 開始遊戲。"
#: bot.py:129 bot.py:281 bot.py:446 bot.py:473 bot.py:501 bot.py:530
#, python-brace-format
msgid "Only the game creator ({name}) and admin can do that."
msgstr "只有遊戲建立者 ({name}) 及管理員才能執行。"
#: bot.py:146
msgid "The lobby is closed"
msgstr "遊戲大廳已關閉。"
#: bot.py:150 bot.py:232
msgid "No game is running at the moment. Create a new game with /new"
msgstr "目前沒有進行中的遊戲。請使用 /new 建立新遊戲。"
#: bot.py:156
msgid "You already joined the game. Start the game with /start"
msgstr "您已加入遊戲。請使用 /start 開始遊戲。"
#: bot.py:162
msgid "There are not enough cards left in the deck for new players to join."
msgstr "卡堆中已經沒有足夠給新進玩家的牌了。"
#: bot.py:168
msgid "Joined the game"
msgstr "已加入遊戲"
#: bot.py:181 bot.py:193
msgid "You are not playing in a game in this group."
msgstr "您不在此群組的遊戲中。"
#: bot.py:204 bot.py:274
#, python-brace-format
msgid "Okay. Next Player: {name}"
msgstr "好的。下一位玩家: {name}"
#: bot.py:210
#, python-brace-format
msgid "{name} left the game before it started."
msgstr "{name} 在遊戲開始前就離開遊戲了。"
#: bot.py:253
#, python-brace-format
msgid "Player {name} is not found in the current game."
msgstr "未在目前遊戲找到 {name} 玩家。"
#: bot.py:260 bot.py:265
#, python-brace-format
msgid "{0} was kicked by {1}"
msgstr "{0} 被 {1} 踢出。"
#: bot.py:269
msgid "Please reply to the person you want to kick and type /kick again."
msgstr "請回覆要踢出的人,並再次輸入 /kick 。"
#: bot.py:299
msgid "Game not found."
msgstr "找不到遊戲。"
#: bot.py:304
msgid "Back to last group"
msgstr "回到上一個群組"
#: bot.py:307
msgid "Please switch to the group you selected!"
msgstr "請切換到您選取的群組!"
#: bot.py:313
#, python-brace-format
msgid ""
"Selected group: {group}\n"
"<b>Make sure that you switch to the correct group!</b>"
msgstr ""
"已選擇的群組: {group}\n"
"<b>請確保您已切換到正確群組!</b>"
#: bot.py:343
#, python-brace-format
msgid "Removing {name} from the game"
msgstr "將 {name} 從遊戲移除"
#: bot.py:360
msgid "There is no game running in this chat. Create a new one with /new"
msgstr "此聊天室目前沒有進行中的遊戲,使用 /new 開始新遊戲。"
#: bot.py:365
msgid "The game has already started"
msgstr "遊戲已經開始。"
#: bot.py:369
#, python-brace-format
msgid ""
"At least {minplayers} players must /join the game before you can start it"
msgstr "必須至少要有 {minplayers} 個人 /join 才能開始遊戲。"
#: bot.py:380
#, python-brace-format
msgid ""
"First player: {name}\n"
"Use /close to stop people from joining the game.\n"
"Enable multi-translations with /enable_translations"
msgstr ""
"第一位玩家: {name}\n"
"可使用 /close 防止玩家加入此場遊戲。\n"
"請使用 /enable_translations 開啟多翻譯模式。"
#: bot.py:417
msgid "Please select the group you want to play in."
msgstr "請選擇你要遊玩的群組。"
#: bot.py:440
msgid "Closed the lobby. No more players can join this game."
msgstr "已關閉遊戲大廳。其他玩家無法再加入此場遊戲。"
#: bot.py:468
msgid "Opened the lobby. New players may /join the game."
msgstr "已開啟遊戲大廳。新玩家可以使用 /join 加入此場遊戲。"
#: bot.py:495
msgid "Enabled multi-translations. Disable with /disable_translations"
msgstr "已啟用多翻譯模式。可使用 /disable_translations 停用。"
#: bot.py:523
msgid ""
"Disabled multi-translations. Enable them again with /enable_translations"
msgstr "已停用多翻譯模式。可使用 /enable_translations 再次啟用。"
#: bot.py:546
msgid "You are not playing in a game in this chat."
msgstr "您不在此聊天室的遊戲中。"
#: bot.py:561
#, python-brace-format
msgid "Please wait {time} second"
msgid_plural "Please wait {time} seconds"
msgstr[0] "請等待 {time} 秒"
#: bot.py:637
#, python-brace-format
msgid "Current game: {game}"
msgstr "目前遊戲: {game}"
#: bot.py:672
#, python-brace-format
msgid "Gamemode changed to {mode}"
msgstr "遊戲模式已變更成 {mode}"
#: bot.py:678
#, python-brace-format
msgid "Cheat attempt by {name}"
msgstr "{name} 嘗試作弊。"
#: bot.py:697
#, python-brace-format
msgid "Next player: {name}"
msgstr "輪到: {name}"
#: bot.py:709
#, python-brace-format
msgid "Waiting time for {name} has been reset to {time} seconds"
msgstr "{name} 的等待時間已重設成 {time} 秒"
#: results.py:39
msgid "Choose Color"
msgstr "選擇顏色"
#: results.py:53
msgid "Card (tap for game state):"
msgid_plural "Cards (tap for game state):"
msgstr[0] "卡牌 (按一下取得遊戲狀態):"
#: results.py:64
#, python-brace-format
msgid "{name} ({number} card)"
msgid_plural "{name} ({number} cards)"
msgstr[0] "{name} (有 {number} 張牌)"
#: results.py:76
msgid "You are not playing"
msgstr "您不在遊戲中。"
#: results.py:78
msgid ""
"Not playing right now. Use /new to start a game or /join to join the current "
"game in this group"
msgstr ""
"您現在不在遊戲中。請使用 /new 開始新遊戲,或使用 /join 加入目前此群組的遊戲。"
#: results.py:90
msgid "The game wasn't started yet"
msgstr "遊戲尚未開始。"
#: results.py:92
msgid "Start the game with /start"
msgstr "請使用 /start 開始遊戲。"
#: results.py:102
msgid "🎻 Classic mode"
msgstr "🎻 傳統模式"
#: results.py:104
msgid "Classic 🎻"
msgstr "傳統 🎻"
#: results.py:114
msgid "🚀 Sanic mode"
msgstr "🚀 Sanic 模式"
#: results.py:116
msgid "Gotta go fast! 🚀"
msgstr "得快點! 🚀"
#: results.py:126
msgid "🐉 Wild mode"
msgstr "🐉 野外 (Wild) 模式"
#: results.py:128
msgid "Into the Wild~ 🐉"
msgstr "走進野外~ 🐉"
#: results.py:141
#, python-brace-format
msgid "Drawing {number} card"
msgid_plural "Drawing {number} cards"
msgstr[0] "抽 {number} 張牌"
#: results.py:167
msgid "Pass"
msgstr "PASS! 下一位!"
#: results.py:180
msgid "I'm calling your bluff!"
msgstr "別騙了,虛張聲勢 = ="
#: results.py:203
#, python-brace-format
msgid "Current player: {name}"
msgstr "目前玩家: {name}"
#: results.py:206
#, python-brace-format
msgid "Last card: {card}"
msgstr "上一張牌: {card}"
#: results.py:208
#, python-brace-format
msgid "Player: {player_list}"
msgid_plural "Players: {player_list}"
msgstr[0] "玩家: {player_list}"
#: settings.py:37
msgid "Please edit your settings in a private chat with the bot."
msgstr "請私訊這台機器人來編輯設定。"
#: settings.py:47
msgid "Enable statistics"
msgstr "啟用統計資料"
#: settings.py:49
msgid "Delete all statistics"
msgstr "刪除所有統計資料"
#: settings.py:51
msgid "Language"
msgstr "語言"
#: settings.py:52
msgid "Settings"
msgstr "設定"
#: settings.py:66
msgid "Enabled statistics!"
msgstr "已啟用統計資料!"
#: settings.py:72
msgid "Select locale"
msgstr "選擇語言"
#: settings.py:82
msgid "Deleted and disabled statistics!"
msgstr "已停用並刪除統計資料!"
#: settings.py:95
msgid "Set locale!"
msgstr "已設定語言!"
#: simple_commands.py:31
msgid ""
"Follow these steps:\n"
"\n" "\n"
"1. Add this bot to a group\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 " "2. In the group, start a new game with /new or join an already running game "
"with /join\n" "with /join\n"
"3. After at least two players have joined, start the game with /start\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>, " "4. Type <code>@unobot</code> into your chat box and hit <b>space</b>, or "
"or click the <code>via @unobot</code> text next to messages. You will " "click the <code>via @unobot</code> text next to messages. You will see your "
"see your cards (some greyed out), any extra options like drawing, and a <b>?" "cards (some greyed out), any extra options like drawing, and a <b>?</b> to "
"</b> to see the current game state. The <b>greyed out cards</b> are those " "see the current game state. The <b>greyed out cards</b> are those you <b>can "
"you <b>can not play</b> at the moment. Tap an option to execute the selected " "not play</b> at the moment. Tap an option to execute the selected action.\n"
"action.\n"
"Players can join the game at any time. To leave a game, use /leave. If a " "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 takes more than 90 seconds to play, you can use /skip to skip that "
"player. " "player. Use /notify_me to receive a private message when a new game is "
"Use /notify_me to receive a private message when a new game is started.\n" "started.\n"
"\n" "\n"
"<b>Language</b> and other settings: /settings\n" "<b>Language</b> and other settings: /settings\n"
"Other commands (only game creator):\n" "Other commands (only game creator):\n"
"/close - Close lobby\n" "/close - Close lobby\n"
"/open - Open lobby\n" "/open - Open lobby\n"
"/enable_translations - Translate relevant texts into all " "/kill - Terminate the game\n"
"languages spoken in a game\n" "/kick - Select a player to kick by replying to him or her\n"
"/disable_translations - Use English for those texts\n\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 " "<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 " "<code>Current game: ...</code> button and select the group you want to play "
"a card in.\n" "a card in.\n"
"If you enjoy this bot, <a href=\"https://telegram.me/storebot?" "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/" "start=mau_mau_bot\">rate me</a>, join the <a href=\"https://telegram.me/"
"unobotupdates\">update channel</a> and buy an UNO card game." "unobotupdates\">update channel</a> and buy an UNO card game."
msgstr "請跟隨以下指示:\n" msgstr ""
"請遵循以下步驟:\n"
"\n" "\n"
"1. 將這個機器人新增到群組\n" "1. 將機器人加入群組。\n"
"2. 輸入 /new 開始一個新遊戲或輸入 /join 加入一個運行中的遊戲\n" "2. 在群組中,請使用 /new 開始一場新遊戲,或是使用 /join 加入已經開始的遊"
"3. 當有兩個或以上的玩家加入, 就可以用 /start 開始遊戲\n" "戲。\n"
"4. 輸入 <code>@unobot</code> 然後按<b>空白鍵</b> 或點一下" "3. 在至少兩個玩家加入之後使用 /start 開始遊戲\n"
"<code>via @unobot</code>。之後你會看見你手上的牌或者其他選項例如DRAW(抽牌), 和" "4. 將 <code>@unobot</code> 輸入到聊天列中,並按下 <b>空白</b> 鍵,或者是按下"
"<b>?</b>看其他玩家狀態。但<b>灰色的牌</b>就是<b>你現在不能使用的牌</b>, 選擇其中一個" "訊息旁的 <code>[via @unobot]</code> 文字。您將會看見您的卡牌 (部分是灰的)、延"
"選項來執行對應的操作。\n" "伸功能 (例如抽牌),以及可用來檢視目前遊戲狀態的 <b>?</b>。<b>灰色卡牌</b>為您"
"玩家可以在任何時間加入, 如果想離開, 請打 /leave 。如果玩家90秒後都沒有出牌" "現在<b>不能使用</b>的卡牌。按一下選項以執行選取的動作\n"
", 你可以用 /skip 跳過他。輸入 /notify_me 以讓我在本群組遊戲開始時私訊你\n" "玩家可隨時加入遊戲。若要離開遊戲,請使用 /leave。如果一名玩家停滯了超過 90 "
"秒,您可使用 /skip 跳過該名玩家。請使用 /notify_me 以在新一局遊戲開始時收到私"
"訊。\n"
"\n" "\n"
"<b>語言</b>和其他設定: /settings\n" "<b>語言</b>及其他設定: /settings\n"
"遊戲創始人可以用以下的command:\n" "其他指令 (僅遊戲建立者可使用):\n"
"/close - 關閉 lobby, 其他人不可以中途加入\n" "/close - 關閉遊戲大廳\n"
"/open - 開啓 lobby, 令其他人可以中途加入\n" "/open - 開啟遊戲大廳\n"
"/enable_translations - 使用翻譯的提示\n" "/kill - 終止遊戲\n"
"/disable_translations - 使用英文的提示\n" "/kick - 透過回覆以踢出玩家\n"
"/enable_translations - 將對應文字翻譯成遊戲中所有使用的語言。\n"
"/disable_translations - 僅顯示對應文字的英文版本。\n"
"\n" "\n"
"<b>試驗功能:</b> 同時在不同的群組中遊玩 請選擇 <code>目前遊戲:...</code>" "<b>實驗性功能:</b> 同時在多個群組遊玩。請按下 <code>[目前遊戲: ...]</code> 按"
"然後選擇你想在哪個群組玩。\n" "鈕,並選取你想玩的群組。\n"
"如果你喜歡這個bot, 請 <a href=\"https://telegram.me/storebot?" "\n"
"start=mau_mau_bot\">評分</a>, 然後加入 <a href=\"https://telegram." "如果你享受這台機器人,請<a href=\"https://telegram.me/storebot?"
"me/unobotupdates\">即時更新頻道</a> 並買一副UNO牌。" "start=mau_mau_bot\">評價這台機器人</a>、加入<a href=\"https://telegram.me/"
"unobotupdates\">更新頻道</a>並買一款 UNO 卡牌遊戲。"
#: bot.py:88 #: simple_commands.py:73
msgid "This bot is Free Software and licensed under the AGPL. The code is available " msgid ""
"This UNO bot has three game modes: Classic, Sanic and Wild.\n"
"\n"
" 🎻 The Classic mode uses the conventional UNO deck and there is no auto "
"skip.\n"
" 🚀 The Sanic mode uses the conventional UNO deck and the bot automatically "
"skips a player if he/she takes too long to play its turn\n"
" 🐉 The Wild mode uses a deck with more special cards, less number variety "
"and no auto skip.\n"
"\n"
"To change the game mode, the GAME CREATOR has to type the bot nickname and a "
"space, just like when playing a card, and all gamemode options should appear."
msgstr ""
"這台 UNO 機器人有三種遊戲模式: 傳統、Sanic 及野外 (Wild) 模式。\n"
"\n"
" 🎻 傳統模式使用常見的 UNO 卡牌組合,且不會自動跳過。\n"
" 🚀 Sanic 模式使用常見的 UNO 卡牌組合,且機器人會自動跳過閒置過久的玩家。\n"
" 🐉 野外 (Wild) 模式使用較多功能牌且較少數字牌的卡片組合且不會自動跳過。\n"
"\n"
"若要變更遊戲模式,遊戲建立者必須輸入機器人的使用者名稱 + 空白,就像玩遊戲那"
"樣,之後應該就會顯示出所有遊戲模式選項。"
#: simple_commands.py:85
msgid ""
"This bot is Free Software and licensed under the AGPL. The code is available "
"here: \n" "here: \n"
"https://github.com/jh0ker/mau_mau_bot" "https://github.com/jh0ker/mau_mau_bot"
msgstr "這個bot是一個免費的軟件, 根據AGPL授權 \n" msgstr ""
"源代碼可以在這裡找到\n" "這台機器人是自由軟體,使用 AGPL 授權。程式碼可在此處取得:\n"
"https://github.com/jh0ker/mau_mau_bot" "https://github.com/jh0ker/mau_mau_bot"
#: bot.py:133 #: simple_commands.py:88
msgid "Created a new game! Join the game with /join and start the game with /start" msgid ""
msgstr "已開始新的遊戲! 用 /join 加入並用 /start 開始遊戲" "Attributions:\n"
"Draw icon by <a href=\"http://www.faithtoken.com/\">Faithtoken</a>\n"
"Pass icon by <a href=\"http://delapouite.com/\">Delapouite</a>\n"
"Originals available on http://game-icons.net\n"
"Icons edited by ɳick"
msgstr ""
"來源:\n"
"抽牌 (Draw) 圖示來自 <a href=\"http://www.faithtoken.com/\">Faithtoken</"
"a>。\n"
"跳過 (Pass) 圖示來自 <a href=\"http://delapouite.com/\">Delapouite</a>。\n"
"原始圖示可在 http://game-icons.net 取得。\n"
"圖示由 ɳick 編輯。"
#: bot.py #: simple_commands.py:105
msgid "Send this command in a group to be notified when a new game is started there."
msgstr "在群組中傳送這個指令以讓我在這個群組開始遊戲時私訊你"
#: bot.py
msgid "A new game has been started in {title}"
msgstr "新遊戲已經在 {title} 中開始!"
#: bot.py:152
msgid "The lobby is closed"
msgstr "遊戲大廳已關閉"
#: bot.py:156
msgid "No game is running at the moment. Create a new game with /new"
msgstr "目前沒有進行中的遊戲,輸入 /new 開始新的遊戲"
#: bot.py:162
msgid "You already joined the game. Start the game with /start"
msgstr "您已加入本局遊戲,輸入 /start 來開始遊戲"
#: bot.py:167
msgid "Joined the game"
msgstr "已加入遊戲"
#: bot.py:179 bot.py:191
msgid "You are not playing in a game in this group."
msgstr "你目前沒有在這個群組中遊玩"
#: bot.py:197 bot.py:258 bot.py:595
msgid "Game ended!"
msgstr "遊戲結束!"
#: bot.py:201
msgid "Okay. Next Player: {name}"
msgstr "OK. 下一位: {name}"
#: bot.py:219
msgid "Game not found."
msgstr "找不到遊戲"
#: bot.py:223
msgid "Back to last group"
msgstr "回到上一個群組"
#: bot.py:227
msgid "Please switch to the group you selected!"
msgstr "請切換到你選擇的群組"
#: bot.py:233
#, python-format
msgid "Selected group: {group}\n"
"<b>Make sure that you switch to the correct group!</b>"
msgstr "已選擇的群組: {group}\n"
"<b>請確認你已經切換到目前遊玩中的群組!</b>"
#: bot.py:260
#, python-format
msgid "Removing {name} from the game"
msgstr "將 {name} 從遊戲中踢除"
#: bot.py:273
msgid "There is no game running in this chat. Create a new one with /new"
msgstr "此聊天室目前沒有遊戲進行中,使用 /new 開始新遊戲"
#: bot.py:278
msgid "The game has already started"
msgstr "遊戲已經開始了!"
#: bot.py:281
msgid "At least two players must /join the game before you can start it"
msgstr "至少要有兩個人 /join 才能開始遊戲"
#: bot.py:297
#, python-format, fuzzy
msgid "First player: {name}\n"
"Use /close to stop people from joining the game.\n"
"Enable multi-translations with /enable_translations"
msgstr "由 {name} 開始出牌\n"
"輸入 /close 以防止新玩家加入此局遊戲 \n"
"如果你要啟用翻譯的提示請輸入 /enable_translations"
#: bot.py:321
msgid "Please select the group you want to play in."
msgstr "請選擇你要玩的群組"
#: bot.py:335 bot.py:361
msgid "There is no running game in this chat."
msgstr "此聊天室沒有正在進行的遊戲"
#: bot.py:342
msgid "Closed the lobby. No more players can join this game."
msgstr "已關閉大廳,其他人將無法加入遊戲"
#: bot.py:348 bot.py:373
#, python-format
msgid "Only the game creator ({name}) can do that."
msgstr "只有創建遊戲的玩家 ({name}) 可以執行此指令"
#: bot.py:349
#, python-format
msgid "Enabled multi-translations. Disable with /disable_translations"
msgstr "已啟用翻譯提示. 使用 /disable_translations 來停用"
#: bot.py:377
#, python-format
msgid "Disabled multi-translations. Enable them again with /enable_translations"
msgstr "已停用翻譯提示. 使用 /enable_translations 再次啟用"
#: bot.py:368
msgid "Opened the lobby. New players may /join the game."
msgstr "大廳已開啟, 現在可以 /join 本局遊戲"
#: bot.py:386
msgid "You are not playing in a game in this chat."
msgstr "你目前沒有在此聊天室中遊玩"
#: bot.py:400
#, python-format
msgid "Please wait {time} second"
msgid_plural "Please wait {time} seconds"
msgstr[0] "請等待 {time} 秒"
msgstr[1] "請等待 {time} 秒"
#: bot.py:413
#, python-format
msgid "Waiting time to skip this player has been reduced to {time} second.\n"
"Next player: {name}"
msgid_plural "Waiting time to skip this player has been reduced to {time} seconds.\n"
"Next player: {name}"
msgstr[0] "此玩家等待時間已經縮短為 {time} 秒\n"
"輪到: {name}"
msgstr[1] "此玩家等待時間已經縮短為 {time} 秒\n"
"輪到: {name}"
#: bot.py:424
#, python-format
msgid "{name1} was skipped four times in a row and has been removed from the game.\n"
"Next player: {name2}"
msgstr "{name1} 已被跳過 4 次,並從此局遊戲中移除\n"
"輪到: {name2}"
#: bot.py:432
#, python-format
msgid "{name} was skipped four times in a row and has been removed from the game.\n"
"The game ended."
msgstr "{name1} 已被跳過 4 次,並從此局遊戲中移除\n"
"遊戲結束!"
#: bot.py:455
msgid "All news here: https://telegram.me/unobotupdates" msgid "All news here: https://telegram.me/unobotupdates"
msgstr "即時更新頻道: https://telegram.me/unobotupdates" msgstr "新聞頻道: https://telegram.me/unobotupdates"
#: bot.py:513 #: simple_commands.py:115
#, python-format msgid ""
msgid "Current game: {group}" "You did not enable statistics. Use /settings in a private chat with the bot "
msgstr "目前遊戲: {group}" "to enable them."
msgstr ""
"您尚未啟用統計資料。請在這台機器人的私人對話中傳送 <code>/settings</code> 以"
"啟用。"
#: bot.py:545 #: simple_commands.py:122
#, python-format #, python-brace-format
msgid "Cheat attempt by {name}"
msgstr "提出作弊嫌疑 by {name}"
#: bot.py:562
msgid "Next player: {name}"
msgstr "輪到: {name}"
#: bot.py:572
#, python-format
msgid "Waiting time for {name} has been reset to 90 seconds"
msgstr "{name} 的等待時間已重置到 90 秒"
#: bot.py:585
msgid "Please choose a color"
msgstr "請選擇一個顏色"
#: bot.py:591
#, python-format
msgid "{name} won!"
msgstr "{name} 贏了!"
#: bot.py:613 bot.py:635 bot.py:647
msgid "There are no more cards in the deck."
msgstr "已經沒牌了"
#: bot.py:627
#, python-format
msgid "Bluff called! Giving 4 cards to {name}"
msgstr "已確認為虛張聲勢! 給予 {name} 4 張牌"
#: bot.py:639
#, python-format
msgid "{name1} didn't bluff! Giving 6 cards to {name2}"
msgstr "{name1} 沒有虛張聲勢! 給予 {name2} 六張牌"
#: results.py:38
msgid "Choose Color"
msgstr "選擇顏色"
#: results.py:56
msgid "Last card (tap for game state):"
msgid_plural "Cards (tap for game state):"
msgstr[0] "最後的牌(點一下以獲得遊戲狀態):"
msgstr[1] "你的手牌(點一下以獲得遊戲狀態):"
#: results.py:60 results.py:123 results.py:165
msgid "Current player: {name}"
msgstr "目前玩家: {name}"
#: results.py:61 results.py:124 results.py:167
msgid "Last card: {card}"
msgstr "上一張牌: {card}"
#: results.py:62 results.py:125 results.py:168
msgid "Player: {player_list}"
msgid_plural "Players: {player_list}"
msgstr[0] "目前玩家: {player_list}"
msgstr[1] "目前玩家: {player_list}"
#: results.py:72
#, python-format
msgid "{name} ({number} card)"
msgid_plural "{name} ({number} cards)"
msgstr[0] "{name} (目前有 {number} 張牌)"
msgstr[1] "{name} (目前有 {number} 張牌)"
#: results.py:81
msgid "You are not playing"
msgstr "你沒有在遊戲中"
#: results.py:83
msgid "Not playing right now. Use /new to start a game or /join to join the current "
"game in this group"
msgstr "你目前沒有在遊玩,使用 /new 開始新的遊戲或使用 /join 加入目前的遊戲"
#: results.py:95
msgid "The game wasn't started yet"
msgstr "遊戲尚未開始"
#: results.py:97
msgid "Start the game with /start"
msgstr "使用 /start 開始遊戲"
#: results.py:108
#, python-format
msgid "Drawing {number} card"
msgid_plural "Drawing {number} cards"
msgstr[0] "抽 {number} 張牌"
msgstr[1] "抽 {number} 張牌"
#: results.py:136
msgid "Pass"
msgstr "PASS! 下一位!"
#: results.py:148
msgid "I'm calling your bluff!"
msgstr "別騙了,虛張聲勢 = ="
#: settings.py:39
msgid "Please edit your settings in a private chat with the bot."
msgstr "請私訊我來修改你的設定"
#: settings.py:49
msgid "Enable statistics"
msgstr "啟用統計資料"
#: settings.py:51
msgid "Delete all statistics"
msgstr "刪除所有統計資料"
#: settings.py:53
msgid "Language"
msgstr "語言"
#: settings.py:54
msgid "Settings"
msgstr "設置"
#: settings.py:68
msgid "Enabled statistics!"
msgstr "已啟用統計資料"
#: settings.py:70
msgid "Select locale"
msgstr "設置語言"
#: settings.py:81
msgid "Deleted and disabled statistics!"
msgstr "已停用並刪除統計資料"
#: settings.py:94
msgid "Set locale!"
msgstr "語言已設置"
#: simple_commands.py
msgid "You did not enable statistics. Use /settings in "
"a private chat with the bot to enable them."
msgstr "您尚未啟用統計資料,請私我"
"<code>/settings</code> 來啟用他"
#: simple_commands.py
msgid "{number} game played" msgid "{number} game played"
msgid_plural "{number} games played" msgid_plural "{number} games played"
msgstr[0] "已遊玩 {number} 個遊戲" msgstr[0] "已遊玩 {number} 場遊戲"
msgstr[1] "已遊玩 {number} 個遊戲"
#: simple_commands.py #: simple_commands.py:129
#, python-brace-format
msgid "{number} first place" msgid "{number} first place"
msgid_plural "{number} first places" msgid_plural "{number} first places"
msgstr[0] "拿了 {number} 次第一名" msgstr[0] "拿了 {number} 次第一名"
msgstr[1] "拿了 {number} 次第一名"
#: simple_commands.py #: simple_commands.py:136
#, python-brace-format
msgid "{number} card played" msgid "{number} card played"
msgid_plural "{number} cards played" msgid_plural "{number} cards played"
msgstr[0] "已遊玩 {number} 張牌" msgstr[0] "已遊玩 {number} 張牌"
msgstr[1] "已遊玩 {number} 張牌"
#: utils.py:55 utils.py:67
#: utils.py #, python-brace-format
msgid "{emoji} Green"
msgstr "{emoji} 綠色 {emoji}"
#: utils.py
msgid "{emoji} Red" msgid "{emoji} Red"
msgstr "{emoji} 紅色 {emoji}" msgstr "{emoji} 紅色"
#: utils.py #: utils.py:57 utils.py:70
#, python-brace-format
msgid "{emoji} Blue" msgid "{emoji} Blue"
msgstr "{emoji} 藍色 {emoji}" msgstr "{emoji} 藍色"
#: utils.py #: utils.py:59 utils.py:73
#, python-brace-format
msgid "{emoji} Green"
msgstr "{emoji} 綠色"
#: utils.py:61 utils.py:76
#, python-brace-format
msgid "{emoji} Yellow" msgid "{emoji} Yellow"
msgstr "{emoji} 黃色 {emoji}" msgstr "{emoji} 黃色"
#~ msgid "{player} was skipped!. "
#~ msgstr "{player} 已被跳過!"

View file

@ -25,79 +25,76 @@ from utils import send_async
from shared_vars import dispatcher from shared_vars import dispatcher
from internationalization import _, user_locale 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"
"/kill - Terminate the game\n"
"/kick - Select a player to kick "
"by replying to him or her\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.")
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")
attributions = ("Attributions:\n"
'Draw icon by '
'<a href="http://www.faithtoken.com/">Faithtoken</a>\n'
'Pass icon by '
'<a href="http://delapouite.com/">Delapouite</a>\n'
"Originals available on http://game-icons.net\n"
"Icons edited by ɳick")
modes_explanation = ("This UNO bot has three game modes: Classic, Sanic and Wild.\n\n"
" 🎻 The Classic mode uses the conventional UNO deck and there is no auto skip.\n"
" 🚀 The Sanic mode uses the conventional UNO deck and the bot automatically skips a player if he/she takes too long to play its turn\n"
" 🐉 The Wild mode uses a deck with more special cards, less number variety and no auto skip.\n\n"
"To change the game mode, the GAME CREATOR has to type the bot nickname and a space, just like when playing a card, and all gamemode options should appear.")
@user_locale @user_locale
def help_handler(bot, update): def help_handler(bot, update):
"""Handler for the /help command""" """Handler for the /help command"""
send_async(bot, update.message.chat_id, text=_(help_text), help_text = _("Follow these steps:\n\n"
parse_mode=ParseMode.HTML, disable_web_page_preview=True) "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"
"/kill - Terminate the game\n"
"/kick - Select a player to kick "
"by replying to him or her\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.")
send_async(bot, update.message.chat_id, text=help_text,
parse_mode=ParseMode.HTML, disable_web_page_preview=True)
@user_locale @user_locale
def modes(bot, update): def modes(bot, update):
"""Handler for the /help command""" """Handler for the /help command"""
send_async(bot, update.message.chat_id, text=_(modes_explanation), modes_explanation = _("This UNO bot has three game modes: Classic, Sanic and Wild.\n\n"
" 🎻 The Classic mode uses the conventional UNO deck and there is no auto skip.\n"
" 🚀 The Sanic mode uses the conventional UNO deck and the bot automatically skips a player if he/she takes too long to play its turn\n"
" 🐉 The Wild mode uses a deck with more special cards, less number variety and no auto skip.\n\n"
"To change the game mode, the GAME CREATOR has to type the bot nickname and a space, "
"just like when playing a card, and all gamemode options should appear.")
send_async(bot, update.message.chat_id, text=modes_explanation,
parse_mode=ParseMode.HTML, disable_web_page_preview=True) parse_mode=ParseMode.HTML, disable_web_page_preview=True)
@user_locale @user_locale
def source(bot, update): def source(bot, update):
"""Handler for the /help command""" """Handler for the /help command"""
send_async(bot, update.message.chat_id, text=_(source_text) + '\n' + source_text = _("This bot is Free Software and licensed under the AGPL. "
_(attributions), "The code is available here: \n"
"https://github.com/jh0ker/mau_mau_bot")
attributions = _("Attributions:\n"
'Draw icon by '
'<a href="http://www.faithtoken.com/">Faithtoken</a>\n'
'Pass icon by '
'<a href="http://delapouite.com/">Delapouite</a>\n'
"Originals available on http://game-icons.net\n"
"Icons edited by ɳick")
send_async(bot, update.message.chat_id, text=source_text + '\n' +
attributions,
parse_mode=ParseMode.HTML, disable_web_page_preview=True) parse_mode=ParseMode.HTML, disable_web_page_preview=True)