Skip to content

Commit a211abc

Browse files
[po] auto sync
1 parent b0bed1d commit a211abc

File tree

14 files changed

+262
-102
lines changed

14 files changed

+262
-102
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "98.70%", "updated_at": "2026-03-27T16:31:29Z"}
1+
{"translation": "98.73%", "updated_at": "2026-03-28T00:57:05Z"}

library/asyncio-subprocess.po

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ msgid ""
1313
msgstr ""
1414
"Project-Id-Version: Python 3.14\n"
1515
"Report-Msgid-Bugs-To: \n"
16-
"POT-Creation-Date: 2026-03-23 14:50+0000\n"
16+
"POT-Creation-Date: 2026-03-27 14:44+0000\n"
1717
"PO-Revision-Date: 2025-09-16 00:00+0000\n"
1818
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2026\n"
1919
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -600,6 +600,28 @@ msgid ""
600600
"date = asyncio.run(get_date())\n"
601601
"print(f\"Current date: {date}\")"
602602
msgstr ""
603+
"import asyncio\n"
604+
"import sys\n"
605+
"\n"
606+
"async def get_date():\n"
607+
" code = 'import datetime as dt; print(dt.datetime.now())'\n"
608+
"\n"
609+
" # 创建子进程;重定向标准输出\n"
610+
" # 至一个管道。\n"
611+
" proc = await asyncio.create_subprocess_exec(\n"
612+
" sys.executable, '-c', code,\n"
613+
" stdout=asyncio.subprocess.PIPE)\n"
614+
"\n"
615+
" # 读取一行输出。\n"
616+
" data = await proc.stdout.readline()\n"
617+
" line = data.decode('ascii').rstrip()\n"
618+
"\n"
619+
" # 等待子进程退出。\n"
620+
" await proc.wait()\n"
621+
" return line\n"
622+
"\n"
623+
"date = asyncio.run(get_date())\n"
624+
"print(f\"Current date: {date}\")"
603625

604626
#: ../../library/asyncio-subprocess.rst:382
605627
msgid ""

library/plistlib.po

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
# Translators:
77
# python-doc bot, 2025
88
# 99 <wh2099@pm.me>, 2026
9+
# Freesand Leo <yuqinju@163.com>, 2026
910
#
1011
#, fuzzy
1112
msgid ""
1213
msgstr ""
1314
"Project-Id-Version: Python 3.14\n"
1415
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2026-03-23 14:50+0000\n"
16+
"POT-Creation-Date: 2026-03-27 14:44+0000\n"
1617
"PO-Revision-Date: 2025-09-16 00:01+0000\n"
17-
"Last-Translator: 99 <wh2099@pm.me>, 2026\n"
18+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2026\n"
1819
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1920
"MIME-Version: 1.0\n"
2021
"Content-Type: text/plain; charset=UTF-8\n"
@@ -295,6 +296,25 @@ msgid ""
295296
")\n"
296297
"print(plistlib.dumps(pl).decode())"
297298
msgstr ""
299+
"import datetime as dt\n"
300+
"import plistlib\n"
301+
"\n"
302+
"pl = dict(\n"
303+
" aString = \"Doodah\",\n"
304+
" aList = [\"A\", \"B\", 12, 32.1, [1, 2, 3]],\n"
305+
" aFloat = 0.1,\n"
306+
" anInt = 728,\n"
307+
" aDict = dict(\n"
308+
" anotherString = \"<hello & hi there!>\",\n"
309+
" aThirdString = \"M\\xe4ssig, Ma\\xdf\",\n"
310+
" aTrueValue = True,\n"
311+
" aFalseValue = False,\n"
312+
" ),\n"
313+
" someData = b\"<binary gunk>\",\n"
314+
" someMoreData = b\"<lots of binary gunk>\" * 10,\n"
315+
" aDate = dt.datetime.now()\n"
316+
")\n"
317+
"print(plistlib.dumps(pl).decode())"
298318

299319
#: ../../library/plistlib.rst:207
300320
msgid "Parsing a plist::"

library/sqlite3.po

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ msgid ""
1313
msgstr ""
1414
"Project-Id-Version: Python 3.14\n"
1515
"Report-Msgid-Bugs-To: \n"
16-
"POT-Creation-Date: 2026-03-23 14:50+0000\n"
16+
"POT-Creation-Date: 2026-03-27 14:44+0000\n"
1717
"PO-Revision-Date: 2025-09-16 00:01+0000\n"
1818
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2026\n"
1919
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -3340,6 +3340,40 @@ msgid ""
33403340
"sqlite3.register_converter(\"datetime\", convert_datetime)\n"
33413341
"sqlite3.register_converter(\"timestamp\", convert_timestamp)"
33423342
msgstr ""
3343+
"import datetime as dt\n"
3344+
"import sqlite3\n"
3345+
"\n"
3346+
"def adapt_date_iso(val):\n"
3347+
" \"\"\"Adapt datetime.date to ISO 8601 date.\"\"\"\n"
3348+
" return val.isoformat()\n"
3349+
"\n"
3350+
"def adapt_datetime_iso(val):\n"
3351+
" \"\"\"Adapt datetime.datetime to timezone-naive ISO 8601 date.\"\"\"\n"
3352+
" return val.replace(tzinfo=None).isoformat()\n"
3353+
"\n"
3354+
"def adapt_datetime_epoch(val):\n"
3355+
" \"\"\"Adapt datetime.datetime to Unix timestamp.\"\"\"\n"
3356+
" return int(val.timestamp())\n"
3357+
"\n"
3358+
"sqlite3.register_adapter(dt.date, adapt_date_iso)\n"
3359+
"sqlite3.register_adapter(dt.datetime, adapt_datetime_iso)\n"
3360+
"sqlite3.register_adapter(dt.datetime, adapt_datetime_epoch)\n"
3361+
"\n"
3362+
"def convert_date(val):\n"
3363+
" \"\"\"Convert ISO 8601 date to datetime.date object.\"\"\"\n"
3364+
" return dt.date.fromisoformat(val.decode())\n"
3365+
"\n"
3366+
"def convert_datetime(val):\n"
3367+
" \"\"\"Convert ISO 8601 datetime to datetime.datetime object.\"\"\"\n"
3368+
" return dt.datetime.fromisoformat(val.decode())\n"
3369+
"\n"
3370+
"def convert_timestamp(val):\n"
3371+
" \"\"\"Convert Unix epoch timestamp to datetime.datetime object.\"\"\"\n"
3372+
" return dt.datetime.fromtimestamp(int(val))\n"
3373+
"\n"
3374+
"sqlite3.register_converter(\"date\", convert_date)\n"
3375+
"sqlite3.register_converter(\"datetime\", convert_datetime)\n"
3376+
"sqlite3.register_converter(\"timestamp\", convert_timestamp)"
33433377

33443378
#: ../../library/sqlite3.rst:2349
33453379
msgid "How to use connection shortcut methods"

0 commit comments

Comments
 (0)