5 changed files with 3671 additions and 2978 deletions
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -2,22 +2,23 @@ |
|||||
# Copyright (C) 2015-2019, Rapptz |
# Copyright (C) 2015-2019, 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: 2019-02-18 03:50-0500\n" |
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
||||
"Last-Translator: Episword <[email protected]>, 2018\n" |
"Last-Translator: Episword <[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" |
|
||||
|
|
||||
#: ../../faq.rst:5 |
#: ../../faq.rst:5 |
||||
msgid "Frequently Asked Questions" |
msgid "Frequently Asked Questions" |
||||
@ -25,11 +26,10 @@ msgstr "よくある質問" |
|||||
|
|
||||
#: ../../faq.rst:7 |
#: ../../faq.rst:7 |
||||
msgid "" |
msgid "" |
||||
"This is a list of Frequently Asked Questions regarding using ``discord.py`` " |
"This is a list of Frequently Asked Questions regarding using " |
||||
"and its extension modules. Feel free to suggest a new question or submit one" |
"``discord.py`` and its extension modules. Feel free to suggest a new " |
||||
" via pull requests." |
"question or submit one via pull requests." |
||||
msgstr "" |
msgstr "これは ``discord.py`` 及び 拡張モジュールに対して、よくある質問をまとめたものです。気軽に質問やプルリクエストを提出してください。" |
||||
"これは ``discord.py`` 及び 拡張モジュールに対して、よくある質問をまとめたものです。気軽に質問やプルリクエストを提出してください。" |
|
||||
|
|
||||
#: ../../faq.rst:11 |
#: ../../faq.rst:11 |
||||
msgid "Questions" |
msgid "Questions" |
||||
@ -53,8 +53,8 @@ msgid "" |
|||||
"from``. When Python encounters an ``await`` it stops the function's " |
"from``. When Python encounters an ``await`` it stops the function's " |
||||
"execution at that point and works on other things until it comes back to " |
"execution at that point and works on other things until it comes back to " |
||||
"that point and finishes off its work. This allows for your program to be " |
"that point and finishes off its work. This allows for your program to be " |
||||
"doing multiple things at the same time without using threads or complicated " |
"doing multiple things at the same time without using threads or " |
||||
"multiprocessing." |
"complicated multiprocessing." |
||||
msgstr "" |
msgstr "" |
||||
"コルーチンとは ``await`` または ``yield from`` から呼び出さなければならない関数です。 ``await`` " |
"コルーチンとは ``await`` または ``yield from`` から呼び出さなければならない関数です。 ``await`` " |
||||
"にエンカウントした場合、そのポイントで関数の実行を停止し、他の作業を実行します。 これは作業が終了し、このポイントに戻ってくるまで続きます。 " |
"にエンカウントした場合、そのポイントで関数の実行を停止し、他の作業を実行します。 これは作業が終了し、このポイントに戻ってくるまで続きます。 " |
||||
@ -62,8 +62,8 @@ msgstr "" |
|||||
|
|
||||
#: ../../faq.rst:26 |
#: ../../faq.rst:26 |
||||
msgid "" |
msgid "" |
||||
"**If you forget to await a coroutine then the coroutine will not run. Never " |
"**If you forget to await a coroutine then the coroutine will not run. " |
||||
"forget to await a coroutine.**" |
"Never forget to await a coroutine.**" |
||||
msgstr "**コルーチンにawaitを記述し忘れた場合、コルーチンは実行されません。awaitの記述を忘れないように注意してください。**" |
msgstr "**コルーチンにawaitを記述し忘れた場合、コルーチンは実行されません。awaitの記述を忘れないように注意してください。**" |
||||
|
|
||||
#: ../../faq.rst:29 |
#: ../../faq.rst:29 |
||||
@ -72,7 +72,8 @@ msgstr "``await`` はどこで使用することができますか。" |
|||||
|
|
||||
#: ../../faq.rst:31 |
#: ../../faq.rst:31 |
||||
msgid "" |
msgid "" |
||||
"You can only use ``await`` inside ``async def`` functions and nowhere else." |
"You can only use ``await`` inside ``async def`` functions and nowhere " |
||||
|
"else." |
||||
msgstr "``await`` は ``async def`` 関数の中でのみ使用できます。" |
msgstr "``await`` は ``async def`` 関数の中でのみ使用できます。" |
||||
|
|
||||
#: ../../faq.rst:34 |
#: ../../faq.rst:34 |
||||
@ -81,12 +82,13 @@ msgstr "「ブロッキング」とはなんですか。" |
|||||
|
|
||||
#: ../../faq.rst:36 |
#: ../../faq.rst:36 |
||||
msgid "" |
msgid "" |
||||
"In asynchronous programming a blocking call is essentially all the parts of " |
"In asynchronous programming a blocking call is essentially all the parts " |
||||
"the function that are not ``await``. Do not despair however, because not all" |
"of the function that are not ``await``. Do not despair however, because " |
||||
" forms of blocking are bad! Using blocking calls is inevitable, but you must" |
"not all forms of blocking are bad! Using blocking calls is inevitable, " |
||||
" work to make sure that you don't excessively block functions. Remember, if " |
"but you must work to make sure that you don't excessively block " |
||||
"you block for too long then your bot will freeze since it has not stopped " |
"functions. Remember, if you block for too long then your bot will freeze " |
||||
"the function's execution at that point to do other things." |
"since it has not stopped the function's execution at that point to do " |
||||
|
"other things." |
||||
msgstr "" |
msgstr "" |
||||
"非同期プログラミングにおけるブロッキングとは、関数内の ``await`` 修飾子がないコードすべてを指します。 " |
"非同期プログラミングにおけるブロッキングとは、関数内の ``await`` 修飾子がないコードすべてを指します。 " |
||||
"しかし、全てのブロッキングが悪いというわけではありません。ブロッキングを使用することは避けられませんが、ブロックの発生は出来るだけ少なくする必要があります。長時間のブロックが発生すると、関数の実行が停止しないため、長時間Botがフリーズすることになることを覚えておきましょう。" |
"しかし、全てのブロッキングが悪いというわけではありません。ブロッキングを使用することは避けられませんが、ブロックの発生は出来るだけ少なくする必要があります。長時間のブロックが発生すると、関数の実行が停止しないため、長時間Botがフリーズすることになることを覚えておきましょう。" |
||||
@ -102,13 +104,15 @@ msgstr "" |
|||||
|
|
||||
#: ../../faq.rst:50 |
#: ../../faq.rst:50 |
||||
msgid "" |
msgid "" |
||||
"Another common source of blocking for too long is using HTTP requests with " |
"Another common source of blocking for too long is using HTTP requests " |
||||
"the famous module ``requests``. While ``requests`` is an amazing module for " |
"with the famous module ``requests``. While ``requests`` is an amazing " |
||||
"non-asynchronous programming, it is not a good choice for :mod:`asyncio` " |
"module for non-asynchronous programming, it is not a good choice for " |
||||
"because certain requests can block the event loop too long. Instead, use the" |
":mod:`asyncio` because certain requests can block the event loop too " |
||||
" ``aiohttp`` library which is installed on the side with this library." |
"long. Instead, use the ``aiohttp`` library which is installed on the side" |
||||
|
" with this library." |
||||
msgstr "" |
msgstr "" |
||||
"また、これだけでなく、有名なモジュール ``requests`` のHTTPリクエストも長時間ブロックの原因になります。 ``requests`` " |
"また、これだけでなく、有名なモジュール ``requests`` のHTTPリクエストも長時間ブロックの原因になります。 ``requests``" |
||||
|
" " |
||||
"モジュールは非非同期プログラミングでは素晴らしいモジュールですが、特定のリクエストがイベントループを長時間ブロックする可能性があるため、``asyncio``" |
"モジュールは非非同期プログラミングでは素晴らしいモジュールですが、特定のリクエストがイベントループを長時間ブロックする可能性があるため、``asyncio``" |
||||
" には適していません。 代わりにこのライブラリと一緒にインストールされた :mod:`aiohttp` を使用してください。" |
" には適していません。 代わりにこのライブラリと一緒にインストールされた :mod:`aiohttp` を使用してください。" |
||||
|
|
||||
@ -129,158 +133,175 @@ msgid "How do I set the \"Playing\" status?" |
|||||
msgstr "「プレイ中」状態の設定をするにはどうすればいいですか。" |
msgstr "「プレイ中」状態の設定をするにはどうすればいいですか。" |
||||
|
|
||||
#: ../../faq.rst:77 |
#: ../../faq.rst:77 |
||||
|
#, fuzzy |
||||
msgid "" |
msgid "" |
||||
"There is a method for this under :class:`Client` called " |
"There is a method for this under :class:`Client` called " |
||||
":meth:`Client.change_presence`. The relevant aspect of this is its ``game`` " |
":meth:`Client.change_presence`. The relevant aspect of this is its " |
||||
"keyword argument which takes in a :class:`Game` object. Putting both of " |
"``activity`` keyword argument which takes in an :class:`Activity` object." |
||||
"these pieces of info together, you get the following: ::" |
|
||||
msgstr "" |
msgstr "" |
||||
":class:`Client` 下にプレイ中状態の設定を行うためのメソッド :meth:`Client.change_presence` " |
":class:`Client` 下にプレイ中状態の設定を行うためのメソッド :meth:`Client.change_presence` " |
||||
"が用意されています。 これの引数 ``game`` に :class:`Game` を渡します。これらの情報をまとめると以下のようになります。" |
"が用意されています。 これの引数 ``game`` に :class:`Game` を渡します。これらの情報をまとめると以下のようになります。" |
||||
|
|
||||
|
#: ../../faq.rst:80 |
||||
|
msgid "" |
||||
|
"The status type (playing, listening, streaming, watching) can be set " |
||||
|
"using the :class:`ActivityType` enum. For memory optimisation purposes, " |
||||
|
"some activities are offered in slimmed down versions:" |
||||
|
msgstr "" |
||||
|
|
||||
|
#: ../../faq.rst:83 |
||||
|
msgid ":class:`Game`" |
||||
|
msgstr "" |
||||
|
|
||||
#: ../../faq.rst:84 |
#: ../../faq.rst:84 |
||||
|
msgid ":class:`Streaming`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#: ../../faq.rst:86 |
||||
|
msgid "Putting both of these pieces of info together, you get the following: ::" |
||||
|
msgstr "" |
||||
|
|
||||
|
#: ../../faq.rst:91 |
||||
msgid "How do I send a message to a specific channel?" |
msgid "How do I send a message to a specific channel?" |
||||
msgstr "特定のチャンネルにメッセージを送るにはどうすればいいですか。" |
msgstr "特定のチャンネルにメッセージを送るにはどうすればいいですか。" |
||||
|
|
||||
#: ../../faq.rst:86 |
#: ../../faq.rst:93 |
||||
msgid "" |
msgid "" |
||||
"You must fetch the channel directly and then call the appropriate method. " |
"You must fetch the channel directly and then call the appropriate method." |
||||
"Example: ::" |
" Example: ::" |
||||
msgstr "チャンネルを直接取得してから、適切なメソッドの呼び出しを行う必要があります。以下がその例です。" |
msgstr "チャンネルを直接取得してから、適切なメソッドの呼び出しを行う必要があります。以下がその例です。" |
||||
|
|
||||
#: ../../faq.rst:92 |
#: ../../faq.rst:99 |
||||
msgid "How do I upload an image?" |
msgid "How do I upload an image?" |
||||
msgstr "画像をアップロードするにはどうすればいいですか。" |
msgstr "画像をアップロードするにはどうすればいいですか。" |
||||
|
|
||||
#: ../../faq.rst:94 |
#: ../../faq.rst:101 |
||||
msgid "" |
msgid "To upload something to Discord you have to use the :class:`File` object." |
||||
"To upload something to Discord you have to use the :class:`File` object." |
|
||||
msgstr "Discordに何かをアップロードする際には :class:`File` オブジェクトを使用する必要があります。" |
msgstr "Discordに何かをアップロードする際には :class:`File` オブジェクトを使用する必要があります。" |
||||
|
|
||||
#: ../../faq.rst:96 |
#: ../../faq.rst:103 |
||||
msgid "" |
msgid "" |
||||
"A :class:`File` accepts two parameters, the file-like object (or file path) " |
"A :class:`File` accepts two parameters, the file-like object (or file " |
||||
"and the filename to pass to Discord when uploading." |
"path) and the filename to pass to Discord when uploading." |
||||
msgstr "" |
msgstr ":class:`File` は二つのパラメータがあり、ファイルライクなオブジェクト(または、そのファイルパス)と、ファイル名を渡すことができます。" |
||||
":class:`File` は二つのパラメータがあり、ファイルライクなオブジェクト(または、そのファイルパス)と、ファイル名を渡すことができます。" |
|
||||
|
|
||||
#: ../../faq.rst:99 |
#: ../../faq.rst:106 |
||||
msgid "If you want to upload an image it's as simple as: ::" |
msgid "If you want to upload an image it's as simple as: ::" |
||||
msgstr "画像をアップロードするだけなら、以下のように簡単に行なえます。" |
msgstr "画像をアップロードするだけなら、以下のように簡単に行なえます。" |
||||
|
|
||||
#: ../../faq.rst:103 |
#: ../../faq.rst:110 |
||||
msgid "If you have a file-like object you can do as follows: ::" |
msgid "If you have a file-like object you can do as follows: ::" |
||||
msgstr "もし、ファイルライクなオブジェクトがあるなら、以下のような実装が可能です。" |
msgstr "もし、ファイルライクなオブジェクトがあるなら、以下のような実装が可能です。" |
||||
|
|
||||
#: ../../faq.rst:108 |
#: ../../faq.rst:115 |
||||
msgid "" |
msgid "" |
||||
"To upload multiple files, you can use the ``files`` keyword argument instead" |
"To upload multiple files, you can use the ``files`` keyword argument " |
||||
" of ``file``\\: ::" |
"instead of ``file``\\: ::" |
||||
msgstr "複数のファイルをアップロードするには、 ``file`` の代わりに ``files`` を使用しましょう。" |
msgstr "複数のファイルをアップロードするには、 ``file`` の代わりに ``files`` を使用しましょう。" |
||||
|
|
||||
#: ../../faq.rst:116 |
#: ../../faq.rst:123 |
||||
msgid "" |
msgid "" |
||||
"If you want to upload something from a URL, you will have to use an HTTP " |
"If you want to upload something from a URL, you will have to use an HTTP " |
||||
"request using ``aiohttp`` and then pass an :class:`io.BytesIO` instance to " |
"request using ``aiohttp`` and then pass an :class:`io.BytesIO` instance " |
||||
":class:`File` like so:" |
"to :class:`File` like so:" |
||||
msgstr "" |
msgstr "" |
||||
"URLから何かをアップロードする場合は、 ``aiohttp`` のHTTPリクエストを使用し、 :class:`io.BytesIO` インスタンスを" |
"URLから何かをアップロードする場合は、 ``aiohttp`` のHTTPリクエストを使用し、 :class:`io.BytesIO` " |
||||
" :class:`File` にわたす必要があります。" |
"インスタンスを :class:`File` にわたす必要があります。" |
||||
|
|
||||
#: ../../faq.rst:133 |
#: ../../faq.rst:140 |
||||
msgid "How can I add a reaction to a message?" |
msgid "How can I add a reaction to a message?" |
||||
msgstr "メッセージにリアクションをつけるにはどうすればいいですか。" |
msgstr "メッセージにリアクションをつけるにはどうすればいいですか。" |
||||
|
|
||||
#: ../../faq.rst:135 |
#: ../../faq.rst:142 |
||||
msgid "You use the :meth:`Message.add_reaction` method." |
msgid "You use the :meth:`Message.add_reaction` method." |
||||
msgstr ":meth:`Client.add_reaction` を使用してください。" |
msgstr ":meth:`Client.add_reaction` を使用してください。" |
||||
|
|
||||
#: ../../faq.rst:137 |
#: ../../faq.rst:144 |
||||
msgid "" |
msgid "" |
||||
"If you want to use unicode emoji, you must pass a valid unicode code point " |
"If you want to use unicode emoji, you must pass a valid unicode code " |
||||
"in a string. In your code, you can write this in a few different ways:" |
"point in a string. In your code, you can write this in a few different " |
||||
msgstr "" |
"ways:" |
||||
"Unicodeの絵文字を使用する場合は、文字列内の有効なUnicodeのコードポイントを渡す必要があります。 例を挙げると、このようになります。" |
msgstr "Unicodeの絵文字を使用する場合は、文字列内の有効なUnicodeのコードポイントを渡す必要があります。 例を挙げると、このようになります。" |
||||
|
|
||||
#: ../../faq.rst:139 |
#: ../../faq.rst:146 |
||||
msgid "``'👍'``" |
msgid "``'👍'``" |
||||
msgstr "``'👍'``" |
msgstr "``'👍'``" |
||||
|
|
||||
#: ../../faq.rst:140 |
#: ../../faq.rst:147 |
||||
msgid "``'\\U0001F44D'``" |
msgid "``'\\U0001F44D'``" |
||||
msgstr "``'\\U0001F44D'``" |
msgstr "``'\\U0001F44D'``" |
||||
|
|
||||
#: ../../faq.rst:141 |
#: ../../faq.rst:148 |
||||
msgid "``'\\N{THUMBS UP SIGN}'``" |
msgid "``'\\N{THUMBS UP SIGN}'``" |
||||
msgstr "``'\\N{THUMBS UP SIGN}'``" |
msgstr "``'\\N{THUMBS UP SIGN}'``" |
||||
|
|
||||
#: ../../faq.rst:143 ../../faq.rst:154 ../../faq.rst:218 |
#: ../../faq.rst:150 ../../faq.rst:161 ../../faq.rst:225 |
||||
msgid "Quick example: ::" |
msgid "Quick example: ::" |
||||
msgstr "簡単な例。" |
msgstr "簡単な例。" |
||||
|
|
||||
#: ../../faq.rst:147 |
#: ../../faq.rst:154 |
||||
msgid "" |
msgid "" |
||||
"In case you want to use emoji that come from a message, you already get " |
"In case you want to use emoji that come from a message, you already get " |
||||
"their code points in the content without needing to do anything special. You" |
"their code points in the content without needing to do anything special. " |
||||
" **cannot** send ``':thumbsup:'`` style shorthands." |
"You **cannot** send ``':thumbsup:'`` style shorthands." |
||||
msgstr "" |
msgstr "" |
||||
"メッセージから来た絵文字を使用したい場合は、特になにをするでもなく、コンテンツのコードポイントをあなたは取得しています。また、 " |
"メッセージから来た絵文字を使用したい場合は、特になにをするでもなく、コンテンツのコードポイントをあなたは取得しています。また、 " |
||||
"``':thumbsup:'`` のような簡略化したものを送信することは**できません**。" |
"``':thumbsup:'`` のような簡略化したものを送信することは**できません**。" |
||||
|
|
||||
#: ../../faq.rst:150 |
#: ../../faq.rst:157 |
||||
msgid "" |
msgid "" |
||||
"For custom emoji, you should pass an instance of :class:`Emoji`. You can " |
"For custom emoji, you should pass an instance of :class:`Emoji`. You can " |
||||
"also pass a ``'name:id'`` string, but if you can use said emoji, you should " |
"also pass a ``'name:id'`` string, but if you can use said emoji, you " |
||||
"be able to use :meth:`Client.get_emoji` to get an emoji via ID or use " |
"should be able to use :meth:`Client.get_emoji` to get an emoji via ID or " |
||||
":func:`utils.find`/ :func:`utils.get` on :attr:`Client.emojis` or " |
"use :func:`utils.find`/ :func:`utils.get` on :attr:`Client.emojis` or " |
||||
":attr:`Guild.emojis` collections." |
":attr:`Guild.emojis` collections." |
||||
msgstr "" |
msgstr "" |
||||
"カスタム絵文字の場合、 :class:`discord.Emoji` のインスタンスを渡す必要があります。``'name:id'`` " |
"カスタム絵文字の場合、 :class:`discord.Emoji` のインスタンスを渡す必要があります。``'name:id'`` " |
||||
"の文字列を渡すこともできます。その場合はあなたが絵文字を使用可能であれば、 :meth:`Client.get_all_emojis` " |
"の文字列を渡すこともできます。その場合はあなたが絵文字を使用可能であれば、 :meth:`Client.get_all_emojis` " |
||||
"を使用してID経由で取得するか、あるいは :attr:`Client.emojis` か :attr:`Guild.emojis` コレクションから " |
"を使用してID経由で取得するか、あるいは :attr:`Client.emojis` か :attr:`Guild.emojis` " |
||||
":func:`utils.find`/ :func:`utils.get` を使用して取得が可能です。" |
"コレクションから :func:`utils.find`/ :func:`utils.get` を使用して取得が可能です。" |
||||
|
|
||||
#: ../../faq.rst:166 |
#: ../../faq.rst:173 |
||||
msgid "How do I pass a coroutine to the player's \"after\" function?" |
msgid "How do I pass a coroutine to the player's \"after\" function?" |
||||
msgstr "どうやってコルーチンをプレイヤーの後処理に渡すのですか。" |
msgstr "どうやってコルーチンをプレイヤーの後処理に渡すのですか。" |
||||
|
|
||||
#: ../../faq.rst:168 |
#: ../../faq.rst:175 |
||||
msgid "" |
msgid "" |
||||
"The library's music player launches on a separate thread, ergo it does not " |
"The library's music player launches on a separate thread, ergo it does " |
||||
"execute inside a coroutine. This does not mean that it is not possible to " |
"not execute inside a coroutine. This does not mean that it is not " |
||||
"call a coroutine in the ``after`` parameter. To do so you must pass a " |
"possible to call a coroutine in the ``after`` parameter. To do so you " |
||||
"callable that wraps up a couple of aspects." |
"must pass a callable that wraps up a couple of aspects." |
||||
msgstr "" |
msgstr "" |
||||
"ライブラリの音楽プレーヤーは別のスレッドで起動するもので、コルーチン内で実行されるものではありません。しかし、 ``after`` " |
"ライブラリの音楽プレーヤーは別のスレッドで起動するもので、コルーチン内で実行されるものではありません。しかし、 ``after`` " |
||||
"にコルーチンが渡せないというわけではありません。コルーチンを渡すためには、いくつかの機能を包括した呼び出し可能コードで渡す必要があります。" |
"にコルーチンが渡せないというわけではありません。コルーチンを渡すためには、いくつかの機能を包括した呼び出し可能コードで渡す必要があります。" |
||||
|
|
||||
#: ../../faq.rst:172 |
#: ../../faq.rst:179 |
||||
msgid "" |
msgid "" |
||||
"The first gotcha that you must be aware of is that calling a coroutine is " |
"The first gotcha that you must be aware of is that calling a coroutine is" |
||||
"not a thread-safe operation. Since we are technically in another thread, we " |
" not a thread-safe operation. Since we are technically in another thread," |
||||
"must take caution in calling thread-safe operations so things do not bug " |
" we must take caution in calling thread-safe operations so things do not " |
||||
"out. Luckily for us, :mod:`asyncio` comes with a " |
"bug out. Luckily for us, :mod:`asyncio` comes with a " |
||||
":func:`asyncio.run_coroutine_threadsafe` function that allows us to call a " |
":func:`asyncio.run_coroutine_threadsafe` function that allows us to call " |
||||
"coroutine from another thread." |
"a coroutine from another thread." |
||||
msgstr "" |
msgstr "" |
||||
"コルーチンを呼び出すという動作はスレッドセーフなものではないということを最初に理解しておく必要があります。技術的に別スレッドなので、スレッドセーフに呼び出す際には注意が必要です。幸運にも、" |
"コルーチンを呼び出すという動作はスレッドセーフなものではないということを最初に理解しておく必要があります。技術的に別スレッドなので、スレッドセーフに呼び出す際には注意が必要です。幸運にも、" |
||||
" :mod:`asyncio` には :func:`asyncio.run_coroutine_threadsafe` " |
" :mod:`asyncio` には :func:`asyncio.run_coroutine_threadsafe` " |
||||
"という関数があります。これを用いることで、別スレッドからコルーチンを呼び出すことが可能です。" |
"という関数があります。これを用いることで、別スレッドからコルーチンを呼び出すことが可能です。" |
||||
|
|
||||
#: ../../faq.rst:177 |
#: ../../faq.rst:184 |
||||
msgid "" |
msgid "" |
||||
"However, this function returns a :class:`concurrent.Future` and to actually " |
"However, this function returns a :class:`concurrent.Future` and to " |
||||
"call it we have to fetch its result. Putting all of this together we can do " |
"actually call it we have to fetch its result. Putting all of this " |
||||
"the following: ::" |
"together we can do the following: ::" |
||||
msgstr "" |
msgstr "" |
||||
"しかし、この関数は :class:`concurrent.Future` " |
"しかし、この関数は :class:`concurrent.Future` " |
||||
"を返すので、実際にはそこから結果を読み出す必要があります。これをすべてまとめると、次のことができます。" |
"を返すので、実際にはそこから結果を読み出す必要があります。これをすべてまとめると、次のことができます。" |
||||
|
|
||||
#: ../../faq.rst:192 |
#: ../../faq.rst:199 |
||||
msgid "How do I run something in the background?" |
msgid "How do I run something in the background?" |
||||
msgstr "バックグラウンドで何かを動かすにはどうすればいいですか。" |
msgstr "バックグラウンドで何かを動かすにはどうすればいいですか。" |
||||
|
|
||||
#: ../../faq.rst:194 |
#: ../../faq.rst:201 |
||||
msgid "" |
msgid "" |
||||
"`Check the background_task.py example. " |
"`Check the background_task.py example. " |
||||
"<https://github.com/Rapptz/discord.py/blob/rewrite/examples/background_task.py>`_" |
"<https://github.com/Rapptz/discord.py/blob/rewrite/examples/background_task.py>`_" |
||||
@ -288,139 +309,107 @@ msgstr "" |
|||||
"`background_task.pyの例を参照してください。 " |
"`background_task.pyの例を参照してください。 " |
||||
"<https://github.com/Rapptz/discord.py/blob/rewrite/examples/background_task.py>`_" |
"<https://github.com/Rapptz/discord.py/blob/rewrite/examples/background_task.py>`_" |
||||
|
|
||||
#: ../../faq.rst:197 |
#: ../../faq.rst:204 |
||||
msgid "How do I get a specific model?" |
msgid "How do I get a specific model?" |
||||
msgstr "特定のユーザー、役割、チャンネル、サーバを取得するにはどうすればいいですか。" |
msgstr "特定のユーザー、役割、チャンネル、サーバを取得するにはどうすればいいですか。" |
||||
|
|
||||
#: ../../faq.rst:199 |
#: ../../faq.rst:206 |
||||
msgid "" |
msgid "" |
||||
"There are multiple ways of doing this. If you have a specific model's ID " |
"There are multiple ways of doing this. If you have a specific model's ID " |
||||
"then you can use one of the following functions:" |
"then you can use one of the following functions:" |
||||
msgstr "方法は複数ありますが、特定のモデルのIDがわかっていれば、以下の方法が使えます。" |
msgstr "方法は複数ありますが、特定のモデルのIDがわかっていれば、以下の方法が使えます。" |
||||
|
|
||||
#: ../../faq.rst:202 |
#: ../../faq.rst:209 |
||||
msgid ":meth:`Client.get_channel`" |
msgid ":meth:`Client.get_channel`" |
||||
msgstr ":meth:`Client.get_channel`" |
msgstr ":meth:`Client.get_channel`" |
||||
|
|
||||
#: ../../faq.rst:203 |
#: ../../faq.rst:210 |
||||
msgid ":meth:`Client.get_guild`" |
msgid ":meth:`Client.get_guild`" |
||||
msgstr ":meth:`Client.get_guild`" |
msgstr ":meth:`Client.get_guild`" |
||||
|
|
||||
#: ../../faq.rst:204 |
#: ../../faq.rst:211 |
||||
msgid ":meth:`Client.get_user`" |
msgid ":meth:`Client.get_user`" |
||||
msgstr ":meth:`Client.get_user`" |
msgstr ":meth:`Client.get_user`" |
||||
|
|
||||
#: ../../faq.rst:205 |
#: ../../faq.rst:212 |
||||
msgid ":meth:`Client.get_emoji`" |
msgid ":meth:`Client.get_emoji`" |
||||
msgstr ":meth:`Client.get_emoji`" |
msgstr ":meth:`Client.get_emoji`" |
||||
|
|
||||
#: ../../faq.rst:206 |
#: ../../faq.rst:213 |
||||
msgid ":meth:`Guild.get_member`" |
msgid ":meth:`Guild.get_member`" |
||||
msgstr ":meth:`Guild.get_member`" |
msgstr ":meth:`Guild.get_member`" |
||||
|
|
||||
#: ../../faq.rst:207 |
#: ../../faq.rst:214 |
||||
msgid ":meth:`Guild.get_channel`" |
msgid ":meth:`Guild.get_channel`" |
||||
msgstr ":meth:`Guild.get_channel`" |
msgstr ":meth:`Guild.get_channel`" |
||||
|
|
||||
#: ../../faq.rst:209 |
#: ../../faq.rst:216 |
||||
msgid "The following use an HTTP request:" |
msgid "The following use an HTTP request:" |
||||
msgstr "以下の例ではHTTPリクエストを使用します。" |
msgstr "以下の例ではHTTPリクエストを使用します。" |
||||
|
|
||||
#: ../../faq.rst:211 |
#: ../../faq.rst:218 |
||||
msgid ":meth:`abc.Messageable.get_message`" |
msgid ":meth:`abc.Messageable.get_message`" |
||||
msgstr ":meth:`abc.Messageable.get_message`" |
msgstr ":meth:`abc.Messageable.get_message`" |
||||
|
|
||||
#: ../../faq.rst:212 |
#: ../../faq.rst:219 |
||||
msgid ":meth:`Client.get_user_info`" |
msgid ":meth:`Client.get_user_info`" |
||||
msgstr ":meth:`Client.get_user_info`" |
msgstr ":meth:`Client.get_user_info`" |
||||
|
|
||||
#: ../../faq.rst:215 |
#: ../../faq.rst:222 |
||||
msgid "" |
msgid "" |
||||
"If the functions above do not help you, then use of :func:`utils.find` or " |
"If the functions above do not help you, then use of :func:`utils.find` or" |
||||
":func:`utils.get` would serve some use in finding specific models." |
" :func:`utils.get` would serve some use in finding specific models." |
||||
msgstr "上記の関数を使えない状況の場合、 :func:`utils.find` または :func:`utils.get` が役に立つでしょう。" |
msgstr "上記の関数を使えない状況の場合、 :func:`utils.find` または :func:`utils.get` が役に立つでしょう。" |
||||
|
|
||||
#: ../../faq.rst:229 |
#: ../../faq.rst:236 |
||||
msgid "Commands Extension" |
msgid "Commands Extension" |
||||
msgstr "コマンド拡張" |
msgstr "コマンド拡張" |
||||
|
|
||||
#: ../../faq.rst:231 |
#: ../../faq.rst:238 |
||||
msgid "Questions regarding ``discord.ext.commands`` belong here." |
msgid "Questions regarding ``discord.ext.commands`` belong here." |
||||
msgstr "``discord.ext.commands`` に関する質問。" |
msgstr "``discord.ext.commands`` に関する質問。" |
||||
|
|
||||
#: ../../faq.rst:234 |
#: ../../faq.rst:241 |
||||
msgid "Is there any documentation for this?" |
|
||||
msgstr "コマンド拡張についてのドキュメントはありますか。" |
|
||||
|
|
||||
#: ../../faq.rst:236 |
|
||||
msgid "" |
|
||||
"Not at the moment. Writing documentation for stuff takes time. A lot of " |
|
||||
"people get by reading the docstrings in the source code. Others get by via " |
|
||||
"asking questions in the `Discord server <https://discord.gg/discord-api>`_. " |
|
||||
"Others look at the source code of `other existing bots " |
|
||||
"<https://github.com/Rapptz/RoboDanny>`_." |
|
||||
msgstr "" |
|
||||
"いいえ、まだありません。ドキュメントを書くには多くの時間が必要になります。大抵の場合はソースコードのdocstringを読むことになります。 または " |
|
||||
"'Discordサーバー <https://discord.gg/discord-api>`_ で質問したり、'既存のBot " |
|
||||
"<https://github.com/Rapptz/RoboDanny>`_ のソースコードを見るといいでしょう。" |
|
||||
|
|
||||
#: ../../faq.rst:240 |
|
||||
msgid "" |
|
||||
"There is a `basic example " |
|
||||
"<https://github.com/Rapptz/discord.py/blob/rewrite/examples/basic_bot.py>`_ " |
|
||||
"showcasing some functionality." |
|
||||
msgstr "" |
|
||||
"いくつかの機能を紹介するための `具体例 " |
|
||||
"<https://github.com/Rapptz/discord.py/blob/rewrite/examples/basic_bot.py>`_ " |
|
||||
"もあります。" |
|
||||
|
|
||||
#: ../../faq.rst:243 |
|
||||
msgid "" |
|
||||
"**Documentation is being worked on, it will just take some time to polish " |
|
||||
"it**." |
|
||||
msgstr "**ドキュメントは現在制作中です。きちんとしたものに仕上げるにはまだ時間がかかります。**" |
|
||||
|
|
||||
#: ../../faq.rst:246 |
|
||||
msgid "Why does ``on_message`` make my commands stop working?" |
msgid "Why does ``on_message`` make my commands stop working?" |
||||
msgstr "``on_message`` を使うとコマンドが動作しなくなります。どうしてですか。" |
msgstr "``on_message`` を使うとコマンドが動作しなくなります。どうしてですか。" |
||||
|
|
||||
#: ../../faq.rst:248 |
#: ../../faq.rst:243 |
||||
msgid "" |
msgid "" |
||||
"Overriding the default provided ``on_message`` forbids any extra commands " |
"Overriding the default provided ``on_message`` forbids any extra commands" |
||||
"from running. To fix this, add a ``bot.process_commands(message)`` line at " |
" from running. To fix this, add a ``bot.process_commands(message)`` line " |
||||
"the end of your ``on_message``. For example: ::" |
"at the end of your ``on_message``. For example: ::" |
||||
msgstr "" |
msgstr "" |
||||
"デフォルトで提供されている ``on_message`` をオーバーライドすると、コマンドが実行されなくなります。これを修正するには " |
"デフォルトで提供されている ``on_message`` をオーバーライドすると、コマンドが実行されなくなります。これを修正するには " |
||||
"``on_message`` の最後に ``bot.process_commands(message)`` を追加してみてください。" |
"``on_message`` の最後に ``bot.process_commands(message)`` を追加してみてください。" |
||||
|
|
||||
#: ../../faq.rst:258 |
#: ../../faq.rst:253 |
||||
msgid "Why do my arguments require quotes?" |
msgid "Why do my arguments require quotes?" |
||||
msgstr "コマンドの引数にクォーテーションが必要なのはなぜですか。" |
msgstr "コマンドの引数にクォーテーションが必要なのはなぜですか。" |
||||
|
|
||||
#: ../../faq.rst:260 |
#: ../../faq.rst:255 |
||||
msgid "In a simple command defined as: ::" |
msgid "In a simple command defined as: ::" |
||||
msgstr "次の簡単なコマンドを見てみましょう。" |
msgstr "次の簡単なコマンドを見てみましょう。" |
||||
|
|
||||
#: ../../faq.rst:266 |
#: ../../faq.rst:261 |
||||
msgid "" |
msgid "" |
||||
"Calling it via ``?echo a b c`` will only fetch the first argument and " |
"Calling it via ``?echo a b c`` will only fetch the first argument and " |
||||
"disregard the rest. To fix this you should either call it via ``?echo \"a b " |
"disregard the rest. To fix this you should either call it via ``?echo \"a" |
||||
"c\"`` or change the signature to have \"consume rest\" behaviour. Example: " |
" b c\"`` or change the signature to have \"consume rest\" behaviour. " |
||||
"::" |
"Example: ::" |
||||
msgstr "" |
msgstr "" |
||||
"このコマンドを ``?echo a b c`` " |
"このコマンドを ``?echo a b c`` " |
||||
"のように実行したとき、コマンドに渡されるのは最初の引数だけです。その後の引数はすべて無視されます。これを正常に動かすためには ``?echo \"a b" |
"のように実行したとき、コマンドに渡されるのは最初の引数だけです。その後の引数はすべて無視されます。これを正常に動かすためには ``?echo " |
||||
" c\"`` のようにしてコマンドを実行するか、コマンドの引数を下記の例のようにしてみましょう" |
"\"a b c\"`` のようにしてコマンドを実行するか、コマンドの引数を下記の例のようにしてみましょう" |
||||
|
|
||||
#: ../../faq.rst:273 |
#: ../../faq.rst:268 |
||||
msgid "This will allow you to use ``?echo a b c`` without needing the quotes." |
msgid "This will allow you to use ``?echo a b c`` without needing the quotes." |
||||
msgstr "これにより、クォーテーションなしで ``?echo a b c`` を使用することができます。" |
msgstr "これにより、クォーテーションなしで ``?echo a b c`` を使用することができます。" |
||||
|
|
||||
#: ../../faq.rst:276 |
#: ../../faq.rst:271 |
||||
msgid "How do I get the original ``message``\\?" |
msgid "How do I get the original ``message``\\?" |
||||
msgstr "元の ``message`` を取得するにはどうすればよいですか。" |
msgstr "元の ``message`` を取得するにはどうすればよいですか。" |
||||
|
|
||||
#: ../../faq.rst:278 |
#: ../../faq.rst:273 |
||||
msgid "" |
msgid "" |
||||
"The :class:`~ext.commands.Context` contains an attribute, " |
"The :class:`~ext.commands.Context` contains an attribute, " |
||||
":attr:`~.Context.message` to get the original message." |
":attr:`~.Context.message` to get the original message." |
||||
@ -428,23 +417,58 @@ msgstr "" |
|||||
":class:`~ext.commands.Context` は元のメッセージを取得するための属性である " |
":class:`~ext.commands.Context` は元のメッセージを取得するための属性である " |
||||
":attr:`~.Context.message` を持っています。" |
":attr:`~.Context.message` を持っています。" |
||||
|
|
||||
#: ../../faq.rst:281 ../../faq.rst:294 |
#: ../../faq.rst:276 ../../faq.rst:288 |
||||
msgid "Example: ::" |
msgid "Example: ::" |
||||
msgstr "例:" |
msgstr "例:" |
||||
|
|
||||
#: ../../faq.rst:289 |
#: ../../faq.rst:283 |
||||
msgid "How do I make a subcommand?" |
msgid "How do I make a subcommand?" |
||||
msgstr "サブコマンドを作るにはどうすればいいですか。" |
msgstr "サブコマンドを作るにはどうすればいいですか。" |
||||
|
|
||||
#: ../../faq.rst:291 |
#: ../../faq.rst:285 |
||||
msgid "" |
msgid "" |
||||
"Use the ``group`` decorator. This will transform the callback into a " |
"Use the ``group`` decorator. This will transform the callback into a " |
||||
"``Group`` which will allow you to add commands into the group operating as " |
"``Group`` which will allow you to add commands into the group operating " |
||||
"\"subcommands\". These groups can be arbitrarily nested as well." |
"as \"subcommands\". These groups can be arbitrarily nested as well." |
||||
msgstr "" |
msgstr "" |
||||
"``group`` デコレータを使います。これにより、コールバックが ``Group`` " |
"``group`` デコレータを使います。これにより、コールバックが ``Group`` " |
||||
"に変換され、groupに「サブコマンド」として動作するコマンドを追加できます。これらのグループは、ネストすることもできます。" |
"に変換され、groupに「サブコマンド」として動作するコマンドを追加できます。これらのグループは、ネストすることもできます。" |
||||
|
|
||||
#: ../../faq.rst:305 |
#: ../../faq.rst:299 |
||||
msgid "This could then be used as ``?git push origin master``." |
msgid "This could then be used as ``?git push origin master``." |
||||
msgstr "これは ``?git push origin master`` のように使うことができます。" |
msgstr "これは ``?git push origin master`` のように使うことができます。" |
||||
|
|
||||
|
#~ msgid "Is there any documentation for this?" |
||||
|
#~ msgstr "コマンド拡張についてのドキュメントはありますか。" |
||||
|
|
||||
|
#~ msgid "" |
||||
|
#~ "Not at the moment. Writing documentation" |
||||
|
#~ " for stuff takes time. A lot of" |
||||
|
#~ " people get by reading the docstrings" |
||||
|
#~ " in the source code. Others get " |
||||
|
#~ "by via asking questions in the " |
||||
|
#~ "`Discord server <https://discord.gg/discord-api>`_." |
||||
|
#~ " Others look at the source code " |
||||
|
#~ "of `other existing bots " |
||||
|
#~ "<https://github.com/Rapptz/RoboDanny>`_." |
||||
|
#~ msgstr "" |
||||
|
#~ "いいえ、まだありません。ドキュメントを書くには多くの時間が必要になります。大抵の場合はソースコードのdocstringを読むことになります。" |
||||
|
#~ " または 'Discordサーバー <https://discord.gg/discord-" |
||||
|
#~ "api>`_ で質問したり、'既存のBot " |
||||
|
#~ "<https://github.com/Rapptz/RoboDanny>`_ のソースコードを見るといいでしょう。" |
||||
|
|
||||
|
#~ msgid "" |
||||
|
#~ "There is a `basic example " |
||||
|
#~ "<https://github.com/Rapptz/discord.py/blob/rewrite/examples/basic_bot.py>`_" |
||||
|
#~ " showcasing some functionality." |
||||
|
#~ msgstr "" |
||||
|
#~ "いくつかの機能を紹介するための `具体例 " |
||||
|
#~ "<https://github.com/Rapptz/discord.py/blob/rewrite/examples/basic_bot.py>`_" |
||||
|
#~ " もあります。" |
||||
|
|
||||
|
#~ msgid "" |
||||
|
#~ "**Documentation is being worked on, it" |
||||
|
#~ " will just take some time to " |
||||
|
#~ "polish it**." |
||||
|
#~ msgstr "**ドキュメントは現在制作中です。きちんとしたものに仕上げるにはまだ時間がかかります。**" |
||||
|
|
||||
|
File diff suppressed because it is too large
Loading…
Reference in new issue