Skip to content

Commit dacc79f

Browse files
actions-userrosekc
authored andcommitted
Update po files by GitHub Actions
(cherry picked from commit 932e3b2)
1 parent 1f8954e commit dacc79f

File tree

5 files changed

+598
-538
lines changed

5 files changed

+598
-538
lines changed

docs/locales/zh_CN/LC_MESSAGES/api.po

+16-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Flask 2.1.x\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2021-05-25 19:31+0800\n"
11+
"POT-Creation-Date: 2021-05-30 19:27+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -242,7 +242,7 @@ msgstr ""
242242
#: werkzeug.wrappers.response.Response.get_wsgi_response
243243
#: werkzeug.wrappers.response.Response.make_conditional
244244
#: werkzeug.wrappers.response.Response.set_data
245-
msgid "Parameters"
245+
msgid "参数"
246246
msgstr ""
247247

248248
#: flask.app.Flask:66 of
@@ -453,7 +453,7 @@ msgstr ""
453453
#: werkzeug.wrappers.response.Response.make_conditional
454454
#: werkzeug.wrappers.response.Response.make_sequence
455455
#: werkzeug.wrappers.response.Response.set_data
456-
msgid "Return type"
456+
msgid "返回类型"
457457
msgstr ""
458458

459459
#: flask.app.Flask.add_template_global:1 of
@@ -1407,7 +1407,7 @@ msgstr ""
14071407
#: werkzeug.wrappers.response.Response.get_app_iter
14081408
#: werkzeug.wrappers.response.Response.get_wsgi_headers
14091409
#: werkzeug.wrappers.response.Response.get_wsgi_response
1410-
msgid "Returns"
1410+
msgid "返回"
14111411
msgstr ""
14121412

14131413
#: flask.app.Flask.process_response:10 of
@@ -5303,7 +5303,7 @@ msgid ""
53035303
msgstr ""
53045304

53055305
#: flask.json.tag.TaggedJSONSerializer.register of
5306-
msgid "Raises"
5306+
msgid "引发"
53075307
msgstr ""
53085308

53095309
#: flask.json.tag.TaggedJSONSerializer.register:11 of
@@ -6602,3 +6602,14 @@ msgid ""
66026602
"having to manually configure the application."
66036603
msgstr ""
66046604

6605+
#~ msgid "Parameters"
6606+
#~ msgstr ""
6607+
6608+
#~ msgid "Return type"
6609+
#~ msgstr ""
6610+
6611+
#~ msgid "Returns"
6612+
#~ msgstr ""
6613+
6614+
#~ msgid "Raises"
6615+
#~ msgstr ""

docs/locales/zh_CN/LC_MESSAGES/async-await.po

+32-20
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Flask 2.1.x\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2021-05-25 19:31+0800\n"
11+
"POT-Creation-Date: 2021-05-30 19:27+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: rosekc <[email protected]>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -25,18 +25,19 @@ msgstr "使用 ``async`` 和 ``await``"
2525
msgid ""
2626
"Routes, error handlers, before request, after request, and teardown "
2727
"functions can all be coroutine functions if Flask is installed with the "
28-
"``async`` extra (``pip install flask[async]``). This allows views to be "
28+
"``async`` extra (``pip install flask[async]``). It requires Python 3.7+ "
29+
"where ``contextvars.ContextVar`` is available. This allows views to be "
2930
"defined with ``async def`` and use ``await``."
3031
msgstr ""
3132
"在安装 Flask 时使用 ``async`` 额外后缀(``pip install flask[async]``)后,"
3233
"包括路由、错误处理、请求前、请求后、清理(teardown)的函数都可以使用协程函数。"
3334
"这允许视图函数使用 ``async def`` 定义,以及使用 ``await``。"
3435

35-
#: ../../async-await.rst:20
36+
#: ../../async-await.rst:21
3637
msgid "Using ``async`` on Windows on Python 3.8"
3738
msgstr "在 Windows,Python 3.8 环境下使用 ``async``"
3839

39-
#: ../../async-await.rst:22
40+
#: ../../async-await.rst:23
4041
msgid ""
4142
"Python 3.8 has a bug related to asyncio on Windows. If you encounter "
4243
"something like ``ValueError: set_wakeup_fd only works in main thread``, "
@@ -46,11 +47,11 @@ msgstr ""
4647
"类似 ``ValueError: set_wakeup_fd only works in main thread`` 的信息,"
4748
"请更新到 Python 3.9。"
4849

49-
#: ../../async-await.rst:28
50+
#: ../../async-await.rst:29
5051
msgid "Performance"
5152
msgstr "性能"
5253

53-
#: ../../async-await.rst:30
54+
#: ../../async-await.rst:31
5455
msgid ""
5556
"Async functions require an event loop to run. Flask, as a WSGI "
5657
"application, uses one worker to handle one request/response cycle. When a"
@@ -61,7 +62,7 @@ msgstr ""
6162
"请求/响应循环。当请求进入一个异步视图函数时,Flask 将在一个线程中启动一个事件"
6263
"循环,在这个事件循环中执行视图函数,然后返回结果。"
6364

64-
#: ../../async-await.rst:35
65+
#: ../../async-await.rst:36
6566
msgid ""
6667
"Each request still ties up one worker, even for async views. The upside "
6768
"is that you can run async code within a view, for example to make "
@@ -73,7 +74,7 @@ msgstr ""
7374
"视图函数中可以执行异步代码,例如多个并行的数据库查询,HTTP请求外部API等等。"
7475
"然而,同一时间应用本身能接受的请求数量不会改变。"
7576

76-
#: ../../async-await.rst:41
77+
#: ../../async-await.rst:42
7778
msgid ""
7879
"**Async is not inherently faster than sync code.** Async is beneficial "
7980
"when performing concurrent IO-bound tasks, but will probably not improve "
@@ -85,11 +86,11 @@ msgstr ""
8586
"则不然。传统的 Flask 视图函数在大多数情况下是合适的选择,而 Flask 对异步的支持让"
8687
"运行和使用协程代码成为可能,这是以前原生环境无法做到的。"
8788

88-
#: ../../async-await.rst:49
89+
#: ../../async-await.rst:50
8990
msgid "Background tasks"
9091
msgstr "后台任务"
9192

92-
#: ../../async-await.rst:51
93+
#: ../../async-await.rst:52
9394
msgid ""
9495
"Async functions will run in an event loop until they complete, at which "
9596
"stage the event loop will stop. This means any additional spawned tasks "
@@ -101,7 +102,7 @@ msgstr ""
101102
"这意味着异步函数完成的时候,所有尚未完成的其他衍生任务都将被取消。因此,不能使用"
102103
"类似 ``asyncio.create_task`` 的方法来创建后台任务。"
103104

104-
#: ../../async-await.rst:57
105+
#: ../../async-await.rst:58
105106
msgid ""
106107
"If you wish to use background tasks it is best to use a task queue to "
107108
"trigger background work, rather than spawn tasks in a view function. With"
@@ -115,11 +116,11 @@ msgstr ""
115116
" :ref:`asgi` 提到的使用 asgiref 中的 WsgiToAsgi 适配器。这种做法与适配器"
116117
"创建了一个持续运行的事件循环类似。"
117118

118-
#: ../../async-await.rst:66
119+
#: ../../async-await.rst:67
119120
msgid "When to use Quart instead"
120121
msgstr "何时使用 Quart 作为替代品"
121122

122-
#: ../../async-await.rst:68
123+
#: ../../async-await.rst:69
123124
msgid ""
124125
"Flask's async support is less performant than async-first frameworks due "
125126
"to the way it is implemented. If you have a mainly async codebase it "
@@ -133,7 +134,7 @@ msgstr ""
133134
"的 Flask 重新实现版本(而 Flask 是基于 WSGI 的)。这让多并行请求,长时间运行"
134135
"的请求,以及 websockets 编程不再需要多个工作进程或线程。"
135136

136-
#: ../../async-await.rst:75
137+
#: ../../async-await.rst:76
137138
msgid ""
138139
"It has also already been possible to run Flask with Gevent or Eventlet to"
139140
" get many of the benefits of async request handling. These libraries "
@@ -147,11 +148,11 @@ msgstr ""
147148
"使用了现代标准 Python 的特性。决定是否应使用 Flask,Quart 或其他工具最终取决于"
148149
"了解项目的特定需求。"
149150

150-
#: ../../async-await.rst:87
151+
#: ../../async-await.rst:88
151152
msgid "Extensions"
152153
msgstr "扩展"
153154

154-
#: ../../async-await.rst:89
155+
#: ../../async-await.rst:90
155156
msgid ""
156157
"Flask extensions predating Flask's async support do not expect async "
157158
"views. If they provide decorators to add functionality to views, those "
@@ -165,7 +166,7 @@ msgstr ""
165166
"异步可等待(awaitable)的,可能在异步视图函数上不能正常运行。扩展提供的其他函数或许"
166167
"同样不是异步可等待的,在异步视图函数调用的时候大概会阻塞。"
167168

168-
#: ../../async-await.rst:95
169+
#: ../../async-await.rst:96
169170
msgid ""
170171
"Extension authors can support async functions by utilising the "
171172
":meth:`flask.Flask.ensure_sync` method. For example, if the extension "
@@ -175,22 +176,33 @@ msgstr ""
175176
"扩展作者可以通过使用 :meth:`flask.Flask.ensure_sync` 方法来支持异步函数。"
176177
"举例来说,如果扩展提供了一个视图函数装饰器,使用 ``ensure_sync`` 调用被包裹的函数。"
177178

178-
#: ../../async-await.rst:110
179+
#: ../../async-await.rst:111
179180
msgid ""
180181
"Check the changelog of the extension you want to use to see if they've "
181182
"implemented async support, or make a feature request or PR to them."
182183
msgstr ""
183184
"检查扩展的更新记录,查看是否实现了异步支持。如果没有可以向他们提交 PR。"
184185

185-
#: ../../async-await.rst:115
186+
#: ../../async-await.rst:116
186187
msgid "Other event loops"
187188
msgstr "其他事件循环"
188189

189-
#: ../../async-await.rst:117
190+
#: ../../async-await.rst:118
190191
msgid ""
191192
"At the moment Flask only supports :mod:`asyncio`. It's possible to "
192193
"override :meth:`flask.Flask.ensure_sync` to change how async functions "
193194
"are wrapped to use a different library."
194195
msgstr ""
196+
195197
"当前 Flask 只支持 :mod:`asyncio`。覆盖 :meth:`flask.Flask.ensure_sync` "
196198
"可以修改包裹异步函数的实现,以使用其他库。"
199+
200+
#~ msgid ""
201+
#~ "Routes, error handlers, before request, "
202+
#~ "after request, and teardown functions "
203+
#~ "can all be coroutine functions if "
204+
#~ "Flask is installed with the ``async``"
205+
#~ " extra (``pip install flask[async]``). This"
206+
#~ " allows views to be defined with "
207+
#~ "``async def`` and use ``await``."
208+
#~ msgstr ""

0 commit comments

Comments
 (0)