From 732f9b335e2a009e16a8176dc43236ae252afe34 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 1 Oct 2023 23:50:54 +0000 Subject: [PATCH] Update translations from Transifex --- library/__main__.po | 70 ++++++++++++++++++++++++++++++++----- reference/compound_stmts.po | 58 +++++++++++++++++++++++++----- 2 files changed, 110 insertions(+), 18 deletions(-) diff --git a/library/__main__.po b/library/__main__.po index b4281bb85..c2dafc45c 100644 --- a/library/__main__.po +++ b/library/__main__.po @@ -5,15 +5,16 @@ # # Translators: # tomo, 2022 +# righteous righteous, 2023 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-15 14:13+0000\n" +"POT-Creation-Date: 2023-09-29 14:12+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" -"Last-Translator: tomo, 2022\n" +"Last-Translator: righteous righteous, 2023\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" "MIME-Version: 1.0\n" @@ -31,16 +32,20 @@ msgid "" "In Python, the special name ``__main__`` is used for two important " "constructs:" msgstr "" +"Python では、 ``__main__`` という特別な名前が次の二つの重要な用途で使われま" +"す:" #: ../../library/__main__.rst:12 msgid "" "the name of the top-level environment of the program, which can be checked " "using the ``__name__ == '__main__'`` expression; and" msgstr "" +"プログラムのトップレベル環境の名前。\n" +"``__name__ == '__main__'`` という式でチェックすることができる。" #: ../../library/__main__.rst:14 msgid "the ``__main__.py`` file in Python packages." -msgstr "" +msgstr "Python パッケージにおける ``__main__.py`` ファイル。" #: ../../library/__main__.rst:16 msgid "" @@ -49,6 +54,12 @@ msgid "" "detail below. If you're new to Python modules, see the tutorial section :" "ref:`tut-modules` for an introduction." msgstr "" +"どちらも Python のモジュールに関わる機能です。\n" +"1つ目はユーザーがどうモジュールを使うか、2つ目はモジュールとモジュールがど" +"うやりとりするかに関係します。\n" +"詳細は以下で説明します。\n" +"Python モジュールがどういうものかについては、 :ref:`tut-modules` を参照してく" +"ださい。" #: ../../library/__main__.rst:25 msgid "``__name__ == '__main__'``" @@ -60,22 +71,30 @@ msgid "" "module's name. Usually, this is the name of the Python file itself without " "the ``.py`` extension::" msgstr "" +"Python モジュールやパッケージがインポートされるとき、 ``__name__`` の値はその" +"モジュールの名前となります。\n" +"通常、インポートされる Python ファイル自体のファイル名から拡張子``.py`` を除" +"いたものとなります::" #: ../../library/__main__.rst:35 msgid "" "If the file is part of a package, ``__name__`` will also include the parent " "package's path::" msgstr "" +"インポートされるファイルがパッケージの一部である場合は、 ``__name__`` にはそ" +"のパッケージのパスも含まれます::" #: ../../library/__main__.rst:42 msgid "" "However, if the module is executed in the top-level code environment, its " "``__name__`` is set to the string ``'__main__'``." msgstr "" +"しかし、モジュールがトップレベルのスクリプト環境で実行される場合は、 " +"``__name__`` が ``'__main__'`` という文字列になります。" #: ../../library/__main__.rst:46 msgid "What is the \"top-level code environment\"?" -msgstr "" +msgstr "「トップレベルのスクリプト環境」とは" #: ../../library/__main__.rst:48 msgid "" @@ -88,36 +107,41 @@ msgstr "" #: ../../library/__main__.rst:53 msgid "The top-level code environment can be:" -msgstr "" +msgstr "以下のものがトップレベルのスクリプト環境となります:" #: ../../library/__main__.rst:55 msgid "the scope of an interactive prompt::" -msgstr "" +msgstr "インタラクティブプロンプトのスコープ::" #: ../../library/__main__.rst:60 msgid "the Python module passed to the Python interpreter as a file argument:" -msgstr "" +msgstr "Python インタープリタにファイル引数として渡される Python モジュール:" #: ../../library/__main__.rst:67 msgid "" "the Python module or package passed to the Python interpreter with the :" "option:`-m` argument:" msgstr "" +"Python インタープリタにPython :option:`-m` オプションとして渡される Python モ" +"ジュールまたはパッケージ:" #: ../../library/__main__.rst:75 msgid "Python code read by the Python interpreter from standard input:" -msgstr "" +msgstr "標準入力から Python インタープリタが読み込む Python コード:" #: ../../library/__main__.rst:86 msgid "" "Python code passed to the Python interpreter with the :option:`-c` argument:" msgstr "" +"Python インタープリタに :option:`-c` オプションで渡される Python コード:" #: ../../library/__main__.rst:97 msgid "" "In each of these situations, the top-level module's ``__name__`` is set to " "``'__main__'``." msgstr "" +"上記それぞれの場合で、トップレベルのモジュールの ``__name__`` の値が " +"``'__main__'`` となります。" #: ../../library/__main__.rst:100 msgid "" @@ -126,16 +150,22 @@ msgid "" "idiom for conditionally executing code when the module is not initialized " "from an import statement::" msgstr "" +"これにより、 ``__name__`` をチェックすれば各モジュールは自分がトップレベル環" +"境で実行されているかどうかを知ることができます。\n" +"このことから、モジュールが import 文で初期化された場合以外の場合でのみコード" +"を実行するため、次のコードがしばしば用いられます::" #: ../../library/__main__.rst:111 msgid "" "For a more detailed look at how ``__name__`` is set in all situations, see " "the tutorial section :ref:`tut-modules`." msgstr "" +"あらゆる場合に ``__name__`` の値がどうセットされるのかについて、詳しくは" +"チュートリアルの :ref:`tut-modules` セクションを参照してください。" #: ../../library/__main__.rst:116 ../../library/__main__.rst:239 msgid "Idiomatic Usage" -msgstr "" +msgstr "通常の使われ方" #: ../../library/__main__.rst:118 msgid "" @@ -144,6 +174,10 @@ msgid "" "like this was imported from a different module, for example to unit test it, " "the script code would unintentionally execute as well." msgstr "" +"一部のモジュールでは、コマンドライン引数をパースしたり標準入力からデータを取" +"得したなど、スクリプト用途のみのコードが含まれています。\n" +"このようなモジュールが、例えばユニットテストのため、別のモジュールからイン" +"ポートされると、そのスクリプト用コードが意図に反して実行されてしまいます。" #: ../../library/__main__.rst:123 msgid "" @@ -151,6 +185,9 @@ msgid "" "handy. Code within this block won't run unless the module is executed in the " "top-level environment." msgstr "" +"``if __name__ == '__main__'`` というコードは、このようなときに役立ちます。\n" +"このブロックの中にあるコードは、当該のモジュールがトップレベル環境で実行され" +"ていない限り、実行されません。" #: ../../library/__main__.rst:127 msgid "" @@ -158,6 +195,10 @@ msgid "" "'__main__'`` can improve code clarity and correctness. Most often, a " "function named ``main`` encapsulates the program's primary behavior::" msgstr "" +"``if __name__ == '__main__'`` の下のブロックにあるコードはできるだけ少なくし" +"た方が、コードの分かりやすさや正確さにつながります。\n" +"最もよくあるのが、プログラムの主要な処理を ``main`` 関数の中にカプセル化する" +"ことです::" #: ../../library/__main__.rst:151 msgid "" @@ -168,6 +209,12 @@ msgid "" "the global variable instead of a local name. A ``main`` function solves " "this problem." msgstr "" +"注意すべき点として、もし ``main`` 関数内のコードをカプセル化せず ``if " +"__name__ == '__main__'`` の下に直接書いた場合、 ``phrase`` 変数はモジュール全" +"体からグローバルにアクセスできてしまいます。\n" +"モジュール内の他の関数が意図せずローカル変数ではなくそのグローバル変数を使用" +"してしまう可能性があるため、ミスにつながります。\n" +"``main`` 関数を用意することでこの問題は解決できます。" #: ../../library/__main__.rst:158 msgid "" @@ -176,6 +223,11 @@ msgid "" "imported, the ``echo`` and ``main`` functions will be defined, but neither " "of them will be called, because ``__name__ != '__main__'``." msgstr "" +"``main`` 関数を使うことのもう一つのメリットとして、 ``echo`` 関数が分離し、別" +"の場所からインポートできるようになることです。\n" +"``echo.py`` がインポートされるとき、 ``echo`` 関数と ``main`` 関数が定義され" +"ますが、 ``__name__ != '__main__'`` であるため、どちらの関数も呼び出されませ" +"ん。" #: ../../library/__main__.rst:165 msgid "Packaging Considerations" diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index 3d4b7745a..baf61a617 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -13,15 +13,16 @@ # Takeshi Nakazato, 2023 # tomo, 2023 # Takanori Suzuki , 2023 +# righteous righteous, 2023 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-15 14:13+0000\n" +"POT-Creation-Date: 2023-09-29 14:12+0000\n" "PO-Revision-Date: 2021-06-28 01:19+0000\n" -"Last-Translator: Takanori Suzuki , 2023\n" +"Last-Translator: righteous righteous, 2023\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" "MIME-Version: 1.0\n" @@ -198,6 +199,13 @@ msgid "" "When the iterator is exhausted, the suite in the :keyword:`!else` clause, if " "present, is executed, and the loop terminates." msgstr "" +"``starred_list`` 式は一度だけ評価され、評価結果として :term:`イテラブル " +"` オブジェクトを返す必要があります。そのイテラブルから :term:`イテ" +"レータ ` が作られます。まず、イテレータから生成される最初の要素が、" +"通常の代入式のルールに従って ``target_list`` に代入され(:ref:`assignment` 節" +"参照)、1つ目のスイート (suite) が実行されます。これが、イテレータから生成さ" +"れる各要素に対して繰り返されます。イテレータのすべての要素が処理されたあ" +"と、 :keyword:`!else` 節がもしあれば実行され、ループ処理が終了します。" #: ../../reference/compound_stmts.rst:173 msgid "" @@ -238,6 +246,8 @@ msgstr "" #: ../../reference/compound_stmts.rst:198 msgid "Starred elements are now allowed in the expression list." msgstr "" +"式のリストの中でアスタリスク付きの式 (starred elements) を指定できるようにな" +"りました。" #: ../../reference/compound_stmts.rst:205 msgid "The :keyword:`!try` statement" @@ -262,7 +272,7 @@ msgstr "" #: ../../reference/compound_stmts.rst:239 msgid ":keyword:`!except` clause" -msgstr "" +msgstr ":keyword:`!except` 節" #: ../../reference/compound_stmts.rst:241 msgid "" @@ -368,10 +378,16 @@ msgid "" "leaving an exception handler, the exception stored in the :mod:`sys` module " "is reset to its previous value::" msgstr "" +":keyword:`!except` 節のスイートが実行される前に、例外が :mod:`sys` モジュール" +"に格納されます。\n" +":keyword:`!except` 節の中では、 :func:`sys.exception` を呼び出す事によってこ" +"の例外にアクセスすることができます。\n" +"例外ハンドラを抜けると、 :mod:`sys` モジュールに格納されている例外の値が、一" +"つ前の値に戻ります::" #: ../../reference/compound_stmts.rst:334 msgid ":keyword:`!except*` clause" -msgstr "" +msgstr ":keyword:`!except*` 節" #: ../../reference/compound_stmts.rst:336 msgid "" @@ -430,7 +446,7 @@ msgstr "" #: ../../reference/compound_stmts.rst:412 msgid ":keyword:`!finally` clause" -msgstr "" +msgstr ":keyword:`!finally` 節" #: ../../reference/compound_stmts.rst:414 msgid "" @@ -624,6 +640,9 @@ msgid "" "You can also write multi-item context managers in multiple lines if the " "items are surrounded by parentheses. For example::" msgstr "" +"括弧で囲むことにより、複数のコンテキストマネージャを複数行に渡って書くことが" +"できます。\n" +"例::" #: ../../reference/compound_stmts.rst:570 msgid "Support for multiple context expressions." @@ -633,7 +652,7 @@ msgstr "複数のコンテキスト式をサポートしました。" msgid "" "Support for using grouping parentheses to break the statement in multiple " "lines." -msgstr "" +msgstr "括弧で囲むことで、文を複数行に分割して書けるようになりました。" #: ../../reference/compound_stmts.rst:579 msgid ":pep:`343` - The \"with\" statement" @@ -652,12 +671,16 @@ msgstr ":keyword:`!match` 文" #: ../../reference/compound_stmts.rst:599 msgid "The match statement is used for pattern matching. Syntax:" msgstr "" +"match 文はパターンマッチングを行う目的で使われます。\n" +"構文:" #: ../../reference/compound_stmts.rst:608 msgid "" "This section uses single quotes to denote :ref:`soft keywords `." msgstr "" +"このセクションでは、一重引用符で囲まれているものは :ref:`ソフトキーワード " +"` を表します。" #: ../../reference/compound_stmts.rst:611 msgid "" @@ -665,21 +688,27 @@ msgid "" "value (following ``match``). The pattern (which may contain subpatterns) is " "matched against the subject value. The outcomes are:" msgstr "" +"パターンマッチングは、パターン (``case`` の後ろ) とマッチング対象の値 " +"(``match`` の後ろ)を入力とします。\n" +"パターン (サブパターンを含みうる) は、マッチング対象の値に対して、マッチする" +"かどうかの判定が行われます。結果として次のことが起こります:" #: ../../reference/compound_stmts.rst:615 msgid "A match success or failure (also termed a pattern success or failure)." -msgstr "" +msgstr "マッチ成功、もしくはマッチ失敗 (パターン成功・失敗とも呼ばれます)。" #: ../../reference/compound_stmts.rst:617 msgid "" "Possible binding of matched values to a name. The prerequisites for this " "are further discussed below." -msgstr "" +msgstr "マッチした値の名前への束縛。必要な条件は後述します。" #: ../../reference/compound_stmts.rst:620 msgid "" "The ``match`` and ``case`` keywords are :ref:`soft keywords `." msgstr "" +"``match`` と ``case`` キーワードは :ref:`ソフトキーワード ` で" +"す。" #: ../../reference/compound_stmts.rst:624 #: ../../reference/compound_stmts.rst:1179 @@ -697,7 +726,7 @@ msgstr "概要" #: ../../reference/compound_stmts.rst:631 msgid "Here's an overview of the logical flow of a match statement:" -msgstr "" +msgstr "match 文の論理的な動作の流れの概要は次の通りです:" #: ../../reference/compound_stmts.rst:634 msgid "" @@ -705,6 +734,9 @@ msgid "" "value obtained. If the subject expression contains a comma, a tuple is " "constructed using :ref:`the standard rules `." msgstr "" +"サブジェクト式 ``subject_expr`` が評価され、サブジェクト値が得られます。\n" +"サブジェクト式がコンマを含む場合、 :ref:`通常のルール ` に" +"従ってタプルが作成されます。" #: ../../reference/compound_stmts.rst:638 msgid "" @@ -715,6 +747,14 @@ msgid "" "specified below. **Name bindings made during a successful pattern match " "outlive the executed block and can be used after the match statement**." msgstr "" +"``case_block`` 内の各パターンに対して、サブジェクト値がマッチするかどうかを" +"チェックします。\n" +"マッチ成功・失敗の具体的なルールは後述します。\n" +"マッチングのチェックにより、パターン内の名前の一部あるいはすべてに値が束縛さ" +"れます。\n" +"具体的な束縛ルールはパターンの種類によって異なるため、後述します。 **成功した" +"マッチで束縛された名前は、そのブロックの実行後も存続し、 match 文の後も使用す" +"ることができます**。" #: ../../reference/compound_stmts.rst:647 msgid ""