@@ -153,6 +153,9 @@ msgid ""
153
153
"Return the length of the Unicode string, in code points. *unicode* has to "
154
154
"be a Unicode object in the \" canonical\" representation (not checked)."
155
155
msgstr ""
156
+ "Unicode 文字列のコードポイントでの長さを返します。\n"
157
+ "*unicode* は \" 正統な\" 表現形式の Unicode オブジェクトでなければなりません "
158
+ "(ただしチェックはしません)。"
156
159
157
160
#: ../../c-api/unicode.rst:110
E377
span>
158
161
msgid ""
@@ -161,6 +164,10 @@ msgid ""
161
164
"canonical representation has the correct character size; use :c:func:"
162
165
"`PyUnicode_KIND` to select the right function."
163
166
msgstr ""
167
+ "文字に直接アクセスするために、 UCS1, UCS2, UCS4 のいずれかの整数型にキャスト"
168
+ "された正統な表現形式へのポインタを返します。\n"
169
+ "正統な表現が適正な文字サイズになっているかどうかのチェックはしません;\n"
170
+ ":c:func:`PyUnicode_KIND` を使って正しい関数を選んでください。"
164
171
165
172
#: ../../c-api/unicode.rst:122
166
173
msgid "Return values of the :c:func:`PyUnicode_KIND` macro."
@@ -200,6 +207,13 @@ msgid ""
200
207
"(starts at 0) and *value* is the new code point value which should be "
201
208
"written to that location."
202
209
msgstr ""
210
+ "正統な表現形式となっている (:c:func:`PyUnicode_DATA` で取得した) *data* に書"
211
+ "き込みます。\n"
212
+ "この関数は正常性のチェックを行わない、ループで使われるためのものです。\n"
213
+ "呼び出し側は、他の呼び出しで取得した *kind* 値と *data* ポインタをキャッシュ"
214
+ "すべきです。\n"
215
+ "*index* は文字列の (0始まりの) インデックスで、 *value* はその場所に書き込ま"
216
+ "れることになる新しいコードポイントの値です。"
203
217
204
218
#: ../../c-api/unicode.rst:163
205
219
msgid ""
@@ -216,6 +230,10 @@ msgid ""
216
230
"\" canonical\" representation. This is less efficient than :c:func:"
217
231
"`PyUnicode_READ` if you do multiple consecutive reads."
218
232
msgstr ""
233
+ "Unicode オブジェクト *unicode* から文字を読み取ります。\n"
234
+ "この Unicode オブジェクトは \" 正統な\" 表現形式でなければなりません。\n"
235
+ "何度も連続して読み取る場合には、このマクロは :c:func:`PyUnicode_READ` よりも"
236
+ "非効率的です。"
219
237
220
238
#: ../../c-api/unicode.rst:180
221
239
msgid ""
@@ -364,6 +382,8 @@ msgid ""
364
382
"Return the character *ch* converted to a double. Return ``-1.0`` if this is "
365
383
"not possible. This function does not raise exceptions."
366
384
msgstr ""
385
+ "*ch* を double に変換したものを返します。不可能ならば ``-1.0`` を返します。こ"
386
+ "の関数は例外を送出しません。"
367
387
368
388
#: ../../c-api/unicode.rst:311
369
389
msgid "These APIs can be used to work with surrogates:"
@@ -605,11 +625,11 @@ msgstr ""
605
625
606
626
#: ../../c-api/unicode.rst:451
607
627
msgid "``t``"
608
- msgstr ""
628
+ msgstr "``t`` "
609
629
610
630
#: ../../c-api/unicode.rst:451
611
631
msgid ":c:type:`ptrdiff_t`"
612
- msgstr ""
632
+ msgstr ":c:type:`ptrdiff_t` "
613
633
614
634
#: ../../c-api/unicode.rst:454
615
635
msgid ""
@@ -748,15 +768,15 @@ msgstr ":func:`ascii` の戻り値。"
748
768
749
769
#: ../../c-api/unicode.rst:510
750
770
msgid "``U``"
751
- msgstr ""
771
+ msgstr "``U`` "
752
772
753
773
#: ../../c-api/unicode.rst:512
754
774
msgid "A Unicode object."
755
- msgstr ""
775
+ msgstr "Unicode オブジェクト。 "
756
776
757
777
#: ../../c-api/unicode.rst:514
758
778
msgid "``V``"
759
- msgstr ""
779
+ msgstr "``V`` "
760
780
761
781
#: ../../c-api/unicode.rst:515
762
782
msgid ":c:expr:`PyObject*`, :c:expr:`const char*` or :c:expr:`const wchar_t*`"
@@ -900,6 +920,11 @@ msgid ""
900
920
"memcpy` if possible. Returns ``-1`` and sets an exception on error, "
901
921
"otherwise returns the number of copied characters."
902
922
msgstr ""
923
+ "ある Unicode オブジェクトから他へ文字をコピーします。\n"
924
+ "この関数は必要なときに文字変換を行い、可能な場合は :c:func:`!memcpy` へ差し戻"
925
+ "します。\n"
926
+ "失敗のときには ``-1`` を返し、例外を設定します。そうでない場合は、コピーした"
927
+ "文字数を返します。"
903
928
904
929
#: ../../c-api/unicode.rst:621
905
930
msgid ""
@@ -951,6 +976,10 @@ msgid ""
951
976
"Unicode object and the index is not out of bounds, in contrast to :c:func:"
952
977
"`PyUnicode_READ_CHAR`, which performs no error checking."
953
978
msgstr ""
979
+ "文字列から文字を読み取ります。\n"
980
+ "エラーチェックを行わない :c:func:`PyUnicode_READ_CHAR` とは対照的に、この関数"
981
+ "は *unicode* が Unicode オブジェクトであること、インデックスが範囲内であるこ"
982
+ "とをチェックします。"
954
983
955
984
#: ../../c-api/unicode.rst:659
956
985
msgid ""
@@ -973,6 +1002,10 @@ msgid ""
973
1002
"`MemoryError` set. The returned buffer always has an extra null code point "
974
1003
"appended."
975
1004
msgstr ""
1005
+ "文字列 *unicode* を :c:func:`PyMem_Malloc` でメモリ確保された新しい UCS4 型の"
1006
+ "バッファにコピーします。\n"
1007
+ "これが失敗した場合は、 ``NULL`` を返し :exc:`MemoryError` をセットします。\n"
1008
+ "返されたバッファは必ず null コードポイントが追加されています。"
976
1009
977
1010
#: ../../c-api/unicode.rst:687
978
1011
msgid "Locale Encoding"
@@ -1308,6 +1341,8 @@ msgid ""
1308
1341
"Create a Unicode object by decoding *size* bytes of the UTF-8 encoded string "
1309
1342
"*str*. Return ``NULL`` if an exception was raised by the codec."
1310
1343
msgstr ""
1344
+ "UTF-8 でエンコードされた *size* バイトの文字列 *str* から Unicode オブジェク"
1345
+ "トを生成します。codec が例外を送出した場合には ``NULL`` を返します。"
1311
1346
1312
1347
#: ../../c-api/unicode.rst:965
1313
1348
msgid ""
@@ -1618,6 +1653,8 @@ msgid ""
1618
1653
"Create a Unicode object by decoding *size* bytes of the Latin-1 encoded "
1619
1654
"string *str*. Return ``NULL`` if an exception was raised by the codec."
1620
1655
msgstr ""
1656
+ "Latin-1 でエンコードされた *size* バイトの文字列 *str* から Unicode オブジェ"
1657
+ "クトを生成します。codec が例外を送出した場合には ``NULL`` を返します。"
1621
1658
1622
1659
#: ../../c-api/unicode.rst:1190
1623
1660
msgid ""
@@ -1672,6 +1709,13 @@ msgid ""
1672
1709
"the :meth:`~object.__getitem__` mapping interface; dictionaries and "
1673
1710
"sequences work well."
1674
1711
msgstr ""
1712
+ "この codec は、多くの様々な codec を実装する際に使われるという点で特殊な "
1713
+ "codec です (実際、 :mod:`!encodings` パッケージに入っている標準 codecs のほと"
1714
+ "んどは、この codec を使っています)。\n"
1715
+ "この codec は、文字のエンコードやデコードに対応表を使います。\n"
1716
+ "提供される対応表のオブジェクトは :meth:`~object.__getitem__` マッピングイン"
1717
+ "ターフェースをサポートしていなければなりません; 辞書やシーケンスがそれに適し"
1718
+ "ています。"
1675
1719
1676
1720
#: ../../c-api/unicode.rst:1224
1677
1721
msgid "These are the mapping codec APIs:"
@@ -1683,6 +1727,9 @@ msgid ""
1683
1727
"using the given *mapping* object. Return ``NULL`` if an exception was "
1684
1728
"raised by the codec."
1685
1729
msgstr ""
1730
+ "与えられた *mapping* オブジェクトを使って、 *size* バイトのエンコードされた文"
1731
+ "字列 *str* をデコードして Unicode オブジェクトを作成します。\n"
1732
+ "codec が例外を発生させたときは ``NULL`` を返します。"
1686
1733
1687
1734
#: ../../c-api/unicode.rst:1233
1688
1735
msgid ""
@@ -1874,6 +1921,12 @@ msgid ""
1874
1921
"the first match; a value of ``-1`` indicates that no match was found, and "
1875
1922
"``-2`` indicates that an error occurred and an exception has been set."
1876
1923
msgstr ""
1924
+ "``unicode[start:end]`` 中に *substr* が最初に出現する場所を返します。\n"
1925
+ "このとき指定された検索方向 *direction* (*direction* == ``1`` は順方向検索、 "
1926
+ "*direction* == ``-1`` は逆方向検索) で検索します。\n"
1927
+ "戻り値は最初にマッチが見つかった場所のインデックスです; 戻り値 ``-1`` はマッ"
1928
+ "チが見つからなかったことを表し、 ``-2`` はエラーが発生して例外情報が設定され"
1929
+ "ていることを表します。"
1877
1930
1878
1931
#: ../../c-api/unicode.rst:1375
1879
1932
msgid ""
@@ -1884,6 +1937,12 @@ msgid ""
1884
1937
"found, and ``-2`` indicates that an error occurred and an exception has been "
1885
1938
"set."
1886
1939
msgstr ""
1940
+ "``unicode[start:end]`` 中に文字 *ch* が最初に出現する場所を返します。\n"
1941
+ "このとき指定された検索方向 *direction* (*direction* == ``1`` は順方向検索、 "
1942
+ "*direction* == ``-1`` は逆方向検索) で検索します。\n"
1943
+ "戻り値は最初にマッチが見つかった場所のインデックスです; 戻り値 ``-1`` はマッ"
1944
+ "チが見つからなかったことを表し、 ``-2`` はエラーが発生して例外情報が設定され"
1945
+ "ていることを表します。"
1887
1946
1888
1947
#: ../../c-api/unicode.rst:1383
1889
1948
msgid ""
@@ -1895,13 +1954,18 @@ msgid ""
1895
1954
"Return the number of non-overlapping occurrences of *substr* in "
1896
1955
"``unicode[start:end]``. Return ``-1`` if an error occurred."
1897
1956
msgstr ""
1957
+ "``unicode[start:end]`` に *substr* が重複することなく出現する回数を返します。"
1958
+ "エラーが発生した場合には ``-1`` を返します。"
1898
1959
1899
1960
#: ../../c-api/unicode.rst:1397
1900
1961
msgid ""
1901
1962
"Replace at most *maxcount* occurrences of *substr* in *unicode* with "
1902
1963
"*replstr* and return the resulting Unicode object. *maxcount* == ``-1`` "
1903
1964
"means replace all occurrences."
1904
1965
msgstr ""
1966
+ "*unicode* 中に出現する *substr* を最大で *maxcount* 個 *replstr* に置換し、置"
1967
+ "換結果である Unicode オブジェクトを返します。\n"
1968
+ "*maxcount* == ``-1`` にすると、文字列中に現れる全ての *substr* を置換します。"
1905
1969
1906
1970
#: ../../c-api/unicode.rst:1404
1907
1971
msgid ""
@@ -1927,6 +1991,11 @@ msgid ""
1927
1991
"pass only ASCII-encoded strings, but the function interprets the input "
1928
1992
"string as ISO-8859-1 if it contains non-ASCII characters."
1929
1993
msgstr ""
1994
+ "Unicode オブジェクト *unicode* と *string* を比較して、左引数が右引数より小さ"
1995
+ "い場合、左右引数が等価の場合、左引数が右引数より大きい場合に対して、それぞれ "
1996
+ "``-1``, ``0``, ``1`` を返します。\n"
1997
+ "ASCII エンコードされた文字列だけを渡すのが最も良いですが、入力文字列に非 "
1998
+ "ASCII 文字が含まれている場合は ISO-8859-1 として解釈します。"
1930
1999
1931
2000
#: ../../c-api/unicode.rst:1418
1932
2001
msgid "This function does not raise exceptions."
@@ -1943,6 +2012,8 @@ msgstr "``NULL`` を、例外が発生したときに返します。"
1943
2012
#: ../../c-api/unicode.rst:1426
1944
2013
msgid ":c:data:`Py_True` or :c:data:`Py_False` for successful comparisons"
1945
2014
msgstr ""
2015
+ ":c:data:`Py_True` もしくは :c:data:`Py_False` を、正しく比較できた時に返しま"
2016
+ "す。"
1946
2017
1947
2018
#: ../../c-api/unicode.rst:1427
1948
2019
msgid ":c:data:`Py_NotImplemented` in case the type combination is unknown"
@@ -1967,12 +2038,15 @@ msgid ""
1967
2038
"Check whether *substr* is contained in *unicode* and return true or false "
1968
2039
"accordingly."
1969
2040
msgstr ""
2041
+ "*substr* が *unicode* 内にあるか調べ、その結果に応じて真または偽を返します。"
1970
2042
1971
2043
#: ../../c-api/unicode.rst:1444
1972
2044
msgid ""
1973
2045
"*substr* has to coerce to a one element Unicode string. ``-1`` is returned "
1974
2046
"if there was an error."
1975
2047
msgstr ""
2048
+ "*substr* は単要素の Unicode 文字に型強制できなければなりません。エラーが生じ"
2049
+ "た場合には ``-1`` を返します。"
1976
2050
1977
2051
#: ../../c-api/unicode.rst:1450
1978
2052
msgid ""
0 commit comments