|
@@ -7,8 +7,8 @@ msgid ""
|
|
|
msgstr ""
|
|
|
"Project-Id-Version: PyWebIO 1.1.0\n"
|
|
|
"Report-Msgid-Bugs-To: \n"
|
|
|
-"POT-Creation-Date: 2021-04-14 21:12+0800\n"
|
|
|
-"PO-Revision-Date: 2021-04-14 21:32+0800\n"
|
|
|
+"POT-Creation-Date: 2021-05-29 14:26+0800\n"
|
|
|
+"PO-Revision-Date: 2021-05-29 14:45+0800\n"
|
|
|
"Last-Translator: WangWeimin <wang0.618@qq.com>\n"
|
|
|
"Language: zh_CN\n"
|
|
|
"Language-Team: \n"
|
|
@@ -123,7 +123,7 @@ msgstr ""
|
|
|
"<port>/static/A/B.jpg``。"
|
|
|
|
|
|
#: of pywebio.platform.path_deploy.path_deploy:16
|
|
|
-#: pywebio.platform.tornado.start_server:31
|
|
|
+#: pywebio.platform.tornado.start_server:43
|
|
|
msgid ""
|
|
|
"The client can reconnect to server within ``reconnect_timeout`` seconds after an "
|
|
|
"unexpected disconnection. If set to 0 (default), once the client disconnects, the "
|
|
@@ -178,27 +178,44 @@ msgstr ""
|
|
|
"``webio_handler()`` 和 ``webio_view()`` 函数用于将PyWebIO应用整合到现有的Python Web"
|
|
|
"项目中。"
|
|
|
|
|
|
-#: of pywebio.platform:29
|
|
|
+#: of pywebio.platform:27
|
|
|
+msgid ""
|
|
|
+"The ``wsgi_app()`` and ``asgi_app()`` is used to get the WSGI or ASGI app for "
|
|
|
+"running PyWebIO applications. This is helpful when you don't want to start server "
|
|
|
+"with the Web framework built-in's. For example, you want to use other WSGI server, "
|
|
|
+"or you are deploying app in a cloud environment. Note that only Flask, Django and "
|
|
|
+"FastApi backend support it."
|
|
|
+msgstr ""
|
|
|
+"``wsgi_app()`` 和 ``asgi_app()`` 用于获取运行PyWebIO应用的 WSGI 或 ASGI app。很适合"
|
|
|
+"当你不想使用Web框架内置的server来启动服务的情况。比如,你想使用其他WSGI server来启"
|
|
|
+"动应用,或者你正在将应用部署到一些云环境中。目前仅在Flask、Django 和 FastApi后端中"
|
|
|
+"支持 ``wsgi_app()`` / ``asgi_app()``"
|
|
|
+
|
|
|
+#: of pywebio.platform:34
|
|
|
msgid ""
|
|
|
"Added the ``cdn`` parameter in ``start_server()``, ``webio_handler()`` and "
|
|
|
"``webio_view()``."
|
|
|
msgstr ""
|
|
|
|
|
|
-#: of pywebio.platform:33
|
|
|
+#: of pywebio.platform:38
|
|
|
msgid "Added the ``static_dir`` parameter in ``start_server()``."
|
|
|
msgstr ""
|
|
|
|
|
|
-#: of pywebio.platform:36
|
|
|
+#: of pywebio.platform:42
|
|
|
+msgid "Added the ``wsgi_app()`` and ``asgi_app()``."
|
|
|
+msgstr ""
|
|
|
+
|
|
|
+#: of pywebio.platform:45
|
|
|
msgid "Tornado support"
|
|
|
msgstr "Tornado相关"
|
|
|
|
|
|
-#: of pywebio.platform:38
|
|
|
+#: of pywebio.platform:47
|
|
|
msgid ""
|
|
|
"There are two protocols (WebSocket and HTTP) can be used to communicates with the "
|
|
|
"browser:"
|
|
|
msgstr "服务端可以通过两种协议(WebSocket 和 HTTP)来与用户浏览器通信。"
|
|
|
|
|
|
-#: of pywebio.platform:41
|
|
|
+#: of pywebio.platform:50
|
|
|
msgid "WebSocket"
|
|
|
msgstr ""
|
|
|
|
|
@@ -314,7 +331,60 @@ msgstr ""
|
|
|
"例如 ``http_static_dir`` 路径下存在文件 ``A/B.jpg`` ,则其URL为 ``http://<host>:"
|
|
|
"<port>/static/A/B.jpg``。"
|
|
|
|
|
|
-#: of pywebio.platform.tornado.start_server:33
|
|
|
+#: of pywebio.platform.tornado.start_server:31
|
|
|
+msgid ""
|
|
|
+"Whether to enable remote access, when enabled, you can get a temporary public "
|
|
|
+"network access address for the current application, others can access your "
|
|
|
+"application via this address. Using remote access makes it easy to temporarily "
|
|
|
+"share the application with others. The remote access service is provided by "
|
|
|
+"`localhost.run <https://localhost.run/>`_. You can use a dict to config remote "
|
|
|
+"access service, the following configurations are currently supported: - "
|
|
|
+"``ssh_key_path``: Use a custom ssh key, the default key path is ``~/.ssh/id_xxx``. "
|
|
|
+"Note that only rsa and ed25519 keys are supported. - ``custom_domain``: Use a "
|
|
|
+"custom domain for your remote access address. This need a subscription to "
|
|
|
+"localhost.run. See also: `Custom Domains - localhost.run <https://localhost.run/"
|
|
|
+"docs/custom-domains/>`_"
|
|
|
+msgstr ""
|
|
|
+
|
|
|
+#: of pywebio.platform.tornado.start_server:31
|
|
|
+msgid ""
|
|
|
+"Whether to enable remote access, when enabled, you can get a temporary public "
|
|
|
+"network access address for the current application, others can access your "
|
|
|
+"application via this address. Using remote access makes it easy to temporarily "
|
|
|
+"share the application with others. The remote access service is provided by "
|
|
|
+"`localhost.run <https://localhost.run/>`_. You can use a dict to config remote "
|
|
|
+"access service, the following configurations are currently supported:"
|
|
|
+msgstr ""
|
|
|
+"是否开启远程接入的功能。开启后,你将得到一个你当前应用的临时公网访问地址,其他人可"
|
|
|
+"以通过此地址访问你的应用。使用远程接入可以很方便地将应用临时分享给其他人来体验。目"
|
|
|
+"前远程接入功能由 `localhost.run <https://localhost.run/>`_ 提供,你可以传入一个dict"
|
|
|
+"来配置远程接入服务,目前支持以下配置:"
|
|
|
+
|
|
|
+#: of pywebio.platform.tornado.start_server:38
|
|
|
+msgid ""
|
|
|
+"``ssh_key_path``: Use a custom ssh key, the default key path is ``~/.ssh/id_xxx``. "
|
|
|
+"Note that only rsa and ed25519 keys are supported."
|
|
|
+msgstr ""
|
|
|
+"``ssh_key_path``: 自定义ssh密钥的路径, 默认使用 ``~/.ssh/id_xxx``. 注意目前仅支持"
|
|
|
+"rsa 和 ed25519 类型的密钥。"
|
|
|
+
|
|
|
+#: of pywebio.platform.tornado.start_server:39
|
|
|
+msgid ""
|
|
|
+"``custom_domain``: Use a custom domain for your remote access address. This need a "
|
|
|
+"subscription to localhost.run. See also: `Custom Domains - localhost.run <https://"
|
|
|
+"localhost.run/docs/custom-domains/>`_"
|
|
|
+msgstr ""
|
|
|
+"``custom_domain``: 使用自定义域名。这项功能需要localhost.run订阅版。参见: `Custom "
|
|
|
+"Domains - localhost.run <https://localhost.run/docs/custom-domains/>`_"
|
|
|
+
|
|
|
+#: of pywebio.platform.tornado.start_server:42
|
|
|
+#: pywebio.platform.tornado.start_server:60
|
|
|
+msgid ""
|
|
|
+"Whether or not auto open web browser when server is started (if the operating "
|
|
|
+"system allows it) ."
|
|
|
+msgstr "当服务启动后,是否自动打开浏览器来访问服务。(该操作需要操作系统支持)"
|
|
|
+
|
|
|
+#: of pywebio.platform.tornado.start_server:45
|
|
|
msgid ""
|
|
|
"The allowed request source list. (The current server host is always allowed) The "
|
|
|
"source contains the protocol, domain name, and port part. Can use Unix shell-style "
|
|
@@ -324,7 +394,7 @@ msgid ""
|
|
|
"detail, see `Python Doc <https://docs.python.org/zh-tw/3/library/fnmatch.html>`_"
|
|
|
msgstr ""
|
|
|
|
|
|
-#: of pywebio.platform.tornado.start_server:33
|
|
|
+#: of pywebio.platform.tornado.start_server:45
|
|
|
msgid ""
|
|
|
"The allowed request source list. (The current server host is always allowed) The "
|
|
|
"source contains the protocol, domain name, and port part. Can use Unix shell-style "
|
|
@@ -333,34 +403,34 @@ msgstr ""
|
|
|
"除当前域名外,服务器还允许的请求的来源列表。来源包含协议、域名和端口部分,允许使用 "
|
|
|
"Unix shell 风格的匹配模式:"
|
|
|
|
|
|
-#: of pywebio.platform.tornado.start_server:37
|
|
|
+#: of pywebio.platform.tornado.start_server:49
|
|
|
msgid "``*`` matches everything"
|
|
|
msgstr "``*`` 为通配符"
|
|
|
|
|
|
-#: of pywebio.platform.tornado.start_server:38
|
|
|
+#: of pywebio.platform.tornado.start_server:50
|
|
|
msgid "``?`` matches any single character"
|
|
|
msgstr "``?`` 匹配单个字符"
|
|
|
|
|
|
-#: of pywebio.platform.tornado.start_server:39
|
|
|
+#: of pywebio.platform.tornado.start_server:51
|
|
|
msgid "``[seq]`` matches any character in *seq*"
|
|
|
msgstr "``[seq]`` 匹配seq中的任何字符"
|
|
|
|
|
|
-#: of pywebio.platform.tornado.start_server:40
|
|
|
+#: of pywebio.platform.tornado.start_server:52
|
|
|
msgid "``[!seq]`` matches any character not in *seq*"
|
|
|
msgstr "``[!seq]`` 匹配任何不在seq中的字符"
|
|
|
|
|
|
-#: of pywebio.platform.tornado.start_server:42
|
|
|
+#: of pywebio.platform.tornado.start_server:54
|
|
|
msgid "Such as: ``https://*.example.com`` 、 ``*://*.example.com``"
|
|
|
msgstr "比如 ``https://*.example.com`` 、 ``*://*.example.com``"
|
|
|
|
|
|
-#: of pywebio.platform.tornado.start_server:44
|
|
|
+#: of pywebio.platform.tornado.start_server:56
|
|
|
msgid ""
|
|
|
"For detail, see `Python Doc <https://docs.python.org/zh-tw/3/library/fnmatch."
|
|
|
"html>`_"
|
|
|
msgstr ""
|
|
|
"全部规则参见 `Python文档 <https://docs.python.org/zh-tw/3/library/fnmatch.html>`_ "
|
|
|
|
|
|
-#: of pywebio.platform.tornado.start_server:45
|
|
|
+#: of pywebio.platform.tornado.start_server:57
|
|
|
msgid ""
|
|
|
"The validation function for request source. It receives the source string (which "
|
|
|
"contains protocol, host, and port parts) as parameter and return ``True/False`` to "
|
|
@@ -371,13 +441,7 @@ msgstr ""
|
|
|
"返回 ``True/False`` 指示服务器接受/拒绝该请求。若设置了 ``check_origin`` , "
|
|
|
"``allowed_origins`` 参数将被忽略"
|
|
|
|
|
|
-#: of pywebio.platform.tornado.start_server:48
|
|
|
-msgid ""
|
|
|
-"Whether or not auto open web browser when server is started (if the operating "
|
|
|
-"system allows it) ."
|
|
|
-msgstr "当服务启动后,是否自动打开浏览器来访问服务。(该操作需要操作系统支持)"
|
|
|
-
|
|
|
-#: of pywebio.platform.tornado.start_server:49
|
|
|
+#: of pywebio.platform.tornado.start_server:61
|
|
|
msgid ""
|
|
|
"Max size of a websocket message which Tornado can accept. Messages larger than the "
|
|
|
"``max_payload_size`` (default 200MB) will not be accepted. ``max_payload_size`` "
|
|
@@ -389,7 +453,7 @@ msgstr ""
|
|
|
"200MB) 的消息会被拒绝接受。 ``max_payload_size`` 可以是整形表示的字节数或以 `K` / "
|
|
|
"`M` / `G` 结尾的字符串,比如: ``500``, ``'40K'``, ``'3M'`` "
|
|
|
|
|
|
-#: of pywebio.platform.tornado.start_server:54
|
|
|
+#: of pywebio.platform.tornado.start_server:66
|
|
|
msgid ""
|
|
|
"Additional keyword arguments passed to the constructor of ``tornado.web."
|
|
|
"Application``. For details, please refer: https://www.tornadoweb.org/en/stable/web."
|
|
@@ -414,7 +478,7 @@ msgid ""
|
|
|
msgstr ""
|
|
|
"关于各参数的详细说明见 :func:`pywebio.platform.tornado.start_server` 的同名参数。"
|
|
|
|
|
|
-#: of pywebio.platform:47
|
|
|
+#: of pywebio.platform:56
|
|
|
msgid "HTTP"
|
|
|
msgstr ""
|
|
|
|
|
@@ -466,11 +530,11 @@ msgstr ""
|
|
|
"关于各参数的详细说明见 :func:`pywebio.platform.tornado_http.start_server` 的同名参"
|
|
|
"数。"
|
|
|
|
|
|
-#: of pywebio.platform:54
|
|
|
+#: of pywebio.platform:63
|
|
|
msgid "Flask support"
|
|
|
msgstr ""
|
|
|
|
|
|
-#: of pywebio.platform:56
|
|
|
+#: of pywebio.platform:65
|
|
|
msgid ""
|
|
|
"When using the Flask as PyWebIO backend server, you need to install Flask by "
|
|
|
"yourself and make sure the version is not less than ``0.10``. You can install it "
|
|
@@ -480,7 +544,7 @@ msgstr ""
|
|
|
"``0.10`` 。\n"
|
|
|
"可通过以下命令安装::"
|
|
|
|
|
|
-#: of pywebio.platform:59
|
|
|
+#: of pywebio.platform:68
|
|
|
msgid "pip3 install -U flask>=0.10"
|
|
|
msgstr ""
|
|
|
|
|
@@ -497,6 +561,17 @@ msgid ""
|
|
|
msgstr ""
|
|
|
"关于各参数的详细说明见 :func:`pywebio.platform.flask.start_server` 的同名参数。"
|
|
|
|
|
|
+#: of pywebio.platform.flask.wsgi_app:1
|
|
|
+msgid "Get the Flask WSGI app for running PyWebIO applications."
|
|
|
+msgstr "将PyWebIO应用转换为Flask WSGI 应用"
|
|
|
+
|
|
|
+#: of pywebio.platform.flask.wsgi_app:3
|
|
|
+msgid ""
|
|
|
+"The arguments of ``wsgi_app()`` have the same meaning as for :func:`pywebio."
|
|
|
+"platform.flask.start_server`"
|
|
|
+msgstr ""
|
|
|
+"关于各参数的详细说明见 :func:`pywebio.platform.flask.start_server` 的同名参数。"
|
|
|
+
|
|
|
#: of pywebio.platform.flask.start_server:1
|
|
|
msgid "Start a Flask server to provide the PyWebIO application as a web service."
|
|
|
msgstr "启动一个 Flask server 将PyWebIO应用作为Web服务提供。"
|
|
@@ -542,11 +617,11 @@ msgid ""
|
|
|
msgstr ""
|
|
|
"关于各参数的详细说明见 :func:`pywebio.platform.tornado.start_server` 的同名参数"
|
|
|
|
|
|
-#: of pywebio.platform:66
|
|
|
+#: of pywebio.platform:76
|
|
|
msgid "Django support"
|
|
|
msgstr ""
|
|
|
|
|
|
-#: of pywebio.platform:68
|
|
|
+#: of pywebio.platform:78
|
|
|
msgid ""
|
|
|
"When using the Django as PyWebIO backend server, you need to install Django by "
|
|
|
"yourself and make sure the version is not less than ``2.2``. You can install it "
|
|
@@ -556,7 +631,7 @@ msgstr ""
|
|
|
"``2.2`` 。\n"
|
|
|
"可通过以下命令安装::"
|
|
|
|
|
|
-#: of pywebio.platform:71
|
|
|
+#: of pywebio.platform:81
|
|
|
msgid "pip3 install -U django>=2.2"
|
|
|
msgstr ""
|
|
|
|
|
@@ -573,6 +648,17 @@ msgid ""
|
|
|
msgstr ""
|
|
|
"关于各参数的详细说明见 :func:`pywebio.platform.flask.webio_view` 的同名参数。"
|
|
|
|
|
|
+#: of pywebio.platform.django.wsgi_app:1
|
|
|
+msgid "Get the Django WSGI app for running PyWebIO applications."
|
|
|
+msgstr "将PyWebIO应用转换为Django WSGI 应用"
|
|
|
+
|
|
|
+#: of pywebio.platform.django.wsgi_app:3
|
|
|
+msgid ""
|
|
|
+"The arguments of ``wsgi_app()`` have the same meaning as for :func:`pywebio."
|
|
|
+"platform.django.start_server`"
|
|
|
+msgstr ""
|
|
|
+"关于各参数的详细说明见 :func:`pywebio.platform.django.start_server` 的同名参数。"
|
|
|
+
|
|
|
#: of pywebio.platform.django.start_server:1
|
|
|
msgid "Start a Django server to provide the PyWebIO application as a web service."
|
|
|
msgstr "启动一个 Django server 将PyWebIO应用作为Web服务提供。"
|
|
@@ -603,11 +689,11 @@ msgid ""
|
|
|
msgstr ""
|
|
|
"剩余参数的详细说明见 :func:`pywebio.platform.flask.start_server` 的同名参数。"
|
|
|
|
|
|
-#: of pywebio.platform:77
|
|
|
+#: of pywebio.platform:88
|
|
|
msgid "aiohttp support"
|
|
|
msgstr ""
|
|
|
|
|
|
-#: of pywebio.platform:79
|
|
|
+#: of pywebio.platform:90
|
|
|
msgid ""
|
|
|
"When using the aiohttp as PyWebIO backend server, you need to install aiohttp by "
|
|
|
"yourself and make sure the version is not less than ``3.1``. You can install it "
|
|
@@ -617,7 +703,7 @@ msgstr ""
|
|
|
"``3.1`` 。\n"
|
|
|
"可通过以下命令安装::"
|
|
|
|
|
|
-#: of pywebio.platform:82
|
|
|
+#: of pywebio.platform:93
|
|
|
msgid "pip3 install -U aiohttp>=3.1"
|
|
|
msgstr ""
|
|
|
|
|
@@ -639,7 +725,8 @@ msgstr ""
|
|
|
"关于 ``applications`` 、 ``allowed_origins`` 、 ``check_origin`` 参数的详细说明见 :"
|
|
|
"func:`pywebio.platform.aiohttp.start_server` 的同名参数。"
|
|
|
|
|
|
-#: of pywebio.platform.aiohttp.webio_handler pywebio.platform.fastapi.webio_routes
|
|
|
+#: of pywebio.platform.aiohttp.webio_handler pywebio.platform.fastapi.asgi_app
|
|
|
+#: pywebio.platform.fastapi.webio_routes
|
|
|
msgid "Returns"
|
|
|
msgstr ""
|
|
|
|
|
@@ -669,11 +756,11 @@ msgstr ""
|
|
|
"需要传给 aiohttp Application 的参数。可用参数见 https://docs.aiohttp.org/en/stable/"
|
|
|
"web_reference.html#application"
|
|
|
|
|
|
-#: of pywebio.platform:88
|
|
|
+#: of pywebio.platform:99
|
|
|
msgid "FastAPI/Starlette support"
|
|
|
msgstr ""
|
|
|
|
|
|
-#: of pywebio.platform:90
|
|
|
+#: of pywebio.platform:101
|
|
|
msgid ""
|
|
|
"When using the FastAPI/Starlette as PyWebIO backend server, you need to install "
|
|
|
"``fastapi`` or ``starlette`` by yourself. Also other dependency packages are "
|
|
@@ -682,7 +769,7 @@ msgstr ""
|
|
|
"当使用FastAPI/Starlette作为PyWebIO的后端server时,你需要手动安装 ``fastapi`` 或 "
|
|
|
"``starlette`` ,另外还需要安装一些其他的依赖库,可以使用以下命令安装::"
|
|
|
|
|
|
-#: of pywebio.platform:93
|
|
|
+#: of pywebio.platform:104
|
|
|
msgid "pip3 install -U fastapi starlette uvicorn aiofiles websockets"
|
|
|
msgstr ""
|
|
|
|
|
@@ -705,6 +792,40 @@ msgstr ""
|
|
|
msgid "FastAPI/Starlette routes"
|
|
|
msgstr ""
|
|
|
|
|
|
+#: of pywebio.platform.fastapi.asgi_app:1
|
|
|
+msgid "Get the starlette/Fastapi ASGI app for running PyWebIO applications."
|
|
|
+msgstr "将PyWebIO应用转换为starlette/Fastapi ASGI应用"
|
|
|
+
|
|
|
+#: of pywebio.platform.fastapi.asgi_app:3
|
|
|
+msgid ""
|
|
|
+"Use :func:`pywebio.platform.fastapi.webio_routes` if you prefer handling static "
|
|
|
+"files yourself. same arguments for :func:`pywebio.platform.fastapi.webio_routes`"
|
|
|
+msgstr ""
|
|
|
+
|
|
|
+#: of pywebio.platform.fastapi.asgi_app
|
|
|
+msgid "Example"
|
|
|
+msgstr ""
|
|
|
+
|
|
|
+#: of pywebio.platform.fastapi.asgi_app:8
|
|
|
+msgid ""
|
|
|
+"To be used with ``FastAPI.mount()`` to include pywebio as a subapp into an "
|
|
|
+"existing Starlette/FastAPI application::"
|
|
|
+msgstr ""
|
|
|
+
|
|
|
+#: of pywebio.platform.fastapi.asgi_app:10
|
|
|
+msgid ""
|
|
|
+"from fastapi import FastAPI\n"
|
|
|
+"from pywebio.platform.fastapi import asgi_app\n"
|
|
|
+"from pywebio.output import put_text\n"
|
|
|
+"app = FastAPI()\n"
|
|
|
+"subapp = asgi_app(lambda: put_text(\"hello from pywebio\"))\n"
|
|
|
+"app.mount(\"/pywebio\", subapp)"
|
|
|
+msgstr ""
|
|
|
+
|
|
|
+#: of pywebio.platform.fastapi.asgi_app:17
|
|
|
+msgid "Starlette/Fastapi ASGI app"
|
|
|
+msgstr ""
|
|
|
+
|
|
|
#: of pywebio.platform.fastapi.start_server:1
|
|
|
msgid ""
|
|
|
"Start a FastAPI/Starlette server using uvicorn to provide the PyWebIO application "
|
|
@@ -723,7 +844,7 @@ msgstr ""
|
|
|
"传递给 ``uvicorn.run()`` 的额外关键字参数\n"
|
|
|
"可设置项参考: https://www.uvicorn.org/settings/"
|
|
|
|
|
|
-#: of pywebio.platform:99
|
|
|
+#: of pywebio.platform:111
|
|
|
msgid "Other"
|
|
|
msgstr "其他"
|
|
|
|
|
@@ -894,3 +1015,6 @@ msgstr ""
|
|
|
#~ "``websocket_ping_timeout`` 秒\n"
|
|
|
#~ "内收到'pong'消息,应用会将连接关闭。默认的超时时间为 "
|
|
|
#~ "``websocket_ping_interval`` 的三倍。"
|
|
|
+
|
|
|
+#~ msgid "Get the WSGI app for running PyWebIO applications in Django."
|
|
|
+#~ msgstr "将PyWebIO应用转换为Django WSGI 应用"
|