Skip to content

Commit 9b1c0cc

Browse files
author
github-actions
committed
Update translations from Transifex
1 parent 88c683d commit 9b1c0cc

50 files changed

Lines changed: 11970 additions & 3907 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎faq/design.po‎

Lines changed: 80 additions & 68 deletions
Large diffs are not rendered by default.

‎faq/extending.po‎

Lines changed: 57 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
#
66
# Translators:
77
# python-doc bot, 2025
8+
# Inada Naoki <songofacandy@gmail.com>, 2026
89
#
910
#, fuzzy
1011
msgid ""
1112
msgstr ""
1213
"Project-Id-Version: Python 3.15\n"
1314
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2026-10-01 19:07+0000\n"
15+
"POT-Creation-Date: 2026-10-25 17:19+0000\n"
1516
"PO-Revision-Date: 2025-09-16 00:00+0000\n"
16-
"Last-Translator: python-doc bot, 2025\n"
17+
"Last-Translator: Inada Naoki <songofacandy@gmail.com>, 2026\n"
1718
"Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/"
1819
"ja/)\n"
1920
"MIME-Version: 1.0\n"
@@ -51,29 +52,32 @@ msgstr "ほとんどの中級から上級の Python 本もこの話題を扱っ
5152
msgid "Can I create my own functions in C++?"
5253
msgstr "C++ で独自の関数を作ることはできますか?"
5354

54-
#: ../../faq/extending.rst:28
5555
msgid ""
5656
"Yes, using the C compatibility features found in C++. Place ``extern "
5757
"\"C\" { ... }`` around the Python include files and put ``extern \"C\"`` "
5858
"before each function that is going to be called by the Python interpreter. "
5959
"Global or static C++ objects with constructors are probably not a good idea."
6060
msgstr ""
61-
"はい。C++ 内にある C 互換機能を使ってできます。 ``extern \"C\" { ... }`` で "
62-
"Python のインクルードファイルを囲み、 ``extern \"C\"`` を Python インタプリタ"
63-
"から呼ぶ各関数の前に置いてください。グローバルや静的な C++ オブジェクトの構造"
64-
"体を持つものは良くないでしょう。"
61+
"はい。\n"
62+
"C++ 内にある C 互換機能を使ってできます。\n"
63+
"``extern \"C\" { ... }`` で Python のインクルードファイルを囲み、 ``extern "
64+
"\"C\"`` を Python インタプリタから呼ぶ各関数の前に置いてください。\n"
65+
"コンストラクタを持つグローバルな C++ オブジェクトや静的な C++ オブジェクトを"
66+
"使うのは、おそらく望ましくありません。"
6567

6668
#: ../../faq/extending.rst:37
6769
msgid "Writing C is hard; are there any alternatives?"
6870
msgstr "C を書くのは大変です。他の方法はありませんか?"
6971

70-
#: ../../faq/extending.rst:39
7172
msgid ""
7273
"There are a number of alternatives to writing your own C extensions, "
7374
"depending on what you're trying to do. :ref:`Recommended third party tools "
7475
"<c-api-tools>` offer both simpler and more sophisticated approaches to "
7576
"creating C and C++ extensions for Python."
7677
msgstr ""
78+
"何をしたいかに応じて、C 拡張を自分で書く以外にもいくつかの方法があります。\n"
79+
":ref:`推奨されるサードパーティツール <c-api-tools>` には、Python の C/C++ 拡"
80+
"張をより簡単に作るものや、より高度な方法を提供するものがあります。"
7781

7882
#: ../../faq/extending.rst:46
7983
msgid "How can I execute arbitrary Python statements from C?"
@@ -185,22 +189,23 @@ msgstr ""
185189
"す。パラメタは、オブジェクト、呼び出すメソッドの名前、 :c:func:"
186190
"`Py_BuildValue` で使われるようなフォーマット文字列、そして引数です::"
187191

188-
#: ../../faq/extending.rst:102
189192
msgid ""
190193
"PyObject *\n"
191194
"PyObject_CallMethod(PyObject *object, const char *method_name,\n"
192195
" const char *arg_format, ...);"
193196
msgstr ""
197+
"PyObject *\n"
198+
"PyObject_CallMethod(PyObject *object, const char *method_name,\n"
199+
" const char *arg_format, ...);"
194200

195-
#: ../../faq/extending.rst:106
196201
msgid ""
197202
"This works for any object that has methods -- whether built-in or user-"
198203
"defined. You are responsible for eventually :c:func:`Py_DECREF`\\ 'ing the "
199204
"return value."
200205
msgstr ""
201-
"これはメソッドを持ついかなるオブジェクトにも有効で、組み込みかユーザ定義かは"
202-
"関係ありません。返り値に対して :c:func:`Py_DECREF` する必要があることもありま"
203-
"す。"
206+
"これは、組み込みかユーザー定義かを問わず、メソッドを持つ任意のオブジェクトに"
207+
"使えます。\n"
208+
"返り値を使い終わったら、呼び出し側で :c:func:`Py_DECREF` する責任があります。"
204209

205210
#: ../../faq/extending.rst:109
206211
msgid ""
@@ -210,7 +215,6 @@ msgstr ""
210215
"例えば、あるファイルオブジェクトの \"seek\" メソッドを 10, 0 を引数として呼ぶ"
211216
"とき (ファイルオブジェクトのポインタを \"f\" とします)::"
212217

213-
#: ../../faq/extending.rst:112
214218
msgid ""
215219
"res = PyObject_CallMethod(f, \"seek\", \"(ii)\", 10, 0);\n"
216220
"if (res == NULL) {\n"
@@ -220,17 +224,24 @@ msgid ""
220224
" Py_DECREF(res);\n"
221225
"}"
222226
msgstr ""
227+
"res = PyObject_CallMethod(f, \"seek\", \"(ii)\", 10, 0);\n"
228+
"if (res == NULL) {\n"
229+
" ... 例外が発生した場合の処理 ...\n"
230+
"}\n"
231+
"else {\n"
232+
" Py_DECREF(res);\n"
233+
"}"
223234

224-
#: ../../faq/extending.rst:120
225235
msgid ""
226236
"Note that since :c:func:`PyObject_CallObject` *always* wants a tuple for the "
227237
"argument list, to call a function without arguments, pass \"()\" for the "
228238
"format, and to call a function with one argument, surround the argument in "
229239
"parentheses, e.g. \"(i)\"."
230240
msgstr ""
231241
"なお、 :c:func:`PyObject_CallObject` の引数リストには *常に* タプルが必要で"
232-
"す。関数を引数なしで呼び出すには、フォーマットに \"()\" を渡し、関数を一つの"
233-
"引数で呼び出すには、関数を括弧でくくって例えば \"(i)\" としてください。"
242+
"す。\n"
243+
"関数を引数なしで呼び出すには、フォーマットに \"()\" を渡し、関数を一つの引数"
244+
"で呼び出すには、引数の書式を括弧で囲んで例えば \"(i)\" としてください。"
234245

235246
#: ../../faq/extending.rst:127
236247
msgid ""
@@ -256,7 +267,6 @@ msgstr ""
256267
msgid "The easiest way to do this is to use the :class:`io.StringIO` class:"
257268
msgstr "最も簡単な方法は、 :class:`io.StringIO` クラスを使うことです:"
258269

259-
#: ../../faq/extending.rst:136
260270
msgid ""
261271
">>> import io, sys\n"
262272
">>> sys.stdout = io.StringIO()\n"
@@ -266,12 +276,18 @@ msgid ""
266276
"foo\n"
267277
"hello world!"
268278
msgstr ""
279+
">>> import io, sys\n"
280+
">>> sys.stdout = io.StringIO()\n"
281+
">>> print('foo')\n"
282+
">>> print('hello world!')\n"
283+
">>> sys.stderr.write(sys.stdout.getvalue())\n"
284+
"foo\n"
285+
"hello world!"
269286

270287
#: ../../faq/extending.rst:146
271288
msgid "A custom object to do the same would look like this:"
272289
msgstr "これと同じことをするカスタムオブジェクトは次のようになるでしょう:"
273290

274-
#: ../../faq/extending.rst:148
275291
msgid ""
276292
">>> import io, sys\n"
277293
">>> class StdoutCatcher(io.TextIOBase):\n"
@@ -288,6 +304,20 @@ msgid ""
288304
"foo\n"
289305
"hello world!"
290306
msgstr ""
307+
">>> import io, sys\n"
308+
">>> class StdoutCatcher(io.TextIOBase):\n"
309+
"... def __init__(self):\n"
310+
"... self.data = []\n"
311+
"... def write(self, stuff):\n"
312+
"... self.data.append(stuff)\n"
313+
"...\n"
314+
">>> import sys\n"
315+
">>> sys.stdout = StdoutCatcher()\n"
316+
">>> print('foo')\n"
317+
">>> print('hello world!')\n"
318+
">>> sys.stderr.write(''.join(sys.stdout.data))\n"
319+
"foo\n"
320+
"hello world!"
291321

292322
#: ../../faq/extending.rst:167
293323
msgid "How do I access a module written in Python from C?"
@@ -297,9 +327,8 @@ msgstr "C から Python で書かれたモジュールにアクセスするに
297327
msgid "You can get a pointer to the module object as follows::"
298328
msgstr "以下のようにモジュールオブジェクトへのポインタを得られます::"
299329

300-
#: ../../faq/extending.rst:171
301330
msgid "module = PyImport_ImportModule(\"<modulename>\");"
302-
msgstr ""
331+
msgstr "module = PyImport_ImportModule(\"<modulename>\");"
303332

304333
#: ../../faq/extending.rst:173
305334
msgid ""
@@ -323,9 +352,8 @@ msgstr ""
323352
"これで、モジュールの属性 (つまり、モジュールで定義された任意の名前) に以下の"
324353
"ようにアクセスできるようになります::"
325354

326-
#: ../../faq/extending.rst:182
327355
msgid "attr = PyObject_GetAttrString(module, \"<attrname>\");"
328-
msgstr ""
356+
msgstr "attr = PyObject_GetAttrString(module, \"<attrname>\");"
329357

330358
#: ../../faq/extending.rst:184
331359
msgid ""
@@ -379,13 +407,12 @@ msgstr ""
379407
msgid "How do I debug an extension?"
380408
msgstr "拡張をデバッグするにはどうしますか?"
381409

382-
#: ../../faq/extending.rst:211
383410
msgid ""
384411
"When using GDB with dynamically loaded extensions, you can't set a "
385412
"breakpoint in your extension until your extension is loaded."
386413
msgstr ""
387414
"動的にロードされた拡張に GDB を使うとき、拡張がロードされるまでブレークポイン"
388-
"トを設定してはいけません。"
415+
"トを設定できません。"
389416

390417
#: ../../faq/extending.rst:214
391418
msgid "In your ``.gdbinit`` file (or interactively), add the command:"
@@ -417,19 +444,20 @@ msgstr ""
417444
"Linux システムで Python モジュールをコンパイルしたいのですが、見つからない"
418445
"ファイルがあります。なぜですか?"
419446

420-
#: ../../faq/extending.rst:234
421447
msgid ""
422448
"Most packaged versions of Python omit some files required for compiling "
423449
"Python extensions."
424450
msgstr ""
451+
"パッケージとして配布されている Python の多くでは、Python 拡張のコンパイルに必"
452+
"要なファイルの一部が省かれています。"
425453

426-
#: ../../faq/extending.rst:237
427454
msgid "For Red Hat, install the python3-devel RPM to get the necessary files."
428455
msgstr ""
456+
"Red Hat では、必要なファイルを入手するために python3-devel RPM をインストール"
457+
"してください。"
429458

430-
#: ../../faq/extending.rst:239
431459
msgid "For Debian, run ``apt-get install python3-dev``."
432-
msgstr ""
460+
msgstr "Debian では ``apt-get install python3-dev`` を実行してください。"
433461

434462
#: ../../faq/extending.rst:242
435463
msgid "How do I tell \"incomplete input\" from \"invalid input\"?"

0 commit comments

Comments
 (0)