Browse Source

doc: update

wangweimin 4 years ago
parent
commit
481f33f268

File diff suppressed because it is too large
+ 174 - 147
docs/locales/zh_CN/LC_MESSAGES/guide.po


File diff suppressed because it is too large
+ 284 - 338
docs/locales/zh_CN/LC_MESSAGES/input.po


File diff suppressed because it is too large
+ 258 - 212
docs/locales/zh_CN/LC_MESSAGES/output.po


+ 143 - 88
docs/locales/zh_CN/LC_MESSAGES/releases.po

@@ -7,15 +7,16 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PyWebIO 1.1.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-02-17 17:38+0800\n"
-"PO-Revision-Date: 2021-02-17 22:58+0800\n"
+"POT-Creation-Date: 2021-03-18 19:44+0800\n"
+"PO-Revision-Date: 2021-03-18 19:45+0800\n"
+"Last-Translator: WangWeimin <wang0.618@qq.com>\n"
+"Language: zh_CN\n"
+"Language-Team: \n"
+"Plural-Forms: nplurals=1; plural=0;\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Generated-By: Babel 2.8.0\n"
-"Last-Translator: WangWeimin <wang0.618@qq.com>\n"
-"Language-Team: \n"
-"Language: zh_CN\n"
 "X-Generator: Poedit 2.4.2\n"
 
 #: ../../releases.rst:2
@@ -32,6 +33,7 @@ msgstr ""
 
 #: ../../releases/v0.2.0.rst:8 ../../releases/v0.3.0.rst:8
 #: ../../releases/v1.0.0.rst:10 ../../releases/v1.1.0.rst:10
+#: ../../releases/v1.2.0.rst:8
 msgid "Highlights"
 msgstr ""
 
@@ -55,8 +57,8 @@ msgstr ""
 
 #: ../../releases/v0.2.0.rst:14
 msgid ""
-"添加 `put_image() <pywebio.output.put_image>` 输出图像、 `remove(anchor)  "
-"<pywebio.output.remove>` 移除内容"
+"添加 `put_image() <pywebio.output.put_image>` 输出图像、 `remove(anchor)  <pywebio."
+"output.remove>` 移除内容"
 msgstr ""
 
 #: ../../releases/v0.2.0.rst:15
@@ -90,8 +92,8 @@ msgstr ""
 
 #: ../../releases/v0.2.0.rst:30
 msgid ""
-"`input_group() <pywebio.input.input_group>` 添加 ``cancelable`` 参数来允许用户"
-"取消输入"
+"`input_group() <pywebio.input.input_group>` 添加 ``cancelable`` 参数来允许用户取消"
+"输入"
 msgstr ""
 
 #: ../../releases/v0.2.0.rst:31
@@ -106,8 +108,8 @@ msgstr ""
 
 #: ../../releases/v0.2.0.rst:36
 msgid ""
-"输出函数使用 ``anchor`` 参数指定输出锚点时,若锚点已经存在,则将锚点处的内容替"
-"换为当前内容。"
+"输出函数使用 ``anchor`` 参数指定输出锚点时,若锚点已经存在,则将锚点处的内容替换为"
+"当前内容。"
 msgstr ""
 
 #: ../../releases/v0.2.0.rst:37
@@ -116,8 +118,8 @@ msgstr ""
 
 #: ../../releases/v0.2.0.rst:38
 msgid ""
-"`scroll_to(anchor, position) <pywebio.output.scroll_to>` 添加 ``position`` 参数"
-"精细化控制滚动位置"
+"`scroll_to(anchor, position) <pywebio.output.scroll_to>` 添加 ``position`` 参数精细"
+"化控制滚动位置"
 msgstr ""
 
 #: ../../releases/v0.2.0.rst:41
@@ -155,8 +157,7 @@ msgid "支持输出 bokeh 数据可视化图表, :ref:`文档 <visualization>`
 msgstr ""
 
 #: ../../releases/v0.3.0.rst:11
-msgid ""
-"添加 :func:`session.get_info() <pywebio.session.get_info>` 获取会话相关信息"
+msgid "添加 :func:`session.get_info() <pywebio.session.get_info>` 获取会话相关信息"
 msgstr ""
 
 #: ../../releases/v0.3.0.rst:12
@@ -165,8 +166,8 @@ msgstr ""
 
 #: ../../releases/v0.3.0.rst:13
 msgid ""
-"`output.put_table() <pywebio.output.put_table>` 支持跨行/列单元格, 单元格内容"
-"支持使用 ``put_xxx`` 类输出函数"
+"`output.put_table() <pywebio.output.put_table>` 支持跨行/列单元格, 单元格内容支持"
+"使用 ``put_xxx`` 类输出函数"
 msgstr ""
 
 #: ../../releases/v0.3.0.rst:21
@@ -206,36 +207,35 @@ msgstr ""
 
 #: ../../releases/v1.0.0.rst:13
 msgid ""
-"添加布局支持( `put_grid() <pywebio.output.put_grid>` , `put_row() <pywebio."
-"output.put_row>` , `put_column() <pywebio.output.put_column>` )和自定义样式支"
-"( `style() <pywebio.output.style>` )"
+"添加布局支持( `put_grid() <pywebio.output.put_grid>` , `put_row() <pywebio.output."
+"put_row>` , `put_column() <pywebio.output.put_column>` )和自定义样式支"
+"( `style() <pywebio.output.style>` )"
 msgstr ""
 
 #: ../../releases/v1.0.0.rst:14
 msgid ""
 "添加新的输出函数: `toast() <pywebio.output.toast>` , `popup() <pywebio.output."
-"popup>` , `put_widget() <pywebio.output.put_widget>` , `put_collapse() "
-"<pywebio.output.put_collapse>` , `put_link() <pywebio.output.put_link>` , "
-"`put_scrollable() <pywebio.output.put_scrollable>` , `put_loading() <pywebio."
-"output.put_loading>` , `put_processbar() <pywebio.output.put_processbar>`"
+"popup>` , `put_widget() <pywebio.output.put_widget>` , `put_collapse() <pywebio."
+"output.put_collapse>` , `put_link() <pywebio.output.put_link>` , `put_scrollable() "
+"<pywebio.output.put_scrollable>` , `put_loading() <pywebio.output.put_loading>` , "
+"`put_processbar() <pywebio.output.put_processbar>`"
 msgstr ""
 
 #: ../../releases/v1.0.0.rst:17
 msgid ""
-"添加 `span() <pywebio.output.span>` , `output() <pywebio.output.output>` 输出控"
-"制函数"
+"添加 `span() <pywebio.output.span>` , `output() <pywebio.output.output>` 输出控制函"
+"数"
 msgstr ""
 
 #: ../../releases/v1.0.0.rst:18
 msgid ""
-"添加JS执行函数: `run_js() <pywebio.session.run_js>` , `eval_js() <pywebio."
-"session.eval_js>`"
+"添加JS执行函数: `run_js() <pywebio.session.run_js>` , `eval_js() <pywebio.session."
+"eval_js>`"
 msgstr ""
 
 #: ../../releases/v1.0.0.rst:19
 msgid ""
-"更新UI: 显示输入时,使用浮动式输入框;发生未捕获异常时,前端使用console日志记录"
-"异常"
+"更新UI: 显示输入时,使用浮动式输入框;发生未捕获异常时,前端使用console日志记录异常"
 msgstr ""
 
 #: ../../releases/v1.0.0.rst:22 ../../releases/v1.1.0.rst:18
@@ -252,14 +252,14 @@ msgstr ""
 
 #: ../../releases/v1.0.0.rst:25
 msgid ""
-"移除 `pywebio.output.set_title()` , `pywebio.output.set_auto_scroll_bottom()`,"
-"用 `pywebio.session.set_env()` 进行控制"
+"移除 `pywebio.output.set_title()` , `pywebio.output.set_auto_scroll_bottom()`,"
+"用 `pywebio.session.set_env()` 进行控制"
 msgstr ""
 
 #: ../../releases/v1.0.0.rst:26
 msgid ""
-"移除 `pywebio.output.table_cell_buttons()` ,使用 `pywebio.output."
-"put_buttons()` 替代"
+"移除 `pywebio.output.table_cell_buttons()` ,使用 `pywebio.output.put_buttons()` 替"
+"代"
 msgstr ""
 
 #: ../../releases/v1.0.0.rst:30
@@ -268,8 +268,8 @@ msgstr ""
 
 #: ../../releases/v1.0.0.rst:31
 msgid ""
-"`file_upload() <pywebio.input.file_upload>` 支持多文件上传,支持限制上传文件大"
-"小,添加上传进度显示"
+"`file_upload() <pywebio.input.file_upload>` 支持多文件上传,支持限制上传文件大小,"
+"添加上传进度显示"
 msgstr ""
 
 #: ../../releases/v1.0.0.rst:32
@@ -278,9 +278,8 @@ msgstr ""
 
 #: ../../releases/v1.0.0.rst:33
 msgid ""
-"`put_widget() <pywebio.output.put_widget>` 、 `popup() <pywebio.output."
-"popup>` 、 `put_table() <pywebio.output.put_table>` 将字符串内容不再视作Html,"
-"而是作为纯文本"
+"`put_widget() <pywebio.output.put_widget>` 、 `popup() <pywebio.output.popup>` 、 "
+"`put_table() <pywebio.output.put_table>` 将字符串内容不再视作Html,而是作为纯文本"
 msgstr ""
 
 #: ../../releases/v1.0.0.rst:34
@@ -301,21 +300,20 @@ msgstr ""
 
 #: ../../releases/v1.1.0.rst:7
 msgid ""
-"It's been a whole year since the first line of PyWebIO code was written. 🎂 "
-"There have been too many things in 2020, but it has a special meaning to me. "
-"In 2021, we will continue to work hard to make PyWebIO better and better."
+"It's been a whole year since the first line of PyWebIO code was written. 🎂 There "
+"have been too many things in 2020, but it has a special meaning to me. In 2021, we "
+"will continue to work hard to make PyWebIO better and better."
 msgstr ""
-"距离写下PyWebIO的第一行代码过去已经整整一年了🎂 ,2020年发生了太多的事情,但对我"
-"来说又多了一份特殊的意义。新的一年继续努力💪 ,将PyWebIO做得越来越好。"
+"距离写下PyWebIO的第一行代码过去已经整整一年了🎂 ,2020年发生了太多的事情,但对我来说"
+"又多了一份特殊的意义。新的一年继续努力💪 ,将PyWebIO做得越来越好。"
 
 #: ../../releases/v1.1.0.rst:11
 msgid ""
-"Security support: `put_html() <pywebio.output.put_html>`, `put_markdown() "
-"<pywebio.output.put_markdown>` can use ``sanitize`` parameter to prevent XSS "
-"attack."
+"Security support: `put_html() <pywebio.output.put_html>`, `put_markdown() <pywebio."
+"output.put_markdown>` can use ``sanitize`` parameter to prevent XSS attack."
 msgstr ""
-"添加安全性支持: `put_html() <pywebio.output.put_html>`, `put_markdown() "
-"<pywebio.output.put_markdown>` 中支持使用 ``sanitize`` 参数开启防 XSS 攻击"
+"添加安全性支持: `put_html() <pywebio.output.put_html>`, `put_markdown() <pywebio."
+"output.put_markdown>` 中支持使用 ``sanitize`` 参数开启防 XSS 攻击"
 
 #: ../../releases/v1.1.0.rst:12
 msgid "UI internationalization support"
@@ -323,8 +321,7 @@ msgstr "UI国际化支持"
 
 #: ../../releases/v1.1.0.rst:13
 msgid ""
-"SEO support: Set SEO info through `pywebio.platform.seo()` or function "
-"docstring"
+"SEO support: Set SEO info through `pywebio.platform.seo()` or function docstring"
 msgstr "添加SEO支持: 通过任务函数的注释或 `pywebio.platform.seo()` 来设置SEO信息"
 
 #: ../../releases/v1.1.0.rst:14
@@ -333,26 +330,24 @@ msgstr "CDN支持,Web框架整合更加方便,仅需引入一条路由即可
 
 #: ../../releases/v1.1.0.rst:15
 msgid ""
-"Application access speed is improved, and no probe requests are used to "
-"determine the communication protocol"
+"Application access speed is improved, and no probe requests are used to determine "
+"the communication protocol"
 msgstr "应用访问速度提升,不再使用探测请求的方式确定通信协议"
 
 #: ../../releases/v1.1.0.rst:19
-msgid ""
-"Remove `disable_asyncio` parameter of `start_server()` in django and flask."
-msgstr ""
-"移除使用 django 和 flask 框架 `start_server()` 中的 `disable_asyncio` 参数"
+msgid "Remove `disable_asyncio` parameter of `start_server()` in django and flask."
+msgstr "移除使用 django 和 flask 框架 `start_server()` 中的 `disable_asyncio` 参数"
 
 #: ../../releases/v1.1.0.rst:20
 msgid "Deprecated `pywebio.session.data()`, use `pywebio.session.local` instead"
 msgstr ""
-"废弃 `pywebio.session.data()` ,使用 `pywebio.session.local` 作为会话本地状态存"
-"储对象"
+"废弃 `pywebio.session.data()` ,使用 `pywebio.session.local` 作为会话本地状态存储对"
+"象"
 
 #: ../../releases/v1.1.0.rst:21
 msgid ""
-"Application integrated into the web framework, the access address changes, "
-"see :ref:`Web framework integration<integration_web_framework>`"
+"Application integrated into the web framework, the access address changes, see :"
+"ref:`Web framework integration<integration_web_framework>`"
 msgstr ""
 "整合到Web框架的应用,访问地址发生变化,参见 :ref:`Web框架整合文档 "
 "<integration_web_framework>`"
@@ -362,56 +357,54 @@ msgid ""
 "Remove `max_height` parameter of `put_scrollable() <pywebio.output."
 "put_scrollable>`, use `height` instead"
 msgstr ""
-"`put_scrollable() <pywebio.output.put_scrollable>` 废弃 `max_height` 参数,使"
-"`height` 替代"
+"`put_scrollable() <pywebio.output.put_scrollable>` 废弃 `max_height` 参数,使"
+"`height` 替代"
 
-#: ../../releases/v1.1.0.rst:25
+#: ../../releases/v1.1.0.rst:25 ../../releases/v1.2.0.rst:16
 msgid "Detailed changes"
 msgstr ""
 
 #: ../../releases/v1.1.0.rst:26
 msgid ""
-"`put_code() <pywebio.output.put_code>` add `rows` parameter to limit the "
-"maximum number of displayed lines"
-msgstr ""
-"`put_code() <pywebio.output.put_code>` 支持使用 `rows` 参数限制最大显示行数"
+"`put_code() <pywebio.output.put_code>` add `rows` parameter to limit the maximum "
+"number of displayed lines"
+msgstr "`put_code() <pywebio.output.put_code>` 支持使用 `rows` 参数限制最大显示行数"
 
 #: ../../releases/v1.1.0.rst:27
 msgid ""
 "`put_scrollable() <pywebio.output.put_scrollable>` add `keep_bottom` parameter"
 msgstr ""
-"`put_scrollable() <pywebio.output.put_scrollable>` 支持使用 `keep_bottom` 参数"
-"设定自动滚动到底部"
+"`put_scrollable() <pywebio.output.put_scrollable>` 支持使用 `keep_bottom` 参数设定"
+"自动滚动到底部"
 
 #: ../../releases/v1.1.0.rst:28
 msgid ""
-"`put_markdown() <pywebio.output.put_markdown>` add ``options`` to config "
-"Markdown parsing options."
+"`put_markdown() <pywebio.output.put_markdown>` add ``options`` to config Markdown "
+"parsing options."
 msgstr "`put_markdown() <pywebio.output.put_markdown>` 支持配置Markdown解析参数"
 
 #: ../../releases/v1.1.0.rst:29
 msgid ""
 "Add html escaping for parameters of `put_code() <pywebio.output.put_code>`, "
-"`put_image() <pywebio.output.put_image>`, `put_link() <pywebio.output."
-"put_link>`, `put_row() <pywebio.output.put_row>`, `put_grid() <pywebio.output."
-"put_grid>`"
+"`put_image() <pywebio.output.put_image>`, `put_link() <pywebio.output.put_link>`, "
+"`put_row() <pywebio.output.put_row>`, `put_grid() <pywebio.output.put_grid>`"
 msgstr ""
 "为 `put_code() <pywebio.output.put_code>`, `put_image() <pywebio.output."
-"put_image>`, `put_link() <pywebio.output.put_link>`, `put_row() <pywebio."
-"output.put_row>`, `put_grid() <pywebio.output.put_grid>` 中的参数添加转义"
+"put_image>`, `put_link() <pywebio.output.put_link>`, `put_row() <pywebio.output."
+"put_row>`, `put_grid() <pywebio.output.put_grid>` 中的参数添加转义"
 
 #: ../../releases/v1.1.0.rst:30
 msgid ""
 "Methods ``reset()``, ``append()``, ``insert()`` of `output()  <pywebio.output."
 "output>`  accept string content"
 msgstr ""
-"`output()  <pywebio.output.output>` 的 ``reset()``, ``append()``, ``insert()`` "
-"方法接受字符串作为输出内容"
+"`output()  <pywebio.output.output>` 的 ``reset()``, ``append()``, ``insert()`` 方法"
+"接受字符串作为输出内容"
 
 #: ../../releases/v1.1.0.rst:31
 msgid ""
-"Fix: Parsing error in `max_size` and `max_total_size` parameters of "
-"`file_upload() <pywebio.input.file_upload>`"
+"Fix: Parsing error in `max_size` and `max_total_size` parameters of `file_upload() "
+"<pywebio.input.file_upload>`"
 msgstr ""
 "修复: `file_upload() <pywebio.input.file_upload>` 的 `max_size` and "
 "`max_total_size` 参数解析错误"
@@ -420,16 +413,78 @@ msgstr ""
 msgid "Fix: Auto open browser failed in python 3.6"
 msgstr "修复: py3.6自动打开浏览器失败"
 
-#: ../../releases/v1.2.0.rst:3
-msgid "Update in v1.1.1 (2021 2/7)"
+#: ../../releases/v1.2.0.rst:2
+msgid "What's new in PyWebIO 1.2"
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:5
+msgid "2021 3/18"
 msgstr ""
 
-#: ../../releases/v1.2.0.rst:4
+#: ../../releases/v1.2.0.rst:9
 msgid ""
-"`output()  <pywebio.output.output>` 的 ``reset()``, ``append()``, ``insert()`` "
-"方法接受任意类型作为输出内容"
+"Support reconnect to server in websocket connection by setting "
+"``reconnect_timeout`` parameter in `start_server() <pywebio.platform.tornado."
+"start_server>`."
 msgstr ""
+"Websocket连接可以通过在 `start_server() <pywebio.platform.tornado.start_server>` 中"
+"设定 ``reconnect_timeout`` 参数来支持连接重连。"
 
-#: ../../releases/v1.2.0.rst:5
-msgid "SEO优化:对于爬虫UA,总是返回静态的应用索引页面"
+#: ../../releases/v1.2.0.rst:10
+msgid ""
+"Add `path_deploy() <pywebio.platform.path_deploy>`, `path_deploy_http() <pywebio."
+"platform.path_deploy>` and ``pywebio-path-deploy`` command to deploy PyWebIO "
+"applications from a directory."
 msgstr ""
+"添加 `path_deploy() <pywebio.platform.path_deploy>`, `path_deploy_http() <pywebio."
+"platform.path_deploy>` 和 ``pywebio-path-deploy`` 命令来实现从目录中加载运行PyWebIO"
+"应用。"
+
+#: ../../releases/v1.2.0.rst:11
+msgid "All documents and demos are now available in English version."
+msgstr "所有的文档和示例都提供了英文版本。"
+
+#: ../../releases/v1.2.0.rst:12
+msgid ""
+"Some output-related functions support context manager, see :ref:`output functions "
+"list <output_func_list>` ."
+msgstr ""
+"为一些输出相关的函数提供上下文管理器的支持,参见 :ref:`output functions list "
+"<output_func_list>` 。"
+
+#: ../../releases/v1.2.0.rst:17
+msgid "Add `put_info()`, `put_error()`, `put_warning()`, `put_success()`"
+msgstr ""
+"添加 `put_info()`, `put_error()`, `put_warning()`, `put_success()` 来显示提示消息。"
+
+#: ../../releases/v1.2.0.rst:18
+msgid ""
+"Add `pywebio.utils.pyinstaller_datas()` to get PyWebIO data files when using "
+"pyinstaller to bundle PyWebIO application."
+msgstr ""
+"添加 `pywebio.utils.pyinstaller_datas()` 来获得使用pyinstaller打包PyWebIO应用所需要"
+"的数据文件。"
+
+#: ../../releases/v1.2.0.rst:19
+msgid "Add documentation for data visualization using pyg2plot."
+msgstr "添加使用pyg2plot进行数据可视化的文档。"
+
+#: ../../releases/v1.2.0.rst:20
+msgid ""
+"The ``reset()``, ``append()``, ``insert()`` of `output() <pywebio.output.output>` "
+"accept any type as content."
+msgstr ""
+"`output() <pywebio.output.output>` 的 ``reset()``, ``append()``, ``insert()`` 方法"
+"接受任意类型作为输出内容。"
+
+#: ../../releases/v1.2.0.rst:21
+msgid "Add ``static_dir`` parameter to ``start_server()`` to serve static files."
+msgstr "``start_server()`` 中添加 ``static_dir`` 参数来托管静态文件。"
+
+#: ../../releases/v1.2.0.rst:22
+msgid "Deprecated `pywebio.session.get_info()`, use `pywebio.session.info` instead."
+msgstr "废弃 `pywebio.session.get_info()` ,使用 `pywebio.session.info` 替代"
+
+#: ../../releases/v1.2.0.rst:23
+msgid "Alert not supporting message when the user using IE browser."
+msgstr "当用户使用IE浏览器时提示浏览器不被支持。"

+ 154 - 139
docs/locales/zh_CN/LC_MESSAGES/session.po

@@ -7,17 +7,16 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PyWebIO 1.1.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-02-24 09:32+0800\n"
+"POT-Creation-Date: 2021-03-14 21:34+0800\n"
 "PO-Revision-Date: 2021-02-24 09:37+0800\n"
 "Last-Translator: WangWeimin <wang0.618@qq.com>\n"
 "Language: zh_CN\n"
 "Language-Team: \n"
-"Plural-Forms: nplurals=1; plural=0;\n"
+"Plural-Forms: nplurals=1; plural=0\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Generated-By: Babel 2.8.0\n"
-"X-Generator: Poedit 2.4.2\n"
 
 #: ../../session.rst:2
 msgid "``pywebio.session`` --- More control to session"
@@ -25,17 +24,15 @@ msgstr "``pywebio.session`` — 会话相关"
 
 #: of pywebio.session.run_async:1
 msgid ""
-"Run the coroutine object asynchronously. PyWebIO interactive functions are also "
-"available in the coroutine."
+"Run the coroutine object asynchronously. PyWebIO interactive functions "
+"are also available in the coroutine."
 msgstr "异步运行协程对象。协程中依然可以调用 PyWebIO 交互函数。 "
 
 #: of pywebio.session.run_async:3
 msgid ""
 "``run_async()`` can only be used in :ref:`coroutine-based session "
 "<coroutine_based_session>`."
-msgstr ""
-"``run_async()`` 仅能在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中"
-"调用"
+msgstr "``run_async()`` 仅能在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中调用"
 
 #: of pywebio.session.download pywebio.session.eval_js pywebio.session.go_app
 #: pywebio.session.register_thread pywebio.session.run_async
@@ -53,11 +50,12 @@ msgstr ""
 
 #: of pywebio.session.run_async:6
 msgid ""
-"`TaskHandle <pywebio.session.coroutinebased.TaskHandle>` instance, which can be "
-"used to query the running status of the coroutine or close the coroutine."
+"`TaskHandle <pywebio.session.coroutinebased.TaskHandle>` instance, which "
+"can be used to query the running status of the coroutine or close the "
+"coroutine."
 msgstr ""
-"`TaskHandle <pywebio.session.coroutinebased.TaskHandle>` 实例。 通过 TaskHandle "
-"可以查询协程运行状态和关闭协程。"
+"`TaskHandle <pywebio.session.coroutinebased.TaskHandle>` 实例。 通过 "
+"TaskHandle 可以查询协程运行状态和关闭协程。"
 
 #: of pywebio.session.run_async:8
 msgid ""
@@ -67,16 +65,17 @@ msgstr "参见::ref:`协程会话的并发 <coroutine_based_concurrency>`"
 
 #: of pywebio.session.run_asyncio_coroutine:1
 msgid ""
-"If the thread running sessions are not the same as the thread running the "
-"asyncio event loop, you need to wrap ``run_asyncio_coroutine()`` to run the "
-"coroutine in asyncio."
+"If the thread running sessions are not the same as the thread running the"
+" asyncio event loop, you need to wrap ``run_asyncio_coroutine()`` to run "
+"the coroutine in asyncio."
 msgstr ""
-"若会话线程和运行asyncio事件循环的线程不是同一个线程,需要用 "
-"`run_asyncio_coroutine()` 来运行asyncio中的协程。"
+"若会话线程和运行asyncio事件循环的线程不是同一个线程,需要用 `run_asyncio_coroutine()` "
+"来运行asyncio中的协程。"
 
 #: of pywebio.session.run_asyncio_coroutine:3
 msgid ""
-"Can only be used in :ref:`coroutine-based session <coroutine_based_session>`."
+"Can only be used in :ref:`coroutine-based session "
+"<coroutine_based_session>`."
 msgstr "仅能在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中调用。"
 
 #: of pywebio.session.run_asyncio_coroutine:5
@@ -100,7 +99,8 @@ msgstr ""
 
 #: of pywebio.session.download:1
 msgid ""
-"Send file to user, and the user browser will download the file to the local"
+"Send file to user, and the user browser will download the file to the "
+"local"
 msgstr "向用户推送文件,用户浏览器会将文件下载到本地"
 
 #: of pywebio.session.download:3
@@ -111,14 +111,14 @@ msgstr "下载保存为的文件名"
 msgid "File content. It is a bytes-like object"
 msgstr "文件内容. 类型为 bytes-like object"
 
-#: of pywebio.session:126 pywebio.session.download:6 pywebio.session.eval_js:9
+#: of pywebio.session:131 pywebio.session.download:6 pywebio.session.eval_js:9
 msgid "Example:"
 msgstr ""
 
 #: of pywebio.session.download:8
 msgid ""
-"put_buttons(['Click to download'], [lambda: download('hello-world.txt', b'hello "
-"world!')])"
+"put_buttons(['Click to download'], [lambda: download('hello-world.txt', "
+"b'hello world!')])"
 msgstr ""
 
 #: of pywebio.session.run_js:1
@@ -143,13 +143,14 @@ msgstr ""
 
 #: of pywebio.session.eval_js:1
 msgid ""
-"Execute JavaScript expression in the user's browser and get the value of the "
-"expression"
+"Execute JavaScript expression in the user's browser and get the value of "
+"the expression"
 msgstr "在用户浏览器中执行JavaScript表达式,并获取表达式的值"
 
 #: of pywebio.session.eval_js:3
 msgid ""
-"JavaScript expression. The value of the expression need to be JSON-serializable."
+"JavaScript expression. The value of the expression need to be JSON-"
+"serializable."
 msgstr "js表达式. 表达式的值需要能JSON序列化"
 
 #: of pywebio.session.eval_js:5
@@ -158,11 +159,12 @@ msgstr "js表达式的值"
 
 #: of pywebio.session.eval_js:7
 msgid ""
-"Note: When using :ref:`coroutine-based session <coroutine_based_session>`, you "
-"need to use the ``await eval_js(expression)`` syntax to call the function."
+"Note: When using :ref:`coroutine-based session "
+"<coroutine_based_session>`, you need to use the ``await "
+"eval_js(expression)`` syntax to call the function."
 msgstr ""
-"注意⚠️:在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中,需要使用 "
-"``await eval_js(expression)`` 语法来进行调用。"
+"注意⚠️:在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中,需要使用 ``await "
+"eval_js(expression)`` 语法来进行调用。"
 
 #: of pywebio.session.eval_js:11
 msgid ""
@@ -180,8 +182,8 @@ msgstr ""
 
 #: of pywebio.session.register_thread:1
 msgid ""
-"Register the thread so that PyWebIO interactive functions are available in the "
-"thread."
+"Register the thread so that PyWebIO interactive functions are available "
+"in the thread."
 msgstr "注册线程,以便在线程内调用 PyWebIO 交互函数。"
 
 #: of pywebio.session.register_thread:3
@@ -202,15 +204,15 @@ msgstr "设置会话结束时调用的函数。"
 
 #: of pywebio.session.defer_call:3
 msgid ""
-"Whether it is because the user closes the page or the task finishes to cause "
-"session closed, the function set by ``defer_call(func)`` will be executed. Can "
-"be used for resource cleaning."
+"Whether it is because the user closes the page or the task finishes to "
+"cause session closed, the function set by ``defer_call(func)`` will be "
+"executed. Can be used for resource cleaning."
 msgstr "无论是用户主动关闭会话还是任务结束会话关闭,设置的函数都会被运行。"
 
 #: of pywebio.session.defer_call:5
 msgid ""
-"You can call ``defer_call(func)`` multiple times in the session, and the set "
-"functions will be executed sequentially after the session closes."
+"You can call ``defer_call(func)`` multiple times in the session, and the "
+"set functions will be executed sequentially after the session closes."
 msgstr "在会话中可以多次调用 `defer_call()` ,会话结束后将会顺序执行设置的函数。"
 
 #: of pywebio.session.defer_call:7
@@ -226,10 +228,9 @@ msgstr ""
 
 #: of pywebio.session.defer_call:13
 msgid ""
-"PyWebIO interactive functions cannot be called inside the function ``func``."
-msgstr ""
-"通过 `defer_call()` 设置的函数被调用时会话已经关闭,所以在函数体内不可以调用 "
-"PyWebIO 的交互函数"
+"PyWebIO interactive functions cannot be called inside the function "
+"``func``."
+msgstr "通过 `defer_call()` 设置的函数被调用时会话已经关闭,所以在函数体内不可以调用 PyWebIO 的交互函数"
 
 #: of pywebio.session.hold:1
 msgid "Keep the session alive until the browser page is closed by user."
@@ -237,27 +238,26 @@ msgstr "保持会话,直到用户关闭浏览器。"
 
 #: of pywebio.session.hold:5
 msgid ""
-"After the PyWebIO session closed, the functions that need communicate with the "
-"PyWebIO server (such as the event callback of `put_buttons()` and download link "
-"of `put_file()`) will not work. You can call the ``hold()`` function at the end "
-"of the task function to hold the session, so that the event callback and "
-"download link will always be available before the browser page is closed by "
-"user."
+"After the PyWebIO session closed, the functions that need communicate "
+"with the PyWebIO server (such as the event callback of `put_buttons()` "
+"and download link of `put_file()`) will not work. You can call the "
+"``hold()`` function at the end of the task function to hold the session, "
+"so that the event callback and download link will always be available "
+"before the browser page is closed by user."
 msgstr ""
 "在PyWebIO会话结束后,页面和服务端的连接便会断开,\n"
-"页面上需要和服务端通信才可实现的功能(比如:下载通过 `put_file() <pywebio.output."
-"put_file>` 输出的文件,\n"
+"页面上需要和服务端通信才可实现的功能(比如:下载通过 `put_file() <pywebio.output.put_file>` 输出的文件,\n"
 "`put_buttons() <pywebio.output.put_buttons>` 按钮回调)便无法使用。\n"
-"可以在任务函数末尾处调用 ``hold()`` 函数来将会话保持,这样在用户关闭浏览器页面"
-"前,会话将一直保持连接。"
+"可以在任务函数末尾处调用 ``hold()`` 函数来将会话保持,这样在用户关闭浏览器页面前,会话将一直保持连接。"
 
 #: of pywebio.session.hold:7
 msgid ""
-"Note: When using :ref:`coroutine-based session <coroutine_based_session>`, you "
-"need to use the ``await hold()`` syntax to call the function."
+"Note: When using :ref:`coroutine-based session "
+"<coroutine_based_session>`, you need to use the ``await hold()`` syntax "
+"to call the function."
 msgstr ""
-"注意⚠️:在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中,需要使用 "
-"``await hold()`` 语法来进行调用。"
+"注意⚠️:在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中,需要使用 ``await "
+"hold()`` 语法来进行调用。"
 
 #: of pywebio.session:12
 msgid "The session-local object for current session."
@@ -267,14 +267,13 @@ msgstr "当前会话的数据对象(session-local object)。"
 msgid ""
 "``local`` is a dictionary that can be accessed through attributes. When "
 "accessing a property that does not exist in the data object, it returns "
-"``None`` instead of throwing an exception. The method of dictionary is not "
-"supported in ``local``. It supports the ``in`` operator to determine whether "
-"the key exists. You can use ``local._dict`` to get the underlying dictionary "
-"data."
+"``None`` instead of throwing an exception. The method of dictionary is "
+"not supported in ``local``. It supports the ``in`` operator to determine "
+"whether the key exists. You can use ``local._dict`` to get the underlying"
+" dictionary data."
 msgstr ""
-"``local`` 是一个可以通过属性访问的字典,访问不存在的属性时会返回 ``None`` 而不是"
-"抛出异常。``local`` 不支持字典的方法,支持使用 ``in`` 操作符来判断键是否存在,可"
-"以使用 ``local._dict`` 获取底层的字典表示。"
+"``local`` 是一个可以通过属性访问的字典,访问不存在的属性时会返回 ``None`` 而不是抛出异常。``local`` "
+"不支持字典的方法,支持使用 ``in`` 操作符来判断键是否存在,可以使用 ``local._dict`` 获取底层的字典表示。"
 
 #: of pywebio.session
 msgid "Usage Scenes"
@@ -282,12 +281,10 @@ msgstr "使用场景"
 
 #: of pywebio.session:20
 msgid ""
-"When you need to share some session-independent data with multiple functions, "
-"it is more convenient to use session-local objects to save state than to use "
-"function parameters."
-msgstr ""
-"当需要在多个函数中保存一些会话独立的数据时,使用session-local对象保存状态会比通"
-"过函数参数传递更方便。"
+"When you need to share some session-independent data with multiple "
+"functions, it is more convenient to use session-local objects to save "
+"state than to use function parameters."
+msgstr "当需要在多个函数中保存一些会话独立的数据时,使用session-local对象保存状态会比通过函数参数传递更方便。"
 
 #: of pywebio.session:22
 msgid "Here is a example of a session independent counter implementation::"
@@ -389,20 +386,19 @@ msgstr "``title`` (str): 当前页面的标题"
 
 #: of pywebio.session.set_env:6
 msgid ""
-"``output_animation`` (bool): Whether to enable output animation, enabled by "
-"default"
-msgstr ""
-"``output_animation`` (bool): 是否启用输出动画(在输出内容时,使用过渡动画),默"
-"认启用"
+"``output_animation`` (bool): Whether to enable output animation, enabled "
+"by default"
+msgstr "``output_animation`` (bool): 是否启用输出动画(在输出内容时,使用过渡动画),默认启用"
 
 #: of pywebio.session.set_env:7
 msgid ""
-"``auto_scroll_bottom`` (bool): Whether to automatically scroll the page to the "
-"bottom after output content, it is closed by default.  Note that after enabled, "
-"only outputting to ROOT scope can trigger automatic scrolling."
+"``auto_scroll_bottom`` (bool): Whether to automatically scroll the page "
+"to the bottom after output content, it is closed by default.  Note that "
+"after enabled, only outputting to ROOT scope can trigger automatic "
+"scrolling."
 msgstr ""
-"``auto_scroll_bottom`` (bool): 是否在内容输出时将页面自动滚动到底部,默认关闭。"
-"注意,开启后,只有输出到ROOT Scope才可以触发自动滚动。"
+"``auto_scroll_bottom`` (bool): 是否在内容输出时将页面自动滚动到底部,默认关闭。注意,开启后,只有输出到ROOT "
+"Scope才可以触发自动滚动。"
 
 #: of pywebio.session.set_env:8
 msgid ""
@@ -410,8 +406,8 @@ msgid ""
 "milliseconds, default 1000ms), only available in sessions based on HTTP "
 "connection."
 msgstr ""
-"``http_pull_interval`` (int): HTTP轮询后端消息的周期(单位为毫秒,默认1000ms),"
-"仅在基于HTTP连接的会话(使用Flask或Django后端)中可用"
+"``http_pull_interval`` (int): "
+"HTTP轮询后端消息的周期(单位为毫秒,默认1000ms),仅在基于HTTP连接的会话(使用Flask或Django后端)中可用"
 
 #: of pywebio.session.set_env:12
 msgid "set_env(title='Awesome PyWebIO!!', output_animation=False)"
@@ -419,8 +415,8 @@ msgstr ""
 
 #: of pywebio.session.go_app:1
 msgid ""
-"Jump to another task of a same PyWebIO application. Only available in PyWebIO "
-"Server mode"
+"Jump to another task of a same PyWebIO application. Only available in "
+"PyWebIO Server mode"
 msgstr "在同一PyWebIO应用的不同服务之间跳转。仅在PyWebIO Server模式下可用"
 
 #: of pywebio.session.go_app:3
@@ -441,8 +437,8 @@ msgstr "表示会话信息的对象,属性有:"
 
 #: of pywebio.session:91
 msgid ""
-"``user_agent`` : The Object of the user browser information, whose attributes "
-"are"
+"``user_agent`` : The Object of the user browser information, whose "
+"attributes are"
 msgstr "``user_agent`` : 表示用户浏览器信息的对象,属性有"
 
 #: of pywebio.session:93
@@ -455,19 +451,15 @@ msgstr ""
 
 #: of pywebio.session:94
 msgid ""
-"``is_tablet`` (bool): whether user agent is identified as a tablet device "
-"(iPad, Kindle Fire, Nexus 7 etc)"
-msgstr ""
-"``is_tablet`` (bool): 用户使用的设备是否为平板 (比如 iPad, Kindle Fire, Nexus 7 "
-"等设备)"
+"``is_tablet`` (bool): whether user agent is identified as a tablet device"
+" (iPad, Kindle Fire, Nexus 7 etc)"
+msgstr "``is_tablet`` (bool): 用户使用的设备是否为平板 (比如 iPad, Kindle Fire, Nexus 7 等设备)"
 
 #: of pywebio.session:95
 msgid ""
-"``is_pc`` (bool): whether user agent is identified to be running a traditional "
-"\"desktop\" OS (Windows, OS X, Linux)"
-msgstr ""
-"``is_pc`` (bool): 用户使用的设备是否为桌面电脑 (比如运行 Windows, OS X, Linux 的"
-"设备)"
+"``is_pc`` (bool): whether user agent is identified to be running a "
+"traditional \"desktop\" OS (Windows, OS X, Linux)"
+msgstr "``is_pc`` (bool): 用户使用的设备是否为桌面电脑 (比如运行 Windows, OS X, Linux 的设备)"
 
 #: of pywebio.session:96
 msgid "``is_touch_capable`` (bool): whether user agent has touch capabilities"
@@ -511,29 +503,27 @@ msgstr "``device.model`` (str): 设备型号. 比如 'iPhone'"
 
 #: of pywebio.session:110
 msgid ""
-"``user_language`` (str): Language used by the user's operating system. (e.g., "
-"``'zh-CN'``)"
+"``user_language`` (str): Language used by the user's operating system. "
+"(e.g., ``'zh-CN'``)"
 msgstr "``user_language`` (str): 用户操作系统使用的语言. 比如 ``'zh-CN'``"
 
 #: of pywebio.session:111
 msgid ""
-"``server_host`` (str): PyWebIO server host, including domain and port, the port "
-"can be omitted when 80."
-msgstr ""
-"``server_host`` (str): 当前会话的服务器host,包含域名和端口,端口为80时可以被省"
-"略"
+"``server_host`` (str): PyWebIO server host, including domain and port, "
+"the port can be omitted when 80."
+msgstr "``server_host`` (str): 当前会话的服务器host,包含域名和端口,端口为80时可以被省略"
 
 #: of pywebio.session:112
 msgid ""
-"``origin`` (str): Indicate where the user from. Including protocol, host, and "
-"port parts. Such as ``'http://localhost:8080'`` . It may be empty, but it is "
-"guaranteed to have a value when the user's page address is not under the server "
-"host. (that is, the host, port part are inconsistent with ``server_host``)."
+"``origin`` (str): Indicate where the user from. Including protocol, host,"
+" and port parts. Such as ``'http://localhost:8080'`` . It may be empty, "
+"but it is guaranteed to have a value when the user's page address is not "
+"under the server host. (that is, the host, port part are inconsistent "
+"with ``server_host``)."
 msgstr ""
 "``origin`` (str): 当前用户的页面地址. 包含 协议、主机、端口 部分. 比如 "
 "``'http://localhost:8080'`` .\n"
-"可能为空,但保证当用户的页面地址不在当前服务器下(即 主机、端口部分和 "
-"``server_host`` 不一致)时有值."
+"可能为空,但保证当用户的页面地址不在当前服务器下(即 主机、端口部分和 ``server_host`` 不一致)时有值."
 
 #: of pywebio.session:114
 msgid "``user_ip`` (str): User's ip address."
@@ -541,70 +531,83 @@ msgstr "用户的ip地址."
 
 #: of pywebio.session:115
 msgid ""
-"``backend`` (str): The current PyWebIO backend server implementation. The "
-"possible values are ``'tornado'``, ``'flask'``, ``'django'`` , ``'aiohttp'``."
+"``backend`` (str): The current PyWebIO backend server implementation. The"
+" possible values are ``'tornado'``, ``'flask'``, ``'django'`` , "
+"``'aiohttp'``."
 msgstr ""
 "当前PyWebIO使用的后端Server实现. 可能出现的值有 ``'tornado'`` , ``'flask'`` , "
 "``'django'`` , ``'aiohttp'``."
 
 #: of pywebio.session:116
 msgid ""
-"``request`` (object): The request object when creating the current session. "
-"Depending on the backend server, the type of ``request`` can be:"
+"``protocol`` (str): The communication protocol between PyWebIO server and"
+" browser. The possible values are ``'websocket'``, ``'http'``"
 msgstr ""
-"创建当前会话时的Web请求对象. 根据PyWebIO使用的后端Server不同,``request`` 的类型"
-"也不同:"
 
-#: of pywebio.session:118
+#: of pywebio.session:117
 msgid ""
-"When using Tornado, ``request`` is instance of `tornado.httputil."
-"HTTPServerRequest <https://www.tornadoweb.org/en/stable/httputil.html#tornado."
-"httputil.HTTPServerRequest>`_"
-msgstr ""
-"使用Tornado后端时, ``request`` 为 `tornado.httputil.HTTPServerRequest <https://"
-"www.tornadoweb.org/en/stable/httputil.html#tornado.httputil."
-"HTTPServerRequest>`_ 实例"
+"``request`` (object): The request object when creating the current "
+"session. Depending on the backend server, the type of ``request`` can be:"
+msgstr "创建当前会话时的Web请求对象. 根据PyWebIO使用的后端Server不同,``request`` 的类型也不同:"
 
-#: of pywebio.session:120
+#: of pywebio.session:119
 msgid ""
-"When using Flask, ``request`` is instance of `flask.Request <https://flask."
-"palletsprojects.com/en/1.1.x/api/#incoming-request-data>`_"
+"When using Tornado, ``request`` is instance of "
+"`tornado.httputil.HTTPServerRequest "
+"<https://www.tornadoweb.org/en/stable/httputil.html#tornado.httputil.HTTPServerRequest>`_"
 msgstr ""
-"使用Flask后端时, ``request`` 为 `flask.Request <https://flask.palletsprojects."
-"com/en/1.1.x/api/#incoming-request-data>`_ 实例"
+"使用Tornado后端时, ``request`` 为 `tornado.httputil.HTTPServerRequest "
+"<https://www.tornadoweb.org/en/stable/httputil.html#tornado.httputil.HTTPServerRequest>`_"
+" 实例"
 
 #: of pywebio.session:121
 msgid ""
-"When using Django, ``request`` is instance of `django.http.HttpRequest <https://"
-"docs.djangoproject.com/en/3.0/ref/request-response/#django.http.HttpRequest>`_"
+"When using Flask, ``request`` is instance of `flask.Request "
+"<https://flask.palletsprojects.com/en/1.1.x/api/#incoming-request-data>`_"
 msgstr ""
-"使用Django后端时, ``request`` 为 `django.http.HttpRequest <https://docs."
-"djangoproject.com/en/3.0/ref/request-response/#django.http.HttpRequest>`_ 实例"
+"使用Flask后端时, ``request`` 为 `flask.Request "
+"<https://flask.palletsprojects.com/en/1.1.x/api/#incoming-request-data>`_"
+" 实例"
 
 #: of pywebio.session:122
 msgid ""
+"When using Django, ``request`` is instance of `django.http.HttpRequest "
+"<https://docs.djangoproject.com/en/3.0/ref/request-"
+"response/#django.http.HttpRequest>`_"
+msgstr ""
+"使用Django后端时, ``request`` 为 `django.http.HttpRequest "
+"<https://docs.djangoproject.com/en/3.0/ref/request-"
+"response/#django.http.HttpRequest>`_ 实例"
+
+#: of pywebio.session:123
+msgid ""
 "When using aiohttp, ``request`` is instance of `aiohttp.web.BaseRequest "
-"<https://docs.aiohttp.org/en/stable/web_reference.html#aiohttp.web."
-"BaseRequest>`_"
+"<https://docs.aiohttp.org/en/stable/web_reference.html#aiohttp.web.BaseRequest>`_"
 msgstr ""
-"使用aiohttp后端时, ``request`` 为 `aiohttp.web.BaseRequest <https://docs."
-"aiohttp.org/en/stable/web_reference.html#aiohttp.web.BaseRequest>`_ 实例"
+"使用aiohttp后端时, ``request`` 为 `aiohttp.web.BaseRequest "
+"<https://docs.aiohttp.org/en/stable/web_reference.html#aiohttp.web.BaseRequest>`_"
+" 实例"
 
-#: of pywebio.session:124
+#: of pywebio.session:125
 msgid ""
-"The ``user_agent`` attribute of the session information object is parsed by the "
-"user-agents library. See https://github.com/selwin/python-user-agents#usage"
+"The ``user_agent`` attribute of the session information object is parsed "
+"by the user-agents library. See https://github.com/selwin/python-user-"
+"agents#usage"
 msgstr ""
 "会话信息对象的 ``user_agent`` 属性是通过 user-agents 库进行解析生成的。参见 "
 "https://github.com/selwin/python-user-agents#usage"
 
-#: of pywebio.session:128
+#: of pywebio.session:129
+msgid "Added the ``protocol`` attribute."
+msgstr ""
+
+#: of pywebio.session:133
 msgid ""
 "import json\n"
-"from pywebio import session\n"
+"from pywebio.session import info as session_info\n"
 "\n"
 "put_code(json.dumps({\n"
-"    k: str(getattr(session.info, k))\n"
+"    k: str(getattr(session_info, k))\n"
 "    for k in ['user_agent', 'user_language', 'server_host',\n"
 "              'origin', 'user_ip', 'backend', 'request']\n"
 "}, indent=4), 'json')"
@@ -633,3 +636,15 @@ msgstr "关闭协程任务"
 #: of pywebio.session.coroutinebased.TaskHandler.closed:1
 msgid "Returns a bool stating whether the coroutine task is closed."
 msgstr "任务是否关闭"
+
+#~ msgid ""
+#~ "import json\n"
+#~ "from pywebio import session\n"
+#~ "\n"
+#~ "put_code(json.dumps({\n"
+#~ "    k: str(getattr(session.info, k))\n"
+#~ "    for k in ['user_agent', 'user_language', 'server_host',\n"
+#~ "              'origin', 'user_ip', 'backend', 'request']\n"
+#~ "}, indent=4), 'json')"
+#~ msgstr ""
+

+ 200 - 199
docs/locales/zh_CN/LC_MESSAGES/spec.po

@@ -7,17 +7,16 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PyWebIO 1.1.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-03-16 22:45+0800\n"
+"POT-Creation-Date: 2021-03-18 14:41+0800\n"
 "PO-Revision-Date: 2021-03-16 23:55+0800\n"
 "Last-Translator: WangWeimin <wang0.618@qq.com>\n"
 "Language: zh_CN\n"
 "Language-Team: \n"
-"Plural-Forms: nplurals=1; plural=0;\n"
+"Plural-Forms: nplurals=1; plural=0\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Generated-By: Babel 2.8.0\n"
-"X-Generator: Poedit 2.4.2\n"
 
 #: ../../spec.rst:2
 msgid "Server-Client communication protocol"
@@ -25,28 +24,26 @@ msgstr "服务器-客户端通信协议"
 
 #: ../../spec.rst:4
 msgid ""
-"PyWebIO uses a server-client architecture, the server executes task code, and "
-"interacts with the client (that is, the user browser) through the network. This "
-"section introduce the protocol specification for the communication between "
-"PyWebIO server and client."
-msgstr ""
-"PyWebIO采用服务器-客户端架构,服务端运行任务代码,通过网络与客户端(也就是用户浏"
-"览器)交互。本章介绍PyWebIO服务端与客户端通信的协议。"
+"PyWebIO uses a server-client architecture, the server executes task code,"
+" and interacts with the client (that is, the user browser) through the "
+"network. This section introduce the protocol specification for the "
+"communication between PyWebIO server and client."
+msgstr "PyWebIO采用服务器-客户端架构,服务端运行任务代码,通过网络与客户端(也就是用户浏览器)交互。本章介绍PyWebIO服务端与客户端通信的协议。"
 
 #: ../../spec.rst:6
 msgid ""
-"There are two communication methods between server and client: WebSocket and "
-"Http."
+"There are two communication methods between server and client: WebSocket "
+"and Http."
 msgstr "服务器与客户端有两种通信方式:WebSocket 和 Http 通信。"
 
 #: ../../spec.rst:8
 msgid ""
-"When using Tornado or aiohttp backend, the server and client communicate through "
-"WebSocket, when using Flask or Django backend, the server and client communicate "
-"through Http."
+"When using Tornado or aiohttp backend, the server and client communicate "
+"through WebSocket, when using Flask or Django backend, the server and "
+"client communicate through Http."
 msgstr ""
-"使用 Tornado或aiohttp 后端时,服务器与客户端通过 WebSocket 通信,使用 Flask或"
-"Django 后端时,服务器与客户端通过 Http 通信。"
+"使用 Tornado或aiohttp 后端时,服务器与客户端通过 WebSocket 通信,使用 Flask或Django "
+"后端时,服务器与客户端通过 Http 通信。"
 
 #: ../../spec.rst:10
 msgid "**WebSocket communication**"
@@ -64,24 +61,21 @@ msgstr "**Http 通信:**"
 
 #: ../../spec.rst:16
 msgid ""
-"The client polls the backend through Http GET requests, and the backend returns "
-"a list of PyWebIO messages serialized in json"
-msgstr ""
-"* 客户端通过Http GET请求向后端轮询,后端返回json序列化之后的PyWebIO消息列表"
+"The client polls the backend through Http GET requests, and the backend "
+"returns a list of PyWebIO messages serialized in json"
+msgstr "* 客户端通过Http GET请求向后端轮询,后端返回json序列化之后的PyWebIO消息列表"
 
 #: ../../spec.rst:18
 msgid ""
-"When the user submits the form or clicks the button, the client submits data to "
-"the backend through Http POST request"
+"When the user submits the form or clicks the button, the client submits "
+"data to the backend through Http POST request"
 msgstr "* 当用户提交表单或者点击页面按钮后,客户端通过Http POST请求向后端提交数据"
 
 #: ../../spec.rst:20
 msgid ""
-"In the following, the data sent by the server to the client is called command, "
-"and the data sent by the client to the server is called event."
-msgstr ""
-"为方便区分,下文将由服务器向客户端发送的数据称作command,将客户端发向服务器的数据"
-"称作event"
+"In the following, the data sent by the server to the client is called "
+"command, and the data sent by the client to the server is called event."
+msgstr "为方便区分,下文将由服务器向客户端发送的数据称作command,将客户端发向服务器的数据称作event"
 
 #: ../../spec.rst:22
 msgid "The following describes the format of command and event"
@@ -93,7 +87,8 @@ msgstr ""
 
 #: ../../spec.rst:27
 msgid ""
-"Command is sent by the server to the client. The basic format of command is::"
+"Command is sent by the server to the client. The basic format of command "
+"is::"
 msgstr "command由服务器->客户端,基本格式为::"
 
 #: ../../spec.rst:29
@@ -115,22 +110,20 @@ msgstr "``command`` 字段表示指令名"
 
 #: ../../spec.rst:39
 msgid "``task_id`` : Id of the task that send the command"
-msgstr ""
-"``task_id`` 字段表示发送指令的Task id,客户端对于此命令的响应事件都会传递 task_id"
+msgstr "``task_id`` 字段表示发送指令的Task id,客户端对于此命令的响应事件都会传递 task_id"
 
 #: ../../spec.rst:41
 msgid ""
-"``spec`` : the data of the command, which is different depending on the command "
-"name"
+"``spec`` : the data of the command, which is different depending on the "
+"command name"
 msgstr "``spec`` 字段为指令的参数,不同指令参数不同"
 
 #: ../../spec.rst:43
 msgid ""
-"Note that: the arguments shown above are merely the same with the parameters of "
-"corresponding PyWebIO functions, but there are some differences."
-msgstr ""
-"需要注意,以下不同命令的参数和 PyWebIO 的对应函数的参数大部分含义一致,但是也有些"
-"许不同。"
+"Note that: the arguments shown above are merely the same with the "
+"parameters of corresponding PyWebIO functions, but there are some "
+"differences."
+msgstr "需要注意,以下不同命令的参数和 PyWebIO 的对应函数的参数大部分含义一致,但是也有些许不同。"
 
 #: ../../spec.rst:46
 msgid "The following describes the ``spec`` fields of different commands:"
@@ -210,19 +203,20 @@ msgstr "表单是否可以取消"
 
 #: ../../spec.rst
 msgid ""
-"If cancelable=True, a “Cancel” button will be displayed at the bottom of the "
-"form."
+"If cancelable=True, a “Cancel” button will be displayed at the bottom of "
+"the form."
 msgstr "若 ``cancelable=True`` 则会在表单底部显示一个”取消”按钮,"
 
 #: ../../spec.rst
 msgid ""
-"A ``from_cancel`` event is triggered after the user clicks the cancel button."
+"A ``from_cancel`` event is triggered after the user clicks the cancel "
+"button."
 msgstr "用户点击取消按钮后,触发 ``from_cancel`` 事件"
 
 #: ../../spec.rst:77
 msgid ""
-"The ``inputs`` field is a list of input items, each input item is a ``dict``, "
-"the fields of the item are as follows:"
+"The ``inputs`` field is a list of input items, each input item is a "
+"``dict``, the fields of the item are as follows:"
 msgstr "``inputs`` 字段为输入项组成的列表,每一输入项为一个 ``dict``,字段如下:"
 
 #: ../../spec.rst:79
@@ -239,8 +233,8 @@ msgstr "name: 输入项id。必选"
 
 #: ../../spec.rst:82
 msgid ""
-"auto_focus: Set focus automatically. At most one item of ``auto_focus`` can be "
-"true in the input item list"
+"auto_focus: Set focus automatically. At most one item of ``auto_focus`` "
+"can be true in the input item list"
 msgstr "auto_focus: 自动获取输入焦点. 输入项列表中最多只能由一项的auto_focus为真"
 
 #: ../../spec.rst:83
@@ -321,13 +315,14 @@ msgstr ""
 
 #: ../../spec.rst:106
 msgid ""
-"select: select  https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select"
+"select: select  https://developer.mozilla.org/zh-"
+"CN/docs/Web/HTML/Element/select"
 msgstr ""
 
 #: ../../spec.rst:107
 msgid ""
-"textarea: textarea  https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/"
-"textarea"
+"textarea: textarea  https://developer.mozilla.org/zh-"
+"CN/docs/Web/HTML/Element/textarea"
 msgstr ""
 
 #: ../../spec.rst:108
@@ -336,8 +331,8 @@ msgstr ""
 
 #: ../../spec.rst:109
 msgid ""
-"actions: button[type=submit] https://developer.mozilla.org/zh-CN/docs/Web/HTML/"
-"Element/button"
+"actions: button[type=submit] https://developer.mozilla.org/zh-"
+"CN/docs/Web/HTML/Element/button"
 msgstr ""
 
 #: ../../spec.rst:111
@@ -346,13 +341,14 @@ msgstr ""
 
 #: ../../spec.rst:113
 msgid ""
-"text,number,password: * action: Display a button on the right of the input field."
+"text,number,password: * action: Display a button on the right of the "
+"input field."
 msgstr ""
 
 #: ../../spec.rst:115
 msgid ""
-"The format of ``action`` is ``{label: button label, callback_id: button click "
-"callback id}``"
+"The format of ``action`` is ``{label: button label, callback_id: button "
+"click callback id}``"
 msgstr ""
 
 #: ../../spec.rst:117
@@ -361,8 +357,8 @@ msgstr ""
 
 #: ../../spec.rst:119
 msgid ""
-"code: Codemirror options, same as ``code`` parameter of :func:`pywebio.input."
-"textarea`"
+"code: Codemirror options, same as ``code`` parameter of "
+":func:`pywebio.input.textarea`"
 msgstr "code: Codemirror 参数, 见 :func:`pywebio.input.textarea` 的 ``code`` 参数"
 
 #: ../../spec.rst:121
@@ -391,7 +387,8 @@ msgstr ""
 
 #: ../../spec.rst:137
 msgid ""
-"buttons: ``{label:, value:, [type: 'submit'/'reset'/'cancel'], [disabled:]}`` ."
+"buttons: ``{label:, value:, [type: 'submit'/'reset'/'cancel'], "
+"[disabled:]}`` ."
 msgstr ""
 
 #: ../../spec.rst:140
@@ -416,8 +413,8 @@ msgstr ""
 
 #: ../../spec.rst:149
 msgid ""
-"Update the input item, you can update the ``spec`` of the input item of the "
-"currently displayed form"
+"Update the input item, you can update the ``spec`` of the input item of "
+"the currently displayed form"
 msgstr "更新输入项,用于对当前显示表单中输入项的 ``spec`` 进行更新"
 
 #: ../../spec.rst:151
@@ -430,8 +427,8 @@ msgstr ""
 
 #: ../../spec.rst:154
 msgid ""
-"target_value: str, optional. Used to filter options in checkbox, radio, actions "
-"type"
+"target_value: str, optional. Used to filter options in checkbox, radio, "
+"actions type"
 msgstr ""
 
 #: ../../spec.rst:155
@@ -440,8 +437,8 @@ msgstr ""
 
 #: ../../spec.rst:157
 msgid ""
-"valid_status: When it is bool, it means setting the state of the input value, "
-"pass/fail; when it is 0, it means clear the valid_status flag"
+"valid_status: When it is bool, it means setting the state of the input "
+"value, pass/fail; when it is 0, it means clear the valid_status flag"
 msgstr ""
 
 #: ../../spec.rst:158
@@ -470,8 +467,8 @@ msgstr ""
 
 #: ../../spec.rst:167
 msgid ""
-"Indicates that the server has closed the connection. ``spec`` of the command is "
-"empty."
+"Indicates that the server has closed the connection. ``spec`` of the "
+"command is empty."
 msgstr "指示服务器端已经关闭连接。 ``spec`` 为空"
 
 #: ../../spec.rst:170
@@ -480,11 +477,10 @@ msgstr ""
 
 #: ../../spec.rst:171
 msgid ""
-"Send current session id to client, used to reconnect to server (Only available "
-"in websocket connection). ``spec`` of the command is session id."
-msgstr ""
-"将当前会话id发送至客户端,客户端可以使用此id来重连会话(仅在websocket连接中可"
-"用)。 ``spec`` 字段为会话id"
+"Send current session id to client, used to reconnect to server (Only "
+"available in websocket connection). ``spec`` of the command is session "
+"id."
+msgstr "将当前会话id发送至客户端,客户端可以使用此id来重连会话(仅在websocket连接中可用)。 ``spec`` 字段为会话id"
 
 #: ../../spec.rst:175
 msgid "destroy_form"
@@ -496,8 +492,8 @@ msgstr ""
 
 #: ../../spec.rst:178
 msgid ""
-"Note: The form will not be automatically destroyed after it is submitted, it "
-"needs to be explicitly destroyed using this command"
+"Note: The form will not be automatically destroyed after it is submitted,"
+" it needs to be explicitly destroyed using this command"
 msgstr "表单在页面上提交之后不会自动销毁,需要使用此命令显式销毁"
 
 #: ../../spec.rst:181
@@ -522,327 +518,333 @@ msgstr ""
 
 #: ../../spec.rst:188
 msgid ""
-"scope: str, CSS selector of the output container. If multiple containers are "
-"matched, the content will be output to every matched container"
+"container_selector: The css selector of output widget's container. If "
+"empty(default), use widget self as container"
 msgstr ""
-"scope: str, 内容输出的域的css选择器。若CSS选择器匹配到页面上的多个容器,则内容会"
-"输出到每个匹配到的容器"
 
 #: ../../spec.rst:189
+msgid "container_dom_id: The dom id set to output widget's container."
+msgstr ""
+
+#: ../../spec.rst:190
+msgid ""
+"scope: str, CSS selector of the output container. If multiple containers "
+"are matched, the content will be output to every matched container"
+msgstr "scope: str, 内容输出的域的css选择器。若CSS选择器匹配到页面上的多个容器,则内容会输出到每个匹配到的容器"
+
+#: ../../spec.rst:191
 msgid "position: int, see :ref:`scope - User manual <scope_param>`"
 msgstr "int, 在输出域中输出的位置, 见 :ref:`输出函数的scope相关参数 <scope_param>`"
 
-#: ../../spec.rst:190
+#: ../../spec.rst:192
 msgid "Other attributes of different types"
 msgstr "不同type时的特有字段"
 
-#: ../../spec.rst:192
+#: ../../spec.rst:194
 msgid "Unique attributes of different types:"
 msgstr "``type`` 的可选值及特有字段:"
 
-#: ../../spec.rst:194
+#: ../../spec.rst:196
 msgid "type: markdown"
 msgstr ""
 
-#: ../../spec.rst:196 ../../spec.rst:202 ../../spec.rst:207
+#: ../../spec.rst:198 ../../spec.rst:204 ../../spec.rst:209
 msgid "content: str"
 msgstr ""
 
-#: ../../spec.rst:197
+#: ../../spec.rst:199
 msgid "options: dict, `marked.js <https://github.com/markedjs/marked>`_ options"
 msgstr ""
 
-#: ../../spec.rst:198 ../../spec.rst:203
+#: ../../spec.rst:200 ../../spec.rst:205
 msgid "sanitize: bool, Whether to enable a XSS sanitizer for HTML"
 msgstr ""
-"sanitize: bool, 是否使用 `DOMPurify <https://github.com/cure53/DOMPurify>`_ 对内"
-"容进行过滤来防止XSS攻击。"
+"sanitize: bool, 是否使用 `DOMPurify <https://github.com/cure53/DOMPurify>`_ "
+"对内容进行过滤来防止XSS攻击。"
 
-#: ../../spec.rst:200
+#: ../../spec.rst:202
 msgid "type: html"
 msgstr ""
 
-#: ../../spec.rst:205
+#: ../../spec.rst:207
 msgid "type: text"
 msgstr ""
 
-#: ../../spec.rst:208
+#: ../../spec.rst:210
 msgid ""
-"inline: bool, Use text as an inline element (no line break at the end of the "
-"text)"
+"inline: bool, Use text as an inline element (no line break at the end of "
+"the text)"
 msgstr ""
 
-#: ../../spec.rst:210
+#: ../../spec.rst:212
 msgid "type: buttons"
 msgstr ""
 
-#: ../../spec.rst:212
+#: ../../spec.rst:214
 msgid "callback_id:"
 msgstr ""
 
-#: ../../spec.rst:213
+#: ../../spec.rst:215
 msgid "buttons:[ {value:, label:, [color:]},...]"
 msgstr ""
 
-#: ../../spec.rst:214
+#: ../../spec.rst:216
 msgid "small: bool, Whether to enable small button"
 msgstr "small: bool,是否显示为小按钮样式"
 
-#: ../../spec.rst:215
+#: ../../spec.rst:217
 msgid "link: bool, Whether to make button seem as link."
 msgstr "link: bool,是否显示为链接样式"
 
-#: ../../spec.rst:217
+#: ../../spec.rst:219
 msgid "type: file"
 msgstr ""
 
-#: ../../spec.rst:219
+#: ../../spec.rst:221
 msgid "name: File name when downloading"
 msgstr "name: 下载保存为的文件名"
 
-#: ../../spec.rst:220
+#: ../../spec.rst:222
 msgid "content: File content with base64 encoded"
 msgstr "content: 文件base64编码的内容"
 
-#: ../../spec.rst:222
+#: ../../spec.rst:224
 msgid "type: table"
 msgstr ""
 
-#: ../../spec.rst:224
+#: ../../spec.rst:226
 msgid ""
-"data: Table data, which is a two-dimensional list, the first row is table header."
+"data: Table data, which is a two-dimensional list, the first row is table"
+" header."
 msgstr ""
 
-#: ../../spec.rst:225
+#: ../../spec.rst:227
 msgid ""
-"span: cell span info. Format: {\"[row id],[col id]\": {\"row\":row span, \"col\":"
-"col span }}"
+"span: cell span info. Format: {\"[row id],[col id]\": {\"row\":row span, "
+"\"col\":col span }}"
 msgstr ""
 
-#: ../../spec.rst:228
+#: ../../spec.rst:230
 msgid "popup"
 msgstr ""
 
-#: ../../spec.rst:229
+#: ../../spec.rst:231
 msgid "Show popup"
 msgstr ""
 
-#: ../../spec.rst:231 ../../spec.rst:244
+#: ../../spec.rst:233 ../../spec.rst:246
 msgid "The ``spec`` fields of ``popup`` commands:"
 msgstr ""
 
-#: ../../spec.rst:233
+#: ../../spec.rst:235
 msgid "title"
 msgstr ""
 
-#: ../../spec.rst:234 ../../spec.rst:246
+#: ../../spec.rst:236 ../../spec.rst:248
 msgid "content"
 msgstr ""
 
-#: ../../spec.rst:235
+#: ../../spec.rst:237
 msgid "size: ``large``, ``normal``, ``small``"
 msgstr ""
 
-#: ../../spec.rst:236
+#: ../../spec.rst:238
 msgid "implicit_close"
 msgstr ""
 
-#: ../../spec.rst:237
+#: ../../spec.rst:239
 msgid "closable"
 msgstr ""
 
-#: ../../spec.rst:238
+#: ../../spec.rst:240
 msgid "dom_id: DOM id of popup container element"
 msgstr ""
 
-#: ../../spec.rst:241
+#: ../../spec.rst:243
 msgid "toast"
 msgstr ""
 
-#: ../../spec.rst:242
+#: ../../spec.rst:244
 msgid "Show a notification message"
 msgstr ""
 
-#: ../../spec.rst:247
+#: ../../spec.rst:249
 msgid "duration"
 msgstr ""
 
-#: ../../spec.rst:248
+#: ../../spec.rst:250
 msgid "position: `'left'` / `'center'` / `'right'`"
 msgstr ""
 
-#: ../../spec.rst:249
+#: ../../spec.rst:251
 msgid "color: hexadecimal color value starting with '#'"
 msgstr ""
 
-#: ../../spec.rst:250
+#: ../../spec.rst:252
 msgid "callback_id"
 msgstr ""
 
-#: ../../spec.rst:254
+#: ../../spec.rst:256
 msgid "close_popup"
 msgstr ""
 
-#: ../../spec.rst:255
+#: ../../spec.rst:257
 msgid "Close the current popup window."
 msgstr ""
 
-#: ../../spec.rst:257
+#: ../../spec.rst:259
 msgid "``spec`` of the command is empty."
 msgstr ""
 
-#: ../../spec.rst:260
+#: ../../spec.rst:262
 msgid "set_env"
 msgstr ""
 
-#: ../../spec.rst:261
+#: ../../spec.rst:263
 msgid "Config the environment of current session."
 msgstr ""
 
-#: ../../spec.rst:263
+#: ../../spec.rst:265
 msgid "The ``spec`` fields of ``set_env`` commands:"
 msgstr ""
 
-#: ../../spec.rst:265
+#: ../../spec.rst:267
 msgid "title (str)"
 msgstr ""
 
-#: ../../spec.rst:266
+#: ../../spec.rst:268
 msgid "output_animation (bool)"
 msgstr ""
 
-#: ../../spec.rst:267
+#: ../../spec.rst:269
 msgid "auto_scroll_bottom (bool)"
 msgstr ""
 
-#: ../../spec.rst:268
+#: ../../spec.rst:270
 msgid "http_pull_interval (int)"
 msgstr ""
 
-#: ../../spec.rst:271
+#: ../../spec.rst:273
 msgid "output_ctl"
 msgstr ""
 
-#: ../../spec.rst:272
+#: ../../spec.rst:274
 msgid "Output control"
 msgstr ""
 
-#: ../../spec.rst:274
+#: ../../spec.rst:276
 msgid "The ``spec`` fields of ``output_ctl`` commands:"
 msgstr ""
 
-#: ../../spec.rst:276
+#: ../../spec.rst:278
 msgid "set_scope: scope name"
 msgstr ""
 
-#: ../../spec.rst:278
+#: ../../spec.rst:280
 msgid "container: Specify css selector to the parent scope of target scope."
 msgstr "container: 新创建的scope的父scope的css选择器"
 
-#: ../../spec.rst:279
+#: ../../spec.rst:281
 msgid "position: int, The index where this scope is created in the parent scope."
 msgstr "position: int, 在父scope中创建此scope的位置."
 
-#: ../../spec.rst:280
+#: ../../spec.rst:282
 msgid "if_exist: What to do when the specified scope already exists:"
 msgstr "scope已经存在时如何操作:"
 
-#: ../../spec.rst:282
+#: ../../spec.rst:284
 msgid "null: Do nothing"
 msgstr "null/不指定: 表示立即返回不进行任何操作"
 
-#: ../../spec.rst:283
+#: ../../spec.rst:285
 msgid "`'remove'`: Remove the old scope first and then create a new one"
 msgstr "`’remove’` : 先移除旧scope再创建新scope"
 
-#: ../../spec.rst:284
+#: ../../spec.rst:286
 msgid ""
-"`'clear'`: Just clear the contents of the old scope, but don’t create a new scope"
+"`'clear'`: Just clear the contents of the old scope, but don’t create a "
+"new scope"
 msgstr "`’clear’` : 将旧scope的内容清除,不创建新scope"
 
-#: ../../spec.rst:286
+#: ../../spec.rst:288
 msgid "clear: css selector of the scope need to clear"
 msgstr "clear: 需要清空的scope的css选择器"
 
-#: ../../spec.rst:287
+#: ../../spec.rst:289
 msgid "clear_before"
 msgstr ""
 
-#: ../../spec.rst:288
+#: ../../spec.rst:290
 msgid "clear_after"
 msgstr ""
 
-#: ../../spec.rst:289
+#: ../../spec.rst:291
 msgid "clear_range:[,]"
 msgstr ""
 
-#: ../../spec.rst:290
+#: ../../spec.rst:292
 msgid "scroll_to"
 msgstr ""
 
-#: ../../spec.rst:291
+#: ../../spec.rst:293
 msgid ""
-"position: top/middle/bottom, Where to place the scope in the visible area of the "
-"page"
-msgstr ""
-"position: top/middle/bottom 与scroll_to一起出现, 表示滚动页面,让scope位于屏幕可"
-"视区域顶部/中部/底部"
+"position: top/middle/bottom, Where to place the scope in the visible area"
+" of the page"
+msgstr "position: top/middle/bottom 与scroll_to一起出现, 表示滚动页面,让scope位于屏幕可视区域顶部/中部/底部"
 
-#: ../../spec.rst:292
+#: ../../spec.rst:294
 msgid "remove: Remove the specified scope"
 msgstr "remove: 将给定的scope连同scope处的内容移除"
 
-#: ../../spec.rst:295
+#: ../../spec.rst:297
 msgid "run_script"
 msgstr ""
 
-#: ../../spec.rst:296
+#: ../../spec.rst:298
 msgid "run javascript code in user's browser"
 msgstr ""
 
-#: ../../spec.rst:298
+#: ../../spec.rst:300
 msgid "The ``spec`` fields of ``run_script`` commands:"
 msgstr ""
 
-#: ../../spec.rst:300
+#: ../../spec.rst:302
 msgid "code: str, code"
 msgstr "code: 字符串格式的要运行的js代码"
 
-#: ../../spec.rst:301
+#: ../../spec.rst:303
 msgid "args: dict, Local variables passed to js code"
-msgstr ""
-"args: 传递给代码的局部变量。字典类型,字典键表示变量名,字典值表示变量值(变量值需"
-"要可以被json序列化)"
+msgstr "args: 传递给代码的局部变量。字典类型,字典键表示变量名,字典值表示变量值(变量值需要可以被json序列化)"
 
-#: ../../spec.rst:304
+#: ../../spec.rst:306
 msgid "download"
 msgstr ""
 
-#: ../../spec.rst:305
+#: ../../spec.rst:307
 msgid "Send file to user"
 msgstr ""
 
-#: ../../spec.rst:307
+#: ../../spec.rst:309
 msgid "The ``spec`` fields of ``download`` commands:"
 msgstr ""
 
-#: ../../spec.rst:309
+#: ../../spec.rst:311
 msgid "name: str, File name when downloading"
 msgstr ""
 
-#: ../../spec.rst:310
+#: ../../spec.rst:312
 msgid "content: str, File content in base64 encoding."
 msgstr ""
 
-#: ../../spec.rst:313
+#: ../../spec.rst:315
 msgid "Event"
 msgstr ""
 
-#: ../../spec.rst:315
+#: ../../spec.rst:317
 msgid "Event is sent by the client to the server. The basic format of event is::"
 msgstr "Event消息由客户端发往服务端。基本格式::"
 
-#: ../../spec.rst:317
+#: ../../spec.rst:319
 msgid ""
 "{\n"
 "    event: event name\n"
@@ -851,92 +853,91 @@ msgid ""
 "}"
 msgstr ""
 
-#: ../../spec.rst:323
+#: ../../spec.rst:325
 msgid ""
-"The ``data`` field is the data carried by the event, and its content varies "
-"according to the event. The ``data`` field of different events is as follows:"
-msgstr ""
-"``event`` 表示事件名称。 ``data`` 为事件所携带的数据,其根据事件不同内容也会不"
-"同,不同事件对应的 ``data`` 字段如下:"
+"The ``data`` field is the data carried by the event, and its content "
+"varies according to the event. The ``data`` field of different events is "
+"as follows:"
+msgstr "``event`` 表示事件名称。 ``data`` 为事件所携带的数据,其根据事件不同内容也会不同,不同事件对应的 ``data`` 字段如下:"
 
-#: ../../spec.rst:327
+#: ../../spec.rst:329
 msgid "input_event"
 msgstr ""
 
-#: ../../spec.rst:328
+#: ../../spec.rst:330
 msgid "Triggered when the form changes"
 msgstr "表单发生更改时触发"
 
-#: ../../spec.rst:330
+#: ../../spec.rst:332
 msgid ""
-"event_name: Current available value is ``'blur'``, which indicates that the "
-"input item loses focus"
+"event_name: Current available value is ``'blur'``, which indicates that "
+"the input item loses focus"
 msgstr "event_name: 目前可用值 ``’blur’``,表示输入项失去焦点"
 
-#: ../../spec.rst:331
+#: ../../spec.rst:333
 msgid "name: name of input item"
 msgstr "name: 输入项name"
 
-#: ../../spec.rst:332
+#: ../../spec.rst:334
 msgid "value: value of input item"
 msgstr "value: 输入项值"
 
-#: ../../spec.rst:334
+#: ../../spec.rst:336
 msgid "note: checkbox and radio do not generate blur events"
 msgstr "注意: checkbox radio 不产生blur事件"
 
-#: ../../spec.rst:339
+#: ../../spec.rst:341
 msgid "callback"
 msgstr ""
 
-#: ../../spec.rst:340
+#: ../../spec.rst:342
 msgid "Triggered when the user clicks the button in the page"
 msgstr "用户点击显示区的按钮时触发"
 
-#: ../../spec.rst:342
+#: ../../spec.rst:344
 msgid ""
-"In the ``callback`` event, ``task_id`` is the ``callback_id`` field of the "
-"``button``; The ``data`` of the event is the ``value`` of the button that was "
-"clicked"
+"In the ``callback`` event, ``task_id`` is the ``callback_id`` field of "
+"the ``button``; The ``data`` of the event is the ``value`` of the button "
+"that was clicked"
 msgstr ""
-"在 ``callback`` 事件中,``task_id`` 为对应的 ``button`` 组件的 ``callback_id`` 字"
-"段;\n"
+"在 ``callback`` 事件中,``task_id`` 为对应的 ``button`` 组件的 ``callback_id`` 字段;\n"
 "事件的 ``data`` 为被点击button的 ``value``"
 
-#: ../../spec.rst:346
+#: ../../spec.rst:348
 msgid "from_submit"
 msgstr ""
 
-#: ../../spec.rst:347
+#: ../../spec.rst:349
 msgid "Triggered when the user submits the form"
 msgstr "用户提交表单时触发"
 
-#: ../../spec.rst:349
+#: ../../spec.rst:351
 msgid ""
-"The ``data`` of the event is a dict, whose key is the name of the input item, "
-"and whose value is the value of the input item."
+"The ``data`` of the event is a dict, whose key is the name of the input "
+"item, and whose value is the value of the input item."
 msgstr "事件 ``data`` 字段为表单 ``name`` -> 表单值 的字典"
 
-#: ../../spec.rst:352
+#: ../../spec.rst:354
 msgid "from_cancel"
 msgstr ""
 
-#: ../../spec.rst:353
+#: ../../spec.rst:355
 msgid "Cancel input form"
 msgstr "表单取消输入"
 
-#: ../../spec.rst:355
+#: ../../spec.rst:357
 msgid "The ``data`` of the event is ``None``"
 msgstr ""
 
-#: ../../spec.rst:358
+#: ../../spec.rst:360
 msgid "js_yield"
 msgstr ""
 
-#: ../../spec.rst:359
+#: ../../spec.rst:361
 msgid "submit data from js"
 msgstr "js代码提交数据"
 
-#: ../../spec.rst:361
+#: ../../spec.rst:363
 msgid "The ``data`` of the event is the data need to submit"
 msgstr "事件 ``data`` 字段为相应的数据"
+

+ 1 - 0
docs/releases.rst

@@ -4,6 +4,7 @@ Release notes
 .. toctree::
    :maxdepth: 2
 
+   releases/v1.2.0
    releases/v1.1.0
    releases/v1.0.0
    releases/v0.3.0

+ 24 - 0
docs/releases/v1.2.0.rst

@@ -0,0 +1,24 @@
+What's new in PyWebIO 1.2
+==========================
+
+2021 3/18
+-----------
+
+Highlights
+^^^^^^^^^^^
+* Support reconnect to server in websocket connection by setting ``reconnect_timeout`` parameter in `start_server() <pywebio.platform.tornado.start_server>`.
+* Add `path_deploy() <pywebio.platform.path_deploy>`, `path_deploy_http() <pywebio.platform.path_deploy>` and ``pywebio-path-deploy`` command to deploy PyWebIO applications from a directory.
+* All documents and demos are now available in English version.
+* Some output-related functions support context manager, see :ref:`output functions list <output_func_list>` .
+
+
+Detailed changes
+^^^^^^^^^^^^^^^^^
+* Add `put_info()`, `put_error()`, `put_warning()`, `put_success()`
+* Add `pywebio.utils.pyinstaller_datas()` to get PyWebIO data files when using pyinstaller to bundle PyWebIO application.
+* Add documentation for data visualization using pyg2plot.
+* The ``reset()``, ``append()``, ``insert()`` of `output() <pywebio.output.output>` accept any type as content.
+* Add ``static_dir`` parameter to ``start_server()`` to serve static files.
+* Deprecated `pywebio.session.get_info()`, use `pywebio.session.info` instead.
+* Alert not supporting message when the user using IE browser.
+

+ 1 - 0
pywebio/html/index.html

@@ -1,3 +1,4 @@
+<!--This file is just for backward compatible-->
 <!doctype html>
 <html lang="">
 <head>

+ 2 - 2
pywebio/input.py

@@ -526,9 +526,9 @@ def file_upload(label='', accept=None, name=None, placeholder='Choose file', mul
 
         {
             'filename': file name,
-            'content':content of the file(bytes object),
+            'content':content of the file (in bytes),
             'mime_type': MIME type of the file,
-            'last_modified': Last modified time(timestamp) of the file
+            'last_modified': Last modified time (timestamp) of the file
         }
        
        If there is no file uploaded, return ``None``.

+ 9 - 1
webiojs/src/models/output.ts

@@ -9,7 +9,7 @@ import * as marked from 'marked';
 export interface Widget {
     handle_type: string;
 
-    get_element(spec: any): JQuery;
+    get_element(spec: any): JQuery;  // The length of element must equal 1
 }
 
 let Text = {
@@ -202,9 +202,17 @@ export function getWidgetElement(spec: any) {
 
     let elem = type2widget[spec.type].get_element(spec);
     if (spec.style) {
+        // add style attribute
         let old_style = elem.attr('style') || '';
         elem.attr({"style": old_style + spec.style});
     }
+    if(spec.container_dom_id){
+        let dom_id = 'pywebio-scope-'+spec.container_dom_id;
+        if(spec.container_selector)
+            elem.find(spec.container_selector).attr('id', dom_id);
+        else
+            elem.attr('id', dom_id);
+    }
     return elem;
 }
 

Some files were not shown because too many files changed in this diff