disnake

Форк
0
82 строки · 5.9 Кб
1
msgid ""
2
msgstr ""
3
"Project-Id-Version: discordpy\n"
4
"Report-Msgid-Bugs-To: \n"
5
"POT-Creation-Date: 2019-06-22 09:35-0400\n"
6
"PO-Revision-Date: 2020-10-24 02:41\n"
7
"Last-Translator: \n"
8
"Language-Team: Japanese\n"
9
"MIME-Version: 1.0\n"
10
"Content-Type: text/plain; charset=UTF-8\n"
11
"Content-Transfer-Encoding: 8bit\n"
12
"Plural-Forms: nplurals=1; plural=0;\n"
13
"X-Crowdin-Project: discordpy\n"
14
"X-Crowdin-Project-ID: 362783\n"
15
"X-Crowdin-Language: ja\n"
16
"X-Crowdin-File: /ext/commands/extensions.pot\n"
17
"X-Crowdin-File-ID: 68\n"
18
"Language: ja_JP\n"
19

20
#: ../../ext/commands/extensions.rst:6
21
msgid "Extensions"
22
msgstr "エクステンション"
23

24
#: ../../ext/commands/extensions.rst:8
25
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**."
26
msgstr "Bot開発ではBotを起動している間にコードを素早くアンロードし、再度ロードし直したい (ホットリロードとも呼ばれます) という時があります。コマンドフレームワークでは **エクステンション** と呼ばれる概念でこの機能が組み込まれています。"
27

28
#: ../../ext/commands/extensions.rst:11
29
msgid "Primer"
30
msgstr "はじめに"
31

32
#: ../../ext/commands/extensions.rst:13
33
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."
34
msgstr "その中核となるエクステンションは ``setup`` というエントリポイントを持つPythonファイルです。このsetupは通常のPython関数である必要があります (コルーチンではありません)。この関数はエクステンションをロードする :class:`~.commands.Bot` を受け取るための単一のパラメータを持ちます。"
35

36
#: ../../ext/commands/extensions.rst:15
37
msgid "An example extension looks like this:"
38
msgstr "エクステンションの例は以下のとおりです:"
39

40
#: ../../ext/commands/extensions.rst:17
41
msgid "hello.py"
42
msgstr "hello.py"
43

44
#: ../../ext/commands/extensions.rst:30
45
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')``."
46
msgstr "この例では単純なコマンドを実装しており、エクステンションがロードされることでこのコマンドがBotに追加されます。最後にこのエクステンションをロードする必要があります。ロードには :meth:`.commands.Bot.load_extension` を実行します。このエクステンションを読み込むために ``bot.load_extension('hello')`` を実行します。"
47

48
#: ../../ext/commands/extensions.rst:32
49
msgid "Cogs"
50
msgstr "コグ"
51

52
#: ../../ext/commands/extensions.rst:35
53
msgid "Extensions are usually used in conjunction with cogs. To read more about them, check out the documentation, :ref:`ext_commands_cogs`."
54
msgstr "エクステンションは通常、コグと組み合わせて使用します。詳細については :ref:`ext_commands_cogs` のドキュメントを参照してください。"
55

56
#: ../../ext/commands/extensions.rst:39
57
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``."
58
msgstr "エクステンションのパスは究極的にはimportのメカニズムと似ています。これはフォルダ等がある場合、それをドットで区切らなければならないということです。例えば ``plugins/hello.py`` というエクステンションをロードする場合は、 ``plugins.hello`` という文字列を使います。"
59

60
#: ../../ext/commands/extensions.rst:42
61
msgid "Reloading"
62
msgstr "リロード"
63

64
#: ../../ext/commands/extensions.rst:44
65
msgid "When you make a change to the extension and want to reload the references, the library comes with a function to do this for you, :meth:`Bot.reload_extension`."
66
msgstr "エクステンションを更新し、その参照を再読込したい場合のために、ライブラリには :meth:`Bot.reload_extension` が用意されています。"
67

68
#: ../../ext/commands/extensions.rst:50
69
msgid "Once the extension reloads, any changes that we did will be applied. This is useful if we want to add or remove functionality without restarting our bot. If an error occurred during the reloading process, the bot will pretend as if the reload never happened."
70
msgstr "エクステンションを再読込すると、その変更が適用されます。Botを再起動せずに機能の追加や削除を行いたい場合に便利です。再読込処理中にエラーが発生した場合、Botは再読込処理をする前の状態に戻ります。"
71

72
#: ../../ext/commands/extensions.rst:53
73
msgid "Cleaning Up"
74
msgstr "クリーンアップ"
75

76
#: ../../ext/commands/extensions.rst:55
77
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."
78
msgstr "稀ではありますが、エクステンションにクリーンアップが必要だったり、いつアンロードするかを確認したい場合があります。このために ``setup`` に似たエクステンションがアンロードされるときに呼び出される ``teardown`` というエントリポイントが用意されています。"
79

80
#: ../../ext/commands/extensions.rst:57
81
msgid "basic_ext.py"
82
msgstr "basic_ext.py"
83

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.