Skip to content

Commit 9daca13

Browse files
author
github-actions
committed
Merge 3.11 into 3.10
1 parent 242aa51 commit 9daca13

File tree

7 files changed

+146
-39
lines changed

7 files changed

+146
-39
lines changed

howto/enum.po

+58-14
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,29 @@ msgid ""
115115
"to the :class:`Weekday` enum to extract the day from the :class:`date` "
116116
"instance and return the matching enum member::"
117117
msgstr ""
118+
"多くの言語で列挙を名前と値のペアとしてのみ扱うのとは異なり、Pythonの列挙は振"
119+
"る舞いを追加することができます。 例えば、 :class:`datetime.date` には曜日を"
120+
"返すメソッドに :meth:`weekday` と :meth:`isoweekday` の2つがあります。違い"
121+
"は、一方は0から6まで、もう一方は1から7まで数えることです。自分たちでそれらの"
122+
"メソッドの挙動を理解しておく代わりに、:class:`Weekday` 列挙型にメソッドを追加"
123+
"することで、 :class:`date` インスタンス から曜日を抽出し、それにマッチする"
124+
"enumメンバーを返すことができます::"
118125

119126
#: ../../howto/enum.rst:82
120127
msgid "The complete :class:`Weekday` enum now looks like this::"
121-
msgstr ""
128+
msgstr "完全な :class:`Weekday` enumはこのようになります::"
122129

123130
#: ../../howto/enum.rst:97
124131
msgid "Now we can find out what today is! Observe::"
125-
msgstr ""
132+
msgstr "さて、これで今日が何曜日か調べることができます! 見てみましょう::"
126133

127134
#: ../../howto/enum.rst:103
128135
msgid ""
129136
"Of course, if you're reading this on some other day, you'll see that day "
130137
"instead."
131138
msgstr ""
139+
"もちろん、あなたがこれを読んでいるのが他の曜日ならば、その曜日が代わりに表示"
140+
"されます。"
132141

133142
#: ../../howto/enum.rst:105
134143
msgid ""
@@ -137,42 +146,52 @@ msgid ""
137146
"during a week, and don't want to use a :class:`list` -- we could use a "
138147
"different type of :class:`Enum`::"
139148
msgstr ""
149+
"この :class:`Weekday` 列挙型は、変数が1つの曜日を必要とする場合には優れていま"
150+
"すが、複数必要な場合はどうでしょうか? 1週間の家事を記録する関数を作成してい"
151+
"て、listは使いたくない場合、別の型の :class:`Enum` を使用することができます::"
140152

141153
#: ../../howto/enum.rst:120
142154
msgid ""
143155
"We've changed two things: we're inherited from :class:`Flag`, and the values "
144156
"are all powers of 2."
145157
msgstr ""
158+
"ここでは2つの変更が行われています。:class:`Flag` を継承している点と、値がすべ"
159+
"て2の累乗である点です。"
146160

147161
#: ../../howto/enum.rst:123
148162
msgid ""
149163
"Just like the original :class:`Weekday` enum above, we can have a single "
150164
"selection::"
151165
msgstr ""
166+
"元々の :class:`Weekday` 列挙型と同じように、1つの要素を持つことができます::"
152167

153168
#: ../../howto/enum.rst:129
154169
msgid ""
155170
"But :class:`Flag` also allows us to combine several members into a single "
156171
"variable::"
157172
msgstr ""
173+
"ただし、:class:`Flag` は複数のメンバーをひとつの変数にまとめることもできま"
174+
"す::"
158175

159176
#: ../../howto/enum.rst:136
160177
msgid "You can even iterate over a :class:`Flag` variable::"
161-
msgstr ""
178+
msgstr ":class:`Flag` 変数は反復することもできます::"
162179

163180
#: ../../howto/enum.rst:143
164181
msgid "Okay, let's get some chores set up::"
165-
msgstr ""
182+
msgstr "さて、いくつかの家事を設定してみましょう::"
166183

167184
#: ../../howto/enum.rst:151
168185
msgid "And a function to display the chores for a given day::"
169-
msgstr ""
186+
msgstr "指定された日の家事を表示する関数も作成します::"
170187

171188
#: ../../howto/enum.rst:160
172189
msgid ""
173190
"In cases where the actual values of the members do not matter, you can save "
174191
"yourself some work and use :func:`auto()` for the values::"
175192
msgstr ""
193+
"メンバーの実際の値が重要でない場合は、:func:`auto()` を使用することで手間を省"
194+
"くことができます::"
176195

177196
#: ../../howto/enum.rst:177
178197
msgid "Programmatic access to enumeration members and their attributes"
@@ -214,6 +233,11 @@ msgid ""
214233
"will return the member ``A``. By-name lookup of ``A`` will return the "
215234
"member ``A``. By-name lookup of ``B`` will also return the member ``A``::"
216235
msgstr ""
236+
"しかし、列挙型メンバー は、別の名前を持つことができます。 同じ値を持つ "
237+
"``A`` と``B`` が与えられた場合(そして ``A`` が先に定義されている場合)、 "
238+
"``B`` はメンバー ``A`` に対するエイリアスとなります。 ``A`` の値での検索で"
239+
"は、メンバー ``A`` が返されます。 ``A`` の名前での検索ではメンバー ``A`` を"
240+
"返します。``B`` の名前での検索も、メンバー ``A`` を返します::"
217241

218242
#: ../../howto/enum.rst:238
219243
msgid ""
@@ -233,6 +257,8 @@ msgid ""
233257
"By default, enumerations allow multiple names as aliases for the same value. "
234258
"When this behavior isn't desired, you can use the :func:`unique` decorator::"
235259
msgstr ""
260+
"デフォルトでは、列挙型は同じ値のエイリアスとして複数の名前を許容します。この"
261+
"振る舞いを望まない場合は、 :func:`unique` デコレータを使用できます::"
236262

237263
#: ../../howto/enum.rst:263
238264
msgid "Using automatic values"
@@ -324,6 +350,11 @@ msgid ""
324350
"doesn't care what the actual value of an enumeration is. But if the value "
325351
"*is* important, enumerations can have arbitrary values."
326352
msgstr ""
353+
"これまでのほとんどの例では、列挙型の値に整数を使用しています。 整数を使うの"
354+
"は短くて便利(そして、 `関数 API`_ ではデフォルトで設定される)ですが、これは"
355+
"強制されているわけではありません。大半の使用例では、列挙値の実際の値が何であ"
356+
"るかは意識しません。しかし、値が重要な場合、列挙型は任意の値を持つことができ"
357+
"ます。"
327358

328359
#: ../../howto/enum.rst:369
329360
msgid ""
@@ -477,6 +508,9 @@ msgid ""
477508
"that ``0`` is ``False`` in a boolean sense, but by default enum members all "
478509
"evaluate to ``True``."
479510
msgstr ""
511+
"``0`` ではなく``1`` をデフォルトの開始番号とする理由は、``0`` が真偽値として"
512+
"は ``False`` であり、デフォルトの列挙メンバーはすべて ``True`` 評価されるよう"
513+
"にするためである。"
480514

481515
#: ../../howto/enum.rst:508
482516
msgid ""
@@ -661,6 +695,9 @@ msgid ""
661695
"Bit-wise operations that result in invalid :class:`IntFlag` values will lose "
662696
"the :class:`IntFlag` membership. See :class:`FlagBoundary` for details."
663697
msgstr ""
698+
"ビット単位演算の結果が :class:`IntFlag` として不正な値な値の場合、値は :"
699+
"class:`IntFlag` メンバーではなくなります。 詳しくは :class:`FlagBoundary` を"
700+
"参照してください。"
664701

665702
#: ../../howto/enum.rst:664
666703
msgid "Sample :class:`IntFlag` class::"
@@ -675,6 +712,8 @@ msgid ""
675712
"Named combinations are considered aliases. Aliases do not show up during "
676713
"iteration, but can be returned from by-value lookups."
677714
msgstr ""
715+
"組み合わせに名前をつけたものはエイリアスとみなされます。エイリアスはイテレー"
716+
"ション中には表示されませんが、値による検索では返却されます。"
678717

679718
#: ../../howto/enum.rst:701
680719
msgid ""
@@ -691,16 +730,20 @@ msgid ""
691730
"Because :class:`IntFlag` members are also subclasses of :class:`int` they "
692731
"can be combined with them (but may lose :class:`IntFlag` membership::"
693732
msgstr ""
733+
":class:`IntFlag` メンバーも :class:`int` のサブクラスであるため、それらと組み"
734+
"合わせることができます(ただし、 :class:`IntFlag` 型ではなくなる可能性があり"
735+
"ます)::"
694736

695737
#: ../../howto/enum.rst:720
696738
msgid ""
697739
"The negation operator, ``~``, always returns an :class:`IntFlag` member with "
698740
"a positive value::"
699741
msgstr ""
742+
"否定の演算子,``~`` は、常に正の値を持つ:class:`IntFlag` メンバー を返す::"
700743

701744
#: ../../howto/enum.rst:726
702745
msgid ":class:`IntFlag` members can also be iterated over::"
703-
msgstr ""
746+
msgstr ":class:`IntFlag` メンバーは反復処理することもできます::"
704747

705748
#: ../../howto/enum.rst:735
706749
msgid "Flag"
@@ -1042,7 +1085,7 @@ msgstr ""
10421085

10431086
#: ../../howto/enum.rst:993
10441087
msgid "Plain :class:`Enum` classes always evaluate as :data:`True`."
1045-
msgstr ""
1088+
msgstr "プレーンな :class:`Enum` クラスは :data:`True` として評価されます。"
10461089

10471090
#: ../../howto/enum.rst:997
10481091
msgid "``Enum`` classes with methods"
@@ -1085,23 +1128,23 @@ msgstr ""
10851128

10861129
#: ../../howto/enum.rst:1041
10871130
msgid "Using the following snippet for our examples::"
1088-
msgstr ""
1131+
msgstr "例として以下のスニペットを使用します::"
10891132

10901133
#: ../../howto/enum.rst:1052
10911134
msgid "the following are true:"
10921135
msgstr ""
10931136

10941137
#: ../../howto/enum.rst:1054
10951138
msgid "single-bit flags are canonical"
1096-
msgstr ""
1139+
msgstr "単一ビットのフラグは正規形です"
10971140

10981141
#: ../../howto/enum.rst:1055
10991142
msgid "multi-bit and zero-bit flags are aliases"
1100-
msgstr ""
1143+
msgstr "複数ビットや0ビットのフラグはエイリアスです"
11011144

11021145
#: ../../howto/enum.rst:1056
11031146
msgid "only canonical flags are returned during iteration::"
1104-
msgstr ""
1147+
msgstr "反復処理では正規形のフラグのみ返却されます::"
11051148

11061149
#: ../../howto/enum.rst:1061
11071150
msgid ""
@@ -1111,7 +1154,7 @@ msgstr ""
11111154

11121155
#: ../../howto/enum.rst:1070
11131156
msgid "names of pseudo-flags are constructed from their members' names::"
1114-
msgstr ""
1157+
msgstr "名前のないフラグについては、そのメンバーの名前から名前が生成されます::"
11151158

11161159
#: ../../howto/enum.rst:1075
11171160
msgid "multi-bit flags, aka aliases, can be returned from operations::"
@@ -1136,15 +1179,16 @@ msgstr ""
11361179

11371180
#: ../../howto/enum.rst:1100
11381181
msgid "STRICT --> raises an exception when presented with invalid values"
1139-
msgstr ""
1182+
msgstr "STRICT --> 無効な値が指定された場合に例外を発生させる"
11401183

11411184
#: ../../howto/enum.rst:1101
11421185
msgid "CONFORM --> discards any invalid bits"
1143-
msgstr ""
1186+
msgstr "CONFORM --> 無効なビットを破棄する"
11441187

11451188
#: ../../howto/enum.rst:1102
11461189
msgid "EJECT --> lose Flag status and become a normal int with the given value"
11471190
msgstr ""
1191+
"EJECT --> フラグのステータスを失い、指定された値を持つ通常の int となります。"
11481192

11491193
#: ../../howto/enum.rst:1106
11501194
msgid "KEEP --> keep the extra bits"

library/exceptions.po

+20-3
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,9 @@ msgid ""
278278
"attribute that was attempted to be accessed and the object that was accessed "
279279
"for said attribute, respectively."
280280
msgstr ""
281+
"コンストラクタのキーワード専用引数を使って :attr:`name` および :attr:`obj` 属"
282+
"性を設定できます。設定された場合、アクセスが試みられた属性の名前と、その属性"
283+
"にアクセスしたオブジェクトを、それぞれ表します。"
281284

282285
#: ../../library/exceptions.rst:179
283286
msgid "Added the :attr:`name` and :attr:`obj` attributes."
@@ -419,6 +422,8 @@ msgid ""
419422
"constructor. When set it represent the name of the variable that was "
420423
"attempted to be accessed."
421424
msgstr ""
425+
"コンストラクタのキーワード専用引数を使って :attr:`name` 属性を設定できます。"
426+
"設定された場合、アクセスが試みられた変数の名前を表します。"
422427

423428
#: ../../library/exceptions.rst:280
424429
msgid "Added the :attr:`name` attribute."
@@ -697,38 +702,48 @@ msgid ""
697702
"The :func:`str` of the exception instance returns only the error message. "
698703
"Details is a tuple whose members are also available as separate attributes."
699704
msgstr ""
705+
"例外インスタンスの :func:`str` はエラーメッセージのみを返します。詳細はタプル"
706+
"で、個々の属性としても利用できます。"
700707

701708
#: ../../library/exceptions.rst:456
702709
msgid "The name of the file the syntax error occurred in."
703-
msgstr ""
710+
msgstr "構文エラーが発生したファイルの名前。"
704711

705712
#: ../../library/exceptions.rst:460
706713
msgid ""
707714
"Which line number in the file the error occurred in. This is 1-indexed: the "
708715
"first line in the file has a ``lineno`` of 1."
709716
msgstr ""
717+
"ファイルのエラーが発生した行番号。1から数えはじめるため、ファイルの最初の行"
718+
"の ``lineno`` は1です。"
710719

711720
#: ../../library/exceptions.rst:465
712721
msgid ""
713722
"The column in the line where the error occurred. This is 1-indexed: the "
714723
"first character in the line has an ``offset`` of 1."
715724
msgstr ""
725+
"行のエラーが発生した列番号。1から数えはじめるため、行の最初の文字の "
726+
"``offset`` は1です。"
716727

717728
#: ../../library/exceptions.rst:470
718729
msgid "The source code text involved in the error."
719-
msgstr ""
730+
msgstr "エラーを含むソースコードのテキスト。"
720731

721732
#: ../../library/exceptions.rst:474
722733
msgid ""
723734
"Which line number in the file the error occurred ends in. This is 1-indexed: "
724735
"the first line in the file has a ``lineno`` of 1."
725736
msgstr ""
737+
"ファイルのエラーが発生した最後の行番号。1から数えはじめるため、ファイルの最初"
738+
"の行の ``lineno`` は1です。"
726739

727740
#: ../../library/exceptions.rst:479
728741
msgid ""
729742
"The column in the end line where the error occurred finishes. This is 1-"
730743
"indexed: the first character in the line has an ``offset`` of 1."
731744
msgstr ""
745+
"行のエラーが発生した最後の列番号。1から数えはじめるため、行の最初の文字の "
746+
"``offset`` は1です。"
732747

733748
#: ../../library/exceptions.rst:482
734749
msgid ""
@@ -1208,6 +1223,8 @@ msgid ""
12081223
"Ignored by the default warning filters. Enabling the :ref:`Python "
12091224
"Development Mode <devmode>` shows this warning."
12101225
msgstr ""
1226+
"デフォルトの警告フィルターで無効化されています。:ref:`Python Development "
1227+
"Mode <devmode>` を有効にするとこの警告が表示されます。"
12111228

12121229
#: ../../library/exceptions.rst:803
12131230
msgid "Base class for warnings about dubious syntax."
@@ -1239,7 +1256,7 @@ msgstr "エンコーディングに関連した警告の基底クラスです。
12391256

12401257
#: ../../library/exceptions.rst:834
12411258
msgid "See :ref:`io-encoding-warning` for details."
1242-
msgstr ""
1259+
msgstr "詳細は :ref:`io-encoding-warning` を参照してください。"
12431260

12441261
#: ../../library/exceptions.rst:841
12451262
msgid ""

library/json.po

+1-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ msgstr "object"
457457

458458
#: ../../library/json.rst:317 ../../library/json.rst:406
459459
msgid "dict"
460-
msgstr "dict"
460+
msgstr "辞書"
461461

462462
#: ../../library/json.rst:319 ../../library/json.rst:408
463463
msgid "array"

library/re.po

+1-1
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ msgstr ""
11471147

11481148
#: ../../library/re.rst:609
11491149
msgid "Flags"
1150-
msgstr ""
1150+
msgstr "フラグ"
11511151

11521152
#: ../../library/re.rst:611
11531153
msgid ""

0 commit comments

Comments
 (0)