Browse Source

Update Japanese documentation strings

pull/796/merge
Rapptz 7 years ago
parent
commit
54e9401a21
  1. 3391
      docs/locale/ja/LC_MESSAGES/api.po
  2. 982
      docs/locale/ja/LC_MESSAGES/ext/commands/api.po
  3. 457
      docs/locale/ja/LC_MESSAGES/ext/commands/commands.po
  4. 928
      docs/locale/ja/LC_MESSAGES/migrating.po

3391
docs/locale/ja/LC_MESSAGES/api.po

File diff suppressed because it is too large

982
docs/locale/ja/LC_MESSAGES/ext/commands/api.po

File diff suppressed because it is too large

457
docs/locale/ja/LC_MESSAGES/ext/commands/commands.po

@ -2,22 +2,23 @@
# Copyright (C) 2015-2017, Rapptz # Copyright (C) 2015-2017, Rapptz
# This file is distributed under the same license as the discord.py package. # This file is distributed under the same license as the discord.py package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2018. # FIRST AUTHOR <EMAIL@ADDRESS>, 2018.
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: discord.py 1.0.0a\n" "Project-Id-Version: discord.py 1.0.0a\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-07-31 14:21-0400\n" "POT-Creation-Date: 2018-09-24 23:41-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: 竹内 歩夢 <[email protected]>, 2018\n" "Last-Translator: 竹内 歩夢 <[email protected]>, 2018\n"
"Language-Team: Japanese (Japan) (https://www.transifex.com/discord-py/teams/88924/ja_JP/)\n" "Language: ja_JP\n"
"Language-Team: Japanese (Japan) (https://www.transifex.com/discord-"
"py/teams/88924/ja_JP/)\n"
"Plural-Forms: nplurals=1; plural=0\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"
"Generated-By: Babel 2.5.3\n" "Generated-By: Babel 2.5.3\n"
"Language: ja_JP\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../ext/commands/commands.rst:6 #: ../../ext/commands/commands.rst:6
msgid "Commands" msgid "Commands"
@ -25,16 +26,16 @@ msgstr "Commands"
#: ../../ext/commands/commands.rst:8 #: ../../ext/commands/commands.rst:8
msgid "" msgid ""
"One of the most appealing aspect of the command extension is how easy it is " "One of the most appealing aspect of the command extension is how easy it "
"to define commands and how you can arbitrarily nest groups and commands to " "is to define commands and how you can arbitrarily nest groups and "
"have a rich sub-command system." "commands to have a rich sub-command system."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:11 #: ../../ext/commands/commands.rst:11
msgid "" msgid ""
"Commands are defined by attaching it to a regular Python function. The " "Commands are defined by attaching it to a regular Python function. The "
"command is then invoked by the user using a similar signature to the Python " "command is then invoked by the user using a similar signature to the "
"function." "Python function."
msgstr "コマンドは、Pythonの関数と関連付けすることによって定義され、同様のシグネチャを使用してユーザーに呼び出されます。" msgstr "コマンドは、Pythonの関数と関連付けすることによって定義され、同様のシグネチャを使用してユーザーに呼び出されます。"
#: ../../ext/commands/commands.rst:14 #: ../../ext/commands/commands.rst:14
@ -42,8 +43,7 @@ msgid "For example, in the given command definition:"
msgstr "例えば、指定されたコマンド定義を使うと次のようになります:" msgstr "例えば、指定されたコマンド定義を使うと次のようになります:"
#: ../../ext/commands/commands.rst:22 #: ../../ext/commands/commands.rst:22
msgid "" msgid "With the following prefix (``$``), it would be invoked by the user via:"
"With the following prefix (``$``), it would be invoked by the user via:"
msgstr "Prefixを (``$``) としたとすると、このコマンドは次の用に実行できます。" msgstr "Prefixを (``$``) としたとすると、このコマンドは次の用に実行できます。"
#: ../../ext/commands/commands.rst:28 #: ../../ext/commands/commands.rst:28
@ -55,8 +55,8 @@ msgstr ""
#: ../../ext/commands/commands.rst:30 #: ../../ext/commands/commands.rst:30
msgid "" msgid ""
"There are two ways of registering a command. The first one is by using " "There are two ways of registering a command. The first one is by using "
":meth:`.Bot.command` decorator, as seen in the example above. The second is " ":meth:`.Bot.command` decorator, as seen in the example above. The second "
"using the :func:`~ext.commands.command` decorator followed by " "is using the :func:`~ext.commands.command` decorator followed by "
":meth:`.Bot.add_command` on the instance." ":meth:`.Bot.add_command` on the instance."
msgstr "" msgstr ""
@ -72,9 +72,9 @@ msgstr ""
#: ../../ext/commands/commands.rst:55 #: ../../ext/commands/commands.rst:55
msgid "" msgid ""
"Any parameter that is accepted by the :class:`.Command` constructor can be " "Any parameter that is accepted by the :class:`.Command` constructor can "
"passed into the decorator. For example, to change the name to something " "be passed into the decorator. For example, to change the name to "
"other than the function would be as simple as doing this:" "something other than the function would be as simple as doing this:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:65 #: ../../ext/commands/commands.rst:65
@ -89,8 +89,8 @@ msgstr ""
#: ../../ext/commands/commands.rst:70 #: ../../ext/commands/commands.rst:70
msgid "" msgid ""
"Certain parameter types do different things in the user side and most forms " "Certain parameter types do different things in the user side and most "
"of parameter types are supported." "forms of parameter types are supported."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:73 #: ../../ext/commands/commands.rst:73
@ -99,14 +99,14 @@ msgstr ""
#: ../../ext/commands/commands.rst:75 #: ../../ext/commands/commands.rst:75
msgid "" msgid ""
"The most basic form of parameter passing is the positional parameter. This " "The most basic form of parameter passing is the positional parameter. "
"is where we pass a parameter as-is:" "This is where we pass a parameter as-is:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:84 #: ../../ext/commands/commands.rst:84
msgid "" msgid ""
"On the bot using side, you can provide positional arguments by just passing " "On the bot using side, you can provide positional arguments by just "
"a regular string:" "passing a regular string:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:88 #: ../../ext/commands/commands.rst:88
@ -115,14 +115,14 @@ msgstr ""
#: ../../ext/commands/commands.rst:92 #: ../../ext/commands/commands.rst:92
msgid "" msgid ""
"As a note of warning, if you omit the quotes, you will only get the first " "As a note of warning, if you omit the quotes, you will only get the first"
"word:" " word:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:96 #: ../../ext/commands/commands.rst:96
msgid "" msgid ""
"Since positional arguments are just regular Python arguments, you can have " "Since positional arguments are just regular Python arguments, you can "
"as many as you want:" "have as many as you want:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:105 #: ../../ext/commands/commands.rst:105
@ -131,16 +131,16 @@ msgstr "変数"
#: ../../ext/commands/commands.rst:107 #: ../../ext/commands/commands.rst:107
msgid "" msgid ""
"Sometimes you want users to pass in an undetermined number of parameters. " "Sometimes you want users to pass in an undetermined number of parameters."
"The library supports this similar to how variable list parameters are done " " The library supports this similar to how variable list parameters are "
"in Python:" "done in Python:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:116 #: ../../ext/commands/commands.rst:116
msgid "" msgid ""
"This allows our user to accept either one or many arguments as they please. " "This allows our user to accept either one or many arguments as they "
"This works similar to positional arguments, so multi-word parameters should " "please. This works similar to positional arguments, so multi-word "
"be quoted." "parameters should be quoted."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:119 #: ../../ext/commands/commands.rst:119
@ -149,8 +149,8 @@ msgstr ""
#: ../../ext/commands/commands.rst:123 #: ../../ext/commands/commands.rst:123
msgid "" msgid ""
"If the user wants to input a multi-word argument, they have to quote it like" "If the user wants to input a multi-word argument, they have to quote it "
" earlier:" "like earlier:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:127 #: ../../ext/commands/commands.rst:127
@ -162,8 +162,8 @@ msgstr ""
#: ../../ext/commands/commands.rst:132 #: ../../ext/commands/commands.rst:132
msgid "" msgid ""
"Since the ``args`` variable is a `tuple " "Since the ``args`` variable is a `tuple "
"<https://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-" "<https://docs.python.org/3/library/stdtypes.html#sequence-types-list-"
"range>`_, you can do anything you would usually do with one." "tuple-range>`_, you can do anything you would usually do with one."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:136 #: ../../ext/commands/commands.rst:136
@ -172,15 +172,14 @@ msgstr ""
#: ../../ext/commands/commands.rst:138 #: ../../ext/commands/commands.rst:138
msgid "" msgid ""
"When you want to handle parsing of the argument yourself or do not feel like" "When you want to handle parsing of the argument yourself or do not feel "
" you want to wrap multi-word user input into quotes, you can ask the library" "like you want to wrap multi-word user input into quotes, you can ask the "
" to give you the rest as a single argument. We do this by using a **keyword-" "library to give you the rest as a single argument. We do this by using a "
"only argument**, seen below:" "**keyword-only argument**, seen below:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:150 #: ../../ext/commands/commands.rst:150
msgid "" msgid "You can only have one keyword-only argument due to parsing ambiguities."
"You can only have one keyword-only argument due to parsing ambiguities."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:152 #: ../../ext/commands/commands.rst:152
@ -193,8 +192,8 @@ msgstr ""
#: ../../ext/commands/commands.rst:160 #: ../../ext/commands/commands.rst:160
msgid "" msgid ""
"By default, the keyword-only arguments are stripped of white space to make " "By default, the keyword-only arguments are stripped of white space to "
"it easier to work with. This behaviour can be toggled by the " "make it easier to work with. This behaviour can be toggled by the "
":attr:`.Command.rest_is_raw` argument in the decorator." ":attr:`.Command.rest_is_raw` argument in the decorator."
msgstr "" msgstr ""
@ -204,20 +203,19 @@ msgstr ""
#: ../../ext/commands/commands.rst:168 #: ../../ext/commands/commands.rst:168
msgid "" msgid ""
"As seen earlier, every command must take at least a single parameter, called" "As seen earlier, every command must take at least a single parameter, "
" the :class:`~ext.commands.Context`." "called the :class:`~ext.commands.Context`."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:170 #: ../../ext/commands/commands.rst:170
msgid "" msgid ""
"This parameter gives you access to something called the \"invocation " "This parameter gives you access to something called the \"invocation "
"context\". Essentially all the information you need to know how the command " "context\". Essentially all the information you need to know how the "
"was executed. It contains a lot of useful information:" "command was executed. It contains a lot of useful information:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:173 #: ../../ext/commands/commands.rst:173
msgid "" msgid ":attr:`.Context.guild` to fetch the :class:`Guild` of the command, if any."
":attr:`.Context.guild` to fetch the :class:`Guild` of the command, if any."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:174 #: ../../ext/commands/commands.rst:174
@ -226,20 +224,20 @@ msgstr ""
#: ../../ext/commands/commands.rst:175 #: ../../ext/commands/commands.rst:175
msgid "" msgid ""
":attr:`.Context.author` to fetch the :class:`Member` or :class:`User` that " ":attr:`.Context.author` to fetch the :class:`Member` or :class:`User` "
"called the command." "that called the command."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:176 #: ../../ext/commands/commands.rst:176
msgid "" msgid ""
":meth:`.Context.send` to send a message to the channel the command was used " ":meth:`.Context.send` to send a message to the channel the command was "
"in." "used in."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:178 #: ../../ext/commands/commands.rst:178
msgid "" msgid ""
"The context implements the :class:`abc.Messageable` interface, so anything " "The context implements the :class:`abc.Messageable` interface, so "
"you can do on a :class:`abc.Messageable` you can do on the " "anything you can do on a :class:`abc.Messageable` you can do on the "
":class:`~ext.commands.Context`." ":class:`~ext.commands.Context`."
msgstr "" msgstr ""
@ -251,8 +249,8 @@ msgstr "コンバーター"
msgid "" msgid ""
"Adding bot arguments with function parameters is only the first step in " "Adding bot arguments with function parameters is only the first step in "
"defining your bot's command interface. To actually make use of the " "defining your bot's command interface. To actually make use of the "
"arguments, we usually want to convert the data into a target type. We call " "arguments, we usually want to convert the data into a target type. We "
"these :ref:`ext_commands_api_converters`." "call these :ref:`ext_commands_api_converters`."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:188 #: ../../ext/commands/commands.rst:188
@ -281,26 +279,27 @@ msgstr "基本的なコンバーター"
#: ../../ext/commands/commands.rst:199 #: ../../ext/commands/commands.rst:199
msgid "" msgid ""
"At its core, a basic converter is a callable that takes in an argument and " "At its core, a basic converter is a callable that takes in an argument "
"turns it into something else." "and turns it into something else."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:201 #: ../../ext/commands/commands.rst:201
msgid "" msgid ""
"For example, if we wanted to add two numbers together, we could request that" "For example, if we wanted to add two numbers together, we could request "
" they are turned into integers for us by specifying the converter:" "that they are turned into integers for us by specifying the converter:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:210 #: ../../ext/commands/commands.rst:210
msgid "" msgid ""
"We specify converters by using something called a **function annotation**. " "We specify converters by using something called a **function "
"This is a Python 3 exclusive feature that was introduced in :pep:`3107`." "annotation**. This is a Python 3 exclusive feature that was introduced in"
" :pep:`3107`."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:213 #: ../../ext/commands/commands.rst:213
msgid "" msgid ""
"This works with any callable, such as a function that would convert a string" "This works with any callable, such as a function that would convert a "
" to all upper-case:" "string to all upper-case:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:227 #: ../../ext/commands/commands.rst:227
@ -309,18 +308,19 @@ msgstr ""
#: ../../ext/commands/commands.rst:229 #: ../../ext/commands/commands.rst:229
msgid "" msgid ""
"Sometimes a basic converter doesn't have enough information that we need. " "Sometimes a basic converter doesn't have enough information that we need."
"For example, sometimes we want to get some information from the " " For example, sometimes we want to get some information from the "
":class:`Message` that called the command or we want to do some asynchronous " ":class:`Message` that called the command or we want to do some "
"processing." "asynchronous processing."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:232 #: ../../ext/commands/commands.rst:232
msgid "" msgid ""
"For this, the library provides the :class:`~ext.commands.Converter` " "For this, the library provides the :class:`~ext.commands.Converter` "
"interface. This allows you to have access to the :class:`.Context` and have " "interface. This allows you to have access to the :class:`.Context` and "
"the callable be asynchronous. Defining a custom converter using this " "have the callable be asynchronous. Defining a custom converter using this"
"interface requires overriding a single method, :meth:`.Converter.convert`." " interface requires overriding a single method, "
":meth:`.Converter.convert`."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:236 #: ../../ext/commands/commands.rst:236
@ -329,22 +329,22 @@ msgstr ""
#: ../../ext/commands/commands.rst:251 #: ../../ext/commands/commands.rst:251
msgid "" msgid ""
"The converter provided can either be constructed or not. Essentially these " "The converter provided can either be constructed or not. Essentially "
"two are equivalent:" "these two are equivalent:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:265 #: ../../ext/commands/commands.rst:265
msgid "" msgid ""
"Having the possibility of the converter be constructed allows you to set up " "Having the possibility of the converter be constructed allows you to set "
"some state in the converter's ``__init__`` for fine tuning the converter. An" "up some state in the converter's ``__init__`` for fine tuning the "
" example of this is actually in the library, " "converter. An example of this is actually in the library, "
":class:`~ext.commands.clean_content`." ":class:`~ext.commands.clean_content`."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:281 #: ../../ext/commands/commands.rst:281
msgid "" msgid ""
"If a converter fails to convert an argument to its designated target type, " "If a converter fails to convert an argument to its designated target "
"the :exc:`.BadArgument` exception must be raised." "type, the :exc:`.BadArgument` exception must be raised."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:285 #: ../../ext/commands/commands.rst:285
@ -365,11 +365,12 @@ msgstr ""
#: ../../ext/commands/commands.rst:298 #: ../../ext/commands/commands.rst:298
msgid "" msgid ""
"When this command is executed, it attempts to convert the string given into " "When this command is executed, it attempts to convert the string given "
"a :class:`Member` and then passes it as a parameter for the function. This " "into a :class:`Member` and then passes it as a parameter for the "
"works by checking if the string is a mention, an ID, a nickname, a username " "function. This works by checking if the string is a mention, an ID, a "
"+ discriminator, or just a regular username. The default set of converters " "nickname, a username + discriminator, or just a regular username. The "
"have been written to be as easy to use as possible." "default set of converters have been written to be as easy to use as "
"possible."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:302 #: ../../ext/commands/commands.rst:302
@ -488,8 +489,8 @@ msgstr ""
#: ../../ext/commands/commands.rst:348 #: ../../ext/commands/commands.rst:348
msgid "" msgid ""
"By providing the converter it allows us to use them as building blocks for " "By providing the converter it allows us to use them as building blocks "
"another converter:" "for another converter:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:363 #: ../../ext/commands/commands.rst:363
@ -498,8 +499,8 @@ msgstr ""
#: ../../ext/commands/commands.rst:365 #: ../../ext/commands/commands.rst:365
msgid "" msgid ""
"If we don't want to inherit from :class:`~ext.commands.Converter`, we can " "If we don't want to inherit from :class:`~ext.commands.Converter`, we can"
"still provide a converter that has the advanced functionalities of an " " still provide a converter that has the advanced functionalities of an "
"advanced converter and save us from specifying two types." "advanced converter and save us from specifying two types."
msgstr "" msgstr ""
@ -511,154 +512,308 @@ msgstr ""
#: ../../ext/commands/commands.rst:394 #: ../../ext/commands/commands.rst:394
msgid "" msgid ""
"This can get tedious, so an inline advanced converter is possible through a " "This can get tedious, so an inline advanced converter is possible through"
"``classmethod`` inside the type:" " a ``classmethod`` inside the type:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:423 #: ../../ext/commands/commands.rst:423
#, fuzzy
msgid "Special Converters"
msgstr "基本的なコンバーター"
#: ../../ext/commands/commands.rst:425
msgid ""
"The command extension also has support for certain converters to allow "
"for more advanced and intricate use cases that go beyond the generic "
"linear parsing. These converters allow you to introduce some more relaxed"
" and dynamic grammar to your commands in an easy to use manner."
msgstr ""
#: ../../ext/commands/commands.rst:430
msgid "typing.Union"
msgstr ""
#: ../../ext/commands/commands.rst:432
msgid ""
"A :data:`typing.Union` is a special type hint that allows for the command"
" to take in any of the specific types instead of a singular type. For "
"example, given the following:"
msgstr ""
#: ../../ext/commands/commands.rst:444
msgid ""
"The ``what`` parameter would either take a :class:`discord.TextChannel` "
"converter or a :class:`discord.Member` converter. The way this works is "
"through a left-to-right order. It first attempts to convert the input to "
"a :class:`discord.TextChannel`, and if it fails it tries to convert it to"
" a :class:`discord.Member`. If all converters fail, then a special error "
"is raised, :exc:`~ext.commands.BadUnionArgument`."
msgstr ""
#: ../../ext/commands/commands.rst:449
msgid ""
"Note that any valid converter discussed above can be passed in to the "
"argument list of a :data:`typing.Union`."
msgstr ""
#: ../../ext/commands/commands.rst:452
msgid "typing.Optional"
msgstr ""
#: ../../ext/commands/commands.rst:454
msgid ""
"A :data:`typing.Optional` is a special type hint that allows for \"back-"
"referencing\" behaviour. If the converter fails to parse into the "
"specified type, the parser will skip the parameter and then either "
"``None`` or the specified default will be passed into the parameter "
"instead. The parser will then continue on to the next parameters and "
"converters, if any."
msgstr ""
#: ../../ext/commands/commands.rst:458 ../../ext/commands/commands.rst:485
msgid "Consider the following example:"
msgstr ""
#: ../../ext/commands/commands.rst:471
msgid ""
"In this example, since the argument could not be converted into an "
"``int``, the default of ``99`` is passed and the parser resumes handling,"
" which in this case would be to pass it into the ``liquid`` parameter."
msgstr ""
#: ../../ext/commands/commands.rst:476
msgid ""
"This converter only works in regular positional parameters, not variable "
"parameters or keyword-only parameters."
msgstr ""
#: ../../ext/commands/commands.rst:479
msgid "Greedy"
msgstr ""
#: ../../ext/commands/commands.rst:481
msgid ""
"The :data:`~ext.commands.Greedy` converter is a generalisation of the "
":data:`typing.Optional` converter, except applied to a list of arguments."
" In simple terms, this means that it tries to convert as much as it can "
"until it can't convert any further."
msgstr ""
#: ../../ext/commands/commands.rst:494
msgid "When invoked, it allows for any number of members to be passed in:"
msgstr ""
#: ../../ext/commands/commands.rst:498
msgid ""
"The type passed when using this converter depends on the parameter type "
"that it is being attached to:"
msgstr ""
#: ../../ext/commands/commands.rst:500
msgid ""
"Positional parameter types will receive either the default parameter or a"
" :class:`list` of the converted values."
msgstr ""
#: ../../ext/commands/commands.rst:501
msgid "Variable parameter types will be a :class:`tuple` as usual."
msgstr ""
#: ../../ext/commands/commands.rst:502
msgid ""
"Keyword-only parameter types will be the same as if "
":data:`~ext.commands.Greedy` was not passed at all."
msgstr ""
#: ../../ext/commands/commands.rst:504
msgid ""
":data:`~ext.commands.Greedy` parameters can also be made optional by "
"specifying an optional value."
msgstr ""
#: ../../ext/commands/commands.rst:506
msgid ""
"When mixed with the :data:`typing.Optional` converter you can provide "
"simple and expressive command invocation syntaxes:"
msgstr ""
#: ../../ext/commands/commands.rst:521
msgid "This command can be invoked any of the following ways:"
msgstr ""
#: ../../ext/commands/commands.rst:531
msgid ""
"The usage of :data:`~ext.commands.Greedy` and :data:`typing.Optional` are"
" powerful and useful, however as a price, they open you up to some "
"parsing ambiguities that might surprise some people."
msgstr ""
#: ../../ext/commands/commands.rst:534
msgid ""
"For example, a signature expecting a :data:`typing.Optional` of a "
":class:`discord.Member` followed by a :class:`int` could catch a member "
"named after a number due to the different ways a "
":class:`~ext.commands.MemberConverter` decides to fetch members. You "
"should take care to not introduce unintended parsing ambiguities in your "
"code. One technique would be to clamp down the expected syntaxes allowed "
"through custom converters or reordering the parameters to minimise "
"clashes."
msgstr ""
#: ../../ext/commands/commands.rst:540
msgid ""
"To help aid with some parsing ambiguities, :class:`str`, ``None`` and "
":data:`~ext.commands.Greedy` are forbidden as parameters for the "
":data:`~ext.commands.Greedy` converter."
msgstr ""
#: ../../ext/commands/commands.rst:546
msgid "Error Handling" msgid "Error Handling"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:425 #: ../../ext/commands/commands.rst:548
msgid "" msgid ""
"When our commands fail to either parse we will, by default, receive a noisy " "When our commands fail to either parse we will, by default, receive a "
"error in ``stderr`` of our console that tells us that an error has happened " "noisy error in ``stderr`` of our console that tells us that an error has "
"and has been silently ignored." "happened and has been silently ignored."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:428 #: ../../ext/commands/commands.rst:551
msgid "" msgid ""
"In order to handle our errors, we must use something called an error " "In order to handle our errors, we must use something called an error "
"handler. There is a global error handler, called :func:`on_command_error` " "handler. There is a global error handler, called :func:`on_command_error`"
"which works like any other event in the :ref:`discord-api-events`. This " " which works like any other event in the :ref:`discord-api-events`. This "
"global error handler is called for every error reached." "global error handler is called for every error reached."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:432 #: ../../ext/commands/commands.rst:555
msgid "" msgid ""
"Most of the time however, we want to handle an error local to the command " "Most of the time however, we want to handle an error local to the command"
"itself. Luckily, commands come with local error handlers that allow us to do" " itself. Luckily, commands come with local error handlers that allow us "
" just that. First we decorate an error handler function with " "to do just that. First we decorate an error handler function with "
":meth:`.Command.error`:" ":meth:`.Command.error`:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:448 #: ../../ext/commands/commands.rst:571
msgid "" msgid ""
"The first parameter of the error handler is the :class:`.Context` while the " "The first parameter of the error handler is the :class:`.Context` while "
"second one is an exception that is derived from " "the second one is an exception that is derived from "
":exc:`~ext.commands.CommandError`. A list of errors is found in the " ":exc:`~ext.commands.CommandError`. A list of errors is found in the "
":ref:`ext_commands_api_errors` page of the documentation." ":ref:`ext_commands_api_errors` page of the documentation."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:452 #: ../../ext/commands/commands.rst:575
msgid "Checks" msgid "Checks"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:454 #: ../../ext/commands/commands.rst:577
msgid "" msgid ""
"There are cases when we don't want a user to use our commands. They don't " "There are cases when we don't want a user to use our commands. They don't"
"have permissions to do so or maybe we blocked them from using our bot " " have permissions to do so or maybe we blocked them from using our bot "
"earlier. The commands extension comes with full support for these things in " "earlier. The commands extension comes with full support for these things "
"a concept called a :ref:`ext_commands_api_checks`." "in a concept called a :ref:`ext_commands_api_checks`."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:458 #: ../../ext/commands/commands.rst:581
msgid "" msgid ""
"A check is a basic predicate that can take in a :class:`.Context` as its " "A check is a basic predicate that can take in a :class:`.Context` as its "
"sole parameter. Within it, you have the following options:" "sole parameter. Within it, you have the following options:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:461 #: ../../ext/commands/commands.rst:584
msgid "Return ``True`` to signal that the person can run the command." msgid "Return ``True`` to signal that the person can run the command."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:462 #: ../../ext/commands/commands.rst:585
msgid "Return ``False`` to signal that the person cannot run the command." msgid "Return ``False`` to signal that the person cannot run the command."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:463 #: ../../ext/commands/commands.rst:586
msgid "" msgid ""
"Raise a :exc:`~ext.commands.CommandError` derived exception to signal the " "Raise a :exc:`~ext.commands.CommandError` derived exception to signal the"
"person cannot run the command." " person cannot run the command."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:465 #: ../../ext/commands/commands.rst:588
msgid "" msgid ""
"This allows you to have custom error messages for you to handle in the " "This allows you to have custom error messages for you to handle in the "
":ref:`error handlers <ext_commands_error_handler>`." ":ref:`error handlers <ext_commands_error_handler>`."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:468 #: ../../ext/commands/commands.rst:591
msgid "" msgid ""
"To register a check for a command, we would have two ways of doing so. The " "To register a check for a command, we would have two ways of doing so. "
"first is using the :meth:`~ext.commands.check` decorator. For example:" "The first is using the :meth:`~ext.commands.check` decorator. For "
"example:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:482 #: ../../ext/commands/commands.rst:605
msgid "" msgid ""
"This would only evaluate the command if the function ``is_owner`` returns " "This would only evaluate the command if the function ``is_owner`` returns"
"``True``. Sometimes we re-use a check often and want to split it into its " " ``True``. Sometimes we re-use a check often and want to split it into "
"own decorator. To do that we can just add another level of depth:" "its own decorator. To do that we can just add another level of depth:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:499 #: ../../ext/commands/commands.rst:622
msgid "" msgid ""
"Since an owner check is so common, the library provides it for you " "Since an owner check is so common, the library provides it for you "
"(:func:`~ext.commands.is_owner`):" "(:func:`~ext.commands.is_owner`):"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:509 #: ../../ext/commands/commands.rst:632
msgid "When multiple checks are specified, **all** of them must be ``True``:" msgid "When multiple checks are specified, **all** of them must be ``True``:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:524 #: ../../ext/commands/commands.rst:647
msgid "" msgid ""
"If any of those checks fail in the example above, then the command will not " "If any of those checks fail in the example above, then the command will "
"be run." "not be run."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:526 #: ../../ext/commands/commands.rst:649
msgid "" msgid ""
"When an error happens, the error is propagated to the :ref:`error handlers " "When an error happens, the error is propagated to the :ref:`error "
"<ext_commands_error_handler>`. If you do not raise a custom " "handlers <ext_commands_error_handler>`. If you do not raise a custom "
":exc:`~ext.commands.CommandError` derived exception, then it will get " ":exc:`~ext.commands.CommandError` derived exception, then it will get "
"wrapped up into a :exc:`~ext.commands.CheckFailure` exception as so:" "wrapped up into a :exc:`~ext.commands.CheckFailure` exception as so:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:543 #: ../../ext/commands/commands.rst:666
msgid "" msgid ""
"If you want a more robust error system, you can derive from the exception " "If you want a more robust error system, you can derive from the exception"
"and raise it instead of returning ``False``:" " and raise it instead of returning ``False``:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:568 #: ../../ext/commands/commands.rst:691
msgid "" msgid ""
"Since having a ``guild_only`` decorator is pretty common, it comes built-in " "Since having a ``guild_only`` decorator is pretty common, it comes built-"
"via :func:`~ext.commands.guild_only`." "in via :func:`~ext.commands.guild_only`."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:571 #: ../../ext/commands/commands.rst:694
msgid "Global Checks" msgid "Global Checks"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:573 #: ../../ext/commands/commands.rst:696
msgid "" msgid ""
"Sometimes we want to apply a check to **every** command, not just certain " "Sometimes we want to apply a check to **every** command, not just certain"
"commands. The library supports this as well using the global check concept." " commands. The library supports this as well using the global check "
"concept."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:576 #: ../../ext/commands/commands.rst:699
msgid "" msgid ""
"Global checks work similarly to regular checks except they are registered " "Global checks work similarly to regular checks except they are registered"
"with the :func:`.Bot.check` decorator." " with the :func:`.Bot.check` decorator."
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:578 #: ../../ext/commands/commands.rst:701
msgid "For example, to block all DMs we could do the following:" msgid "For example, to block all DMs we could do the following:"
msgstr "" msgstr ""
#: ../../ext/commands/commands.rst:588 #: ../../ext/commands/commands.rst:711
msgid "" msgid ""
"Be careful on how you write your global checks, as it could also lock you " "Be careful on how you write your global checks, as it could also lock you"
"out of your own bot." " out of your own bot."
msgstr "" msgstr ""

928
docs/locale/ja/LC_MESSAGES/migrating.po

File diff suppressed because it is too large
Loading…
Cancel
Save