Skip to content

Commit f529672

Browse files
author
github-actions
committed
Update translations from Transifex
1 parent 583db0c commit f529672

File tree

3 files changed

+146
-6
lines changed

3 files changed

+146
-6
lines changed

tutorial/errors.po

+9-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@
1111
# Takuya Futatsugi, 2024
1212
# TENMYO Masakazu, 2024
1313
# Takanori Suzuki <takanori@takanory.net>, 2025
14+
# righteous, 2025
1415
#
1516
#,fuzzy
1617
msgid ""
1718
msgstr ""
1819
"Project-Id-Version: Python 3.13\n"
1920
"Report-Msgid-Bugs-To: \n"
20-
"POT-Creation-Date: 2025-04-04 14:18+0000\n"
21+
"POT-Creation-Date: 2025-04-25 14:19+0000\n"
2122
"PO-Revision-Date: 2021-06-28 01:50+0000\n"
22-
"Last-Translator: Takanori Suzuki <takanori@takanory.net>, 2025\n"
23+
"Last-Translator: righteous, 2025\n"
2324
"Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/"
2425
"ja/)\n"
2526
"MIME-Version: 1.0\n"
@@ -76,12 +77,18 @@ msgid ""
7677
"place that needs to be fixed. In the example, the error is detected at the "
7778
"function :func:`print`, since a colon (``':'``) is missing just before it."
7879
msgstr""
80+
"パーサが構文解析エラーと判断した行が表示されるとともに、エラーが検出された部"
81+
"分に矢印 (^) が表示されます。ただし、この部分が本当に修正すべき箇所とは限らな"
82+
"いので注意してください。上記の例では、エラーは関数 :func:`print` のところで検"
83+
"出されており、これはその前にコロン (``':'``) が抜けているためです。"
7984

8085
#:../../tutorial/errors.rst:31
8186
msgid""
8287
"The file name (``<stdin>`` in our example) and line number are printed so "
8388
"you know where to look in case the input came from a file."
8489
msgstr""
90+
"ファイルに書かれたコードの場合、ファイル名 (上の例では ``<stdin>``) と行番号"
91+
"が表示されるので、どこを見ればよいかが分かるようになっています。"
8592

8693
#:../../tutorial/errors.rst:38
8794
msgid"Exceptions"

tutorial/inputoutput.po

+59-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@
1111
# TENMYO Masakazu, 2023
1212
# 石井明久, 2024
1313
# tomo, 2024
14+
# righteous, 2025
1415
#
1516
#,fuzzy
1617
msgid ""
1718
msgstr ""
1819
"Project-Id-Version: Python 3.13\n"
1920
"Report-Msgid-Bugs-To: \n"
20-
"POT-Creation-Date: 2025-04-11 14:19+0000\n"
21+
"POT-Creation-Date: 2025-04-25 14:19+0000\n"
2122
"PO-Revision-Date: 2021-06-28 01:50+0000\n"
22-
"Last-Translator: tomo, 2024\n"
23+
"Last-Translator: righteous, 2025\n"
2324
"Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/"
2425
"ja/)\n"
2526
"MIME-Version: 1.0\n"
@@ -191,6 +192,26 @@ msgid ""
191192
">>> repr((x, y, ('spam', 'eggs')))\n"
192193
"\"(32.5, 40000, ('spam', 'eggs'))\""
193194
msgstr""
195+
">>> s = 'Hello, world.'\n"
196+
">>> str(s)\n"
197+
"'Hello, world.'\n"
198+
">>> repr(s)\n"
199+
"\"'Hello, world.'\"\n"
200+
">>> str(1/7)\n"
201+
"'0.14285714285714285'\n"
202+
">>> x = 10 * 3.25\n"
203+
">>> y = 200 * 200\n"
204+
">>> s = 'The value of x is ' + repr(x) + ', and y is ' + repr(y) + '...'\n"
205+
">>> print(s)\n"
206+
"The value of x is 32.5, and y is 40000...\n"
207+
">>> # 文字列に repr() を使うとクォートとバックスラッシュが追加される:\n"
208+
">>> hello = 'hello, world\\n'\n"
209+
">>> hellos = repr(hello)\n"
210+
">>> print(hellos)\n"
211+
"'hello, world\\n'\n"
212+
">>> # repr() の引数はどんな Python オブジェクトでも可:\n"
213+
">>> repr((x, y, ('spam', 'eggs')))\n"
214+
"\"(32.5, 40000, ('spam', 'eggs'))\""
194215

195216
#:../../tutorial/inputoutput.rst:98
196217
msgid""
@@ -463,6 +484,21 @@ msgid ""
463484
" 9 81 729\n"
464485
"10 100 1000"
465486
msgstr""
487+
">>> for x in range(1, 11):\n"
488+
"... print(repr(x).rjust(2), repr(x*x).rjust(3), end=' ')\n"
489+
"... # 上の行で end を使用していることに注意\n"
490+
"... print(repr(x*x*x).rjust(4))\n"
491+
"...\n"
492+
" 1 1 1\n"
493+
" 2 4 8\n"
494+
" 3 9 27\n"
495+
" 4 16 64\n"
496+
" 5 25 125\n"
497+
" 6 36 216\n"
498+
" 7 49 343\n"
499+
" 8 64 512\n"
500+
" 9 81 729\n"
501+
"10 100 1000"
466502

467503
#:../../tutorial/inputoutput.rst:263
468504
msgid""
@@ -640,6 +676,12 @@ msgid ""
640676
">>> f.closed\n"
641677
"True"
642678
msgstr""
679+
">>> with open('workfile', encoding=\"utf-8\") as f:\n"
680+
"... read_data = f.read()\n"
681+
"\n"
682+
">>> # ファイルが自動でクローズされたことが確認できる\n"
683+
">>> f.closed\n"
684+
"True"
643685

644686
#:../../tutorial/inputoutput.rst:365
645687
msgid""
@@ -801,6 +843,10 @@ msgid ""
801843
">>> f.write(s)\n"
802844
"18"
803845
msgstr""
846+
">>> value = ('the answer', 42)\n"
847+
">>> s = str(value) # タプルを文字列に変換\n"
848+
">>> f.write(s)\n"
849+
"18"
804850

805851
#:../../tutorial/inputoutput.rst:451
806852
msgid""
@@ -843,6 +889,17 @@ msgid ""
843889
">>> f.read(1)\n"
844890
"b'd'"
845891
msgstr""
892+
">>> f = open('workfile', 'rb+')\n"
893+
">>> f.write(b'0123456789abcdef')\n"
894+
"16\n"
895+
">>> f.seek(5) # ファイル内の6番目のバイトまで移動\n"
896+
"5\n"
897+
">>> f.read(1)\n"
898+
"b'5'\n"
899+
">>> f.seek(-3, 2) # 末尾から3番目のバイトに移動\n"
900+
"13\n"
901+
">>> f.read(1)\n"
902+
"b'd'"
846903

847904
#:../../tutorial/inputoutput.rst:474
848905
msgid""

tutorial/stdlib.po

+78-2
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88
# tomo, 2023
99
# Nozomu Kaneko <nozom.kaneko@gmail.com>, 2023
1010
# Takanori Suzuki <takanori@takanory.net>, 2024
11+
# righteous, 2025
1112
#
1213
#,fuzzy
1314
msgid ""
1415
msgstr ""
1516
"Project-Id-Version: Python 3.13\n"
1617
"Report-Msgid-Bugs-To: \n"
17-
"POT-Creation-Date: 2025-04-11 14:19+0000\n"
18+
"POT-Creation-Date: 2025-04-25 14:19+0000\n"
1819
"PO-Revision-Date: 2021-06-28 01:50+0000\n"
19-
"Last-Translator: Takanori Suzuki <takanori@takanory.net>, 2024\n"
20+
"Last-Translator: righteous, 2025\n"
2021
"Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/"
2122
"ja/)\n"
2223
"MIME-Version: 1.0\n"
@@ -50,6 +51,12 @@ msgid ""
5051
">>> os.system('mkdir today') # Run the command mkdir in the system shell\n"
5152
"0"
5253
msgstr""
54+
">>> import os\n"
55+
">>> os.getcwd() # 現在のワーキングディレクトリ\n"
56+
"C:\\\\Python313 を返す\n"
57+
">>> os.chdir('/server/accesslogs') # ワーキングディレクトリを変更\n"
58+
">>> os.system('mkdir today') # システムのシェルで mkdir コマンドを実行\n"
59+
"0"
5360

5461
#:../../tutorial/stdlib.rst:23
5562
msgid""
@@ -77,6 +84,11 @@ msgid ""
7784
">>> help(os)\n"
7885
"<returns an extensive manual page created from the module's docstrings>"
7986
msgstr""
87+
">>> import os\n"
88+
">>> dir(os)\n"
89+
"<OSモジュールの関数すべてのリストを返す>\n"
90+
">>> help(os)\n"
91+
"<モジュールの docstring から生成された詳細なマニュアルを返す>"
8092

8193
#:../../tutorial/stdlib.rst:38
8294
msgid""
@@ -280,6 +292,15 @@ msgid ""
280292
">>> random.randrange(6) # random integer chosen from range(6)\n"
281293
"4"
282294
msgstr""
295+
">>> import random\n"
296+
">>> random.choice(['apple', 'pear', 'banana'])\n"
297+
"'apple'\n"
298+
">>> random.sample(range(100), 10) # 重複なしでサンプリング\n"
299+
"[30, 83, 16, 4, 8, 81, 41, 50, 18, 33]\n"
300+
">>> random.random() # [0.0, 1.0) の区間内のランダムな float\n"
301+
"0.17970987693706186\n"
302+
">>> random.randrange(6) # range(6) からランダムに選ばれた integer\n"
303+
"4"
283304

284305
#:../../tutorial/stdlib.rst:161
285306
msgid""
@@ -346,6 +367,25 @@ msgid ""
346367
"... \"\"\")\n"
347368
">>> server.quit()"
348369
msgstr""
370+
">>> from urllib.request import urlopen\n"
371+
">>> with urlopen('http://worldtimeapi.org/api/timezone/etc/UTC.txt') as "
372+
"response:\n"
373+
"... for line in response:\n"
374+
"... line = line.decode() # str を bytes に変換\n"
375+
"... if line.startswith('datetime'):\n"
376+
"... print(line.rstrip()) # 末尾の改行を削除\n"
377+
"...\n"
378+
"datetime: 2022-01-01T01:36:47.689215+00:00\n"
379+
"\n"
380+
">>> import smtplib\n"
381+
">>> server = smtplib.SMTP('localhost')\n"
382+
">>> server.sendmail('soothsayer@example.org', 'jcaesar@example.org',\n"
383+
"... \"\"\"To: jcaesar@example.org\n"
384+
"... From: soothsayer@example.org\n"
385+
"...\n"
386+
"... Beware the Ides of March.\n"
387+
"... \"\"\")\n"
388+
">>> server.quit()"
349389

350390
#:../../tutorial/stdlib.rst:204
351391
msgid"(Note that the second example needs a mailserver running on localhost.)"
@@ -387,6 +427,19 @@ msgid ""
387427
">>> age.days\n"
388428
"14368"
389429
msgstr""
430+
">>> # 日付 (date) は容易に作成・フォーマットが可能\n"
431+
">>> from datetime import date\n"
432+
">>> now = date.today()\n"
433+
">>> now\n"
434+
"datetime.date(2003, 12, 2)\n"
435+
">>> now.strftime(\"%m-%d-%y. %d %b %Y is a %A on the %d day of %B.\")\n"
436+
"'12-02-03. 02 Dec 2003 is a Tuesday on the 02 day of December.'\n"
437+
"\n"
438+
">>> # date で日付の演算が可能\n"
439+
">>> birthday = date(1964, 7, 31)\n"
440+
">>> age = now - birthday\n"
441+
">>> age.days\n"
442+
"14368"
390443

391444
#:../../tutorial/stdlib.rst:236
392445
msgid"Data Compression"
@@ -502,6 +555,16 @@ msgid ""
502555
"import doctest\n"
503556
"doctest.testmod() # automatically validate the embedded tests"
504557
msgstr""
558+
"def average(values):\n"
559+
" \"\"\"数値のリストの算術平均を計算する。\n"
560+
"\n"
561+
" >>> print(average([20, 30, 70]))\n"
562+
" 40.0\n"
563+
" \"\"\"\n"
564+
" return sum(values) / len(values)\n"
565+
"\n"
566+
"import doctest\n"
567+
"doctest.testmod() # docstring に埋め込まれたテストを自動的に評価"
505568

506569
#:../../tutorial/stdlib.rst:306
507570
msgid""
@@ -529,6 +592,19 @@ msgid ""
529592
"\n"
530593
"unittest.main() # Calling from the command line invokes all tests"
531594
msgstr""
595+
"import unittest\n"
596+
"\n"
597+
"class TestStatisticalFunctions(unittest.TestCase):\n"
598+
"\n"
599+
" def test_average(self):\n"
600+
" self.assertEqual(average([20, 30, 70]), 40.0)\n"
601+
" self.assertEqual(round(average([1, 5, 7]), 1), 4.3)\n"
602+
" with self.assertRaises(ZeroDivisionError):\n"
603+
" average([])\n"
604+
" with self.assertRaises(TypeError):\n"
605+
" average(20, 30, 70)\n"
606+
"\n"
607+
"unittest.main() # コマンドラインからこれを呼び出すとテストがすべて実行される"
532608

533609
#:../../tutorial/stdlib.rst:328
534610
msgid"Batteries Included"

0 commit comments

Comments
 (0)
close