Translated some .po files.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,225 +1,179 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2015-2019, Rapptz
|
||||
# This file is distributed under the same license as the discord.py package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discord.py 1.0.0a\n"
|
||||
"Project-Id-Version: discordpy-japanese\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-02-24 04:09-0500\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"PO-Revision-Date: 2019-03-16 10:14\n"
|
||||
"Last-Translator: mistio100 <mistio100@gmail.com>\n"
|
||||
"Language-Team: Japanese\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"
|
||||
"Generated-By: Babel 2.5.3\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: crowdin.com\n"
|
||||
"X-Crowdin-Project: discordpy-japanese\n"
|
||||
"X-Crowdin-Language: ja\n"
|
||||
"X-Crowdin-File: /ext/commands/cogs.po\n"
|
||||
"Language: ja_JP\n"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:6
|
||||
msgid "Cogs"
|
||||
msgstr ""
|
||||
msgstr "コグ"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:8
|
||||
msgid ""
|
||||
"There comes a point in your bot's development when you want to organize a"
|
||||
" collection of commands, listeners, and some state into one class. Cogs "
|
||||
"allow you to do just that."
|
||||
msgstr ""
|
||||
msgid "There comes a point in your bot's development when you want to organize a collection of commands, listeners, and some state into one class. Cogs allow you to do just that."
|
||||
msgstr "Bot開発においてコマンドやリスナー、いくつかの状態を一つのクラスにまとめてしまいたい場合があるでしょう。コグはそれを実現したものです。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:10
|
||||
msgid "The gist:"
|
||||
msgstr ""
|
||||
msgstr "要旨:"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:12
|
||||
msgid "Each cog is a Python class that subclasses :class:`.commands.Cog`."
|
||||
msgstr ""
|
||||
msgstr "すべてのコグは :class:`.commands.Cog` を継承したPythonクラスです。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:13
|
||||
msgid "Every command is marked with the :func:`.commands.command` decorator."
|
||||
msgstr ""
|
||||
msgstr "すべてのコマンドは :func:`.commands.command` デコレータでデコレートされます。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:14
|
||||
msgid ""
|
||||
"Every listener is marked with the :meth:`.commands.Cog.listener` "
|
||||
"decorator."
|
||||
msgstr ""
|
||||
msgid "Every listener is marked with the :meth:`.commands.Cog.listener` decorator."
|
||||
msgstr "すべてのリスナーは :meth:`.commands.Cog.listener` デコレータでデコレートされます。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:15
|
||||
msgid "Cogs are then registered with the :meth:`.Bot.add_cog` call."
|
||||
msgstr ""
|
||||
msgstr "コグは :meth:`.Bot.add_cog` を呼び出して登録します。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:16
|
||||
msgid "Cogs are subsequently removed with the :meth:`.Bot.remove_cog` call."
|
||||
msgstr ""
|
||||
msgstr "コグは :meth:`.Bot.remove_cog` の呼び出しで削除されます。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:18
|
||||
msgid ""
|
||||
"It should be noted that cogs are typically used alongside with "
|
||||
":ref:`ext_commands_extensions`."
|
||||
msgstr ""
|
||||
msgid "It should be noted that cogs are typically used alongside with :ref:`ext_commands_extensions`."
|
||||
msgstr "コグは :ref:`ext_commands_extensions` とともに使用されるのが一般的であることを覚えておきましょう。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:21
|
||||
msgid "Quick Example"
|
||||
msgstr ""
|
||||
msgstr "簡単な例"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:23
|
||||
msgid ""
|
||||
"This example cog defines a ``Greetings`` category for your commands, with"
|
||||
" a single :ref:`command <ext_commands_commands>` named ``hello`` as well "
|
||||
"as a listener to listen to an :ref:`Event <discord-api-events>`."
|
||||
msgstr ""
|
||||
msgid "This example cog defines a ``Greetings`` category for your commands, with a single :ref:`command <ext_commands_commands>` named ``hello`` as well as a listener to listen to an :ref:`Event <discord-api-events>`."
|
||||
msgstr "この例で紹介するコグは ``hello`` という名前の :ref:`command <ext_commands_commands>` と、 :ref:`Event <discord-api-events>` をリッスンするリスナーを実装した ``Greetings`` という名前のコマンドカテゴリを定義しています。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:48
|
||||
msgid "A couple of technical notes to take into consideration:"
|
||||
msgstr ""
|
||||
msgstr "考慮すべき二つのテクニカルノート:"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:50
|
||||
msgid ""
|
||||
"All listeners must be explicitly marked via decorator, "
|
||||
":meth:`~.commands.Cog.listener`."
|
||||
msgstr ""
|
||||
msgid "All listeners must be explicitly marked via decorator, :meth:`~.commands.Cog.listener`."
|
||||
msgstr "すべてのリスナーは :meth:`~.commands.Cog.listener` で明示的にデコレートする必要があります。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:51
|
||||
msgid ""
|
||||
"The name of the cog is automatically derived from the class name but can "
|
||||
"be overridden. See :ref:`ext_commands_cogs_meta_options`."
|
||||
msgstr ""
|
||||
msgid "The name of the cog is automatically derived from the class name but can be overridden. See :ref:`ext_commands_cogs_meta_options`."
|
||||
msgstr "コグの名前は、自動的にクラスの名前が引用されますが、上書きも可能です。 :ref:`ext_commands_cogs_meta_options` を参照してください。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:52
|
||||
msgid ""
|
||||
"All commands must now take a ``self`` parameter to allow usage of "
|
||||
"instance attributes that can be used to maintain state."
|
||||
msgstr ""
|
||||
msgid "All commands must now take a ``self`` parameter to allow usage of instance attributes that can be used to maintain state."
|
||||
msgstr "すべてのコマンドは状態を保持するインスタンスの属性を使用するために ``self`` パラメータを持つ必要があります。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:55
|
||||
msgid "Cog Registration"
|
||||
msgstr ""
|
||||
msgstr "コグの登録"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:57
|
||||
msgid ""
|
||||
"Once you have defined your cogs, you need to tell the bot to register the"
|
||||
" cogs to be used. We do this via the :meth:`~.commands.Bot.add_cog` "
|
||||
"method."
|
||||
msgstr ""
|
||||
msgid "Once you have defined your cogs, you need to tell the bot to register the cogs to be used. We do this via the :meth:`~.commands.Bot.add_cog` method."
|
||||
msgstr "コグを定義したら、Botにコグを登録する処理が必要になります。 :meth:`~.commands.Bot.add_cog` メソッドを用いて登録ができます。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:63
|
||||
msgid ""
|
||||
"This binds the cog to the bot, adding all commands and listeners to the "
|
||||
"bot automatically."
|
||||
msgstr ""
|
||||
msgid "This binds the cog to the bot, adding all commands and listeners to the bot automatically."
|
||||
msgstr "これはコグとBotを紐づけ、すべてのコマンドとリスナーを自動的にBotに追加します。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:65
|
||||
msgid ""
|
||||
"Note that we reference the cog by name, which we can override through "
|
||||
":ref:`ext_commands_cogs_meta_options`. So if we ever want to remove the "
|
||||
"cog eventually, we would have to do the following."
|
||||
msgstr ""
|
||||
msgid "Note that we reference the cog by name, which we can override through :ref:`ext_commands_cogs_meta_options`. So if we ever want to remove the cog eventually, we would have to do the following."
|
||||
msgstr "コグを名前で参照している点に注意してください。これは :ref:`ext_commands_cogs_meta_options` でオーバーライドが可能です。そのため、最終的にコグを削除したい場合は、次の処理を行う必要があります。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:72
|
||||
msgid "Using Cogs"
|
||||
msgstr ""
|
||||
msgstr "コグの使用"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:74
|
||||
msgid ""
|
||||
"Just as we remove a cog by its name, we can also retrieve it by its name "
|
||||
"as well. This allows us to use a cog as an inter-command communication "
|
||||
"protocol to share data. For example:"
|
||||
msgstr ""
|
||||
msgid "Just as we remove a cog by its name, we can also retrieve it by its name as well. This allows us to use a cog as an inter-command communication protocol to share data. For example:"
|
||||
msgstr "コグを名前で削除するのと同様に、名前でコグを検索することもできます。これによってコグをデータ共有のためのコマンド間通信プロトコルとして使うことができます。例えば:"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:109
|
||||
msgid "Special Methods"
|
||||
msgstr ""
|
||||
msgstr "特殊なメソッド"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:111
|
||||
msgid ""
|
||||
"As cogs get more complicated and have more commands, there comes a point "
|
||||
"where we want to customise the behaviour of the entire cog or bot."
|
||||
msgstr ""
|
||||
msgid "As cogs get more complicated and have more commands, there comes a point where we want to customise the behaviour of the entire cog or bot."
|
||||
msgstr "コグが複雑化し、多くのコマンドを持つようになるにつれ、コグあるいはBot全体の挙動をカスタマイズしたくなることがあります。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:113
|
||||
msgid "They are as follows:"
|
||||
msgstr ""
|
||||
msgstr "そのための特殊なメソッドは以下のとおりです:"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:115
|
||||
msgid ":meth:`.Cog.cog_unload`"
|
||||
msgstr ""
|
||||
msgstr ":meth:`.Cog.cog_unload`"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:116
|
||||
msgid ":meth:`.Cog.cog_check`"
|
||||
msgstr ""
|
||||
msgstr ":meth:`.Cog.cog_check`"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:117
|
||||
msgid ":meth:`.Cog.cog_command_error`"
|
||||
msgstr ""
|
||||
msgstr ":meth:`.Cog.cog_command_error`"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:118
|
||||
msgid ":meth:`.Cog.cog_before_invoke`"
|
||||
msgstr ""
|
||||
msgstr ":meth:`.Cog.cog_before_invoke`"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:119
|
||||
msgid ":meth:`.Cog.cog_after_invoke`"
|
||||
msgstr ""
|
||||
msgstr ":meth:`.Cog.cog_after_invoke`"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:120
|
||||
msgid ":meth:`.Cog.bot_check`"
|
||||
msgstr ""
|
||||
msgstr ":meth:`.Cog.bot_check`"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:121
|
||||
msgid ":meth:`.Cog.bot_check_once`"
|
||||
msgstr ""
|
||||
msgstr ":meth:`.Cog.bot_check_once`"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:123
|
||||
msgid "You can visit the reference to get more detail."
|
||||
msgstr ""
|
||||
msgstr "詳細はリファレンスを参照してください。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:128
|
||||
msgid "Meta Options"
|
||||
msgstr ""
|
||||
msgstr "メタオプション"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:130
|
||||
msgid ""
|
||||
"At the heart of a cog resides a metaclass, :class:`.commands.CogMeta`, "
|
||||
"which can take various options to customise some of the behaviour. To do "
|
||||
"this, we pass keyword arguments to the class definition line. For "
|
||||
"example, to change the cog name we can pass the ``name`` keyword argument"
|
||||
" as follows:"
|
||||
msgstr ""
|
||||
msgid "At the heart of a cog resides a metaclass, :class:`.commands.CogMeta`, which can take various options to customise some of the behaviour. To do this, we pass keyword arguments to the class definition line. For example, to change the cog name we can pass the ``name`` keyword argument as follows:"
|
||||
msgstr "コグの中核にはメタクラスである :class:`.commands.CogMeta` が存在します。これにはいくつかの挙動を変更ができる様々なオプションが用意されています。オプションを使用する際はキーワード引数をクラス定義の行で渡します。例えば、コグの名前を変更する場合はキーワード引数 ``name`` を次のように渡します。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:137
|
||||
msgid ""
|
||||
"To see more options that you can set, see the documentation of "
|
||||
":class:`.commands.CogMeta`."
|
||||
msgstr ""
|
||||
msgid "To see more options that you can set, see the documentation of :class:`.commands.CogMeta`."
|
||||
msgstr "設定可能な他のオプションについては :class:`.commands.CogMeta` のドキュメントを参照してください。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:140
|
||||
msgid "Inspection"
|
||||
msgstr ""
|
||||
msgstr "インスペクション"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:142
|
||||
msgid ""
|
||||
"Since cogs ultimately are classes, we have some tools to help us inspect "
|
||||
"certain properties of the cog."
|
||||
msgstr ""
|
||||
msgid "Since cogs ultimately are classes, we have some tools to help us inspect certain properties of the cog."
|
||||
msgstr "コグは究極的にはクラスのため、コグの特定のプロパティを調べるのに役立つツールがいくつか用意されています。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:145
|
||||
msgid ""
|
||||
"To get a :class:`list` of commands, we can use :meth:`.Cog.get_commands`."
|
||||
" ::"
|
||||
msgstr ""
|
||||
msgid "To get a :class:`list` of commands, we can use :meth:`.Cog.get_commands`. ::"
|
||||
msgstr ":meth:`.Cog.get_commands` を使うことで、コマンドの :class:`list` を取得できます。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:151
|
||||
msgid ""
|
||||
"If we want to get the subcommands as well, we can use the "
|
||||
":meth:`.Cog.walk_commands` generator. ::"
|
||||
msgstr ""
|
||||
msgid "If we want to get the subcommands as well, we can use the :meth:`.Cog.walk_commands` generator. ::"
|
||||
msgstr "サブコマンドを取得したい場合は :meth:`.Cog.walk_commands` ジェネレータを使うことができます。"
|
||||
|
||||
#: ../../ext/commands/cogs.rst:155
|
||||
msgid ""
|
||||
"To do the same with listeners, we can query them with "
|
||||
":meth:`.Cog.get_listeners`. This returns a list of tuples -- the first "
|
||||
"element being the listener name and the second one being the actual "
|
||||
"function itself. ::"
|
||||
msgstr ""
|
||||
msgid "To do the same with listeners, we can query them with :meth:`.Cog.get_listeners`. This returns a list of tuples -- the first element being the listener name and the second one being the actual function itself. ::"
|
||||
msgstr "これ同様の処理をリスナーで行う場合は、 :meth:`.Cog.get_listeners` が使用できます。これはタプルのリストを返します -- 最初の要素がリスナーの名前で、二つ目の要素が関数そのものです。"
|
||||
|
||||
|
@@ -1,120 +1,87 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2015-2017, Rapptz
|
||||
# This file is distributed under the same license as the discord.py package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2018.
|
||||
#
|
||||
# Translators:
|
||||
# 竹内 歩夢 <take000a@gmail.com>, 2018
|
||||
# Episword <mistio100@gmail.com>, 2018
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discord.py 1.0.0a\n"
|
||||
"Project-Id-Version: discordpy-japanese\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-02-18 03:50-0500\n"
|
||||
"PO-Revision-Date: 2018-08-01 17:09+0000\n"
|
||||
"Last-Translator: Episword <mistio100@gmail.com>, 2018\n"
|
||||
"PO-Revision-Date: 2019-03-16 10:14\n"
|
||||
"Last-Translator: mistio100 <mistio100@gmail.com>\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"
|
||||
"Language-Team: Japanese\n"
|
||||
"Plural-Forms: nplurals=1; plural=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"
|
||||
"Generated-By: Babel 2.5.3\n"
|
||||
"X-Generator: crowdin.com\n"
|
||||
"X-Crowdin-Project: discordpy-japanese\n"
|
||||
"X-Crowdin-Language: ja\n"
|
||||
"X-Crowdin-File: /ext/commands/commands.po\n"
|
||||
|
||||
#: ../../ext/commands/commands.rst:6
|
||||
msgid "Commands"
|
||||
msgstr "Commands"
|
||||
msgstr "コマンド"
|
||||
|
||||
#: ../../ext/commands/commands.rst:8
|
||||
msgid ""
|
||||
"One of the most appealing aspect of the command extension is how easy it "
|
||||
"is to define commands and how you can arbitrarily nest groups and "
|
||||
"commands to have a rich sub-command system."
|
||||
msgid "One of the most appealing aspect of the command extension is how easy it is to define commands and how you can arbitrarily nest groups and commands to have a rich sub-command system."
|
||||
msgstr "コマンド拡張の最も魅力的な機能の一つは、簡単にコマンドが定義でき、かつそのコマンドを好きなようにネスト状にして、豊富なサブコマンドを用意することができる点です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:11
|
||||
msgid ""
|
||||
"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 function."
|
||||
msgid "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 function."
|
||||
msgstr "コマンドは、Pythonの関数と関連付けすることによって定義され、同様のシグネチャを使用してユーザーに呼び出されます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:14
|
||||
msgid "For example, in the given command definition:"
|
||||
msgstr "例えば、指定されたコマンド定義を使うと次のようになります:"
|
||||
msgstr "例えば、指定されたコマンド定義を使うと次のようになります。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:22
|
||||
msgid "With the following prefix (``$``), it would be invoked by the user via:"
|
||||
msgstr "Prefixを (``$``) としたとすると、このコマンドは次の用に実行できます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:28
|
||||
msgid ""
|
||||
"A command must always have at least one parameter, ``ctx``, which is the "
|
||||
":class:`.Context` as the first one."
|
||||
msgid "A command must always have at least one parameter, ``ctx``, which is the :class:`.Context` as the first one."
|
||||
msgstr "コマンドには、少なくとも :class:`.Context` を渡すための引数 ``ctx`` が必要です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:30
|
||||
msgid ""
|
||||
"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 using the :func:`~ext.commands.command` decorator followed by "
|
||||
":meth:`.Bot.add_command` on the instance."
|
||||
msgstr ""
|
||||
"コマンドを登録するには二通りの方法があります。一つ目は :meth:`.Bot.command` を使用する方法で、二つ目が "
|
||||
":func:`~ext.commands.command` デコレータを使用して :meth:`.Bot.add_command` "
|
||||
"でインスタンスにコマンドを追加していく方法です。"
|
||||
msgid "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 using the :func:`~ext.commands.command` decorator followed by :meth:`.Bot.add_command` on the instance."
|
||||
msgstr "コマンドを登録するには二通りの方法があります。一つ目は :meth:`.Bot.command` を使用する方法で、二つ目が :func:`~ext.commands.command` デコレータを使用して :meth:`.Bot.add_command` でインスタンスにコマンドを追加していく方法です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:34
|
||||
msgid "Essentially, these two are equivalent: ::"
|
||||
msgstr "本質的に、これら2つは同等になります: ::"
|
||||
|
||||
#: ../../ext/commands/commands.rst:52
|
||||
msgid ""
|
||||
"Since the :meth:`.Bot.command` decorator is shorter and easier to "
|
||||
"comprehend, it will be the one used throughout the documentation here."
|
||||
msgid "Since the :meth:`.Bot.command` decorator is shorter and easier to comprehend, it will be the one used throughout the documentation here."
|
||||
msgstr ":meth:`.Bot.command` が簡単かつ理解がしやすいので、ドキュメント上ではこちらを使っています。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:55
|
||||
msgid ""
|
||||
"Any parameter that is accepted by the :class:`.Command` constructor can "
|
||||
"be passed into the decorator. For example, to change the name to "
|
||||
"something other than the function would be as simple as doing this:"
|
||||
msgstr ""
|
||||
":class:`.Command` "
|
||||
"のコンストラクタの引数はデコレータに渡すことで利用できます。例えば、コマンドの名前を関数以外のものへと変更したい場合は以下のように簡単に設定することができます。"
|
||||
msgid "Any parameter that is accepted by the :class:`.Command` constructor can be passed into the decorator. For example, to change the name to something other than the function would be as simple as doing this:"
|
||||
msgstr ":class:`.Command` のコンストラクタの引数はデコレータに渡すことで利用できます。例えば、コマンドの名前を関数以外のものへと変更したい場合は以下のように簡単に設定することができます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:65
|
||||
msgid "Parameters"
|
||||
msgstr "パラメーター"
|
||||
|
||||
#: ../../ext/commands/commands.rst:67
|
||||
msgid ""
|
||||
"Since we define commands by making Python functions, we also define the "
|
||||
"argument passing behaviour by the function parameters."
|
||||
msgid "Since we define commands by making Python functions, we also define the argument passing behaviour by the function parameters."
|
||||
msgstr "Pythonの関数定義によって、同時にコマンドを定義するので、関数のパラメーターを設定することにより、コマンドの引数受け渡し動作も定義することができます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:70
|
||||
msgid ""
|
||||
"Certain parameter types do different things in the user side and most "
|
||||
"forms of parameter types are supported."
|
||||
msgstr ""
|
||||
msgid "Certain parameter types do different things in the user side and most forms of parameter types are supported."
|
||||
msgstr "特定のパラメータタイプはユーザーサイドで異なる動作を行い、そしてほとんどの形式のパラメータタイプがサポートされています。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:73
|
||||
msgid "Positional"
|
||||
msgstr "位置引数"
|
||||
|
||||
#: ../../ext/commands/commands.rst:75
|
||||
msgid ""
|
||||
"The most basic form of parameter passing is the positional parameter. "
|
||||
"This is where we pass a parameter as-is:"
|
||||
msgid "The most basic form of parameter passing is the positional parameter. This is where we pass a parameter as-is:"
|
||||
msgstr "最も基本的な引数は位置パラメーターです。与えられた値をそのまま渡します。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:84
|
||||
msgid ""
|
||||
"On the bot using side, you can provide positional arguments by just "
|
||||
"passing a regular string:"
|
||||
msgid "On the bot using side, you can provide positional arguments by just passing a regular string:"
|
||||
msgstr "Botの使用者側は、通常の文字列を渡すだけで位置引数に値を渡すことができます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:88
|
||||
@@ -122,15 +89,11 @@ msgid "To make use of a word with spaces in between, you should quote it:"
|
||||
msgstr "間に空白を含む文字列を渡す場合は、文字列を引用符で囲む必要があります。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:92
|
||||
msgid ""
|
||||
"As a note of warning, if you omit the quotes, you will only get the first"
|
||||
" word:"
|
||||
msgid "As a note of warning, if you omit the quotes, you will only get the first word:"
|
||||
msgstr "引用符を用いなかった場合、最初の文字列のみが渡されます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:96
|
||||
msgid ""
|
||||
"Since positional arguments are just regular Python arguments, you can "
|
||||
"have as many as you want:"
|
||||
msgid "Since positional arguments are just regular Python arguments, you can have as many as you want:"
|
||||
msgstr "位置引数は、Pythonの引数と同じものなので、好きなだけ設定することが可能です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:105
|
||||
@@ -138,17 +101,11 @@ msgid "Variable"
|
||||
msgstr "変数"
|
||||
|
||||
#: ../../ext/commands/commands.rst:107
|
||||
msgid ""
|
||||
"Sometimes you want users to pass in an undetermined number of parameters."
|
||||
" The library supports this similar to how variable list parameters are "
|
||||
"done in Python:"
|
||||
msgid "Sometimes you want users to pass in an undetermined number of parameters. The library supports this similar to how variable list parameters are done in Python:"
|
||||
msgstr "場合によっては、可変長のパラメーターを設定したい場合もあるでしょう。このライブラリはPythonの可変長パラメーターと同様にこれをサポートしています。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:116
|
||||
msgid ""
|
||||
"This allows our user to accept either one or many arguments as they "
|
||||
"please. This works similar to positional arguments, so multi-word "
|
||||
"parameters should be quoted."
|
||||
msgid "This allows our user to accept either one or many arguments as they please. This works similar to positional arguments, so multi-word parameters should be quoted."
|
||||
msgstr "これによって一つ、あるいは複数の引数を受け取ることができます。ただし、引数を渡す際の挙動は位置引数と同様のため、複数の単語を含む文字列は引用符で囲む必要があります。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:119
|
||||
@@ -156,236 +113,151 @@ msgid "For example, on the bot side:"
|
||||
msgstr "例えば、Bot側ではこのように動きます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:123
|
||||
msgid ""
|
||||
"If the user wants to input a multi-word argument, they have to quote it "
|
||||
"like earlier:"
|
||||
msgid "If the user wants to input a multi-word argument, they have to quote it like earlier:"
|
||||
msgstr "複数単語の文字列を渡す際は、引用符で囲んでください。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:127
|
||||
msgid ""
|
||||
"Do note that similar to the Python function behaviour, a user can "
|
||||
"technically pass no arguments at all:"
|
||||
msgstr ""
|
||||
msgid "Do note that similar to the Python function behaviour, a user can technically pass no arguments at all:"
|
||||
msgstr "Pythonの振る舞いと同様に、ユーザーは引数なしの状態を技術的に渡すことができます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:132
|
||||
msgid ""
|
||||
"Since the ``args`` variable is a `tuple "
|
||||
"<https://docs.python.org/3/library/stdtypes.html#sequence-types-list-"
|
||||
"tuple-range>`_, you can do anything you would usually do with one."
|
||||
msgstr ""
|
||||
"また、 ``args`` は `tuple <https://docs.python.org/3/library/stdtypes.html"
|
||||
"#sequence-types-list-tuple-range>`_ のため、通常これ一つで大抵のことは行うことができます。"
|
||||
msgid "Since the ``args`` variable is a `tuple <https://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range>`_, you can do anything you would usually do with one."
|
||||
msgstr "また、 ``args`` は `tuple <https://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range>`_ のため、通常これ一つで大抵のことは行うことができます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:136
|
||||
msgid "Keyword-Only Arguments"
|
||||
msgstr "キーワード引数"
|
||||
|
||||
#: ../../ext/commands/commands.rst:138
|
||||
msgid ""
|
||||
"When you want to handle parsing of the argument yourself or do not feel "
|
||||
"like you want to wrap multi-word user input into quotes, you can ask the "
|
||||
"library to give you the rest as a single argument. We do this by using a "
|
||||
"**keyword-only argument**, seen below:"
|
||||
msgstr ""
|
||||
msgid "When you want to handle parsing of the argument yourself or do not feel like you want to wrap multi-word user input into quotes, you can ask the library to give you the rest as a single argument. We do this by using a **keyword-only argument**, seen below:"
|
||||
msgstr "引数の構文解析を自分で行う場合や、複数単語の入力を引用符で囲む必要のないようにしたい場合は、渡された値を単一の引数として受け取るようにライブラリに求めることができます。以下のコードのようにキーワード引数のみを使用することでこれが可能になります。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:150
|
||||
msgid "You can only have one keyword-only argument due to parsing ambiguities."
|
||||
msgstr ""
|
||||
msgstr "解析が曖昧になるため、一つのキーワードのみの引数しか扱えません。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:152
|
||||
msgid "On the bot side, we do not need to quote input with spaces:"
|
||||
msgstr ""
|
||||
msgstr "Bot側では、スペースを含む入力を引用符で囲む必要がありません:"
|
||||
|
||||
#: ../../ext/commands/commands.rst:156
|
||||
msgid "Do keep in mind that wrapping it in quotes leaves it as-is:"
|
||||
msgstr ""
|
||||
msgstr "引用符で囲んだ場合、消えずに残るので注意してください:"
|
||||
|
||||
#: ../../ext/commands/commands.rst:160
|
||||
msgid ""
|
||||
"By default, the keyword-only arguments are stripped of white space to "
|
||||
"make it easier to work with. This behaviour can be toggled by the "
|
||||
":attr:`.Command.rest_is_raw` argument in the decorator."
|
||||
msgid "By default, the keyword-only arguments are stripped of white space to make it easier to work with. This behaviour can be toggled by the :attr:`.Command.rest_is_raw` argument in the decorator."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:166
|
||||
msgid "Invocation Context"
|
||||
msgstr ""
|
||||
msgstr "呼び出しコンテクスト"
|
||||
|
||||
#: ../../ext/commands/commands.rst:168
|
||||
msgid ""
|
||||
"As seen earlier, every command must take at least a single parameter, "
|
||||
"called the :class:`~ext.commands.Context`."
|
||||
msgstr ""
|
||||
"前述の通り、すべてのコマンドは、必ず :class:`~ext.commands.Context` "
|
||||
"と呼ばれるパラメータを受け取らなければいけません。"
|
||||
msgid "As seen earlier, every command must take at least a single parameter, called the :class:`~ext.commands.Context`."
|
||||
msgstr "前述の通り、すべてのコマンドは必ず :class:`~ext.commands.Context` と呼ばれるパラメータを受け取らなければいけません。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:170
|
||||
msgid ""
|
||||
"This parameter gives you access to something called the \"invocation "
|
||||
"context\". Essentially all the information you need to know how the "
|
||||
"command was executed. It contains a lot of useful information:"
|
||||
msgstr ""
|
||||
msgid "This parameter gives you access to something called the \"invocation context\". Essentially all the information you need to know how the command was executed. It contains a lot of useful information:"
|
||||
msgstr "このパラメータにより、「呼び出しコンテクスト」というものにアクセスできます。言うなればコマンドがどのように実行されたのかを知るのに必要な基本的情報です。これにはたくさんの有用な情報が含まれています。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:173
|
||||
msgid ":attr:`.Context.guild` to fetch the :class:`Guild` of the command, if any."
|
||||
msgstr "存在する場合に限り、コマンドの :class:`Guild` を取得する :attr:`.Context.guild` 。"
|
||||
msgstr "存在する場合に限り、コマンドの :class:`Guild` を取得できる :attr:`.Context.guild` 。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:174
|
||||
msgid ":attr:`.Context.message` to fetch the :class:`Message` of the command."
|
||||
msgstr "コマンドの :class:`Message` を取得する :attr:`.Context.message` 。"
|
||||
msgstr "コマンドの :class:`Message` を取得できる :attr:`.Context.message` 。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:175
|
||||
msgid ""
|
||||
":attr:`.Context.author` to fetch the :class:`Member` or :class:`User` "
|
||||
"that called the command."
|
||||
msgstr ""
|
||||
"コマンドを実行した :class:`Member` あるいは :class:`User` を取得する "
|
||||
":attr:`.Context.author` 。"
|
||||
msgid ":attr:`.Context.author` to fetch the :class:`Member` or :class:`User` that called the command."
|
||||
msgstr "コマンドを実行した :class:`Member` あるいは :class:`User` を取得できる :attr:`.Context.author` 。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:176
|
||||
msgid ""
|
||||
":meth:`.Context.send` to send a message to the channel the command was "
|
||||
"used in."
|
||||
msgid ":meth:`.Context.send` to send a message to the channel the command was used in."
|
||||
msgstr "コマンドが実行されたチャンネルにメッセージを送信する :meth:`.Context.send` 。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:178
|
||||
msgid ""
|
||||
"The context implements the :class:`abc.Messageable` interface, so "
|
||||
"anything you can do on a :class:`abc.Messageable` you can do on the "
|
||||
":class:`~ext.commands.Context`."
|
||||
msgstr ""
|
||||
"コンテキストは :class:`abc.Messageable` インタフェースを実装しているため、 "
|
||||
":class:`abc.Messageable` 上でできることは :class:`~ext.commands.Context` "
|
||||
"上でも行うことが可能です。"
|
||||
msgid "The context implements the :class:`abc.Messageable` interface, so anything you can do on a :class:`abc.Messageable` you can do on the :class:`~ext.commands.Context`."
|
||||
msgstr "コンテクストは :class:`abc.Messageable` インタフェースを実装しているため、 :class:`abc.Messageable` 上でできることは :class:`~ext.commands.Context` 上でも行うことが可能です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:182
|
||||
msgid "Converters"
|
||||
msgstr "コンバーター"
|
||||
|
||||
#: ../../ext/commands/commands.rst:184
|
||||
msgid ""
|
||||
"Adding bot arguments with function parameters is only the first step in "
|
||||
"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 these :ref:`ext_commands_api_converters`."
|
||||
msgstr ""
|
||||
msgid "Adding bot arguments with function parameters is only the first step in 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 these :ref:`ext_commands_api_converters`."
|
||||
msgstr "Botの引数を関数のパラメータとして設定するのは、Botのコマンドインタフェースを定義する第一歩です。引数を実際に扱うには、大抵の場合、データを目的の型へとと変換する必要があります。私達はこれを :ref:`ext_commands_api_converters` と呼んでいます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:188
|
||||
msgid "Converters come in a few flavours:"
|
||||
msgstr "コンバーターにはいくつかの種類があります:"
|
||||
|
||||
#: ../../ext/commands/commands.rst:190
|
||||
msgid ""
|
||||
"A regular callable object that takes an argument as a sole parameter and "
|
||||
"returns a different type."
|
||||
msgstr ""
|
||||
msgid "A regular callable object that takes an argument as a sole parameter and returns a different type."
|
||||
msgstr "引数を一つのパラメータとして受け取り、異なる型として返す、通常の呼び出し可能オブジェクト。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:192
|
||||
msgid ""
|
||||
"These range from your own function, to something like :class:`bool` or "
|
||||
":class:`int`."
|
||||
msgstr ""
|
||||
msgid "These range from your own function, to something like :class:`bool` or :class:`int`."
|
||||
msgstr "これらにはあなたの作った関数、 :class:`bool` や :class:`int` といったものまで含まれます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:194
|
||||
msgid "A custom class that inherits from :class:`~ext.commands.Converter`."
|
||||
msgstr ""
|
||||
msgstr ":class:`~ext.commands.Converter` を継承したカスタムクラス。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:197
|
||||
msgid "Basic Converters"
|
||||
msgstr "基本的なコンバーター"
|
||||
|
||||
#: ../../ext/commands/commands.rst:199
|
||||
msgid ""
|
||||
"At its core, a basic converter is a callable that takes in an argument "
|
||||
"and turns it into something else."
|
||||
msgid "At its core, a basic converter is a callable that takes in an argument and turns it into something else."
|
||||
msgstr "基本的なコンバーターは、中核をなすものであり、受け取った引数を別のものへと変換します。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:201
|
||||
msgid ""
|
||||
"For example, if we wanted to add two numbers together, we could request "
|
||||
"that they are turned into integers for us by specifying the converter:"
|
||||
msgid "For example, if we wanted to add two numbers together, we could request that they are turned into integers for us by specifying the converter:"
|
||||
msgstr "例えば、二つの値を加算したい場合、コンバーターを指定することにより、受け取った値を整数型へ変換するように要求できます。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:210
|
||||
msgid ""
|
||||
"We specify converters by using something called a **function "
|
||||
"annotation**. This is a Python 3 exclusive feature that was introduced in"
|
||||
" :pep:`3107`."
|
||||
msgstr ""
|
||||
"コンバーターの指定には関数アノテーションというもの用います。これは :pep:`3107` にて追加された Python 3 "
|
||||
"にのみ実装されている機能です。"
|
||||
msgid "We specify converters by using something called a **function annotation**. This is a Python 3 exclusive feature that was introduced in :pep:`3107`."
|
||||
msgstr "コンバーターの指定には関数アノテーションというもの用います。これは :pep:`3107` にて追加された Python 3 にのみ実装されている機能です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:213
|
||||
msgid ""
|
||||
"This works with any callable, such as a function that would convert a "
|
||||
"string to all upper-case:"
|
||||
msgid "This works with any callable, such as a function that would convert a string to all upper-case:"
|
||||
msgstr "これは、文字列をすべて大文字に変換する関数などといった、任意の呼び出し可能関数でも動作します。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:225
|
||||
msgid "bool"
|
||||
msgstr ""
|
||||
msgstr "論理型"
|
||||
|
||||
#: ../../ext/commands/commands.rst:227
|
||||
msgid ""
|
||||
"Unlike the other basic converters, the :class:`bool` converter is treated"
|
||||
" slightly different. Instead of casting directly to the :class:`bool` "
|
||||
"type, which would result in any non-empty argument returning ``True``, it"
|
||||
" instead evaluates the argument as ``True`` or ``False`` based on it's "
|
||||
"given content:"
|
||||
msgstr ""
|
||||
msgid "Unlike the other basic converters, the :class:`bool` converter is treated slightly different. Instead of casting directly to the :class:`bool` type, which would result in any non-empty argument returning ``True``, it instead evaluates the argument as ``True`` or ``False`` based on it's given content:"
|
||||
msgstr "他の基本的なコンバーターとは異なり、 :class:`bool` のコンバーターは若干異なる扱いになります。 :class:`bool` 型に直接キャストする代わりに、与えられた値に基づいて ``True`` か ``False`` を返します。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:239
|
||||
msgid "Advanced Converters"
|
||||
msgstr "応用的なコンバーター"
|
||||
|
||||
#: ../../ext/commands/commands.rst:241
|
||||
msgid ""
|
||||
"Sometimes a basic converter doesn't have enough information that we need."
|
||||
" For example, sometimes we want to get some information from the "
|
||||
":class:`Message` that called the command or we want to do some "
|
||||
"asynchronous processing."
|
||||
msgstr ""
|
||||
"場合によっては、基本的なコンバーターを動かすのに必要な情報が不足していることがあります。例えば、実行されたコマンドの "
|
||||
":class:`Message` から情報を取得したい場合や、非同期処理を行いたい場合です。"
|
||||
msgid "Sometimes a basic converter doesn't have enough information that we need. For example, sometimes we want to get some information from the :class:`Message` that called the command or we want to do some asynchronous processing."
|
||||
msgstr "場合によっては、基本的なコンバーターを動かすのに必要な情報が不足していることがあります。例えば、実行されたコマンドの :class:`Message` から情報を取得したい場合や、非同期処理を行いたい場合です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:244
|
||||
msgid ""
|
||||
"For this, the library provides the :class:`~ext.commands.Converter` "
|
||||
"interface. This allows you to have access to the :class:`.Context` and "
|
||||
"have the callable be asynchronous. Defining a custom converter using this"
|
||||
" interface requires overriding a single method, "
|
||||
":meth:`.Converter.convert`."
|
||||
msgstr ""
|
||||
"そういった用途のために、このライブラリは :class:`~ext.commands.Converter` "
|
||||
"インタフェースを提供します。これによって :class:`.Context` "
|
||||
"にアクセスが可能になり、また、呼び出し可能関数を非同期にもできるようになります。このインタフェースを使用して、カスタムコンバーターを定義したい場合は"
|
||||
" :meth:`.Converter.convert` をオーバーライドしてください。"
|
||||
msgid "For this, the library provides the :class:`~ext.commands.Converter` interface. This allows you to have access to the :class:`.Context` and have the callable be asynchronous. Defining a custom converter using this interface requires overriding a single method, :meth:`.Converter.convert`."
|
||||
msgstr "そういった用途のために、このライブラリは :class:`~ext.commands.Converter` インタフェースを提供します。これによって :class:`.Context` にアクセスが可能になり、また、呼び出し可能関数を非同期にもできるようになります。このインタフェースを使用して、カスタムコンバーターを定義したい場合は :meth:`.Converter.convert` をオーバーライドしてください。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:248
|
||||
msgid "An example converter:"
|
||||
msgstr "コンバーターの例"
|
||||
|
||||
#: ../../ext/commands/commands.rst:263
|
||||
msgid ""
|
||||
"The converter provided can either be constructed or not. Essentially "
|
||||
"these two are equivalent:"
|
||||
msgid "The converter provided can either be constructed or not. Essentially these two are equivalent:"
|
||||
msgstr "コンバーターはインスタンス化されていなくても構いません。以下の例の二つのは同じ処理になります。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:277
|
||||
msgid ""
|
||||
"Having the possibility of the converter be constructed allows you to set "
|
||||
"up some state in the converter's ``__init__`` for fine tuning the "
|
||||
"converter. An example of this is actually in the library, "
|
||||
":class:`~ext.commands.clean_content`."
|
||||
msgstr ""
|
||||
"コンバーターをインスタンス化する可能性がある場合、コンバーターの調整を行うために ``__init__`` "
|
||||
"で何かしらの状態を設定することが出来ます。この例としてライブラリに実際に存在する "
|
||||
":class:`~ext.commands.clean_content` があります。"
|
||||
msgid "Having the possibility of the converter be constructed allows you to set up some state in the converter's ``__init__`` for fine tuning the converter. An example of this is actually in the library, :class:`~ext.commands.clean_content`."
|
||||
msgstr "コンバーターをインスタンス化する可能性がある場合、コンバーターの調整を行うために ``__init__`` で何かしらの状態を設定することが出来ます。この例としてライブラリに実際に存在する :class:`~ext.commands.clean_content` があります。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:293
|
||||
msgid ""
|
||||
"If a converter fails to convert an argument to its designated target "
|
||||
"type, the :exc:`.BadArgument` exception must be raised."
|
||||
msgid "If a converter fails to convert an argument to its designated target type, the :exc:`.BadArgument` exception must be raised."
|
||||
msgstr "コンバーターが渡された引数を指定の型に変換できなかった場合は :exc:`.BadArgument` を発生させてください。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:297
|
||||
@@ -393,22 +265,15 @@ msgid "Inline Advanced Converters"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:299
|
||||
msgid ""
|
||||
"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 "
|
||||
"advanced converter and save us from specifying two types."
|
||||
msgid "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 advanced converter and save us from specifying two types."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:302
|
||||
msgid ""
|
||||
"For example, a common idiom would be to have a class and a converter for "
|
||||
"that class:"
|
||||
msgid "For example, a common idiom would be to have a class and a converter for that class:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:328
|
||||
msgid ""
|
||||
"This can get tedious, so an inline advanced converter is possible through"
|
||||
" a ``classmethod`` inside the type:"
|
||||
msgid "This can get tedious, so an inline advanced converter is possible through a ``classmethod`` inside the type:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:355
|
||||
@@ -416,31 +281,16 @@ msgid "Discord Converters"
|
||||
msgstr "Discord コンバーター"
|
||||
|
||||
#: ../../ext/commands/commands.rst:357
|
||||
msgid ""
|
||||
"Working with :ref:`discord_api_models` is a fairly common thing when "
|
||||
"defining commands, as a result the library makes working with them easy."
|
||||
msgstr ""
|
||||
":ref:`discord_api_models` "
|
||||
"を使用して作業を行うのは、コマンドを定義する際には一般的なことです。そのため、このライブラリでは簡単に作業が行えるようになっています。"
|
||||
msgid "Working with :ref:`discord_api_models` is a fairly common thing when defining commands, as a result the library makes working with them easy."
|
||||
msgstr ":ref:`discord_api_models` を使用して作業を行うのは、コマンドを定義する際には一般的なことです。そのため、このライブラリでは簡単に作業が行えるようになっています。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:360
|
||||
msgid ""
|
||||
"For example, to receive a :class:`Member`, you can just pass it as a "
|
||||
"converter:"
|
||||
msgid "For example, to receive a :class:`Member`, you can just pass it as a converter:"
|
||||
msgstr "例えば、 :class:`Member` を受け取るには、これをコンバーターとして渡すだけです。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:368
|
||||
msgid ""
|
||||
"When this command is executed, it attempts to convert the string given "
|
||||
"into a :class:`Member` and then passes it as a parameter for the "
|
||||
"function. This works by checking if the string is a mention, an ID, a "
|
||||
"nickname, a username + discriminator, or just a regular username. The "
|
||||
"default set of converters have been written to be as easy to use as "
|
||||
"possible."
|
||||
msgstr ""
|
||||
"このコマンドが実行されると、与えられた文字列を :class:`Member` "
|
||||
"に変換して、それを関数のパラメーターとして渡します。これは文字列がメンション、ID、ニックネーム、ユーザー名 + "
|
||||
"Discordタグ、または普通のユーザー名かどうかをチェックすることで機能しています。デフォルトで定義されているコンバーターは、できるだけ簡単に使えるように作られています。"
|
||||
msgid "When this command is executed, it attempts to convert the string given into a :class:`Member` and then passes it as a parameter for the function. This works by checking if the string is a mention, an ID, a nickname, a username + discriminator, or just a regular username. The default set of converters have been written to be as easy to use as possible."
|
||||
msgstr "このコマンドが実行されると、与えられた文字列を :class:`Member` に変換して、それを関数のパラメーターとして渡します。これは文字列がメンション、ID、ニックネーム、ユーザー名 + Discordタグ、または普通のユーザー名かどうかをチェックすることで機能しています。デフォルトで定義されているコンバーターは、できるだけ簡単に使えるように作られています。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:372
|
||||
msgid "A lot of discord models work out of the gate as a parameter:"
|
||||
@@ -492,19 +342,12 @@ msgid ":class:`Colour`"
|
||||
msgstr ":class:`Colour`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:386
|
||||
msgid ""
|
||||
"Having any of these set as the converter will intelligently convert the "
|
||||
"argument to the appropriate target type you specify."
|
||||
msgid "Having any of these set as the converter will intelligently convert the argument to the appropriate target type you specify."
|
||||
msgstr "これらをコンバーターとして設定すると、引数を指定した型へとインテリジェントに変換します。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:389
|
||||
msgid ""
|
||||
"Under the hood, these are implemented by the "
|
||||
":ref:`ext_commands_adv_converters` interface. A table of the equivalent "
|
||||
"converter is given below:"
|
||||
msgstr ""
|
||||
"これらは :ref:`ext_commands_adv_converters` "
|
||||
"インタフェースによって実装されています。コンバーターとクラスの関係は以下の通りです。"
|
||||
msgid "Under the hood, these are implemented by the :ref:`ext_commands_adv_converters` interface. A table of the equivalent converter is given below:"
|
||||
msgstr "これらは :ref:`ext_commands_adv_converters` インタフェースによって実装されています。コンバーターとクラスの関係は以下の通りです。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:393
|
||||
msgid "Discord Class"
|
||||
@@ -559,22 +402,15 @@ msgid ":class:`~ext.commands.ColourConverter`"
|
||||
msgstr ":class:`~ext.commands.ColourConverter`"
|
||||
|
||||
#: ../../ext/commands/commands.rst:418
|
||||
msgid ""
|
||||
"By providing the converter it allows us to use them as building blocks "
|
||||
"for another converter:"
|
||||
msgid "By providing the converter it allows us to use them as building blocks for another converter:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:435
|
||||
#, fuzzy
|
||||
msgid "Special Converters"
|
||||
msgstr "コンバーターの例"
|
||||
msgstr "特殊なコンバーター"
|
||||
|
||||
#: ../../ext/commands/commands.rst:437
|
||||
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."
|
||||
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:442
|
||||
@@ -582,40 +418,23 @@ msgid "typing.Union"
|
||||
msgstr "typing.Union"
|
||||
|
||||
#: ../../ext/commands/commands.rst:444
|
||||
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 ""
|
||||
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 ":data:`typing.Union` はコマンドが単数の型の代わりに、複数の特定の型を取り込める特殊な型ヒントです。例えば:"
|
||||
|
||||
#: ../../ext/commands/commands.rst:456
|
||||
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 ""
|
||||
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 "``what`` パラメータには :class:`discord.TextChannel` コンバーターか :class:`discord.Member` コンバーターのいずれかが用いられます。これは左から右の順で変換できるか試行することになります。最初に渡された値を :class:`discord.TextChannel` へ変換しようと試み、失敗した場合は :class:`discord.Member` に変換しようとします。すべてのコンバーターで失敗した場合は :exc:`~ext.commands.BadUnionArgument` というエラーが発生します。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:461
|
||||
msgid ""
|
||||
"Note that any valid converter discussed above can be passed in to the "
|
||||
"argument list of a :data:`typing.Union`."
|
||||
msgstr ""
|
||||
msgid "Note that any valid converter discussed above can be passed in to the argument list of a :data:`typing.Union`."
|
||||
msgstr "以前に説明した有効なコンバーターは、すべて :data:`typing.Union` にわたすことが可能です。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:464
|
||||
msgid "typing.Optional"
|
||||
msgstr "typing.Optional"
|
||||
|
||||
#: ../../ext/commands/commands.rst:466
|
||||
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."
|
||||
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:470 ../../ext/commands/commands.rst:497
|
||||
@@ -623,28 +442,19 @@ msgid "Consider the following example:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:483
|
||||
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."
|
||||
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:488
|
||||
msgid ""
|
||||
"This converter only works in regular positional parameters, not variable "
|
||||
"parameters or keyword-only parameters."
|
||||
msgid "This converter only works in regular positional parameters, not variable parameters or keyword-only parameters."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:491
|
||||
msgid "Greedy"
|
||||
msgstr ""
|
||||
msgstr "Greedy"
|
||||
|
||||
#: ../../ext/commands/commands.rst:493
|
||||
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."
|
||||
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:506
|
||||
@@ -652,15 +462,11 @@ msgid "When invoked, it allows for any number of members to be passed in:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:510
|
||||
msgid ""
|
||||
"The type passed when using this converter depends on the parameter type "
|
||||
"that it is being attached to:"
|
||||
msgid "The type passed when using this converter depends on the parameter type that it is being attached to:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:512
|
||||
msgid ""
|
||||
"Positional parameter types will receive either the default parameter or a"
|
||||
" :class:`list` of the converted values."
|
||||
msgid "Positional parameter types will receive either the default parameter or a :class:`list` of the converted values."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:513
|
||||
@@ -668,21 +474,15 @@ msgid "Variable parameter types will be a :class:`tuple` as usual."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:514
|
||||
msgid ""
|
||||
"Keyword-only parameter types will be the same as if "
|
||||
":data:`~ext.commands.Greedy` was not passed at all."
|
||||
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:516
|
||||
msgid ""
|
||||
":data:`~ext.commands.Greedy` parameters can also be made optional by "
|
||||
"specifying an optional value."
|
||||
msgid ":data:`~ext.commands.Greedy` parameters can also be made optional by specifying an optional value."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:518
|
||||
msgid ""
|
||||
"When mixed with the :data:`typing.Optional` converter you can provide "
|
||||
"simple and expressive command invocation syntaxes:"
|
||||
msgid "When mixed with the :data:`typing.Optional` converter you can provide simple and expressive command invocation syntaxes:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:533
|
||||
@@ -690,64 +490,35 @@ msgid "This command can be invoked any of the following ways:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:543
|
||||
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."
|
||||
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:546
|
||||
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."
|
||||
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:552
|
||||
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."
|
||||
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:558
|
||||
msgid "Error Handling"
|
||||
msgstr ""
|
||||
msgstr "エラーハンドリング"
|
||||
|
||||
#: ../../ext/commands/commands.rst:560
|
||||
msgid ""
|
||||
"When our commands fail to either parse we will, by default, receive a "
|
||||
"noisy error in ``stderr`` of our console that tells us that an error has "
|
||||
"happened and has been silently ignored."
|
||||
msgid "When our commands fail to either parse we will, by default, receive a noisy error in ``stderr`` of our console that tells us that an error has happened and has been silently ignored."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:563
|
||||
msgid ""
|
||||
"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`"
|
||||
" which works like any other event in the :ref:`discord-api-events`. This "
|
||||
"global error handler is called for every error reached."
|
||||
msgid "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` which works like any other event in the :ref:`discord-api-events`. This global error handler is called for every error reached."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:567
|
||||
msgid ""
|
||||
"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 just that. First we decorate an error handler function with "
|
||||
":meth:`.Command.error`:"
|
||||
msgid "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 just that. First we decorate an error handler function with :meth:`.Command.error`:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:583
|
||||
msgid ""
|
||||
"The first parameter of the error handler is the :class:`.Context` while "
|
||||
"the second one is an exception that is derived from "
|
||||
":exc:`~ext.commands.CommandError`. A list of errors is found in the "
|
||||
":ref:`ext_commands_api_errors` page of the documentation."
|
||||
msgid "The first parameter of the error handler is the :class:`.Context` while the second one is an exception that is derived from :exc:`~ext.commands.CommandError`. A list of errors is found in the :ref:`ext_commands_api_errors` page of the documentation."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:587
|
||||
@@ -755,17 +526,11 @@ msgid "Checks"
|
||||
msgstr "チェック"
|
||||
|
||||
#: ../../ext/commands/commands.rst:589
|
||||
msgid ""
|
||||
"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 "
|
||||
"earlier. The commands extension comes with full support for these things "
|
||||
"in a concept called a :ref:`ext_commands_api_checks`."
|
||||
msgstr ""
|
||||
msgid "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 earlier. The commands extension comes with full support for these things in a concept called a :ref:`ext_commands_api_checks`."
|
||||
msgstr "コマンドをユーザーに使ってほしくない場合などがあります。例えば、使用者が権限を持っていない場合や、Botをブロックしている場合などです。コマンド拡張ではこのような機能を :ref:`ext_commands_api_checks` と呼び、完全にサポートしています。"
|
||||
|
||||
#: ../../ext/commands/commands.rst:593
|
||||
msgid ""
|
||||
"A check is a basic predicate that can take in a :class:`.Context` as its "
|
||||
"sole parameter. Within it, you have the following options:"
|
||||
msgid "A check is a basic predicate that can take in a :class:`.Context` as its sole parameter. Within it, you have the following options:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:596
|
||||
@@ -777,35 +542,23 @@ msgid "Return ``False`` to signal that the person cannot run the command."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:598
|
||||
msgid ""
|
||||
"Raise a :exc:`~ext.commands.CommandError` derived exception to signal the"
|
||||
" person cannot run the command."
|
||||
msgid "Raise a :exc:`~ext.commands.CommandError` derived exception to signal the person cannot run the command."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:600
|
||||
msgid ""
|
||||
"This allows you to have custom error messages for you to handle in the "
|
||||
":ref:`error handlers <ext_commands_error_handler>`."
|
||||
msgid "This allows you to have custom error messages for you to handle in the :ref:`error handlers <ext_commands_error_handler>`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:603
|
||||
msgid ""
|
||||
"To register a check for a command, we would have two ways of doing so. "
|
||||
"The first is using the :meth:`~ext.commands.check` decorator. For "
|
||||
"example:"
|
||||
msgid "To register a check for a command, we would have two ways of doing so. The first is using the :meth:`~ext.commands.check` decorator. For example:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:617
|
||||
msgid ""
|
||||
"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 own decorator. To do that we can just add another level of depth:"
|
||||
msgid "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 own decorator. To do that we can just add another level of depth:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:634
|
||||
msgid ""
|
||||
"Since an owner check is so common, the library provides it for you "
|
||||
"(:func:`~ext.commands.is_owner`):"
|
||||
msgid "Since an owner check is so common, the library provides it for you (:func:`~ext.commands.is_owner`):"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:644
|
||||
@@ -813,29 +566,19 @@ msgid "When multiple checks are specified, **all** of them must be ``True``:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:659
|
||||
msgid ""
|
||||
"If any of those checks fail in the example above, then the command will "
|
||||
"not be run."
|
||||
msgid "If any of those checks fail in the example above, then the command will not be run."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:661
|
||||
msgid ""
|
||||
"When an error happens, the error is propagated to the :ref:`error "
|
||||
"handlers <ext_commands_error_handler>`. If you do not raise a custom "
|
||||
":exc:`~ext.commands.CommandError` derived exception, then it will get "
|
||||
"wrapped up into a :exc:`~ext.commands.CheckFailure` exception as so:"
|
||||
msgid "When an error happens, the error is propagated to the :ref:`error handlers <ext_commands_error_handler>`. If you do not raise a custom :exc:`~ext.commands.CommandError` derived exception, then it will get wrapped up into a :exc:`~ext.commands.CheckFailure` exception as so:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:678
|
||||
msgid ""
|
||||
"If you want a more robust error system, you can derive from the exception"
|
||||
" and raise it instead of returning ``False``:"
|
||||
msgid "If you want a more robust error system, you can derive from the exception and raise it instead of returning ``False``:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:703
|
||||
msgid ""
|
||||
"Since having a ``guild_only`` decorator is pretty common, it comes built-"
|
||||
"in via :func:`~ext.commands.guild_only`."
|
||||
msgid "Since having a ``guild_only`` decorator is pretty common, it comes built-in via :func:`~ext.commands.guild_only`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:706
|
||||
@@ -843,16 +586,11 @@ msgid "Global Checks"
|
||||
msgstr "グローバルチェック"
|
||||
|
||||
#: ../../ext/commands/commands.rst:708
|
||||
msgid ""
|
||||
"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."
|
||||
msgid "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."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:711
|
||||
msgid ""
|
||||
"Global checks work similarly to regular checks except they are registered"
|
||||
" with the :func:`.Bot.check` decorator."
|
||||
msgid "Global checks work similarly to regular checks except they are registered with the :func:`.Bot.check` decorator."
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:713
|
||||
@@ -860,8 +598,6 @@ msgid "For example, to block all DMs we could do the following:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../ext/commands/commands.rst:723
|
||||
msgid ""
|
||||
"Be careful on how you write your global checks, as it could also lock you"
|
||||
" out of your own bot."
|
||||
msgid "Be careful on how you write your global checks, as it could also lock you out of your own bot."
|
||||
msgstr ""
|
||||
|
||||
|
@@ -1,111 +1,83 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2015-2019, Rapptz
|
||||
# This file is distributed under the same license as the discord.py package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discord.py 1.0.0a\n"
|
||||
"Project-Id-Version: discordpy-japanese\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-02-24 04:09-0500\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"PO-Revision-Date: 2019-03-16 10:14\n"
|
||||
"Last-Translator: mistio100 <mistio100@gmail.com>\n"
|
||||
"Language-Team: Japanese\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"
|
||||
"Generated-By: Babel 2.5.3\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: crowdin.com\n"
|
||||
"X-Crowdin-Project: discordpy-japanese\n"
|
||||
"X-Crowdin-Language: ja\n"
|
||||
"X-Crowdin-File: /ext/commands/extensions.po\n"
|
||||
"Language: ja_JP\n"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:6
|
||||
msgid "Extensions"
|
||||
msgstr ""
|
||||
msgstr "エクステンション"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:8
|
||||
msgid ""
|
||||
"There comes a time in the bot development when you want to extend the bot"
|
||||
" functionality at run-time and quickly unload and reload code (also "
|
||||
"called hot-reloading). The command framework comes with this ability "
|
||||
"built-in, with a concept called **extensions**."
|
||||
msgstr ""
|
||||
msgid "There comes a time in the bot development when you want to extend the bot functionality at run-time and quickly unload and reload code (also called hot-reloading). The command framework comes with this ability built-in, with a concept called **extensions**."
|
||||
msgstr "Bot開発ではBotを起動している間にコードを素早くアンロードし、再度ロードし直したい (ホットリロードとも呼ばれます) という時があります。コマンドフレームワークでは **エクステンション** と呼ばれる概念でこの機能が組み込まれています。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:11
|
||||
msgid "Primer"
|
||||
msgstr ""
|
||||
msgstr "はじめに"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:13
|
||||
msgid ""
|
||||
"An extension at its core is a python file with an entry point called "
|
||||
"``setup``. This setup must be a plain Python function (not a coroutine). "
|
||||
"It takes a single parameter -- the :class:`~.commands.Bot` that loads the"
|
||||
" extension."
|
||||
msgstr ""
|
||||
msgid "An extension at its core is a python file with an entry point called ``setup``. This setup must be a plain Python function (not a coroutine). It takes a single parameter -- the :class:`~.commands.Bot` that loads the extension."
|
||||
msgstr "その中核となるエクステンションは ``setup`` というエントリポイントを持つPythonファイルです。このsetupは通常のPython関数である必要があります (コルーチンではありません)。この関数はエクステンションをロードする :class:`~.commands.Bot` を受け取るための単一のパラメータを持ちます。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:15
|
||||
msgid "An example extension looks like this:"
|
||||
msgstr ""
|
||||
msgstr "エクステンションの例は以下のとおりです:"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:17
|
||||
msgid "hello.py"
|
||||
msgstr ""
|
||||
msgstr "hello.py"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:30
|
||||
msgid ""
|
||||
"In this example we define a simple command, and when the extension is "
|
||||
"loaded this command is added to the bot. Now the final step to this is "
|
||||
"loading the extension, which we do by calling "
|
||||
":meth:`.commands.Bot.load_extension`. To load this extension we call "
|
||||
"``bot.load_extension('hello')``."
|
||||
msgstr ""
|
||||
msgid "In this example we define a simple command, and when the extension is loaded this command is added to the bot. Now the final step to this is loading the extension, which we do by calling :meth:`.commands.Bot.load_extension`. To load this extension we call ``bot.load_extension('hello')``."
|
||||
msgstr "この例では単純なコマンドを実装しており、エクステンションがロードされることでこのコマンドがBotに追加されます。最後にこのエクステンションをロードする必要があります。ロードには :meth:`.commands.Bot.load_extension` を実行します。このエクステンションを読み込むために ``bot.load_extension('hello')`` を実行します。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:32
|
||||
msgid "Cogs"
|
||||
msgstr ""
|
||||
msgstr "コグ"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:35
|
||||
msgid ""
|
||||
"Extensions are usually used in conjunction with cogs. To read more about "
|
||||
"them, check out the documentation, :ref:`ext_commands_cogs`."
|
||||
msgstr ""
|
||||
msgid "Extensions are usually used in conjunction with cogs. To read more about them, check out the documentation, :ref:`ext_commands_cogs`."
|
||||
msgstr "エクステンションは通常、コグと組み合わせて使用します。詳細については :ref:`ext_commands_cogs` のドキュメントを参照してください。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:39
|
||||
msgid ""
|
||||
"Extension paths are ultimately similar to the import mechanism. What this"
|
||||
" means is that if there is a folder, then it must be dot-qualified. For "
|
||||
"example to load an extension in ``plugins/hello.py`` then we use the "
|
||||
"string ``plugins.hello``."
|
||||
msgstr ""
|
||||
msgid "Extension paths are ultimately similar to the import mechanism. What this means is that if there is a folder, then it must be dot-qualified. For example to load an extension in ``plugins/hello.py`` then we use the string ``plugins.hello``."
|
||||
msgstr "エクステンションのパスは究極的にはimportのメカニズムと似ています。これはフォルダ等がある場合、それをドットで区切らなければならないということです。例えば ``plugins/hello.py`` というエクステンションをロードする場合は、 ``plugins.hello`` という文字列を使います。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:42
|
||||
msgid "Reloading"
|
||||
msgstr ""
|
||||
msgstr "リロード"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:44
|
||||
msgid ""
|
||||
"The act of reloading an extension is actually quite simple -- it is as "
|
||||
"simple as unloading it and then reloading it."
|
||||
msgstr ""
|
||||
msgid "The act of reloading an extension is actually quite simple -- it is as simple as unloading it and then reloading it."
|
||||
msgstr "エクステンションをリロードするというのは、実のところアンロードしてから、リロードするのと同じくらい簡単です。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:51
|
||||
msgid ""
|
||||
"Once we remove and load the extension, any changes that we did will be "
|
||||
"applied upon load. This is useful if we want to add or remove "
|
||||
"functionality without restarting our bot."
|
||||
msgstr ""
|
||||
msgid "Once we remove and load the extension, any changes that we did will be applied upon load. This is useful if we want to add or remove functionality without restarting our bot."
|
||||
msgstr "エクステンションを削除してロードすると、あらゆる変更がロード時に適用されます。これはBotを再起動させずに機能を追加、あるいは削除したい場合に便利です。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:54
|
||||
msgid "Cleaning Up"
|
||||
msgstr ""
|
||||
msgstr "クリーンアップ"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:56
|
||||
msgid ""
|
||||
"Although rare, sometimes an extension needs to clean-up or know when it's"
|
||||
" being unloaded. For cases like these, there is another entry point named"
|
||||
" ``teardown`` which is similar to ``setup`` except called when the "
|
||||
"extension is unloaded."
|
||||
msgstr ""
|
||||
msgid "Although rare, sometimes an extension needs to clean-up or know when it's being unloaded. For cases like these, there is another entry point named ``teardown`` which is similar to ``setup`` except called when the extension is unloaded."
|
||||
msgstr "稀ではありますが、エクステンションにクリーンアップが必要だったり、いつアンロードするかを確認したい場合があります。このために ``setup`` に似たエクステンションがアンロードされるときに呼び出される ``teardown`` というエントリポイントが用意されています。"
|
||||
|
||||
#: ../../ext/commands/extensions.rst:58
|
||||
msgid "basic_ext.py"
|
||||
msgstr ""
|
||||
msgstr "basic_ext.py"
|
||||
|
||||
|
@@ -1,33 +1,27 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2015-2017, Rapptz
|
||||
# This file is distributed under the same license as the discord.py package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2018.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: discord.py 1.0.0a\n"
|
||||
"Project-Id-Version: discordpy-japanese\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-07-31 14:21-0400\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"PO-Revision-Date: 2019-03-16 10:14\n"
|
||||
"Last-Translator: mistio100 <mistio100@gmail.com>\n"
|
||||
"Language-Team: Japanese\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"
|
||||
"Generated-By: Babel 2.5.3\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: crowdin.com\n"
|
||||
"X-Crowdin-Project: discordpy-japanese\n"
|
||||
"X-Crowdin-Language: ja\n"
|
||||
"X-Crowdin-File: /ext/commands/index.po\n"
|
||||
"Language: ja_JP\n"
|
||||
|
||||
#: ../../ext/commands/index.rst:2
|
||||
msgid "``discord.ext.commands`` -- Bot commands framework"
|
||||
msgstr ""
|
||||
msgstr "``discord.ext.commands`` -- Bot commands framework"
|
||||
|
||||
#: ../../ext/commands/index.rst:4
|
||||
msgid ""
|
||||
"``discord.py`` offers a lower level aspect on interacting with Discord. "
|
||||
"Often times, the library is used for the creation of bots. However this "
|
||||
"task can be daunting and confusing to get correctly the first time. Many "
|
||||
"times there comes a repetition in creating a bot command framework that "
|
||||
"is extensible, flexible, and powerful. For this reason, ``discord.py`` "
|
||||
"comes with an extension library that handles this for you."
|
||||
msgid "``discord.py`` offers a lower level aspect on interacting with Discord. Often times, the library is used for the creation of bots. However this task can be daunting and confusing to get correctly the first time. Many times there comes a repetition in creating a bot command framework that is extensible, flexible, and powerful. For this reason, ``discord.py`` comes with an extension library that handles this for you."
|
||||
msgstr ""
|
||||
|
||||
|
Reference in New Issue
Block a user