瀏覽代碼

doc: multiple translations

wangweimin 4 年之前
父節點
當前提交
1cc1943927

+ 4 - 1
docs/_ext/codeblock.py

@@ -20,6 +20,9 @@ class ExportableCodeBlock(CodeBlock):
         return t.hexdigest()
 
     def run(self):
+        if self.env.app.builder.name == 'gettext':
+            return super().run()
+
         code_save_path = os.environ.get('CODE_EXPORT_PATH')
         caption = self.options.get('summary', '')
 
@@ -31,7 +34,7 @@ class ExportableCodeBlock(CodeBlock):
             # 设置name属性,从而让生成的代码html块具有id属性
             self.options.update({'name': 'demo-' + code_id})
 
-        name = self.options.get('name').replace('_','-')
+        name = self.options.get('name').replace('_', '-')
         if name in type(self).names:
             name += '-' + code_id
             self.options.update({'name': name})

+ 2 - 1
docs/conf.py

@@ -49,7 +49,8 @@ autodoc_member_order = 'bysource'
 #
 # This is also used if you do content translation via gettext catalogs.
 # Usually you set "language" from the command line for these cases.
-language = 'zh_CN'
+language = 'en'
+gettext_additional_targets = ["literal-block"]
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.

+ 102 - 0
docs/locales/zh_CN/LC_MESSAGES/FAQ.po

@@ -0,0 +1,102 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+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:54+0800\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"
+
+#: ../../FAQ.rst:2
+msgid "FAQ"
+msgstr "常见问题"
+
+#: ../../FAQ.rst:8
+msgid ""
+"How to make the input form not disappear after submission, and can "
+"continue to receive input?"
+msgstr "如何让输入框在提交后不消失,并可以持续性地输入"
+
+#: ../../FAQ.rst:10
+msgid ""
+"The design of PyWebIO is that the input form is destroyed after "
+"successful submission. The input function of PyWebIO is blocking. Once "
+"the form is submitted, the input function returns. So it is meaningless "
+"to leave the form on the page after submission of form. If you want to "
+"make continuous input, you can put input and subsequent operations into "
+"a ``while`` loop."
+msgstr ""
+"PyWebIO 的设计就是输入表单在成功提交后就销毁,因为 PyWebIO 的输入是阻塞式"
+"的,一旦提交表单,输入函数就返回了,此时表单还留在界面上是没有意义的。如"
+"果想实现持续性的输入,可以将接收输入以及后续操作放到一个 ``while`` 循环"
+"中。"
+
+#: ../../FAQ.rst:14
+msgid "How to output an input widget such as a search bar?"
+msgstr "如何输出一个诸如搜索栏的输入框"
+
+#: ../../FAQ.rst:16
+msgid ""
+"Unfortunately, PyWebIO does not support outputting input widget to the "
+"page as general output widget. Because this will make the input "
+"asynchronous, which is exactly what PyWebIO strives to avoid. Callbacks "
+"will increase the complexity of application development. PyWebIO does "
+"not recommend relying too much on the callback mechanism, so it only "
+"provides a little support. However, there is a compromise way to achieve "
+"similar behavior: just put a button (`put_buttons() <pywebio.output."
+"put_buttons>`) where the input widget needs to be displayed, and in the "
+"button's callback function, you can call the input function to get input "
+"and perform subsequent operations."
+msgstr ""
+"很遗憾,PyWebIO并不支持将输入框作为一般性的内容输出到页面。因为这样就相当"
+"于又回到了基于回调获取输入的方式了,会导致应用开发的复杂性提高,PyWebIO不"
+"太推荐过多依赖回调机制,所以对此仅提供了非常少的支持。\n"
+"不过也可以使用另一种方式实现近似的效果:只需要在需要显示输入框的地方放置"
+"一个button( `put_buttons() <pywebio.output.put_buttons>` ),然后在button"
+"的回调函数中调用输入函数来获取输入并进行后续操作。"
+
+#: ../../FAQ.rst:22
+msgid "Why the callback of ``put_buttons()`` does not work?"
+msgstr "为什么 ``put_buttons()`` 的回调不起作用"
+
+#: ../../FAQ.rst:24
+msgid ""
+"In general, in Server mode, once the task function returns (or in Script "
+"mode, the script exits), the session closes. After this, the event "
+"callback will not work. You can call the `pywebio.session.hold()` "
+"function at the end of the task function (or script) to hold the "
+"session, so that the event callback will always be available before the "
+"browser page is closed by user."
+msgstr ""
+"一般情况下,在Server模式下,任务函数一旦返回(或在Script模式下,脚本运行结"
+"束),会话就结束了,此时事件回调也将不起作用,可以在任务函数(或脚本)末尾处"
+"使用 `pywebio.session.hold()` 函数来将会话保持,这样在用户关闭浏览器页面"
+"前,事件回调将一直可用。 参见 :ref:`Server模式与Script模式 "
+"<server_and_script_mode>`"
+
+#: ../../FAQ.rst:28
+msgid "Why I cannot download the file using ``put_file()``?"
+msgstr "为什么 ``put_file()`` 无法下载文件"
+
+#: ../../FAQ.rst:30
+msgid ""
+"The reason is the same as above. The page needs to request server for "
+"data when the download button is clicked, so the download link will be "
+"unavailable after the session is closed. You can use the `pywebio."
+"session.hold()` function at the end of the task function to hold the "
+"session."
+msgstr ""
+"原因同上。 ``put_file()`` 的文件链接被点击后,也是需要和服务端通信获取文"
+"件数据的,所以会话关闭后下载链接会不可用。可以在任务函数末尾处使用 "
+"`pywebio.session.hold()` 函数来将会话保持。"

+ 535 - 0
docs/locales/zh_CN/LC_MESSAGES/arch.po

@@ -0,0 +1,535 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PyWebIO 1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-17 17:57+0800\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\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"
+
+#: ../../arch.rst:2
+msgid "Architecture"
+msgstr ""
+
+#: ../../arch.rst:5
+msgid "概念"
+msgstr ""
+
+#: ../../arch.rst:7
+msgid "``Session`` 表示浏览器与程序交互产生的一次会话。PyWebIO在会话中运行 ``Task`` ,任务是"
+msgstr ""
+
+#: ../../arch.rst:9
+msgid "会话中除了起始的执行单元,也可以并发启动新的执行单元,在新的执行单元中也可以进行输入输出。"
+msgstr ""
+
+#: ../../arch.rst:11
+msgid "在用户端,相同会话中的不同的执行单元的输入是独立的,共享输出空间,但输出域的栈结构各自独立。"
+msgstr ""
+
+#: ../../arch.rst:13
+msgid ""
+"若用户正在填写一个执行单元的表单,会话中的其他执行单元也开始向用户请求输入,此时用户正在填写的表单将会隐藏, "
+"新的输入表单将会显示给用户,当用户填写完新表单并提交后,旧表单重新显示,之前在旧表单上的输入也会保留。"
+msgstr ""
+
+#: ../../arch.rst:16
+msgid "在基于线程的会话中,会话中的每个执行单元都是一个线程"
+msgstr ""
+
+#: ../../arch.rst:18
+msgid "在基于协程的会话中,会话中的每个执行单元都是一个协程"
+msgstr ""
+
+#: ../../arch.rst:20
+msgid "除了并发执行的执行单元,会话中还有事件回调函数,目前就只有按钮控件可以绑定点击事件的回调函数。"
+msgstr ""
+
+#: ../../arch.rst:23
+msgid "架构"
+msgstr ""
+
+#: ../../arch.rst:25
+msgid ""
+"会话内的每个执行单元使用唯一的task_id进行标识,由于会话内的输入需要区分执行单元,所以每个表单提交时, "
+"除了表单的内容以外,还会携带表单所在的执行单元的task_id,这样,后台会话才可以知道该将表单数据传递给哪个执行单元。"
+msgstr ""
+
+#: ../../arch.rst:31
+msgid "PyWebIO会话是由事件驱动的,这些事件来自用户在页面上的操作,比如提交表单,点击按钮,这些事件会通过http请求或websocket连接发送到后端框架。"
+msgstr ""
+
+#: ../../arch.rst:33
+msgid ""
+"后端框架维护有当前在线的Session实例,后端框架在收到用户提交的事件后,回调用相关Session实例的 "
+"``send_client_event()`` 方法将事件发送至会话;"
+msgstr ""
+
+#: ../../arch.rst:35
+msgid ""
+"一个会话内会拥有至少一个执行单元,执行单元在调用PyWebIO的输入函数后会临时挂起,当会话收到用户的输入提交后,会话便将执行单元恢复执行,并提供用户输入的值。"
+" 执行单元内,任何输入输出的调用都会转换成一些命令序列发送给会话."
+msgstr ""
+
+#: ../../arch.rst:38
+msgid "当后端框架通过HTTP与用户浏览器通信时,用户浏览器是以轮训的方式获取指令,会话会保存由执行单元生成的、还未发送到浏览器的命令序列,等待下次轮训时由后端框架取走。"
+msgstr ""
+
+#: ../../arch.rst:40
+msgid "当后端框架通过WebSocket与用户建立连接时,任何由执行单元发送到会话的命令都会立即发送到后端,并由后端通过WebSocket连接通知用户浏览器。"
+msgstr ""
+
+#: ../../arch.rst:43
+msgid "实现"
+msgstr ""
+
+#: ../../arch.rst:46
+msgid "后端与Session的交互"
+msgstr ""
+
+#: ../../arch.rst:48
+msgid "后端框架负责从Session会话中获取来自PyWebIO的指令,并发送给用户浏览器;同时后端框架接收用户提交的数据,并发送给相应的会话实例。"
+msgstr ""
+
+#: ../../arch.rst:50
+msgid ""
+"Session暴露给后端框架的方法仅有 `Session.send_client_event "
+"<pywebio.session.base.Session.send_client_event>` 、 "
+"`Session.get_task_commands "
+"<pywebio.session.base.Session.get_task_commands>` 和 `Session.close "
+"<pywebio.session.base.Session.close>` 。"
+msgstr ""
+
+#: ../../arch.rst:54
+msgid "基于HTTP通信的后端的实现逻辑"
+msgstr ""
+
+#: ../../arch.rst:56
+msgid "**基于HTTP的前后端通信约定**"
+msgstr ""
+
+#: ../../arch.rst:58
+msgid "前端按照固定间隔使用GET请求轮训后端接口,在请求中使用 ``webio-session-id`` HTTP头来传递会话ID。"
+msgstr ""
+
+#: ../../arch.rst:60
+msgid ""
+"会话一开始时,会话ID由后端生成并通过响应中的 ``webio-session-id`` HTTP头返回给前端,后续前端的请求都会在请求头中使用 "
+"``webio-session-id`` 字段传递会话ID。"
+msgstr ""
+
+#: ../../arch.rst:62
+msgid "前端产生的事件使用POST请求发送给后端。对于前端的每次轮训和事件提交请求,后端都会返回当前未执行的指令序列作为响应,前端收到响应后会依次执行指令。"
+msgstr ""
+
+#: ../../arch.rst:64 ../../arch.rst:93
+msgid "**代码实现**"
+msgstr ""
+
+#: ../../arch.rst:66
+msgid ""
+"以Flask后端为例,Flask后端与Session的交互都在Flask视图函数中实现,视图函数通过调用 "
+"`pywebio.platform.flask.webio_view "
+"<./_modules/pywebio/platform/flask.html#webio_view>`_ 获取, 在 `webio_view` "
+"中,先是实例化了一个 `pywebio.platform.httpbased.HttpHandler` "
+",然后声明了一个内部函数,这个内部函数就是Flask视图函数, 在视图函数内,先是实例化了一个 "
+"`pywebio.platform.flask.FlaskHttpContext` 对象,然后通过调用 "
+"``HttpHandler.handle_request(FlaskHttpContext)`` 就获得了视图的响应。"
+msgstr ""
+
+#: ../../arch.rst:70
+msgid ""
+"这其中,FlaskHttpContext 的基类为 HttpContext ,HttpContext "
+"接口各异的后端框架定义了一个统一的操作接口,用于从当前请求中获取请求相关的数据并设置请求的相应。 FlaskHttpContext "
+"为HttpContext接口的Flask实现。"
+msgstr ""
+
+#: ../../arch.rst:72
+msgid ""
+"而 HttpHandle 负责维护Session实例并实现HTTP请求与Session之间的交互,HttpHandle "
+"与后端框架相关的交互全都通过 HttpContext 操作。"
+msgstr ""
+
+#: ../../arch.rst:74
+msgid "HttpContext的生命周期为一次HTTP请求,HttpHandle的生命周期和整个后端框架的生命周期一致。"
+msgstr ""
+
+#: ../../arch.rst:76
+msgid ""
+"HttpHandler.handle_request 负责处理前端发送给后端的每一次请求,HttpHandler.handle_request "
+"的处理流程如下:"
+msgstr ""
+
+#: ../../arch.rst:78
+msgid "检测当前HTTP请求是否满足跨域设置"
+msgstr ""
+
+#: ../../arch.rst:79
+msgid ""
+"根绝当前请求的 webio-session-id 头信息找到相应的Session实例,若不存在 webio-session-id "
+"头则创建新会话并分配webio-session-id"
+msgstr ""
+
+#: ../../arch.rst:80
+msgid "若当前请求为POST事件提交请求,则将提交的数据通过 Session.send_client_event 发送给Session"
+msgstr ""
+
+#: ../../arch.rst:81
+msgid "通过调用 Session.get_task_commands 获取待执行的指令序列,并通过 HttpContext 向后端设置响应数据"
+msgstr ""
+
+#: ../../arch.rst:83
+msgid ""
+"此外,基于HTTP的会话,用户主动关闭会话时(比如关闭浏览器),后端无法立即感知,所以在HttpHandler.handle_request 中,"
+" 还会周期性地检测会话的最后活跃时间,将一段时间内不活跃的会话视为过期,所以在HttpHandler清理过期会话并调用 Session.close"
+" 释放会话内的资源。"
+msgstr ""
+
+#: ../../arch.rst:88
+msgid "基于WebSocket通信的后端的实现逻辑"
+msgstr ""
+
+#: ../../arch.rst:89
+msgid "**基于WebSocket的前后端通信约定:**"
+msgstr ""
+
+#: ../../arch.rst:91
+msgid "浏览器与后端使用一个WebSocket连接来保持一个会话,后端的指令通过JSON序列化之后的消息实时发送给前端,前端用户触发的事件数据也通过JSON序列化之后发送给后端。"
+msgstr ""
+
+#: ../../arch.rst:95
+msgid "以Tornado后端为例"
+msgstr ""
+
+#: ../../arch.rst:97
+msgid ""
+"webio_handler用于获取Tornado与前端进行通信的WebSocketHandler子类,其逻辑实现在 _webio_handler "
+"中,由于WebSocket的有状态性, "
+"WebSocketHandler子类的实现比基于HTTP通信的HttpHandler要简单许多,关键部分如下:"
+msgstr ""
+
+#: ../../arch.rst:100
+msgid ""
+"在WebSocket连接创建的时候初始化Session实例,并向Session对象注册了 "
+"on_task_command和on_session_close 回调,分别在新指令产生时和会话由执行单元关闭时由Session调用, "
+"用于实现WebSocketHandler向前端实时发送指令"
+msgstr ""
+
+#: ../../arch.rst:102
+msgid ""
+"在收到前端浏览器发送来的消息后,WebSocketHandler将收到的数据通过 Session.send_client_event "
+"发送给Session"
+msgstr ""
+
+#: ../../arch.rst:103
+msgid "在WebSocket连接关闭时,调用 Session.close 释放会话内的资源。"
+msgstr ""
+
+#: ../../arch.rst:106
+msgid "session与执行单元(输入/输出)的交互"
+msgstr ""
+
+#: ../../arch.rst:108
+msgid "会话提供给执行单元的关键接口有:"
+msgstr ""
+
+#: ../../arch.rst:110
+msgid "get_current_session : 静态方法,获取当前执行单元所属的会话实例"
+msgstr ""
+
+#: ../../arch.rst:111
+msgid "get_current_task_id : 静态方法,获取当前执行单元所属的id"
+msgstr ""
+
+#: ../../arch.rst:112
+msgid "send_task_command : 向会话发送指令"
+msgstr ""
+
+#: ../../arch.rst:113
+msgid "next_client_event : 读取来自浏览器的属于当前执行单元的下一个事件"
+msgstr ""
+
+#: ../../arch.rst:114
+msgid "register_callback : 向会话注册一个回调"
+msgstr ""
+
+#: ../../arch.rst:116
+msgid "同时,会话根据实现方式不同,还分别提供了 register_thread 和 run_async 用于启动新的执行单元。"
+msgstr ""
+
+#: ../../arch.rst:119
+msgid "**回调机制**"
+msgstr ""
+
+#: ../../arch.rst:121
+msgid ""
+"在会话中,为了能够响应用户在界面上的某些事件(比如点击了输出内容中的某个按钮),于是设计了回调机制,可以在执行单元中使用register_callback向当前会话注册回调,然后执行单元会得到一个回调ID,"
+" 执行单元再通过相关指令让浏览器输出一些可以触发的控件,并向控件绑定回调ID,当用户触发控件后,前端将带有回调ID的 :ref:`回调事件 "
+"<callback_event>` 发回会话,会话会在专门的执行单元中或启动新执行单元中运行回调。"
+msgstr ""
+
+#: ../../arch.rst:125
+msgid "基于线程的会话实现"
+msgstr ""
+
+#: ../../arch.rst:127
+msgid "在基于线程的会话中,每个执行单元都是一个线程,每个执行单元通过一条消息队列从会话接收来自用户的事件消息,当执行单元所需要的事件用户还没有提交时,执行单元便会挂起。"
+msgstr ""
+
+#: ../../arch.rst:129
+msgid "基于线程的会话使用线程ID作为执行单元的ID,在全局使用一个以线程id为key的字典来映射执行单元所属的会话实例,会话内不同执行单元的用户事件消息队列也通过执行单元ID进行索引。"
+msgstr ""
+
+#: ../../arch.rst:131
+msgid "使用 register_thread 启动新的执行单元时,也需要为新执行单元注册用户事件消息队列。"
+msgstr ""
+
+#: ../../arch.rst:134
+msgid "基于协程的会话实现"
+msgstr ""
+
+#: ../../arch.rst:135
+msgid "在基于协程的会话中,每个执行单元都是一个由协程包装成的任务对象(Task),当会话接收来自用户的事件消息后,便激活相应的任务对象,使得协程恢复运行。"
+msgstr ""
+
+#: ../../arch.rst:137
+msgid ""
+"由于基于协程的会话是单线程的,所以会话在激活任务对象前是通过将上下文信息保存在全局变量中来实现 get_current_session 和 "
+"get_current_task_id 方法,全局的上下文信息包含当前将要执行的会话的实例和执行单元的ID。"
+msgstr ""
+
+#: ../../arch.rst:141
+msgid "Script mode的实现"
+msgstr ""
+
+#: ../../arch.rst:142
+msgid ""
+"Script mode "
+"也是基于线程的,但由于全局仅存在一个会话,所有执行单元必定全部属于这个会话,所以也无需主动调用register_thread(thread)注册线程。"
+msgstr ""
+
+#: ../../arch.rst:144
+msgid "当PyWebIO检测到用户代码在后端Server还未启动的情况下就调用了PyWebIO交互函数时,便会启动Script mode:"
+msgstr ""
+
+#: ../../arch.rst:146
+msgid "在新线程中启动后端Server"
+msgstr ""
+
+#: ../../arch.rst:147
+msgid "启动浏览器打开后端Server运行的地址"
+msgstr ""
+
+#: ../../arch.rst:148
+msgid "在第一次与用户建立连接时初始化会话"
+msgstr ""
+
+#: ../../arch.rst:150
+msgid "script mode的会话类继承了基于线程的会话类,并修改了部分方法:"
+msgstr ""
+
+#: ../../arch.rst:152
+msgid "构造函数 : 仅允许script mode会话类被初始化一次"
+msgstr ""
+
+#: ../../arch.rst:153
+msgid "get_current_session : 直接返回全局的会话对象"
+msgstr ""
+
+#: ../../arch.rst:154
+msgid "get_current_task_id : 除了返回当前线程id,还会自动将当前线程使用 register_thread 注册到会话中"
+msgstr ""
+
+#: ../../arch.rst:157
+msgid "相关对象的文档"
+msgstr ""
+
+#: of pywebio.platform.httpbased.HttpHandler:1
+msgid "基于HTTP的后端Handler实现"
+msgstr ""
+
+#: of pywebio.platform.httpbased.HttpHandler:4
+msgid ""
+"Don't need a lock when access HttpHandler._webio_sessions, See: "
+"https://stackoverflow.com/questions/1312331/using-a-global-dictionary-"
+"with-threads-in-python"
+msgstr ""
+
+#: of pywebio.platform.httpbased.HttpHandler.handle_request:1
+msgid "called when every http request"
+msgstr ""
+
+#: of pywebio.platform.flask.FlaskHttpContext.request_obj:1
+msgid "返回当前请求对象"
+msgstr ""
+
+#: of pywebio.platform.flask.FlaskHttpContext.request_method:1
+msgid "返回当前请求的方法,大写"
+msgstr ""
+
+#: of pywebio.platform.flask.FlaskHttpContext.request_headers:1
+msgid "返回当前请求的header字典"
+msgstr ""
+
+#: of pywebio.platform.flask.FlaskHttpContext.request_url_parameter:1
+msgid "返回当前请求的URL参数"
+msgstr ""
+
+#: of pywebio.platform.flask.FlaskHttpContext.request_json:1
+msgid "返回当前请求的json反序列化后的内容,若请求数据不为json格式,返回None"
+msgstr ""
+
+#: of pywebio.platform.flask.FlaskHttpContext.set_header:1
+msgid "为当前响应设置header"
+msgstr ""
+
+#: of pywebio.platform.flask.FlaskHttpContext.set_status:1
+msgid "为当前响应设置http status"
+msgstr ""
+
+#: of pywebio.platform.flask.FlaskHttpContext.set_content:1
+msgid "设置相应的内容"
+msgstr ""
+
+#: of pywebio.platform.flask.FlaskHttpContext.set_content
+#: pywebio.session.base.Session.defer_call
+#: pywebio.session.base.Session.get_scope_name
+msgid "Parameters"
+msgstr ""
+
+#: of pywebio.platform.flask.FlaskHttpContext.set_content:4
+msgid "content是否要序列化成json格式,并将 content-type 设置为application/json"
+msgstr ""
+
+#: of pywebio.platform.flask.FlaskHttpContext.get_response:1
+msgid "获取当前的响应对象,用于在私图函数中返回"
+msgstr ""
+
+#: of pywebio.platform.flask.FlaskHttpContext.get_client_ip:1
+msgid "获取用户的ip"
+msgstr ""
+
+#: of pywebio.session.base.Session:1
+msgid "会话对象,由Backend创建"
+msgstr ""
+
+#: of pywebio.session.base.Session:5
+msgid "属性:"
+msgstr ""
+
+#: of pywebio.session.base.Session:4
+msgid "info 表示会话信息的对象 save 会话的数据对象,提供用户在对象上保存一些会话相关数据"
+msgstr ""
+
+#: of pywebio.session.base.Session:19
+msgid "由Task在当前Session上下文中调用:"
+msgstr ""
+
+#: of pywebio.session.base.Session:8
+msgid "get_current_session get_current_task_id"
+msgstr ""
+
+#: of pywebio.session.base.Session:11
+msgid ""
+"get_scope_name pop_scope push_scope send_task_command next_client_event "
+"on_task_exception register_callback"
+msgstr ""
+
+#: of pywebio.session.base.Session:19
+msgid "defer_call"
+msgstr ""
+
+#: of pywebio.session.base.Session:24
+msgid "由Backend调用:"
+msgstr ""
+
+#: of pywebio.session.base.Session:22
+msgid "send_client_event get_task_commands close"
+msgstr ""
+
+#: of pywebio.session.base.Session:27
+msgid "Task和Backend都可调用:"
+msgstr ""
+
+#: of pywebio.session.base.Session:27
+msgid "closed"
+msgstr ""
+
+#: of pywebio.session.base.Session:32
+msgid "Session是不同的后端Backend与协程交互的桥梁:"
+msgstr ""
+
+#: of pywebio.session.base.Session:30
+msgid ""
+"后端Backend在接收到用户浏览器的数据后,会通过调用 ``send_client_event`` "
+"来通知会话,进而由Session驱动协程的运行。 Task内在调用输入输出函数后,会调用 ``send_task_command`` "
+"向会话发送输入输出消息指令, Session将其保存并留给后端Backend处理。"
+msgstr ""
+
+#: of pywebio.session.base.Session.get_scope_name:1
+msgid "获取当前任务的scope栈检索scope名"
+msgstr ""
+
+#: of pywebio.session.base.Session.get_scope_name:3
+msgid "scope栈的索引"
+msgstr ""
+
+#: of pywebio.session.base.Session.get_scope_name
+#: pywebio.session.base.Session.pop_scope
+msgid "Returns"
+msgstr ""
+
+#: of pywebio.session.base.Session.get_scope_name:4
+msgid "scope名,不存在时返回 None"
+msgstr ""
+
+#: of pywebio.session.base.Session.pop_scope:1
+msgid "弹出当前scope"
+msgstr ""
+
+#: of pywebio.session.base.Session.pop_scope:3
+msgid "当前scope名"
+msgstr ""
+
+#: of pywebio.session.base.Session.push_scope:1
+msgid "进入新scope"
+msgstr ""
+
+#: of pywebio.session.base.Session.next_client_event:1
+msgid "获取来自客户端的下一个事件。阻塞调用,若在等待过程中,会话被用户关闭,则抛出SessionClosedException异常"
+msgstr ""
+
+#: of pywebio.session.base.Session.register_callback:1
+msgid "向Session注册一个回调函数,返回回调id"
+msgstr ""
+
+#: of pywebio.session.base.Session.register_callback:3
+msgid ""
+"Session需要保证当收到前端发送的事件消息 ``{event: \"callback\",task_id: 回调id, data:...}``"
+" 时, ``callback`` 回调函数被执行, 并传入事件消息中的 ``data`` 字段值作为参数"
+msgstr ""
+
+#: of pywebio.session.base.Session.defer_call:1
+msgid "设置会话结束时调用的函数。可以用于资源清理。 在会话中可以多次调用 `defer_call()` ,会话结束后将会顺序执行设置的函数。"
+msgstr ""
+
+#: of pywebio.session.base.Session.defer_call:4
+msgid "话结束时调用的函数"
+msgstr ""
+
+#~ msgid "参数"
+#~ msgstr ""
+
+#~ msgid "返回"
+#~ msgstr ""
+

+ 122 - 0
docs/locales/zh_CN/LC_MESSAGES/demos.po

@@ -0,0 +1,122 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+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:51+0800\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"
+
+#: ../../demos.rst:2
+msgid "Demos"
+msgstr "示例Demos"
+
+#: ../../demos.rst:5
+msgid "Basic demos"
+msgstr "基本demo"
+
+#: ../../demos.rst:6
+msgid "Sample application written with PyWebIO"
+msgstr "使用PyWebIO编写的示例应用"
+
+#: demos.bmi:2 of
+msgid "BMI calculation"
+msgstr "BMI指数计算"
+
+#: demos.bmi:4 of
+msgid ""
+"Simple application for calculating `Body Mass Index <https://en."
+"wikipedia.org/wiki/Body_mass_index>`_"
+msgstr ""
+"计算 `BMI指数 <https://en.wikipedia.org/wiki/Body_mass_index>`_ 的简单"
+"应用"
+
+#: demos.bmi:6 of
+msgid ""
+":demo_host:`Demo </?pywebio_api=bmi>`  `Source code <https://github."
+"com/wang0618/PyWebIO/blob/dev/demos/bmi.py>`_"
+msgstr ""
+":demo_host:`Demo地址 </?pywebio_api=bmi>`  `源码 <https://github.com/"
+"wang0618/PyWebIO/blob/dev/demos/bmi.py>`_"
+
+#: demos.input_usage:2 of
+msgid "Input demo"
+msgstr "输入演示"
+
+#: demos.input_usage:3 of
+msgid "Demonstrate various input usage supported by PyWebIO"
+msgstr "演示PyWebIO输入模块的使用"
+
+#: demos.input_usage:5 of
+msgid ""
+":demo_host:`Demo </?pywebio_api=input_usage>`  `Source code <https://"
+"github.com/wang0618/PyWebIO/blob/dev/demos/input_usage.py>`_"
+msgstr ""
+":demo_host:`Demo地址 </?pywebio_api=input_usage>`  `源码 <https://"
+"github.com/wang0618/PyWebIO/blob/dev/demos/input_usage.py>`_"
+
+#: demos.output_usage:2 of
+msgid "Output demo"
+msgstr "输出演示"
+
+#: demos.output_usage:3 of
+msgid "Demonstrate various output usage supported by PyWebIO"
+msgstr "演示PyWebIO输出模块的使用"
+
+#: demos.output_usage:5 of
+msgid ""
+":demo_host:`Demo </?pywebio_api=output_usage>`  `Source code <https://"
+"github.com/wang0618/PyWebIO/blob/dev/demos/output_usage.py>`_"
+msgstr ""
+":demo_host:`Demo地址 </?pywebio_api=output_usage>`  `源码 <https://"
+"github.com/wang0618/PyWebIO/blob/dev/demos/output_usage.py>`_"
+
+#: demos.chat_room:2 of
+msgid "Online chat room"
+msgstr "聊天室"
+
+#: demos.chat_room:3 of
+msgid "Chat with everyone currently online"
+msgstr "和当前所有在线的人聊天"
+
+#: demos.chat_room:5 of
+msgid ""
+":demo_host:`Demo </?pywebio_api=chat_room>`  `Source code <https://"
+"github.com/wang0618/PyWebIO/blob/dev/demos/chat_room.py>`_"
+msgstr ""
+":demo_host:`Demo地址 </?pywebio_api=chat_room>`  `源码 <https://github."
+"com/wang0618/PyWebIO/blob/dev/demos/chat_room.py>`_"
+
+#: demos.chat_room:7 of
+msgid "Use coroutine-based sessions"
+msgstr "使用基于协程的会话"
+
+#: demos.chat_room:8 of
+msgid ""
+"Use `run_async() <pywebio.session.run_async>` to start background "
+"coroutine"
+msgstr "使用 `run_async() <pywebio.session.run_async>` 启动后台协程"
+
+#: ../../demos.rst:11
+msgid "Data visualization demos"
+msgstr "数据可视化demo"
+
+#: ../../demos.rst:13
+msgid ""
+"PyWebIO supports data visualization by using of third-party libraries. "
+"For details, see :ref:`Use PyWebIO for data visualization "
+"<visualization>`"
+msgstr ""
+"PyWebIO支持使用第三方库进行数据可视化,详情见 :ref:`使用PyWebIO进行数据"
+"可视化 <visualization>`"

+ 43 - 0
docs/locales/zh_CN/LC_MESSAGES/exceptions.po

@@ -0,0 +1,43 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+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:53+0800\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"
+
+#: ../../exceptions.rst:2
+msgid "``pywebio.exceptions``"
+msgstr ""
+
+#: of pywebio.exceptions:2
+msgid "pywebio.exceptions"
+msgstr ""
+
+#: of pywebio.exceptions:4
+msgid "This module contains the set of PyWebIO's exceptions."
+msgstr ""
+
+#: of pywebio.exceptions.SessionException:1
+msgid "Base class for PyWebIO session related exceptions"
+msgstr "PyWebIO会话相关异常的基类"
+
+#: of pywebio.exceptions.SessionClosedException:1
+msgid "The session has been closed abnormally"
+msgstr "会话已经关闭异常"
+
+#: of pywebio.exceptions.SessionNotFoundException:1
+msgid "Session not found"
+msgstr "会话未找到异常"

+ 1884 - 0
docs/locales/zh_CN/LC_MESSAGES/guide.po

@@ -0,0 +1,1884 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PyWebIO 1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-17 18:31+0800\n"
+"PO-Revision-Date: 2021-02-18 11:33+0800\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"
+
+#: ../../guide.rst:2
+msgid "User's guide"
+msgstr ""
+
+#: ../../guide.rst:4
+msgid ""
+"If you are familiar with web development, you may not be accustomed to the "
+"usage of PyWebIO described below, which is different from the traditional web "
+"development patton that backend implement api and frontend display content. In "
+"PyWebIO, you only need write code in Python."
+msgstr ""
+"如果你接触过Web开发,你可能对接下来描述的PyWebIO的用法感到不太习惯,不同于传统"
+"Web开发的后端实现接口、前端进行展示交互的模式,在PyWebIO中,所有的逻辑都通过编写"
+"Python代码实现。"
+
+#: ../../guide.rst:6
+msgid ""
+"In fact, the way of writing PyWebIO applications is more like writing a console "
+"program, except that the terminal here becomes a browser. Using the imperative "
+"API provided by PyWebIO, you can simply call ``put_text``, ``put_image``, "
+"``put_table`` and other functions to output text, pictures, tables and other "
+"content to the browser, or you can call some functions such as ``input``, "
+"``select``, ``file_upload`` to display different forms on the browser to get "
+"user input. In addition, PyWebIO also provides support for click events, "
+"layout, etc. PyWebIO aims to allow you to use the least code to interact with "
+"the user and provide a good user experience as much as possible."
+msgstr ""
+"你可以按照编写控制台程序的逻辑编写PyWebIO应用,只不过这里的终端变成了浏览器。通"
+"过PyWebIO提供的命令式API,\n"
+"你可以简单地调用 ``put_text`` 、 ``put_image`` 、 ``put_table`` 等函数输出文本、"
+"图片、表格等内容到浏览器,也可以调用 ``input`` 、 ``select`` 、\n"
+"``file_upload`` 等函数在浏览器上显示不同表单来接收用户的输入。此外PyWebIO中还提"
+"供了点击事件、布局等支持,让你可以使用最少的代码完成与用户的交互,\n"
+"并尽可能提供良好的用户体验。"
+
+#: ../../guide.rst:9
+msgid ""
+"This user guide introduces you the most of the features of PyWebIO. There is a "
+"demo link at the top right of the most of the example codes in this document, "
+"where you can preview the running effect of the code online."
+msgstr ""
+"本篇使用指南从几个方面对PyWebIO的使用进行介绍,覆盖了PyWebIO的绝大部分特性。本文"
+"档中大部分示例代码的右上方都有一个Demo链接,点击后可以在线预览代码的运行效果。"
+
+#: ../../guide.rst:12
+msgid "Input"
+msgstr "输入"
+
+#: ../../guide.rst:14
+msgid ""
+"The input functions are defined in the :doc:`pywebio.input </input>` module and "
+"can be imported using ``from pywebio.input import *``."
+msgstr ""
+"输入函数都定义在 :doc:`pywebio.input </input>` 模块中,可以使用 ``from pywebio."
+"input import *`` 引入。"
+
+#: ../../guide.rst:16
+msgid ""
+"When calling the input function, an input form  will be popped up on the "
+"browser. PyWebIO's input functions is blocking (same as Python's built-in "
+"``input()`` function) and will not return until the form is successfully "
+"submitted."
+msgstr ""
+"调用输入函数会在浏览器上弹出一个输入表单来获取输入。PyWebIO的输入函数是阻塞式的"
+"(和Python内置的 `input` 一样),在表单被成功提交之前,输入函数不会返回。"
+
+#: ../../guide.rst:19
+msgid "Basic input"
+msgstr "基本输入"
+
+#: ../../guide.rst:21
+msgid "Here are some basic types of input."
+msgstr "首先是一些基本类型的输入。"
+
+#: ../../guide.rst:23
+msgid "Text input:"
+msgstr "文本输入:"
+
+#: ../../guide.rst:25
+#, python-format
+msgid ""
+"age = input(\"How old are you?\", type=NUMBER)\n"
+"put_text('age = %r' % age)  # ..demo-only"
+msgstr ""
+
+#: ../../guide.rst:32
+msgid ""
+"After running the above code, the browser will pop up a text input field to get "
+"the input. After the user completes the input and submits the form, the "
+"function returns the value entered by the user."
+msgstr ""
+"这样一行代码的效果为:浏览器会弹出一个文本输入框来获取输入,在用户完成输入将表单"
+"提交后,函数返回用户输入的值。"
+
+#: ../../guide.rst:34
+msgid "Here are some other types of input functions:"
+msgstr "下面是一些其他类型的输入函数:"
+
+#: ../../guide.rst:36
+#, python-format
+msgid ""
+"# Password input\n"
+"password = input(\"Input password\", type=PASSWORD)\n"
+"put_text('password = %r' % password)  # ..demo-only\n"
+"## ----\n"
+"\n"
+"# Drop-down selection\n"
+"gift = select('Which gift you want?', ['keyboard', 'ipad'])\n"
+"put_text('gift = %r' % gift)  # ..demo-only\n"
+"## ----\n"
+"\n"
+"# Checkbox\n"
+"agree = checkbox(\"User Term\", options=['I agree to terms and conditions'])\n"
+"put_text('agree = %r' % agree)  # ..demo-only\n"
+"## ----\n"
+"\n"
+"# Single choice\n"
+"answer = radio(\"Choose one\", options=['A', 'B', 'C', 'D'])\n"
+"put_text('answer = %r' % answer)  # ..demo-only\n"
+"## ----\n"
+"\n"
+"# Multi-line text input\n"
+"text = textarea('Text Area', rows=3, placeholder='Some text')\n"
+"put_text('text = %r' % text)  # ..demo-only\n"
+"## ----\n"
+"\n"
+"# File Upload\n"
+"img = file_upload(\"Select a image:\", accept=\"image/*\")\n"
+"if img:    # ..demo-only\n"
+"    put_image(img['content'], title=img['filename'])  # ..demo-only"
+msgstr ""
+"# 密码输入\n"
+"password = input(\"Input password\", type=PASSWORD)\n"
+"put_text('password = %r' % password)  # ..demo-only\n"
+"## ——\n"
+"\n"
+"# 下拉选择框\n"
+"gift = select('Which gift you want?', ['keyboard', 'ipad'])\n"
+"put_text('gift = %r' % gift)  # ..demo-only\n"
+"## ——\n"
+"\n"
+"# 勾选选项\n"
+"agree = checkbox(\"用户协议\", options=['I agree to terms and conditions'])\n"
+"put_text('agree = %r' % agree)  # ..demo-only\n"
+"## ——\n"
+"\n"
+"# 单选选项\n"
+"answer = radio(\"Choose one\", options=['A', 'B', 'C', 'D'])\n"
+"put_text('answer = %r' % answer)  # ..demo-only\n"
+"## ——\n"
+"\n"
+"# 多行文本输入\n"
+"text = textarea('Text Area', rows=3, placeholder='Some text')\n"
+"put_text('text = %r' % text)  # ..demo-only\n"
+"## ——\n"
+"\n"
+"# 文件上传\n"
+"img = file_upload(\"Select a image:\", accept=\"image/*\")\n"
+"if img:    # ..demo-only\n"
+"    put_image(img['content'], title=img['filename'])  # ..demo-only"
+
+#: ../../guide.rst:72
+msgid "Parameter of input functions"
+msgstr "输入选项"
+
+#: ../../guide.rst:74
+msgid ""
+"There are many parameters that can be passed to the input function(for complete "
+"parameters, please refer to the :doc:`function document </input>`):"
+msgstr ""
+"输入函数可指定的参数非常丰富(全部参数及含义请见 :doc:`函数文档 </input>` ):"
+
+#: ../../guide.rst:76
+msgid ""
+"input('This is label', type=TEXT, placeholder='This is placeholder',\n"
+"        help_text='This is help text', required=True)"
+msgstr ""
+
+#: ../../guide.rst:83 ../../guide.rst:118 ../../guide.rst:239 ../../guide.rst:540
+msgid "The results of the above example are as follows:"
+msgstr "以上代码将在浏览器上显示如下:"
+
+#: ../../guide.rst:87
+msgid ""
+"You can specify a validation function for the input by using ``validate`` "
+"parameter. The validation function should return ``None`` when the check "
+"passes, otherwise an error message will be returned:"
+msgstr ""
+"我们可以为输入指定校验函数,校验函数应在校验通过时返回None,否则返回错误消息:"
+
+#: ../../guide.rst:89
+#, python-format
+msgid ""
+"def check_age(p):  # return None when the check passes, otherwise return the "
+"error message\n"
+"    if p < 10:\n"
+"        return 'Too young!!'\n"
+"    if p > 60:\n"
+"        return 'Too old!!'\n"
+"\n"
+"age = input(\"How old are you?\", type=NUMBER, validate=check_age)\n"
+"put_text('age = %r' % age)  # ..demo-only"
+msgstr ""
+
+#: ../../guide.rst:102
+msgid ""
+"When the user input an illegal value, the input field is displayed as follows:"
+msgstr "当用户输入了不合法的值时,页面上的显示如下:"
+
+#: ../../guide.rst:106
+msgid ""
+"You can use ``code`` parameter in :func:`pywebio.input.textarea()` to make a "
+"code editing textarea. This feature uses `Codemirror <https://codemirror.net/"
+">`_ as underlying implementation. The ``code`` parameter accept the Codemirror "
+"options as a dict."
+msgstr ""
+":func:`pywebio.input.textarea` 还支持使用 `Codemirror <https://codemirror.net/"
+">`_ 实现代码风格的编辑区,只需使用 ``code`` 参数传入Codemirror支持的选项即可(最"
+"简单的情况是直接传入 ``code={}`` 或 ``code=True``):"
+
+#: ../../guide.rst:108
+msgid ""
+"code = textarea('Code Edit', code={\n"
+"    'mode': \"python\",  # code language\n"
+"    'theme': 'darcula',  # Codemirror theme. Visit https://codemirror.net/demo/"
+"theme.html#cobalt to get more themes\n"
+"}, value='import something\\n# Write your python code')\n"
+"put_code(code, language='python')  # ..demo-only"
+msgstr ""
+
+#: ../../guide.rst:122
+msgid ""
+":ref:`Here <codemirror_options>` are some commonly used Codemirror options. For "
+"complete Codemirror options, please visit: https://codemirror.net/doc/manual."
+"html#config"
+msgstr ""
+":ref:`这里 <codemirror_options>` 列举了一些常用的Codemirror选项,完整的"
+"Codemirror选项请见:https://codemirror.net/doc/manual.html#config"
+
+#: ../../guide.rst:125
+msgid "Input Group"
+msgstr "输入组"
+
+#: ../../guide.rst:127
+msgid ""
+"PyWebIO uses input group to get multiple inputs in a single form. `pywebio."
+"input.input_group()` accepts a list of single input function call as parameter, "
+"and returns a dictionary with the ``name`` from the single input function as "
+"the key and the input data as the value:"
+msgstr ""
+"PyWebIO支持输入组, 返回结果为一个字典。`pywebio.input.input_group()` 接受单项输"
+"入组成的列表作为参数, 返回以单项输入函数中的 ``name`` 作为键、以输入数据为值的字"
+"典:"
+
+#: ../../guide.rst:130
+msgid ""
+"def check_age(p):  # ..demo-only\n"
+"    if p < 10:                  # ..demo-only\n"
+"        return 'Too young!!'    # ..demo-only\n"
+"    if p > 60:                  # ..demo-only\n"
+"        return 'Too old!!'      # ..demo-only\n"
+"                                # ..demo-only\n"
+"data = input_group(\"Basic info\",[\n"
+"  input('Input your name', name='name'),\n"
+"  input('Input your age', name='age', type=NUMBER, validate=check_age)\n"
+"])\n"
+"put_text(data['name'], data['age'])"
+msgstr ""
+
+#: ../../guide.rst:146
+msgid ""
+"The input group also supports using ``validate`` parameter to set the "
+"validation function, which accepts the entire form data as parameter:"
+msgstr ""
+"输入组中同样支持使用 ``validate`` 参数设置校验函数,其接受整个表单数据作为参数:"
+
+#: ../../guide.rst:148
+msgid ""
+"def check_age(p):  # single input item validation  # ..demo-only\n"
+"    if p < 10:                  # ..demo-only\n"
+"        return 'Too young!!'    # ..demo-only\n"
+"    if p > 60:                  # ..demo-only\n"
+"        return 'Too old!!'      # ..demo-only\n"
+"                                # ..demo-only\n"
+"def check_form(data):  # input group validation: return (input name, error msg) "
+"when validation fail\n"
+"    if len(data['name']) > 6:\n"
+"        return ('name', 'Name too long!')\n"
+"    if data['age'] <= 0:\n"
+"        return ('age', 'Age can not be negative!')\n"
+"\n"
+"data = input_group(\"Basic info\",[           # ..demo-only\n"
+"   input('Input your name', name='name'),   # ..demo-only\n"
+"   input('Input your age', name='age', type=NUMBER, validate=check_age)  # .."
+"demo-only\n"
+"], validate=check_form)              # ..demo-only\n"
+"put_text(data['name'], data['age'])    # ..demo-only"
+msgstr ""
+
+#: ../../guide.rst:171
+msgid ""
+"PyWebIO determines whether the input function is in `input_group` or is called "
+"alone according to whether the ``name`` parameter is passed. So when calling an "
+"input function alone, **do not** set the ``name`` parameter; when calling the "
+"input function in `input_group`, you **must** provide the ``name`` parameter."
+msgstr ""
+"PyWebIO 根据是否在输入函数中传入 ``name`` 参数来判断输入函数是在 `input_group` "
+"中还是被单独调用。所以当单独调用一个输入函数时, **不要** 设置 ``name`` 参数;而"
+"在 `input_group` 中调用输入函数时,需 **务必提供** ``name`` 参数。"
+
+#: ../../guide.rst:174
+msgid "Output"
+msgstr "输出"
+
+#: ../../guide.rst:176
+msgid ""
+"The output functions are all defined in the :doc:`pywebio.output </output>` "
+"module and can be imported using ``from pywebio.output import *``."
+msgstr ""
+"输出函数都定义在 :doc:`pywebio.output </output>` 模块中,可以使用 ``from "
+"pywebio.output import *`` 引入。"
+
+#: ../../guide.rst:178
+msgid ""
+"When output functions is called, the content will be output to the browser in "
+"real time. The output functions can be called at any time during the "
+"application lifetime."
+msgstr ""
+"调用输出函数后,内容会实时输出到浏览器,在应用的生命周期内,可以在任意时刻调用输"
+"出函数。"
+
+#: ../../guide.rst:181
+msgid "Basic Output"
+msgstr "基本输出"
+
+#: ../../guide.rst:183
+msgid "PyWebIO provides a series of functions to output text, tables, links, etc:"
+msgstr "PyWebIO提供了一系列函数来输出表格、链接等格式:"
+
+#: ../../guide.rst:185
+msgid ""
+"# Text Output\n"
+"put_text(\"Hello world!\")\n"
+"## ----\n"
+"\n"
+"# Table Output\n"
+"put_table([\n"
+"    ['Commodity', 'Price'],\n"
+"    ['Apple', '5.5'],\n"
+"    ['Banana', '7'],\n"
+"])\n"
+"## ----\n"
+"\n"
+"# Markdown Output\n"
+"put_markdown('~~Strikethrough~~')\n"
+"## ----\n"
+"\n"
+"# File Output\n"
+"put_file('hello_word.txt', b'hello word!')\n"
+"## ----\n"
+"\n"
+"# PopUp Output\n"
+"popup('popup title', 'popup text content')"
+msgstr ""
+
+#: ../../guide.rst:213
+msgid ""
+"For all output functions provided by PyWebIO, please refer to the :doc:`pywebio."
+"output </output>` module. In addition, PyWebIO also supports data visualization "
+"with some third-party libraries, see :doc:`Third-party library ecology </"
+"libraries_support>`."
+msgstr ""
+"PyWebIO提供的全部输出函数见 :doc:`pywebio.output </output>` 模块。另外,PyWebIO"
+"还支持一些第三方库来进行数据可视化,参见 :doc:`第三方库生态 </"
+"libraries_support>` 。"
+
+#: ../../guide.rst:218
+msgid "Combined Output"
+msgstr "组合输出"
+
+#: ../../guide.rst:220
+msgid ""
+"The output functions whose name starts with ``put_`` can be combined with some "
+"output functions as part of the final output:"
+msgstr ""
+"函数名以 ``put_`` 开始的输出函数,可以与一些输出函数组合使用,作为最终输出的一部"
+"分:"
+
+#: ../../guide.rst:222
+msgid ""
+"You can pass ``put_xxx()`` calls to `put_table() <pywebio.output.put_table>` as "
+"cell content:"
+msgstr ""
+"`put_table() <pywebio.output.put_table>` 支持以 ``put_xxx()`` 调用作为单元格内"
+"容:"
+
+#: ../../guide.rst:224
+msgid ""
+"put_table([\n"
+"    ['Type', 'Content'],\n"
+"    ['html', put_html('X<sup>2</sup>')],\n"
+"    ['text', '<hr/>'],  # equal to ['text', put_text('<hr/>')]\n"
+"    ['buttons', put_buttons(['A', 'B'], onclick=...)],  # ..doc-only\n"
+"    ['buttons', put_buttons(['A', 'B'], onclick=put_text)],  # ..demo-only\n"
+"    ['markdown', put_markdown('`Awesome PyWebIO!`')],\n"
+"    ['file', put_file('hello.text', b'hello world')],\n"
+"    ['table', put_table([['A', 'B'], ['C', 'D']])]\n"
+"])"
+msgstr ""
+
+#: ../../guide.rst:243
+msgid ""
+"Similarly, you can pass ``put_xxx()`` calls to `popup() <pywebio.output.popup>` "
+"as the popup content:"
+msgstr ""
+"类似地, `popup() <pywebio.output.popup>` 也可以将 ``put_xxx()`` 调用作为弹窗内"
+"容:"
+
+#: ../../guide.rst:245
+msgid ""
+"popup('Popup title', [\n"
+"    put_html('<h3>Popup Content</h3>'),\n"
+"    'plain html: <br/>',  # Equivalent to: put_text('plain html: <br/>')\n"
+"    put_table([['A', 'B'], ['C', 'D']]),\n"
+"    put_buttons(['close_popup()'], onclick=lambda _: close_popup())\n"
+"])"
+msgstr ""
+
+#: ../../guide.rst:256
+msgid ""
+"Other output functions that accept ``put_xxx()`` calls as parameters are "
+"`put_collapse() <pywebio.output.put_collapse>`, `put_scrollable() <pywebio."
+"output.put_scrollable>`, `put_row() <pywebio.output.put_row>`, etc. In "
+"addition, you can use `put_widget() <pywebio.output.put_widget>` to make your "
+"own output widgets that can accept ``put_xxx()`` calls. For more information, "
+"please refer to corresponding function documentation."
+msgstr ""
+"其他接受 ``put_xxx()`` 调用作为参数的输出函数还有 `put_collapse() <pywebio."
+"output.put_collapse>` 、 `put_scrollable() <pywebio.output.put_scrollable>` 、"
+"`put_row() <pywebio.output.put_row>` 等,此外,还可以通过 `put_widget() "
+"<pywebio.output.put_widget>` 自定义可接收 ``put_xxx()`` 调用的输出组件,具体用法"
+"请参考函数文档。"
+
+#: ../../guide.rst:258
+msgid ""
+"When using combination output, if you want to dynamically update the "
+"``put_xxx()`` content after it has been output, you can use the `output() "
+"<pywebio.output.output>` function. `output() <pywebio.output.output>` is like a "
+"placeholder, it can be passed in anywhere that ``put_xxx()`` can passed in. And "
+"after being output, the content can also be modified:"
+msgstr ""
+"使用组合输出时,如果想在内容输出后,对其中的 ``put_xxx()`` 子项进行动态修改,可"
+"以使用 `output() <pywebio.output.output>` 函数,\n"
+"`output() <pywebio.output.output>` 就像一个占位符,它可以像 ``put_xxx()`` 一样传"
+"入 `put_table` 、 `popup` 、 `put_widget` 等函数中作为输出的一部分,\n"
+"并且,在输出后,还可以对其中的内容进行修改(比如重置或增加内容):"
+
+#: ../../guide.rst:260
+msgid ""
+" hobby = output('Coding')  # equal to output(put_text('Coding'))\n"
+" put_table([\n"
+"    ['Name', 'Hobbies'],\n"
+"    ['Wang', hobby]      # hobby is initialized to Coding\n"
+" ])\n"
+" ## ----\n"
+"\n"
+" hobby.reset('Movie')  # hobby is reset to Movie\n"
+" ## ----\n"
+" hobby.append('Music', put_text('Drama'))   # append Music, Drama to hobby\n"
+" ## ----\n"
+" hobby.insert(0, put_markdown('**Coding**'))  # insert the Coding into the top "
+"of the hobby"
+msgstr ""
+
+#: ../../guide.rst:279
+msgid "Callback"
+msgstr "事件回调"
+
+#: ../../guide.rst:281
+msgid ""
+"As we can see from the above, PyWebIO divides the interaction into two parts: "
+"input and output. The input function is blocking, a form will be displayed on "
+"the user's web browser when calling input function, the input function will not "
+"return util the user submits the form. The output function is used to output "
+"content to the browser in real time. The behavior of input and output is "
+"consistent with the console program. That's why we say PyWebIO turning the "
+"browser into a \"rich text terminal\". So you can write PyWebIO applications in "
+"script programing way."
+msgstr ""
+"从上面可以看出,PyWebIO把交互分成了输入和输出两部分:输入函数为阻塞式调用,会在"
+"用户浏览器上显示一个表单,在用户提交表单之前输入函数将不会返回;输出函数将内容实"
+"时输出至浏览器。这种交互方式和控制台程序是一致的,因此PyWebIO应用非常适合使用控"
+"制台程序的编写逻辑来进行开发。"
+
+#: ../../guide.rst:283
+msgid ""
+"In addition, PyWebIO also supports event callbacks: PyWebIO allows you to "
+"output some buttons, and the provided callback function will be executed when "
+"the button is clicked."
+msgstr ""
+"此外,PyWebIO还支持事件回调:PyWebIO允许你输出一些控件,当控件被点击时执行提供的"
+"回调函数。"
+
+#: ../../guide.rst:285
+msgid "This is an example:"
+msgstr "下面是一个例子:"
+
+#: ../../guide.rst:287
+#, python-format
+msgid ""
+"from functools import partial\n"
+"\n"
+"def edit_row(choice, row):\n"
+"    put_text(\"You click %s button ar row %s\" % (choice, row))\n"
+"\n"
+"put_table([\n"
+"    ['Idx', 'Actions'],\n"
+"    [1, put_buttons(['edit', 'delete'], onclick=partial(edit_row, row=1))],\n"
+"    [2, put_buttons(['edit', 'delete'], onclick=partial(edit_row, row=2))],\n"
+"    [3, put_buttons(['edit', 'delete'], onclick=partial(edit_row, row=3))],\n"
+"])"
+msgstr ""
+
+#: ../../guide.rst:303
+msgid ""
+"The call to `put_table() <pywebio.output.put_table>` will not block. When user "
+"clicks a button, the corresponding callback function will be invoked:"
+msgstr ""
+"`put_table() <pywebio.output.put_table>` 的调用不会阻塞。当用户点击了某行中的按"
+"钮时,PyWebIO会自动调用相应的回调函数:"
+
+#: ../../guide.rst:307
+msgid "Of course, PyWebIO also supports outputting individual button:"
+msgstr "当然,PyWebIO还支持单独的按钮控件:"
+
+#: ../../guide.rst:309
+#, python-format
+msgid ""
+"def btn_click(btn_val):\n"
+"    put_text(\"You click %s button\" % btn_val)\n"
+"put_buttons(['A', 'B', 'C'], onclick=btn_click)"
+msgstr ""
+
+#: ../../guide.rst:318
+msgid ""
+"After the PyWebIO session (see :ref:`Server and script mode "
+"<server_and_script_mode>` for more information about session) closed, the event "
+"callback will not work. You can call the :func:`pywebio.session.hold()` "
+"function at the end of the task function to hold the session, so that the event "
+"callback will always be available before the browser page is closed by user."
+msgstr ""
+"在PyWebIO会话(关于会话的概念见下文 :ref:`Server与script模式 "
+"<server_and_script_mode>` )结束后,事件回调也将不起作用,你可以在任务函数末尾处"
+"使用 :func:`pywebio.session.hold()` 函数来将会话保持,这样在用户关闭浏览器页面"
+"前,事件回调将一直可用。"
+
+#: ../../guide.rst:321
+msgid "Output Scope"
+msgstr "输出域Scope"
+
+#: ../../guide.rst:323
+msgid ""
+"PyWebIO uses the scope model to give more control to the location of content "
+"output. The output area of PyWebIO can be divided into different output "
+"domains. The output domain is called Scope in PyWebIO."
+msgstr ""
+"PyWebIO使用Scope模型来对内容输出的位置进行灵活地控制,PyWebIO的内容输出区可以划"
+"分出不同的输出域,PyWebIO将输出域称作 `Scope` 。"
+
+#: ../../guide.rst:325
+msgid ""
+"The output domain is a container of output content, and each output domain is "
+"arranged vertically, and the output domains can also be nested."
+msgstr "输出域为输出内容的容器,各个输出域之间上下排列,输出域也可以进行嵌套。"
+
+#: ../../guide.rst:327
+msgid ""
+"Each output function (function name like ``put_xxx()``) will output its content "
+"to a scope, the default is \"current scope\". \"current scope\" is determined "
+"by the runtime context. The output function can also manually specify the scope "
+"to output. The scope name is unique within the session."
+msgstr ""
+"每个输出函数(函数名形如 `put_xxx()` )都会将内容输出到一个Scope,默认为\"当前"
+"Scope\",\"当前Scope\"由运行时上下文确定,输出函数也可以手动指定输出到的Scope。"
+"Scope名在会话内唯一。"
+
+#: ../../guide.rst:331
+msgid "**use_scope()**"
+msgstr ""
+
+#: ../../guide.rst:333
+msgid ""
+"You can use `use_scope() <pywebio.output.use_scope>` to open and enter a new "
+"output scope, or enter an existing output scope:"
+msgstr ""
+"可以使用 `use_scope() <pywebio.output.use_scope>` 开启并进入一个新的输出域,或进"
+"入一个已经存在的输出域:"
+
+#: ../../guide.rst:335
+msgid ""
+"with use_scope('scope1'):  # open and enter a new output: 'scope1'\n"
+"    put_text('text1 in scope1')  # output text to scope1\n"
+"\n"
+"put_text('text in parent scope of scope1')  # output text to ROOT scope\n"
+"\n"
+"with use_scope('scope1'):  # enter an existing scope: 'scope1'\n"
+"    put_text('text2 in scope1')  # output text to scope1"
+msgstr ""
+"with use_scope('scope1'):  # 创建并进入scope 'scope1'\n"
+"    put_text('text1 in scope1')  # 输出内容到 scope1\n"
+"\n"
+"put_text('text in parent scope of scope1')  # 输出内容到 ROOT scope\n"
+"\n"
+"with use_scope('scope1'):  # 进入之前创建的scope 'scope1'\n"
+"    put_text('text2 in scope1')  # 输出内容到 scope1"
+
+#: ../../guide.rst:347 ../../guide.rst:368 ../../guide.rst:452
+msgid "The results of the above code are as follows::"
+msgstr "以上代码将会输出::"
+
+#: ../../guide.rst:349
+msgid ""
+"text1 in scope1\n"
+"text2 in scope1\n"
+"text in parent scope of scope1"
+msgstr ""
+
+#: ../../guide.rst:353
+msgid ""
+"You can use ``clear`` parameter in `use_scope() <pywebio.output.use_scope>` to "
+"clear the previous content in the scope:"
+msgstr ""
+"`use_scope() <pywebio.output.use_scope>` 还可以使用 `clear` 参数将scope中原有的"
+"内容清空:"
+
+#: ../../guide.rst:355
+msgid ""
+"with use_scope('scope2'):\n"
+"    put_text('create scope2')\n"
+"\n"
+"put_text('text in parent scope of scope2')\n"
+"## ----\n"
+"\n"
+"with use_scope('scope2', clear=True):  # enter the existing scope and clear the "
+"previous content\n"
+"    put_text('text in scope2')"
+msgstr ""
+"with use_scope('scope2'):\n"
+"    put_text('create scope2')\n"
+"\n"
+"put_text('text in parent scope of scope2')\n"
+"## ——\n"
+"\n"
+"with use_scope('scope2', clear=True):  # 进入之前创建的scope2,并清空原有内容\n"
+"    put_text('text in scope2')"
+
+#: ../../guide.rst:370
+msgid ""
+"text in scope2\n"
+"text in parent scope of scope2"
+msgstr ""
+
+#: ../../guide.rst:373
+msgid "`use_scope() <pywebio.output.use_scope>` can also be used as a decorator:"
+msgstr "`use_scope() <pywebio.output.use_scope>` 还可以作为装饰器来使用:"
+
+#: ../../guide.rst:375
+msgid ""
+"import time  # ..demo-only\n"
+"from datetime import datetime\n"
+"\n"
+"@use_scope('time', clear=True)\n"
+"def show_time():\n"
+"    put_text(datetime.now())\n"
+"\n"
+"while 1:          # ..demo-only\n"
+"   show_time()    # ..demo-only\n"
+"   time.sleep(1)  # ..demo-only"
+msgstr ""
+
+#: ../../guide.rst:390
+msgid ""
+"When calling ``show_time()`` for the first time, a ``time`` scope will be "
+"created at the current position, and the current time will be output to it. And "
+"then every time the ``show_time()`` is called, the new content will replace the "
+"previous content."
+msgstr ""
+"第一次调用 ``show_time`` 时,将会在当前位置创建 ``time`` 输出域并在其中输出当前"
+"时间,之后每次调用 ``show_time()`` ,时间都会输出到相同的区域。"
+
+#: ../../guide.rst:392
+msgid ""
+"Scopes can be nested. At the beginning, PyWebIO applications have only one "
+"``ROOT`` Scope. Each time a new scope is created, the nesting level of the "
+"scope will increase by one level, and each time the current scope is exited, "
+"the nesting level of the scope will be reduced by one. PyWebIO uses the Scope "
+"stack to save the nesting level of scope at runtime."
+msgstr ""
+"Scope是可嵌套的,初始条件下,PyWebIO应用只有一个最顶层的 ``ROOT`` Scope。每创建"
+"一个新Scope,Scope的嵌套层级便会多加一层,每退出当前Scope,Scope的嵌套层级便会减"
+"少一层。PyWebIO使用Scope栈来保存运行时的Scope的嵌套层级。"
+
+#: ../../guide.rst:394
+msgid "For example, the following code will create 3 scopes:"
+msgstr "例如,如下代码将会创建3个Scope:"
+
+#: ../../guide.rst:396
+#, python-format
+msgid ""
+"with use_scope('A'):\n"
+"    put_text('Text in scope A')\n"
+"\n"
+"    with use_scope('B'):\n"
+"        put_text('Text in scope B')\n"
+"\n"
+"with use_scope('C'):\n"
+"    put_text('Text in scope C')\n"
+"\n"
+"put_html(\"\"\"<style>                                          # ..demo-only\n"
+"#pywebio-scope-A {border: 1px solid red;}                    # ..demo-only\n"
+"#pywebio-scope-B {border: 1px solid blue;margin:2px}         # ..demo-only\n"
+"#pywebio-scope-C {border: 1px solid green;margin-top:2px}    # ..demo-only\n"
+"</style>\"\"\")                                                 # ..demo-only\n"
+"put_text()                                                   # ..demo-only\n"
+"put_buttons([('Put text to %s' % i, i) for i in ('A', 'B', 'C')], lambda s: "
+"put_text(s, scope=s))  # ..demo-only"
+msgstr ""
+
+#: ../../guide.rst:418
+msgid "The above code will generate the following Scope layout::"
+msgstr "以上代码将会产生如下Scope布局::"
+
+#: ../../guide.rst:420
+msgid ""
+"┌─ROOT────────────────────┐\n"
+"│                         │\n"
+"│ ┌─A───────────────────┐ │\n"
+"│ │ Text in scope A     │ │\n"
+"│ │ ┌─B───────────────┐ │ │\n"
+"│ │ │ Text in scope B │ │ │\n"
+"│ │ └─────────────────┘ │ │\n"
+"│ └─────────────────────┘ │\n"
+"│                         │\n"
+"│ ┌─C───────────────────┐ │\n"
+"│ │ Text in scope C     │ │\n"
+"│ └─────────────────────┘ │\n"
+"└─────────────────────────┘"
+msgstr ""
+
+#: ../../guide.rst:436
+msgid "**Scope related parameters of output function**"
+msgstr "**输出函数的scope相关参数**"
+
+#: ../../guide.rst:438
+msgid ""
+"The output function (function name like ``put_xxx()``) will output the content "
+"to the \"current scope\" by default, and the \"current scope\" of the runtime "
+"context can be set by ``use_scope()``."
+msgstr ""
+"输出函数(函数名形如 ``put_xxx()`` )在默认情况下,会将内容输出到\"当前Scope\","
+"可以通过 ``use_scope()`` 设置运行时上下文的\"当前Scope\"。"
+
+#: ../../guide.rst:440
+msgid ""
+"In addition, you can use the ``scope`` parameter of the output function to "
+"specify the destination scope to output:"
+msgstr "此外,也可以通过输出函数的 ``scope`` 参数指定输出的目的Scope:"
+
+#: ../../guide.rst:442
+msgid ""
+"with use_scope('scope3'):\n"
+"    put_text('text1 in scope3')   # output to current scope: scope3\n"
+"    put_text('text in ROOT scope', scope='ROOT')   # output to ROOT Scope\n"
+"\n"
+"put_text('text2 in scope3', scope='scope3')   # output to scope3"
+msgstr ""
+
+#: ../../guide.rst:454
+msgid ""
+"text1 in scope3\n"
+"text2 in scope3\n"
+"text in ROOT scope"
+msgstr ""
+
+#: ../../guide.rst:458
+msgid ""
+"In addition to directly specifying the target scope name, the ``scope`` "
+"parameter can also accept an integer to determine the scope by indexing the "
+"scope stack: 0 means the top level scope(the ROOT Scope), -1 means the current "
+"Scope, -2 means the scope used before entering the current scope, ..."
+msgstr ""
+"``scope`` 参数除了直接指定目标Scope名,还可以使用一个整形通过索引Scope栈来确定"
+"Scope:0表示最顶层也就是ROOT Scope,-1表示当前Scope,-2表示进入当前Scope前所使用"
+"的Scope,……"
+
+#: ../../guide.rst:460
+msgid ""
+"By default, the content output to the same scope will be arranged from top to "
+"bottom according to the calling order of the output function, and the output "
+"function called last will output the content to the bottom of the target scope. "
+"The output content can be inserted into other positions of the target scope by "
+"using the ``position`` parameter of the output function."
+msgstr ""
+"默认条件下,在同一Scope中的输出内容,会根据输出函数的调用顺序从上往下排列,最后"
+"调用的输出函数会输出内容到目标Scope的底部。通过输出函数的 ``position`` 参数可以"
+"将输出内容插入到目标Scope的其他位置。"
+
+#: ../../guide.rst:462
+msgid ""
+"Each output item in a scope has an index, the first item's index is 0, and the "
+"next item's index is incremented by one. You can also use a negative number to "
+"index the items in the scope, -1 means the last item, -2 means the item before "
+"the last..."
+msgstr ""
+"一个Scope中各次输出的元素具有像数组一样的索引,最前面的编号为0,以此往后递增加"
+"一;同样可以使用负数对Scope中的元素进行索引,-1表示最后面的元素,-2表示次后面的"
+"元素……"
+
+#: ../../guide.rst:464
+msgid ""
+"The ``position`` parameter of output functions is an integer. When "
+"``position>=0``, it means to insert content before the item whose index equal "
+"``position``; when ``position<0``, it means to insert content after the item "
+"whose index equal ``position``:"
+msgstr ""
+"``position`` 参数类型为整形, ``position>=0`` 时表示输出内容到目标Scope的第"
+"position号元素的前面; ``position<0`` 时表示输出内容到目标Scope第position号元素"
+"之后:"
+
+#: ../../guide.rst:466
+msgid ""
+"with use_scope('scope1'):\n"
+"    put_text('A')\n"
+"## ----\n"
+"with use_scope('scope1'):  # ..demo-only\n"
+"    put_text('B', position=0)   # insert B before A -> B A\n"
+"## ----\n"
+"with use_scope('scope1'):  # ..demo-only\n"
+"    put_text('C', position=-2)  # insert C after B -> B C A\n"
+"## ----\n"
+"with use_scope('scope1'):  # ..demo-only\n"
+"    put_text('D', position=1)   # insert D before C B -> B D C A"
+msgstr ""
+
+#: ../../guide.rst:482
+msgid "**Scope control**"
+msgstr "**输出域控制函数**"
+
+#: ../../guide.rst:484
+msgid ""
+"In addition to `use_scope() <pywebio.output.use_scope>`, PyWebIO also provides "
+"the following scope control functions:"
+msgstr "除了 `use_scope()` , PyWebIO同样提供了以下scope控制函数:"
+
+#: ../../guide.rst:486
+msgid ""
+"`set_scope(name) <pywebio.output.set_scope>` : Create scope at current "
+"location(or specified location)"
+msgstr ""
+"`set_scope(name) <pywebio.output.set_scope>` : 在当前位置(或指定位置)创建scope"
+
+#: ../../guide.rst:487
+msgid "`clear(scope) <pywebio.output.clear>` : Clear the contents of the scope"
+msgstr "`clear(scope) <pywebio.output.clear>` : 清除scope的内容"
+
+#: ../../guide.rst:488
+msgid "`remove(scope) <pywebio.output.remove>` : Remove scope"
+msgstr "`remove(scope) <pywebio.output.remove>` : 移除scope"
+
+#: ../../guide.rst:489
+msgid ""
+"`scroll_to(scope) <pywebio.output.scroll_to>` : Scroll the page to the scope"
+msgstr "`scroll_to(scope) <pywebio.output.scroll_to>` : 将页面滚动到scope处"
+
+#: ../../guide.rst:493
+msgid "Page environment settings"
+msgstr "页面环境设置"
+
+#: ../../guide.rst:495
+msgid "**Page Title**"
+msgstr "**页面标题**"
+
+#: ../../guide.rst:497
+msgid ""
+"You can call `set_env(title=...) <pywebio.session.set_env>` to set the page "
+"title。"
+msgstr "调用 `set_env(title=…) <pywebio.session.set_env>` 可以设置页面标题。"
+
+#: ../../guide.rst:499
+msgid "**Auto Scroll**"
+msgstr "**自动滚动**"
+
+#: ../../guide.rst:501
+msgid ""
+"When performing some continuous output (such as log output), you may want to "
+"scroll the page to the bottom automatically when there is new output. You can "
+"call `set_env(auto_scroll_bottom=True) <pywebio.session.set_env>` to enable "
+"automatic scrolling. Note that when enabled, only outputting to ROOT scope can "
+"trigger automatic scrolling."
+msgstr ""
+"在进行一些持续性的输出时(比如日志输出),有时希望在有新输出后自动将页面滚动到最下"
+"方,这时可以调用 `set_env(auto_scroll_bottom=True) <pywebio.session.set_env>` 来"
+"开启自动滚动。\n"
+"注意,开启后,只有输出到ROOT Scope才可以触发自动滚动。"
+
+#: ../../guide.rst:503
+msgid "**Output Animation**"
+msgstr "**输出动画**"
+
+#: ../../guide.rst:505
+msgid ""
+"By default, PyWebIO will use the fade-in animation effect to display the "
+"content. You can use `set_env(output_animation=False) <pywebio.session."
+"set_env>` to turn off the animation."
+msgstr ""
+"PyWebIO在输出内容时默认会使用淡入的动画效果来显示内容,可使用 "
+"`set_env(output_animation=False) <pywebio.session.set_env>` 来关闭动画。"
+
+#: ../../guide.rst:507
+msgid ""
+"To view the effects of environment settings, please visit :demo_host:`set_env "
+"Demo </?pywebio_api=set_env_demo>`"
+msgstr ""
+"有关不同环境配置的效果可查看 :demo_host:`set_env Demo </?"
+"pywebio_api=set_env_demo>`"
+
+#: ../../guide.rst:510
+msgid "Layout"
+msgstr "布局"
+
+#: ../../guide.rst:512
+msgid ""
+"In general, using the various output functions introduced above is enough to "
+"output what you want, but these outputs are arranged vertically. If you want to "
+"make a more complex layout (such as displaying a code block on the left side of "
+"the page and an image on the right), you need to use layout functions."
+msgstr ""
+"一般情况下,使用上文介绍的各种输出函数足以完成各种内容的展示,但直接调用输出函数"
+"产生的输出之间都是竖直排列的,如果想实现更复杂的布局(比如在页面左侧显示一个代码"
+"块,在右侧显示一个图像),就需要借助布局函数。"
+
+#: ../../guide.rst:514
+msgid ""
+"The ``pywebio.output`` module provides 3 layout functions, and you can create "
+"complex layouts by combining them:"
+msgstr ""
+"``pywebio.output`` 模块提供了3个布局函数,通过对他们进行组合可以完成各种复杂的布"
+"局:"
+
+#: ../../guide.rst:516
+msgid ""
+"`put_row() <pywebio.output.put_row>` : Use row layout to output content. The "
+"content is arranged horizontally"
+msgstr ""
+"`put_row() <pywebio.output.put_row>` : 使用行布局输出内容. 内容在水平方向上排列"
+
+#: ../../guide.rst:517
+msgid ""
+"`put_column() <pywebio.output.put_column>` : Use column layout to output "
+"content. The content is arranged vertically"
+msgstr ""
+"`put_column() <pywebio.output.put_column>` : 使用列布局输出内容. 内容在竖直方向"
+"上排列"
+
+#: ../../guide.rst:518
+msgid "`put_grid() <pywebio.output.put_grid>` : Output content using grid layout"
+msgstr "`put_grid() <pywebio.output.put_grid>` : 使用网格布局输出内容"
+
+#: ../../guide.rst:520
+msgid "Here is an example by combining ``put_row()`` and ``put_column()``:"
+msgstr "通过组合 ``put_row()`` 和 ``put_column()`` 可以实现灵活布局:"
+
+#: ../../guide.rst:522
+msgid ""
+"put_row([\n"
+"    put_column([\n"
+"        put_code('A'),\n"
+"        put_row([\n"
+"            put_code('B1'), None,  # None represents the space between the "
+"output\n"
+"            put_code('B2'), None,\n"
+"            put_code('B3'),\n"
+"        ]),\n"
+"        put_code('C'),\n"
+"    ]), None,\n"
+"    put_code('D'), None,\n"
+"    put_code('E')\n"
+"])"
+msgstr ""
+
+#: ../../guide.rst:545
+msgid "The layout function also supports customizing the size of each part::"
+msgstr "布局函数还支持自定义各部分的尺寸::"
+
+#: ../../guide.rst:547
+#, python-format
+msgid ""
+"put_row([put_image(...), put_image(...)], size='40% 60%')  # The ratio of the "
+"width of two images is 2:3"
+msgstr ""
+"put_row([put_image(…), put_image(…)], size='40% 60%')  # 左右两图宽度比2:3"
+
+#: ../../guide.rst:549
+msgid ""
+"For more information, please refer to the :ref:`layout function documentation "
+"<style_and_layout>`."
+msgstr ""
+"更多布局函数的用法及代码示例请查阅 :ref:`布局函数文档 <style_and_layout>` ."
+
+#: ../../guide.rst:552
+msgid "Style"
+msgstr "样式"
+
+#: ../../guide.rst:554
+msgid ""
+"If you are familiar with `CSS <https://en.wikipedia.org/wiki/CSS>`_ styles, you "
+"can use the `style() <pywebio.output.style>` function to set a custom style for "
+"the output."
+msgstr ""
+"如果你熟悉 `CSS样式 <https://www.google.com/search?q=CSS%E6%A0%B7%E5%BC%8F>`_ ,"
+"你还可以使用 `style() <pywebio.output.style>` 函数给输出设定自定义样式。"
+
+#: ../../guide.rst:556
+msgid "You can set the CSS style for a single ``put_xxx()`` output:"
+msgstr "可以给单个的 ``put_xxx()`` 输出设定CSS样式,也可以配合组合输出使用:"
+
+#: ../../guide.rst:558
+msgid ""
+"style(put_text('Red'), 'color: red')\n"
+"\n"
+"## ----\n"
+"put_table([\n"
+"    ['A', 'B'],\n"
+"    ['C', style(put_text('Red'), 'color: red')],\n"
+"])"
+msgstr ""
+
+#: ../../guide.rst:570
+msgid ""
+"`style() <pywebio.output.style>` also accepts a list of output calls, `style() "
+"<pywebio.output.style>` will set the CSS style for each item of the list:"
+msgstr ""
+"``style()`` 也接受列表作为输入,``style()`` 会为列表的每一项都设置CSS样式,返回"
+"值可以直接输出,可用于任何接受 ``put_xxx()`` 列表的地方:"
+
+#: ../../guide.rst:572
+msgid ""
+"style([\n"
+"    put_text('Red'),\n"
+"    put_markdown('~~del~~')\n"
+"], 'color: red')\n"
+"\n"
+"## ----\n"
+"put_collapse('title', style([\n"
+"    put_text('text'),\n"
+"    put_markdown('~~del~~'),\n"
+"], 'margin-left: 20px'))"
+msgstr ""
+
+#: ../../guide.rst:591
+msgid "Server mode and Script mode"
+msgstr "Server模式与Script模式"
+
+#: ../../guide.rst:593
+msgid ""
+"In the :ref:`Hello, world <hello_word>` section, we already know that PyWebIO "
+"supports two modes: running as a script and using `start_server() <pywebio."
+"platform.tornado.start_server>` to run as a web service."
+msgstr ""
+"在 :ref:`Hello, world <hello_word>` 一节中,已经知道,PyWebIO支持在普通的脚本中"
+"调用和使用 `start_server() <pywebio.platform.tornado.start_server>` 启动一个Web"
+"服务两种模式。"
+
+#: ../../guide.rst:595 ../../guide.rst:648
+msgid "**Server mode**"
+msgstr "**Server模式**"
+
+#: ../../guide.rst:597
+msgid ""
+"In Server mode, PyWebIO will start a web server to continuously provide "
+"services. A task function needs to be provided. When the user accesses the "
+"service address, PyWebIO will open a new session and run the task function."
+msgstr ""
+"在Server模式下,PyWebIO会启动一个Web服务来持续性地提供服务。需要提供一个任务函数"
+"(类似于Web开发中的视图函数),当用户访问服务地址时,PyWebIO会开启一个新会话并运行"
+"任务函数。"
+
+#: ../../guide.rst:599
+msgid ""
+"Use `start_server() <pywebio.platform.tornado.start_server>` to start a web "
+"service. In addition to accepting a function as task function, "
+"``start_server()`` also accepts a list of task function or a dictionary of it, "
+"so that one PyWebIO Server can have multiple services with different functions. "
+"You can use `go_app() <pywebio.session.go_app>` or `put_link() <pywebio.output."
+"put_link>` to jump between services::"
+msgstr ""
+"使用 `start_server() <pywebio.platform.tornado.start_server>` 来启动PyWebIO的"
+"Server模式, `start_server() <pywebio.platform.tornado.start_server>` 除了接收一"
+"个函数作为任务函数外,\n"
+"还支持传入函数列表或字典,从而使一个PyWebIO Server下可以有多个不同功能的服务,服"
+"务之间可以通过 `go_app() <pywebio.session.go_app>` 或 `put_link() <pywebio."
+"output.put_link>` 进行跳转::"
+
+#: ../../guide.rst:601
+msgid ""
+"def task_1():\n"
+"    put_text('task_1')\n"
+"    put_buttons(['Go task 2'], [lambda: go_app('task_2')])\n"
+"    hold()\n"
+"\n"
+"def task_2():\n"
+"    put_text('task_2')\n"
+"    put_buttons(['Go task 1'], [lambda: go_app('task_1')])\n"
+"    hold()\n"
+"\n"
+"def index():\n"
+"    put_link('Go task 1', app='task_1')  # Use `app` parameter to specify the "
+"task name\n"
+"    put_link('Go task 2', app='task_2')\n"
+"\n"
+"start_server([index, task_1, task_2])  # or start_server({'index': index, "
+"'task_1': task_1, 'task_2': task_2}) For more information, please refer to the "
+"function documentation."
+msgstr ""
+"def task_1():\n"
+"    put_text('task_1')\n"
+"    put_buttons(['Go task 2'], [lambda: go_app('task_2')])\n"
+"    hold()\n"
+"\n"
+"def task_2():\n"
+"    put_text('task_2')\n"
+"    put_buttons(['Go task 1'], [lambda: go_app('task_1')])\n"
+"    hold()\n"
+"\n"
+"def index():\n"
+"    put_link('Go task 1', app='task_1')  #  使用app参数指定任务名\n"
+"    put_link('Go task 2', app='task_2')\n"
+"\n"
+"start_server([index, task_1, task_2])  # 或 start_server({'index': index, "
+"'task_1': task_1, 'task_2': task_2}) For more information, please refer to the "
+"function documentation."
+
+#: ../../guide.rst:618
+msgid ""
+"You can use `pywebio.platform.seo()` to set the `SEO <https://en.wikipedia.org/"
+"wiki/Search_engine_optimization>`_ information. If not ``seo()`` is not used, "
+"the `docstring <https://www.python.org/dev/peps/pep-0257/>`_ of the task "
+"function will be regarded as SEO information by default."
+msgstr ""
+"可以使用 `pywebio.platform.seo()` 函数来设置任务函数SEO信息(在被搜索引擎索引时"
+"提供的网页信息,包含应用标题和应用简介),如果不使用 ``seo()`` 函数,默认条件"
+"下,PyWebIO会将任务函数的函数注释作为SEO信息(应用标题和简介之间使用一个空行分"
+"隔)。"
+
+#: ../../guide.rst:622
+msgid ""
+"Note that in Server mode, PyWebIO's input and output functions can only be "
+"called in the context of task functions. For example, the following code is "
+"**not allowed**::"
+msgstr ""
+"注意,在Server模式下,仅能在任务函数上下文中对PyWebIO的交互函数进行调用。比如如"
+"下调用是 **不被允许的** ::"
+
+#: ../../guide.rst:624
+msgid ""
+"import pywebio\n"
+"from pywebio.input import input\n"
+"\n"
+"port = input('Input port number:')   # ❌ error\n"
+"pywebio.start_server(my_task_func, port=int(port))"
+msgstr ""
+
+#: ../../guide.rst:631 ../../guide.rst:644
+msgid "**Script mode**"
+msgstr "**Script模式**"
+
+#: ../../guide.rst:633
+msgid "In Script mode, PyWebIO input and output functions can be called anywhere."
+msgstr "Script模式下,在任何位置都可以调用PyWebIO的交互函数。"
+
+#: ../../guide.rst:635
+msgid ""
+"If the user closes the browser before the end of the session, then calls to "
+"PyWebIO input and output functions in the session will cause a "
+"`SessionException <pywebio.exceptions.SessionException>` exception."
+msgstr ""
+"如果用户在会话结束之前关闭了浏览器,那么之后会话内对于PyWebIO交互函数的调用将会"
+"引发一个 `SessionException <pywebio.exceptions.SessionException>` 异常。"
+
+#: ../../guide.rst:640
+msgid "Concurrent"
+msgstr "并发"
+
+#: ../../guide.rst:642
+msgid "PyWebIO can be used in a multi-threading environment."
+msgstr "PyWebIO 支持在多线程环境中使用。"
+
+#: ../../guide.rst:646
+msgid ""
+"In Script mode, you can freely start new thread and call PyWebIO interactive "
+"functions in it. When all `non-daemonic <https://docs.python.org/3/library/"
+"threading.html#thread-objects>`_ threads finish running, the script exits."
+msgstr ""
+"在 Script模式下,你可以自由地启动线程,并在其中调用PyWebIO的交互函数。当所有非 "
+"`Daemon线程 <https://docs.python.org/3/library/threading.html#thread-objects>`_ "
+"运行结束后,脚本退出。"
+
+#: ../../guide.rst:650
+msgid ""
+"In Server mode, if you need to use PyWebIO interactive functions in new thread, "
+"you need to use `register_thread(thread) <pywebio.session.register_thread>` to "
+"register the new thread (so that PyWebIO can know which session the thread "
+"belongs to). If the PyWebIO interactive function is not used in the new thread, "
+"no registration is required. Threads that are not registered with "
+"`register_thread(thread) <pywebio.session.register_thread>` calling PyWebIO's "
+"interactive functions will cause `SessionNotFoundException <pywebio.exceptions."
+"SessionNotFoundException>`. When both the task function of the session and the "
+"thread registered through `register_thread(thread) <pywebio.session."
+"register_thread>` in the session have finished running, the session is closed."
+msgstr ""
+"Server模式下,如果需要在新创建的线程中使用PyWebIO的交互函数,需要手动调用 "
+"`register_thread(thread) <pywebio.session.register_thread>` 对新进程进行注册(这"
+"样PyWebIO才能知道新创建的线程属于哪个会话)。\n"
+"如果新创建的线程中没有使用到PyWebIO的交互函数,则无需注册。没有使用 "
+"`register_thread(thread) <pywebio.session.register_thread>` 注册的线程不受会话管"
+"理,其调用PyWebIO的交互函数将会产生 `SessionNotFoundException <pywebio."
+"exceptions.SessionNotFoundException>` 异常。\n"
+"当会话的任务函数和会话内通过 `register_thread(thread) <pywebio.session."
+"register_thread>` 注册的线程都结束运行时,会话关闭。"
+
+#: ../../guide.rst:652
+msgid "Example of using multi-threading in Server mode::"
+msgstr "Server模式下多线程的使用示例::"
+
+#: ../../guide.rst:654
+msgid ""
+"def show_time():\n"
+"    while True:\n"
+"        with use_scope(name='time', clear=True):\n"
+"            put_text(datetime.datetime.now())\n"
+"            time.sleep(1)\n"
+"\n"
+"def app():\n"
+"    t = threading.Thread(target=show_time)\n"
+"    register_thread(t)\n"
+"    put_markdown('## Clock')\n"
+"    t.start()  # run `show_time()` in background\n"
+"\n"
+"    # ❌ this thread will cause `SessionNotFoundException`\n"
+"    threading.Thread(target=show_time).start()\n"
+"\n"
+"    put_text('Background task started.')\n"
+"\n"
+"\n"
+"start_server(app, port=8080, debug=True)"
+msgstr ""
+
+#: ../../guide.rst:678 ../../guide.rst:898
+msgid "Close of session"
+msgstr "会话的结束"
+
+#: ../../guide.rst:680
+msgid ""
+"The close of session may also be caused by the user closing the browser page. "
+"After the browser page is closed, PyWebIO input function calls that have not "
+"yet returned in the current session will cause `SessionClosedException <pywebio."
+"exceptions.SessionClosedException>`, and subsequent calls to PyWebIO "
+"interactive functions will cause `SessionNotFoundException <pywebio.exceptions."
+"SessionNotFoundException>` or `SessionClosedException <pywebio.exceptions."
+"SessionClosedException>`."
+msgstr ""
+"会话还会因为用户的关闭浏览器而结束,这时当前会话内还未返回的PyWebIO输入函数调用"
+"将抛出 `SessionClosedException <pywebio.exceptions.SessionClosedException>` 异"
+"常,之后对于PyWebIO交互函数的调用将会产生 `SessionNotFoundException <pywebio."
+"exceptions.SessionNotFoundException>` 或 `SessionClosedException <pywebio."
+"exceptions.SessionClosedException>` 异常。"
+
+#: ../../guide.rst:682
+msgid ""
+"You can use `defer_call(func) <pywebio.session.defer_call>` to set the function "
+"to be called when the session closes. Whether it is because the user closes the "
+"page or the task finishes to cause session closed, the function set by "
+"`defer_call(func) <pywebio.session.defer_call>` will be executed. "
+"`defer_call(func) <pywebio.session.defer_call>` can be used for resource "
+"cleaning. You can call `defer_call(func) <pywebio.session.defer_call>` multiple "
+"times in the session, and the set functions will be executed sequentially after "
+"the session closes."
+msgstr ""
+"可以使用 `defer_call(func) <pywebio.session.defer_call>` 来设置会话结束时需要调"
+"用的函数。无论是因为用户主动关闭页面还是任务结束使得会话关闭,设置的函数都会被执"
+"行。\n"
+"`defer_call(func) <pywebio.session.defer_call>` 可以用于资源清理等工作。在会话中"
+"可以多次调用 `defer_call() <pywebio.session.defer_call>` ,会话结束后将会顺序执行"
+"设置的函数。"
+
+#: ../../guide.rst:687
+msgid "Integration with web framework"
+msgstr "与Web框架集成"
+
+#: ../../guide.rst:689
+msgid ""
+"The PyWebIO application can be integrated into an existing Python Web project, "
+"and the PyWebIO application and the Web project share a web framework. PyWebIO "
+"currently supports integration with Flask, Tornado, Django and aiohttp web "
+"frameworks."
+msgstr ""
+"可以将PyWebIO应用集成到现有的Python Web项目中,PyWebIO应用与Web项目共用一个Web框"
+"架。目前支持与Flask、Tornado、Django和aiohttp Web框架的集成。"
+
+#: ../../guide.rst:691
+msgid "The integration methods of different web frameworks are as follows:"
+msgstr "不同Web框架的集成方法如下:"
+
+#: ../../guide.rst:695
+msgid "Tornado"
+msgstr ""
+
+#: ../../guide.rst:697
+msgid "Need to add a ``RequestHandler`` to Tornado application::"
+msgstr "需要在Tornado应用中引入一个 ``RequestHandler`` ::"
+
+#: ../../guide.rst:699
+msgid ""
+"import tornado.ioloop\n"
+"import tornado.web\n"
+"from pywebio.platform.tornado import webio_handler\n"
+"from pywebio import STATIC_PATH\n"
+"\n"
+"class MainHandler(tornado.web.RequestHandler):\n"
+"    def get(self):\n"
+"        self.write(\"Hello, world\")\n"
+"\n"
+"if __name__ == \"__main__\":\n"
+"    application = tornado.web.Application([\n"
+"        (r\"/\", MainHandler),\n"
+"        (r\"/tool\", webio_handler(task_func)),  # `task_func` is PyWebIO task "
+"function\n"
+"    ])\n"
+"    application.listen(port=80, address='localhost')\n"
+"    tornado.ioloop.IOLoop.current().start()"
+msgstr ""
+
+#: ../../guide.rst:717
+msgid ""
+"In above code, we use `webio_handler(task_func) <pywebio.platform.tornado."
+"webio_handler>` to get the Tornado `WebSocketHandler <https://www.tornadoweb."
+"org/en/stable/websocket.html#tornado.websocket.WebSocketHandler>`_  that "
+"communicates with the browser, and bind it to the ``/tool`` path. After "
+"starting the Tornado server, you can visit ``http://localhost/tool`` to open "
+"the PyWebIO application."
+msgstr ""
+"以上代码调用 `webio_handler(task_func) <pywebio.platform.tornado."
+"webio_handler>` 来获得PyWebIO和浏览器进行通讯的Tornado `WebSocketHandler "
+"<https://www.tornadoweb.org/en/stable/websocket.html#tornado.websocket."
+"WebSocketHandler>`_ ,并将其绑定在 ``/tool`` 路由下。启动Tornado服务器后,访问 "
+"``http://localhost/tool`` 即可打开PyWebIO应用。"
+
+#: ../../guide.rst:721
+msgid ""
+"PyWebIO uses the WebSocket protocol to communicate with the browser in Tornado. "
+"If your Tornado application is behind a reverse proxy (such as Nginx), you may "
+"need to configure the reverse proxy to support the WebSocket protocol. :ref:"
+"`Here <nginx_ws_config>` is an example of Nginx WebSocket configuration."
+msgstr ""
+"当使用Tornado后端时,PyWebIO使用WebSocket协议和浏览器进行通讯,如果你的Tornado应"
+"用处在反向代理(比如Nginx)之后,可能需要特别配置反向代理来支持WebSocket协议,:"
+"ref:`这里 <nginx_ws_config>` 有一个Nginx配置WebSocket的例子。"
+
+#: ../../guide.rst:723
+msgid "Flask"
+msgstr ""
+
+#: ../../guide.rst:725
+msgid "One route need to be added to communicate with the browser through HTTP::"
+msgstr "需要添加一个PyWebIO相关的路由,用来和浏览器进行Http通讯::"
+
+#: ../../guide.rst:727
+msgid ""
+"from pywebio.platform.flask import webio_view\n"
+"from pywebio import STATIC_PATH\n"
+"from flask import Flask, send_from_directory\n"
+"\n"
+"app = Flask(__name__)\n"
+"\n"
+"# `task_func` is PyWebIO task function\n"
+"app.add_url_rule('/tool', 'webio_view', webio_view(task_func),\n"
+"            methods=['GET', 'POST', 'OPTIONS'])  # need GET,POST and OPTIONS "
+"methods\n"
+"\n"
+"app.run(host='localhost', port=80)"
+msgstr ""
+
+#: ../../guide.rst:740
+msgid ""
+"In above code, we use `webio_view(task_func) <pywebio.platform.flask."
+"webio_view>` to get the Flask view of the PyWebIO application, and bind it to "
+"``/tool`` path. After starting the Flask application, visit ``http://localhost/"
+"tool`` to open the PyWebIO application."
+msgstr ""
+"以上代码使用 `webio_view(task_func) <pywebio.platform.flask.webio_view>` 来获得"
+"运行PyWebIO应用的Flask视图 ,并调用 `Flask.add_url_rule <https://flask."
+"palletsprojects.com/en/1.1.x/api/#flask.Flask.add_url_rule>`_ 将其绑定在 ``/"
+"tool`` 路径下。启动Flask应用后,访问 ``http://localhost/tool`` 即可打开PyWebIO应"
+"用。"
+
+#: ../../guide.rst:742
+msgid "Django"
+msgstr ""
+
+#: ../../guide.rst:744
+msgid "Need to add a route in ``urls.py``::"
+msgstr "在django的路由配置文件 ``urls.py`` 中加入PyWebIO相关的路由即可::"
+
+#: ../../guide.rst:746
+msgid ""
+"# urls.py\n"
+"\n"
+"from functools import partial\n"
+"from django.urls import path\n"
+"from django.views.static import serve\n"
+"from pywebio import STATIC_PATH\n"
+"from pywebio.platform.django import webio_view\n"
+"\n"
+"# `task_func` is PyWebIO task function\n"
+"webio_view_func = webio_view(task_func)\n"
+"\n"
+"urlpatterns = [\n"
+"    path(r\"tool\", webio_view_func),\n"
+"]"
+msgstr ""
+
+#: ../../guide.rst:762
+msgid ""
+"In above code, we add a routing rule to bind the view function of the PyWebIO "
+"application to the ``/tool`` path After starting the Django server, visit "
+"``http://localhost/tool`` to open the PyWebIO application"
+msgstr ""
+"以上代码使用添加了一条路由规则将PyWebIO应用的视图函数绑定到 ``/tool`` 路径下。\n"
+"启动Django应用后,访问 ``http://localhost/tool`` 即可打开PyWebIO应用"
+
+#: ../../guide.rst:765
+msgid "aiohttp"
+msgstr ""
+
+#: ../../guide.rst:767
+msgid ""
+"One route need to be added to communicate with the browser through WebSocket:::"
+msgstr "需要添加一个PyWebIO相关的路由,用来和浏览器进行WebSocket通讯::"
+
+#: ../../guide.rst:769
+msgid ""
+"from aiohttp import web\n"
+"from pywebio.platform.aiohttp import static_routes, webio_handler\n"
+"\n"
+"app = web.Application()\n"
+"# `task_func` is PyWebIO task function\n"
+"app.add_routes([web.get('/tool', webio_handler(task_func))])\n"
+"\n"
+"web.run_app(app, host='localhost', port=80)"
+msgstr ""
+
+#: ../../guide.rst:778
+msgid ""
+"After starting the aiohttp server, visit ``http://localhost/tool`` to open the "
+"PyWebIO application"
+msgstr "启动aiohttp应用后,访问 ``http://localhost/tool`` 即可打开PyWebIO应用"
+
+#: ../../guide.rst:782
+msgid ""
+"PyWebIO uses the WebSocket protocol to communicate with the browser in aiohttp. "
+"If your aiohttp server is behind a reverse proxy (such as Nginx), you may need "
+"to configure the reverse proxy to support the WebSocket protocol. :ref:`Here "
+"<nginx_ws_config>` is an example of Nginx WebSocket configuration."
+msgstr ""
+"当使用aiohttp后端时,PyWebIO使用WebSocket协议和浏览器进行通讯,如果你的aiohttp应"
+"用处在反向代理(比如Nginx)之后,\n"
+"可能需要特别配置反向代理来支持WebSocket协议,:ref:`这里 <nginx_ws_config>` 有一"
+"个Nginx配置WebSocket的例子。"
+
+#: ../../guide.rst:787
+msgid "Notes"
+msgstr ""
+
+#: ../../guide.rst:788
+msgid "**Static resources Hosting**"
+msgstr "**PyWebIO静态资源的托管**"
+
+#: ../../guide.rst:790
+msgid ""
+"By default, the front-end of PyWebIO gets required static resources from CDN. "
+"If you want to deploy PyWebIO applications in an offline environment, you need "
+"to host static files by yourself, and set the ``cdn`` parameter of "
+"``webio_view()`` or ``webio_handler()`` to ``False``."
+msgstr ""
+"PyWebIO默认使用CDN来获取前端的静态资源,如果要将PyWebIO应用部署到离线环境中,需"
+"要自行托管静态文件,\n"
+"并将 ``webio_view()`` 或 ``webio_handler()`` 的 ``cdn`` 参数设置为 ``False`` 。"
+
+#: ../../guide.rst:792
+msgid ""
+"When setting ``cdn=False`` , you need to host the static resources in the same "
+"directory as the PyWebIO application. In addition, you can also pass a string "
+"to ``cdn`` parameter to directly set the deployment directory of PyWebIO static "
+"resources."
+msgstr ""
+"``cdn=False``  时需要将静态资源托管在和PyWebIO应用同级的目录下。\n"
+"同时,也可以通过 ``cdn`` 参数直接设置PyWebIO静态资源的部署目录。"
+
+#: ../../guide.rst:795
+msgid ""
+"The path of the static file of PyWebIO is stored in ``pywebio.STATIC_PATH``, "
+"you can use the command ``python3 -c \"import pywebio; print(pywebio."
+"STATIC_PATH)\"`` to print it out."
+msgstr ""
+"PyWebIO的静态文件的路径可保存在 ``pywebio.STATIC_PATH`` 中,可使用命令 "
+"``python3 -c \"import pywebio; print(pywebio.STATIC_PATH)\"`` 将其打印出来。"
+
+#: ../../guide.rst:797
+msgid ""
+"``start_server()`` also support ``cdn`` parameter, if it is set to ``False``, "
+"the static resource will be hosted in local server automatically, without "
+"manual hosting."
+msgstr ""
+"使用 ``start_server()`` 启动的应用,如果将 ``cdn`` 参数设置为 ``False`` ,会自动"
+"启动一个本地的静态资源托管服务,无需手动托管。"
+
+#: ../../guide.rst:803
+msgid "Coroutine-based session"
+msgstr "基于协程的会话"
+
+#: ../../guide.rst:805
+msgid ""
+"This section will introduce the advanced features of PyWebIO --- coroutine-"
+"based session. In most cases, you don’t need it. All functions or methods in "
+"PyWebIO that are only used for coroutine sessions are specifically noted in the "
+"document."
+msgstr ""
+"关于协程内容属于高级特性,您不必使用此部分也可以实现PyWebIO支持的全部功能。"
+"PyWebIO中所有仅用于协程会话的函数或方法都在文档中有特别说明。"
+
+#: ../../guide.rst:807
+msgid ""
+"PyWebIO's session is based on thread by default. Each time a user opens a "
+"session connection to the server, PyWebIO will start a thread to run the task "
+"function. In addition to thread-based sessions, PyWebIO also provides coroutine-"
+"based sessions. Coroutine-based sessions accept coroutine functions as task "
+"functions."
+msgstr ""
+"PyWebIO的会话实现默认是基于线程的,用户每打开一个和服务端的会话连接,PyWebIO会启"
+"动一个线程来运行任务函数。\n"
+"除了基于线程的会话,PyWebIO还提供了基于协程的会话。基于协程的会话接受协程函数作"
+"为任务函数。"
+
+#: ../../guide.rst:809
+msgid ""
+"The session based on the coroutine is a single-thread model, which means that "
+"all sessions run in a single thread. For IO-bound tasks, coroutines take up "
+"fewer resources than threads and have performance comparable to threads. In "
+"addition, the context switching of the coroutine is predictable, which can "
+"reduce the need for program synchronization and locking, and can effectively "
+"avoid most critical section problems."
+msgstr ""
+"基于协程的会话为单线程模型,所有会话都运行在一个线程内。对于IO密集型的任务,协程"
+"比线程占用更少的资源同时又拥有媲美于线程的性能。\n"
+"另外,协程的上下文切换具有可预测性,能够减少程序同步与加锁的需要,可以有效避免大"
+"多数临界区问题。"
+
+#: ../../guide.rst:812
+msgid "Using coroutine session"
+msgstr "使用协程会话"
+
+#: ../../guide.rst:814
+msgid ""
+"To use coroutine-based session, you need to use the ``async`` keyword to "
+"declare the task function as a coroutine function, and use the ``await`` syntax "
+"to call the PyWebIO input function:"
+msgstr ""
+"要使用基于协程的会话,需要使用 ``async`` 关键字将任务函数声明为协程函数,并使用 "
+"``await`` 语法调用PyWebIO输入函数:"
+
+#: ../../guide.rst:816
+#, python-format
+msgid ""
+" from pywebio.input import *\n"
+" from pywebio.output import *\n"
+" from pywebio import start_server\n"
+"\n"
+" async def say_hello():\n"
+"     name = await input(\"what's your name?\")\n"
+"     put_text('Hello, %s' % name)\n"
+"\n"
+" start_server(say_hello, auto_open_webbrowser=True)"
+msgstr ""
+
+#: ../../guide.rst:830
+msgid ""
+"In the coroutine task function, you can also use ``await`` to call other "
+"coroutines or ( `awaitable objects <https://docs.python.org/3/library/asyncio-"
+"task.html#asyncio-awaitables>`_ ) in the standard library `asyncio <https://"
+"docs.python.org/3/library/asyncio.html>`_:"
+msgstr ""
+"在协程任务函数中,也可以使用 ``await`` 调用其他协程或标准库 `asyncio <https://"
+"docs.python.org/3/library/asyncio.html>`_ 中的可等待对象( `awaitable objects "
+"<https://docs.python.org/3/library/asyncio-task.html#asyncio-awaitables>`_ ):"
+
+#: ../../guide.rst:832
+msgid ""
+" import asyncio\n"
+" from pywebio import start_server\n"
+"\n"
+" async def hello_word():\n"
+"     put_text('Hello ...')\n"
+"     await asyncio.sleep(1)  # await awaitable objects in asyncio\n"
+"     put_text('... World!')\n"
+"\n"
+" async def main():\n"
+"     await hello_word()  # await coroutine\n"
+"     put_text('Bye, bye')\n"
+"\n"
+" start_server(main, auto_open_webbrowser=True)"
+msgstr ""
+
+#: ../../guide.rst:851
+msgid ""
+"In coroutine-based session, all input functions defined in the :doc:`pywebio."
+"input </input>` module need to use ``await`` syntax to get the return value. "
+"Forgetting to use ``await`` will be a common error when using coroutine-based "
+"session."
+msgstr ""
+"在基于协程的会话中, :doc:`pywebio.input </input>` 模块中的定义输入函数都需要使"
+"用 ``await`` 语法来获取返回值,忘记使用 ``await`` 将会是在使用基于协程的会话时常"
+"出现的错误。"
+
+#: ../../guide.rst:853
+msgid ""
+"Other functions that need to use ``await`` syntax in the coroutine session are:"
+msgstr "其他在协程会话中也需要使用 ``await`` 语法来进行调用函数有:"
+
+#: ../../guide.rst:855
+msgid ""
+"`pywebio.session.run_asyncio_coroutine(coro_obj) <pywebio.session."
+"run_asyncio_coroutine>`"
+msgstr ""
+
+#: ../../guide.rst:856
+msgid "`pywebio.session.eval_js(expression) <pywebio.session.eval_js>`"
+msgstr ""
+
+#: ../../guide.rst:857
+msgid "`pywebio.session.hold() <pywebio.session.hold>`"
+msgstr ""
+
+#: ../../guide.rst:861
+msgid ""
+"Although the PyWebIO coroutine session is compatible with the ``awaitable "
+"objects`` in the standard library ``asyncio``, the ``asyncio`` library is not "
+"compatible with the ``awaitable objects`` in the PyWebIO coroutine session."
+msgstr ""
+"虽然PyWebIO的协程会话兼容标准库 ``asyncio`` 中的 ``awaitable objects`` ,但 "
+"``asyncio`` 库不兼容PyWebIO协程会话中的 ``awaitable objects`` ."
+
+#: ../../guide.rst:863
+msgid ""
+"That is to say, you can't pass PyWebIO ``awaitable objects`` to the `asyncio`` "
+"functions that accept ``awaitable objects``. For example, the following calls "
+"are **not supported** ::"
+msgstr ""
+"也就是说,无法将PyWebIO中的 ``awaitable objects`` 传入 ``asyncio`` 中的接受 "
+"``awaitable objects`` 作为参数的函数中,比如如下调用是 **不被支持的** ::"
+
+#: ../../guide.rst:865
+msgid ""
+"await asyncio.shield(pywebio.input())\n"
+"await asyncio.gather(asyncio.sleep(1), pywebio.session.eval_js('1+1'))\n"
+"task = asyncio.create_task(pywebio.input())"
+msgstr ""
+
+#: ../../guide.rst:872
+msgid "Concurrency in coroutine-based sessions"
+msgstr "协程会话的并发"
+
+#: ../../guide.rst:874
+msgid ""
+"In coroutine-based session, you can start new thread, but you cannot call "
+"PyWebIO interactive functions in it (`register_thread() <pywebio.session."
+"register_thread>` is not available in coroutine session). But you can use "
+"`run_async(coro) <pywebio.session.run_async>` to execute a coroutine object "
+"asynchronously, and PyWebIO interactive functions can be used in the new "
+"coroutine:"
+msgstr ""
+"在基于协程的会话中,你可以启动线程,但是无法在其中调用PyWebIO交互函数"
+"( `register_thread() <pywebio.session.register_thread>` 在协程会话中不可"
+"用)。\n"
+"但你可以使用 `run_async(coro) <pywebio.session.run_async>` 来异步执行一个协程对"
+"象,新协程内可以使用PyWebIO交互函数:"
+
+#: ../../guide.rst:876
+msgid ""
+" from pywebio import start_server\n"
+" from pywebio.session import run_async\n"
+"\n"
+" async def counter(n):\n"
+"     for i in range(n):\n"
+"         put_text(i)\n"
+"         await asyncio.sleep(1)\n"
+"\n"
+" async def main():\n"
+"     run_async(counter(10))\n"
+"     put_text('Main coroutine function exited.')\n"
+"\n"
+"\n"
+" start_server(main, auto_open_webbrowser=True)"
+msgstr ""
+
+#: ../../guide.rst:895
+msgid ""
+"`run_async(coro) <pywebio.session.run_async>` returns a `TaskHandle <pywebio."
+"session.coroutinebased.TaskHandle>`, which can be used to query the running "
+"status of the coroutine or close the coroutine."
+msgstr ""
+"`run_async(coro) <pywebio.session.run_async>` 返回一个 `TaskHandle <pywebio."
+"session.coroutinebased.TaskHandle>` ,通过 `TaskHandle <pywebio.session."
+"coroutinebased.TaskHandle>` 可以查询协程运行状态和关闭协程。"
+
+#: ../../guide.rst:900
+msgid ""
+"Similar to thread-based session, in coroutine-based session, when the task "
+"function and the coroutine running through `run_async() <pywebio.session."
+"run_async>` in the session are all finished, the session is closed."
+msgstr ""
+"与基于线程的会话类似,在基于协程的会话中,当任务函数和在会话内通过 `run_async() "
+"<pywebio.session.run_async>` 运行的协程全部结束后,会话关闭。"
+
+#: ../../guide.rst:902
+msgid ""
+"If the close of the session is caused by the user closing the browser, the "
+"behavior of PyWebIO is the same as :ref:`Thread-based session <session_close>`: "
+"After the browser page closed, PyWebIO input function calls that have not yet "
+"returned in the current session will cause `SessionClosedException <pywebio."
+"exceptions.SessionClosedException>`, and subsequent calls to PyWebIO "
+"interactive functions will cause `SessionNotFoundException <pywebio.exceptions."
+"SessionNotFoundException>` or `SessionClosedException <pywebio.exceptions."
+"SessionClosedException>`."
+msgstr ""
+"对于因为用户的关闭浏览器而造成的会话结束,处理逻辑和 :ref:`基于线程的会话 "
+"<session_close>` 一致:\n"
+"此时当前会话内还未返回的PyWebIO输入函数调用将抛出 `SessionClosedException "
+"<pywebio.exceptions.SessionClosedException>` 异常,之后对于PyWebIO交互函数的调用"
+"将会产生 `SessionNotFoundException <pywebio.exceptions."
+"SessionNotFoundException>` 或 `SessionClosedException <pywebio.exceptions."
+"SessionClosedException>` 异常。"
+
+#: ../../guide.rst:904
+msgid ""
+"`defer_call(func) <pywebio.session.defer_call>` also available in coroutine "
+"session."
+msgstr ""
+"协程会话也同样支持使用 `defer_call(func) <pywebio.session.defer_call>` 来设置会"
+"话结束时需要调用的函数。"
+
+#: ../../guide.rst:909
+msgid "Integration with Web Framework"
+msgstr "协程会话与Web框架集成"
+
+#: ../../guide.rst:911
+msgid ""
+"The PyWebIO application that using coroutine-based session can also be "
+"integrated to the web framework."
+msgstr ""
+"基于协程的会话同样可以与Web框架进行集成,只需要在原来传入任务函数的地方改为传入"
+"协程函数即可。"
+
+#: ../../guide.rst:913
+msgid ""
+"However, there are some limitations when using coroutine-based sessions to "
+"integrate into Flask or Django:"
+msgstr "但当前在使用基于协程的会话集成进Flask或Django时,存在一些限制:"
+
+#: ../../guide.rst:915
+msgid ""
+"First, when ``await`` the coroutine objects/awaitable objects in the "
+"``asyncio`` module, you need to use `run_asyncio_coroutine() <pywebio.session."
+"run_asyncio_coroutine>` to wrap the coroutine object."
+msgstr ""
+"一是协程函数内还无法直接通过 ``await`` 直接等待asyncio库中的协程对象,目前需要使"
+"用 `run_asyncio_coroutine() <pywebio.session.run_asyncio_coroutine>` 进行包装。"
+
+#: ../../guide.rst:917
+msgid ""
+"Secondly, you need to start a new thread to run the event loop before starting "
+"a Flask/Django server."
+msgstr ""
+"二是,在启动Flask/Django这类基于线程的服务器之前需要启动一个单独的线程来运行事件"
+"循环。"
+
+#: ../../guide.rst:919
+msgid "Example of coroutine-based session integration into Flask:"
+msgstr "使用基于协程的会话集成进Flask的示例:"
+
+#: ../../guide.rst:921
+msgid ""
+" import asyncio\n"
+" import threading\n"
+" from flask import Flask, send_from_directory\n"
+" from pywebio import STATIC_PATH\n"
+" from pywebio.output import *\n"
+" from pywebio.platform.flask import webio_view\n"
+" from pywebio.platform import run_event_loop\n"
+" from pywebio.session import run_asyncio_coroutine\n"
+"\n"
+" async def hello_word():\n"
+"     put_text('Hello ...')\n"
+"     await run_asyncio_coroutine(asyncio.sleep(1))  # can't just \"await "
+"asyncio.sleep(1)\"\n"
+"     put_text('... World!')\n"
+"\n"
+" app = Flask(__name__)\n"
+" app.add_url_rule('/hello', 'webio_view', webio_view(hello_word),\n"
+"                             methods=['GET', 'POST', 'OPTIONS'])\n"
+"\n"
+" # thread to run event loop\n"
+" threading.Thread(target=run_event_loop, daemon=True).start()\n"
+" app.run(host='localhost', port=80)"
+msgstr ""
+
+#: ../../guide.rst:946
+msgid ""
+"Finally, coroutine-based session is not available in the Script mode. You "
+"always need to use ``start_server()`` to run coroutine task function or "
+"integrate it to a web framework."
+msgstr ""
+"最后,使用PyWebIO编写的协程函数不支持Script模式,总是需要使用 ``start_server`` "
+"来启动一个服务或者集成进Web框架来调用。"
+
+#: ../../guide.rst:949
+msgid "Last but not least"
+msgstr ""
+
+#: ../../guide.rst:951
+msgid ""
+"This is all features of PyWebIO, you can continue to read the rest of the "
+"documents, or start writing your PyWebIO applications now."
+msgstr ""
+"以上就是PyWebIO的全部功能了,你可以继续阅读接下来的文档,或者立即开始PyWebIO应用"
+"的编写了。"
+
+#: ../../guide.rst:953
+msgid ""
+"Finally, please allow me to provide one more suggestion. When you encounter a "
+"design problem when using PyWebIO, you can ask yourself a question: What would "
+"I do if it is in a terminal program? If you already have the answer, it can be "
+"done in the same way with PyWebIO. If the problem persists or the solution is "
+"not good enough, you can consider the callback mechanism provided by "
+"`put_buttons() <pywebio.output.put_buttons>`."
+msgstr ""
+"最后再提供一条建议,当你在使用PyWebIO遇到设计上的问题时,可以问一下自己:如果在"
+"是在终端程序中我会怎么做?\n"
+"如果你已经有答案了,那么在PyWebIO中一样可以使用这样的方式完成。如果问题依然存在"
+"或者觉得解决方案不够好,\n"
+"你可以考虑使用 `put_buttons() <pywebio.output.put_buttons>` 提供的回调机制。"
+
+#: ../../guide.rst:956
+msgid "OK, Have fun with PyWebIO!"
+msgstr ""

+ 242 - 0
docs/locales/zh_CN/LC_MESSAGES/index.po

@@ -0,0 +1,242 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PyWebIO 1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-17 17:57+0800\n"
+"PO-Revision-Date: 2021-02-18 11:23+0800\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"
+
+#: ../../index.rst:72
+msgid "Manual"
+msgstr "使用手册"
+
+#: ../../index.rst:91
+msgid "Implement Doc"
+msgstr "实现文档"
+
+#: ../../index.rst:2
+msgid "PyWebIO"
+msgstr "PyWebIO"
+
+#: ../../index.rst:4
+msgid ""
+"PyWebIO provides a series of imperative functions to obtain user input "
+"and output on the browser, turning the browser into a \"rich text "
+"terminal\", and can be used to build simple web applications or browser-"
+"based GUI applications. Using PyWebIO, developers can write applications "
+"just like writing terminal scripts (interaction based on input and "
+"print), without the need to have knowledge of HTML and JS. PyWebIO can "
+"also be easily integrated into existing Web services. PyWebIO is very "
+"suitable for quickly building applications that do not require complex "
+"UI."
+msgstr ""
+"PyWebIO提供了一系列命令式的交互函数来在浏览器上获取用户输入和进行输出,将"
+"浏览器变成了一个“富文本终端”,可以用于构建简单的Web应用或基于浏览器的GUI"
+"应用。 使用PyWebIO,开发者能像编写终端脚本一样(基于input和print进行交互)"
+"来编写应用,无需具备HTML和JS的相关知识; PyWebIO还可以方便地整合进现有的"
+"Web服务。非常适合快速构建对UI要求不高的应用。"
+
+#: ../../index.rst:7
+msgid "Features"
+msgstr "特性"
+
+#: ../../index.rst:9
+msgid "Use synchronization instead of callback-based method to get input"
+msgstr "使用同步而不是基于回调的方式获取输入,代码编写逻辑更自然"
+
+#: ../../index.rst:10
+msgid "Non-declarative layout, simple and efficient"
+msgstr "非声明式布局,布局方式简单高效"
+
+#: ../../index.rst:11
+msgid ""
+"Less intrusive: old script code can be transformed into a Web service "
+"only by modifying the input and output logic"
+msgstr "代码侵入性小,旧脚本代码仅需修改输入输出逻辑便可改造为Web服务"
+
+#: ../../index.rst:12
+msgid ""
+"Support integration into existing web services, currently supports "
+"Flask, Django, Tornado, aiohttp framework"
+msgstr ""
+"支持整合到现有的Web服务,目前支持与Flask、Django、Tornado、aiohttp框架集"
+"成"
+
+#: ../../index.rst:13
+msgid "Support for ``asyncio`` and coroutine"
+msgstr "同时支持基于线程的执行模型和基于协程的执行模型"
+
+#: ../../index.rst:14
+msgid "Support data visualization with third-party libraries"
+msgstr "支持结合第三方库实现数据可视化"
+
+#: ../../index.rst:17
+msgid "Installation"
+msgstr ""
+
+#: ../../index.rst:19
+msgid "Stable version::"
+msgstr "稳定版::"
+
+#: ../../index.rst:21
+msgid "pip3 install -U pywebio"
+msgstr ""
+
+#: ../../index.rst:23
+msgid "Development version::"
+msgstr "开发版::"
+
+#: ../../index.rst:25
+msgid ""
+"pip3 install -U https://code.aliyun.com/wang0618/pywebio/repository/"
+"archive.zip"
+msgstr ""
+
+#: ../../index.rst:27
+msgid "**Prerequisites**: PyWebIO requires Python 3.5.2 or newer"
+msgstr "**系统要求**: PyWebIO要求 Python 版本在 3.5.2 及以上"
+
+#: ../../index.rst:32
+msgid "Hello, world"
+msgstr ""
+
+#: ../../index.rst:34
+msgid ""
+"Here is a simple PyWebIO script to calculate the `BMI <https://en."
+"wikipedia.org/wiki/Body_mass_index>`_ ::"
+msgstr ""
+"这是一个使用PyWebIO计算 `BMI指数 <https://en.wikipedia.org/wiki/"
+"Body_mass_index>`_ 的脚本:"
+
+#: ../../index.rst:36
+#, python-format
+msgid ""
+"# A simple script to calculate BMI\n"
+"from pywebio.input import input, FLOAT\n"
+"from pywebio.output import put_text\n"
+"\n"
+"def bmi():\n"
+"    height = input(\"Input your height(cm):\", type=FLOAT)\n"
+"    weight = input(\"Input your weight(kg):\", type=FLOAT)\n"
+"\n"
+"    BMI = weight / (height / 100) ** 2\n"
+"\n"
+"    top_status = [(16, 'Severely underweight'), (18.5, 'Underweight'),\n"
+"                  (25, 'Normal'), (30, 'Overweight'),\n"
+"                  (35, 'Moderately obese'), (float('inf'), 'Severely "
+"obese')]\n"
+"\n"
+"    for top, status in top_status:\n"
+"        if BMI <= top:\n"
+"            put_text('Your BMI: %.1f. Category: %s' % (BMI, status))\n"
+"            break\n"
+"\n"
+"if __name__ == '__main__':\n"
+"    bmi()"
+msgstr ""
+"from pywebio.input import input, FLOAT\n"
+"from pywebio.output import put_text\n"
+"\n"
+"def bmi():\n"
+"    height = input(\"请输入你的身高(cm):\", type=FLOAT)\n"
+"    weight = input(\"请输入你的体重(kg):\", type=FLOAT)\n"
+"\n"
+"    BMI = weight / (height / 100) ** 2\n"
+"\n"
+"    top_status = [(14.9, '极瘦'), (18.4, '偏瘦'),\n"
+"                  (22.9, '正常'), (27.5, '过重'),\n"
+"                  (40.0, '肥胖'), (float('inf'), '非常肥胖')]\n"
+"\n"
+"    for top, status in top_status:\n"
+"        if BMI <= top:\n"
+"            put_text('你的 BMI 值: %.1f,身体状态:%s' % (BMI, status))\n"
+"            break\n"
+"\n"
+"if __name__ == '__main__':\n"
+"    bmi()"
+
+#: ../../index.rst:58
+msgid ""
+"This is just a very simple script if you ignore PyWebIO, but after using "
+"the input and output functions provided by PyWebIO, you can interact "
+"with the code in the browser:"
+msgstr ""
+"如果没有使用PyWebIO,这只是一个非常简单的脚本,而通过使用PyWebIO提供的输"
+"入输出函数,你可以在浏览器中与代码进行交互:"
+
+#: ../../index.rst:64
+msgid ""
+"In the last line of the above code, changing the function call ``bmi()`` "
+"to `pywebio.start_server(bmi, port=80) <pywebio.platform.tornado."
+"start_server>` will start a bmi web service on port 80 ( :demo_host:"
+"`online Demo </?pywebio_api=bmi>` )."
+msgstr ""
+"将上面代码最后一行对 ``bmi()`` 的直接调用改为使用 `pywebio."
+"start_server(bmi, port=80) <pywebio.platform.tornado.start_server>` 便可"
+"以在80端口提供 ``bmi()`` 服务( :demo_host:`在线Demo </?"
+"pywebio_api=bmi>` )。"
+
+#: ../../index.rst:66
+msgid ""
+"If you want to integrate the ``bmi()`` service into an existing web "
+"framework, you can visit :ref:`Integration with a web framework "
+"<integration_web_framework>` section of this document."
+msgstr ""
+"将 ``bmi()`` 服务整合到现有的Web框架请参考 :ref:`与Web框架集成 "
+"<integration_web_framework>` 。"
+
+#: ../../index.rst:69
+msgid "Documentation"
+msgstr ""
+
+#: ../../index.rst:70
+msgid ""
+"This documentation is also available in `PDF and Epub formats <https://"
+"readthedocs.org/projects/pywebio/downloads/>`_."
+msgstr ""
+"这个文档同时也提供 `PDF 和 Epub 格式 <https://readthedocs.org/projects/"
+"pywebio/downloads/>`_."
+
+#: ../../index.rst:98
+msgid "Indices and tables"
+msgstr ""
+
+#: ../../index.rst:100
+msgid ":ref:`genindex`"
+msgstr ""
+
+#: ../../index.rst:101
+msgid ":ref:`modindex`"
+msgstr ""
+
+#: ../../index.rst:102
+msgid ":ref:`search`"
+msgstr ""
+
+#: ../../index.rst:106
+msgid "Discussion and support"
+msgstr ""
+
+#: ../../index.rst:108
+msgid ""
+"Need help when use PyWebIO? Make a new discussion on `Github Discussions "
+"<https://github.com/wang0618/PyWebIO/discussions>`_."
+msgstr ""
+
+#: ../../index.rst:110
+msgid ""
+"Report bugs on the `GitHub issue <https://github.com/wang0618/pywebio/"
+"issues>`_."
+msgstr ""

+ 1042 - 0
docs/locales/zh_CN/LC_MESSAGES/input.po

@@ -0,0 +1,1042 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PyWebIO 1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-17 18:31+0800\n"
+"PO-Revision-Date: 2021-02-18 11:23+0800\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"
+
+#: ../../input.rst:2
+msgid "``pywebio.input`` --- Get input from web browser"
+msgstr "``pywebio.input`` — 输入模块"
+
+#: of pywebio.input:1
+msgid ""
+"This module provides many functions to get all kinds of input of user from the "
+"browser"
+msgstr "本模块提供了一系列函数来从浏览器接收用户不同的形式的输入"
+
+#: of pywebio.input:3
+msgid ""
+"There are two ways to use the input functions, one is to call the input "
+"function alone to get a single input::"
+msgstr "输入函数大致分为两类,一类是单项输入::"
+
+#: of pywebio.input:5
+#, python-format
+msgid ""
+"name = input(\"What's your name\")\n"
+"print(\"Your name is %s\" % name)"
+msgstr ""
+
+#: of pywebio.input:8
+msgid "The other is to use `input_group` to get multiple inputs at once::"
+msgstr "另一类是使用 `input_group` 的输入组::"
+
+#: of pywebio.input:10
+msgid ""
+"info = input_group(\"User info\",[\n"
+"  input('Input your name', name='name'),\n"
+"  input('Input your age', name='age', type=NUMBER)\n"
+"])\n"
+"print(info['name'], info['age'])"
+msgstr ""
+
+#: of pywebio.input:16
+msgid ""
+"When use `input_group`, you needs to provide the ``name`` parameter in each "
+"input function to identify the input items in the result."
+msgstr ""
+"输入组中需要在每一项输入函数中提供 ``name`` 参数来用于在结果中标识不同输入项."
+
+#: of pywebio.input:20
+msgid ""
+"PyWebIO determines whether the input function is in `input_group` or is called "
+"alone according to whether the ``name`` parameter is passed. So when calling an "
+"input function alone, **do not** set the ``name`` parameter; when calling the "
+"input function in `input_group`, you **must** provide the ``name`` parameter."
+msgstr ""
+"PyWebIO 根据是否在输入函数中传入 ``name`` 参数来判断输入函数是在 `input_group` "
+"中还是被单独调用。所以当你想要单独调用一个输入函数时,请不要设置 ``name`` 参数;"
+"而在 `input_group` 中调用输入函数时,**务必提供** ``name`` 参数"
+
+#: of pywebio.input:22
+msgid ""
+"By default, the user can submit an input of empty value. If the user must "
+"provide a non-empty input value, you need to pass ``required=True`` to the "
+"input function (some input functions do not support the ``required`` parameter)"
+msgstr ""
+"输入默认可以忽略,如果需要用户必须提供值,则需要在输入函数中传入 "
+"``required=True`` (部分输入函数不支持 ``required`` 参数)"
+
+#: of pywebio.input:25
+msgid "Functions list"
+msgstr "函数清单"
+
+#: of pywebio.input:29
+msgid "Function name"
+msgstr "函数"
+
+#: of pywebio.input:30
+msgid "Description"
+msgstr "简介"
+
+#: of pywebio.input:32
+msgid "`input <pywebio.input.input>`"
+msgstr ""
+
+#: of pywebio.input:33 pywebio.input.input:1
+msgid "Text input"
+msgstr "文本输入"
+
+#: of pywebio.input:35
+msgid "`textarea <pywebio.input.textarea>`"
+msgstr ""
+
+#: of pywebio.input:36
+msgid "Multi-line text input"
+msgstr "多行文本输入"
+
+#: of pywebio.input:38
+msgid "`select <pywebio.input.select>`"
+msgstr ""
+
+#: of pywebio.input:39 pywebio.input.select:1
+msgid "Drop-down selection"
+msgstr "下拉选择框"
+
+#: of pywebio.input:41
+msgid "`checkbox <pywebio.input.checkbox>`"
+msgstr ""
+
+#: of pywebio.input:42
+msgid "Checkbox"
+msgstr "勾选选项"
+
+#: of pywebio.input:44
+msgid "`radio <pywebio.input.radio>`"
+msgstr ""
+
+#: of pywebio.input:45
+msgid "Radio"
+msgstr "单选选项"
+
+#: of pywebio.input:47
+msgid "`actions <pywebio.input.actions>`"
+msgstr ""
+
+#: of pywebio.input:48 pywebio.input.actions:1
+msgid "Actions selection"
+msgstr "按钮选项"
+
+#: of pywebio.input:50
+msgid "`file_upload <pywebio.input.file_upload>`"
+msgstr ""
+
+#: of pywebio.input:51 pywebio.input.file_upload:1
+msgid "File uploading"
+msgstr "文件上传"
+
+#: of pywebio.input:53
+msgid "`input_group <pywebio.input.input_group>`"
+msgstr ""
+
+#: of pywebio.input:54
+msgid "Input group"
+msgstr "输入组"
+
+#: of pywebio.input:58
+msgid "Functions doc"
+msgstr "函数文档"
+
+#: of pywebio.input.actions pywebio.input.checkbox pywebio.input.file_upload
+#: pywebio.input.input pywebio.input.input_group pywebio.input.radio
+#: pywebio.input.select pywebio.input.textarea
+msgid "Parameters"
+msgstr ""
+
+#: of pywebio.input.input:3
+msgid "Label of input field."
+msgstr "输入框标签"
+
+#: of pywebio.input.input:4
+msgid ""
+"Input type. Currently supported types are:`TEXT` , `NUMBER` , `FLOAT` , "
+"`PASSWORD` , `URL` , `DATE` , `TIME`  Note that `DATE` and `TIME` type are not "
+"supported on some browsers, for details see https://developer.mozilla.org/en-US/"
+"docs/Web/HTML/Element/input#Browser_compatibility"
+msgstr ""
+
+#: of pywebio.input.input:4
+msgid ""
+"Input type. Currently supported types are:`TEXT` , `NUMBER` , `FLOAT` , "
+"`PASSWORD` , `URL` , `DATE` , `TIME`"
+msgstr ""
+"输入类型. 可使用的常量:`TEXT` , `NUMBER` , `FLOAT` , `PASSWORD` , `URL` , "
+"`DATE` , `TIME`"
+
+#: of pywebio.input.input:6
+msgid ""
+"Note that `DATE` and `TIME` type are not supported on some browsers, for "
+"details see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/"
+"input#Browser_compatibility"
+msgstr ""
+"其中 `DATE` , `TIME` 类型在某些浏览器上不被支持,详情见 https://developer."
+"mozilla.org/en-US/docs/Web/HTML/Element/input#Browser_compatibility"
+
+#: of pywebio.input.input:7
+msgid ""
+"Input value validation function. If provided, the validation function will be "
+"called when the user completes input or submits the form.  ``validate`` "
+"receives the input value as a parameter. When the input value is valid, it "
+"returns ``None``. When the input value is invalid, it returns an error message "
+"string. For example:  .. exportable-codeblock::     :name: input-valid-"
+"func     :summary: `input()` validation      def check_age(age):         if "
+"age>30:             return 'Too old'         elif age<10:             return "
+"'Too young'     input('Input your age', type=NUMBER, validate=check_age)"
+msgstr ""
+
+#: of pywebio.input.input:7
+msgid ""
+"Input value validation function. If provided, the validation function will be "
+"called when the user completes input or submits the form."
+msgstr "输入值校验函数. 如果提供,当用户输入完毕或提交表单后校验函数将被调用."
+
+#: of pywebio.input.input:9
+msgid ""
+"``validate`` receives the input value as a parameter. When the input value is "
+"valid, it returns ``None``. When the input value is invalid, it returns an "
+"error message string. For example:"
+msgstr ""
+"``validate`` 接收输入值作为参数,当输入值有效时,返回 ``None`` ,当输入值无效"
+"时,返回错误提示字符串. 比如:"
+
+#: of pywebio.input.input:11
+msgid ""
+"def check_age(age):\n"
+"    if age>30:\n"
+"        return 'Too old'\n"
+"    elif age<10:\n"
+"        return 'Too young'\n"
+"input('Input your age', type=NUMBER, validate=check_age)"
+msgstr ""
+
+#: of pywebio.input.input:22
+msgid ""
+"A string specifying a name for the input. Used with `input_group()` to identify "
+"different input items in the results of the input group. If call the input "
+"function alone, this parameter can **not** be set!"
+msgstr ""
+"输入框的名字. 与 `input_group` 配合使用,用于在输入组的结果中标识不同输入项.  **"
+"在单个输入中,不可以设置该参数!**"
+
+#: of pywebio.input.input:23
+msgid "The initial value of the input"
+msgstr "输入框的初始值"
+
+#: of pywebio.input.input:25
+msgid ""
+"Put a button on the right side of the input field, and you can click the button "
+"to set the value for the input.  ``label`` is the label of the button, and "
+"``callback`` is the callback function to set the input value when clicked.  The "
+"callback is invoked with one argument, the ``set_value``. ``set_value`` is a "
+"callable object, which is invoked with one or two arguments. You can use "
+"``set_value`` to set the value for the input.  ``set_value`` can be invoked "
+"with one argument: ``set_value(value:str)``. The ``value`` parameter is the "
+"value to be set for the input.  ``set_value`` can be invoked with two "
+"arguments: ``set_value(value:any, label:str)``. Each arguments are described as "
+"follows:   * ``value`` : The real value of the input, can be any object. it "
+"will not be passed to the user browser.  * ``label`` : The text displayed to "
+"the user  When calling ``set_value`` with two arguments, the input item in web "
+"page will become read-only.  The usage scenario of ``set_value(value:any, label:"
+"str)`` is: You need to dynamically generate the value of the input in the "
+"callback, and hope that the result displayed to the user is different from the "
+"actual submitted data (for example, result displayed to the user can be some "
+"user-friendly texts, and the value of the input can be objects that are easier "
+"to process)  Usage example:  .. exportable-codeblock::     :name: input-"
+"action     :summary: `input()` action usage      import time     def "
+"set_now_ts(set_value):         set_value(int(time.time()))      ts = "
+"input('Timestamp', type=NUMBER, action=('Now', set_now_ts))     "
+"put_text('Timestamp:', ts)  # ..demo-only     ## ----     from datetime import "
+"date,timedelta     def select_date(set_value):         with popup('Select "
+"Date'):             put_buttons(['Today'], onclick=[lambda: set_value(date."
+"today(), 'Today')])             put_buttons(['Yesterday'], onclick=[lambda: "
+"set_value(date.today() - timedelta(days=1), 'Yesterday')])      d = "
+"input('Date', action=('Select', select_date), readonly=True)     "
+"put_text(type(d), d)  Note: When using :ref:`Coroutine-based session "
+"<coroutine_based_session>` implementation, the ``callback`` function can be a "
+"coroutine function."
+msgstr ""
+
+#: of pywebio.input.input:25
+msgid ""
+"Put a button on the right side of the input field, and you can click the button "
+"to set the value for the input."
+msgstr "在输入框右侧显示一个按钮,可通过点击按钮为输入框设置值。"
+
+#: of pywebio.input.input:27
+msgid ""
+"``label`` is the label of the button, and ``callback`` is the callback function "
+"to set the input value when clicked."
+msgstr "``label`` 为按钮的显示文本, ``callback`` 为按钮点击的回调函数。"
+
+#: of pywebio.input.input:29
+msgid ""
+"The callback is invoked with one argument, the ``set_value``. ``set_value`` is "
+"a callable object, which is invoked with one or two arguments. You can use "
+"``set_value`` to set the value for the input."
+msgstr ""
+"回调函数需要接收一个 ``set_value`` 位置参数, ``set_value`` 是一个可调用对象,接"
+"受单参数调用和双参数调用。"
+
+#: of pywebio.input.input:31
+msgid ""
+"``set_value`` can be invoked with one argument: ``set_value(value:str)``. The "
+"``value`` parameter is the value to be set for the input."
+msgstr ""
+"单参数调用时,签名为 ``set_value(value:str)`` ,调用set_value即可将表单项的值设"
+"置为传入的 ``value`` 参数。"
+
+#: of pywebio.input.input:33
+msgid ""
+"``set_value`` can be invoked with two arguments: ``set_value(value:any, label:"
+"str)``. Each arguments are described as follows:"
+msgstr "双参数调用时,签名为 ``set_value(value:any, label:str)`` ,其中:"
+
+#: of pywebio.input.input:35
+msgid ""
+"``value`` : The real value of the input, can be any object. it will not be "
+"passed to the user browser."
+msgstr ""
+"``value`` 参数为最终输入项的返回值,可以为任意Python对象,并不会传递给用户浏览器"
+
+#: of pywebio.input.input:36
+msgid "``label`` : The text displayed to the user"
+msgstr "``label`` 参数用于显示在用户表单项上"
+
+#: of pywebio.input.input:38
+msgid ""
+"When calling ``set_value`` with two arguments, the input item in web page will "
+"become read-only."
+msgstr "使用双参数调用 ``set_value`` 后,用户表单项会变为只读状态。"
+
+#: of pywebio.input.input:40
+msgid ""
+"The usage scenario of ``set_value(value:any, label:str)`` is: You need to "
+"dynamically generate the value of the input in the callback, and hope that the "
+"result displayed to the user is different from the actual submitted data (for "
+"example, result displayed to the user can be some user-friendly texts, and the "
+"value of the input can be objects that are easier to process)"
+msgstr ""
+"双参数调用的使用场景为:表单项的值通过回调动态生成,同时希望用户表单显示的和实际"
+"提交的数据不同(例如表单项上可以显示更人性化的内容,而表单项的值则可以保存更方便"
+"被处理的对象)"
+
+#: of pywebio.input.input:42
+msgid "Usage example:"
+msgstr "使用示例"
+
+#: of pywebio.input.input:44
+msgid ""
+"import time\n"
+"def set_now_ts(set_value):\n"
+"    set_value(int(time.time()))\n"
+"\n"
+"ts = input('Timestamp', type=NUMBER, action=('Now', set_now_ts))\n"
+"put_text('Timestamp:', ts)  # ..demo-only\n"
+"## ----\n"
+"from datetime import date,timedelta\n"
+"def select_date(set_value):\n"
+"    with popup('Select Date'):\n"
+"        put_buttons(['Today'], onclick=[lambda: set_value(date.today(), "
+"'Today')])\n"
+"        put_buttons(['Yesterday'], onclick=[lambda: set_value(date.today() - "
+"timedelta(days=1), 'Yesterday')])\n"
+"\n"
+"d = input('Date', action=('Select', select_date), readonly=True)\n"
+"put_text(type(d), d)"
+msgstr ""
+
+#: of pywebio.input.input:64
+msgid ""
+"Note: When using :ref:`Coroutine-based session <coroutine_based_session>` "
+"implementation, the ``callback`` function can be a coroutine function."
+msgstr ""
+"Note: 当使用 :ref:`基于协程的会话实现 <coroutine_based_session>` 时,回调函数 "
+"``callback`` 可以为协程函数."
+
+#: of pywebio.input.input:66
+msgid ""
+"A hint to the user of what can be entered in the input. It will appear in the "
+"input field when it has no value set."
+msgstr "输入框的提示内容。提示内容会在输入框未输入值时以浅色字体显示在输入框中"
+
+#: of pywebio.input.input:67
+msgid "Whether a value is required for the input to be submittable"
+msgstr "当前输入是否为必填项"
+
+#: of pywebio.input.input:68
+msgid "Whether the value is readonly(not editable)"
+msgstr "输入框是否为只读"
+
+#: of pywebio.input.input:69
+msgid ""
+"A list of predefined values to suggest to the user for this input. Can only be "
+"used when ``type=TEXT``"
+msgstr ""
+"输入建议内容列表,在页面上的显示效果为下拉候选列表,用户可以忽略建议内容列表而输"
+"入其他内容。仅当输入类型 ``type`` 为 `TEXT` 时可用"
+
+#: of pywebio.input.input:70
+msgid ""
+"Help text for the input. The text will be displayed below the input field in a "
+"small font"
+msgstr "输入框的帮助文本。帮助文本会以小号字体显示在输入框下方"
+
+#: of pywebio.input.input:71
+#, python-format
+msgid ""
+"Additional html attributes added to the input element. reference: https://"
+"developer.mozilla.org/zh-CN/docs/Web/HTML/Element/input#%E5%B1%9E%E6%80%A7"
+msgstr ""
+"在输入框上附加的额外html属性。参考: https://developer.mozilla.org/zh-CN/docs/"
+"Web/HTML/Element/input#%E5%B1%9E%E6%80%A7"
+
+#: of pywebio.input.actions pywebio.input.checkbox pywebio.input.file_upload
+#: pywebio.input.input pywebio.input.input_group pywebio.input.radio
+#: pywebio.input.select pywebio.input.textarea
+msgid "Returns"
+msgstr ""
+
+#: of pywebio.input.input:72
+msgid "The value that user input."
+msgstr "用户输入的值"
+
+#: of pywebio.input.textarea:1
+msgid "Text input area (multi-line text input)"
+msgstr "文本输入域(多行文本输入)"
+
+#: of pywebio.input.textarea:3
+msgid ""
+"The number of visible text lines for the input area. Scroll bar will be used "
+"when content exceeds."
+msgstr "输入框的最多可显示的文本的行数,内容超出时会显示滚动条"
+
+#: of pywebio.input.textarea:4
+msgid ""
+"The maximum number of characters (UTF-16 code units) that the user can enter. "
+"If this value isn't specified, the user can enter an unlimited number of "
+"characters."
+msgstr "最大允许用户输入的字符长度 (Unicode) 。未指定表示无限长度"
+
+#: of pywebio.input.textarea:5
+msgid ""
+"The minimum number of characters (UTF-16 code units) required that the user "
+"should enter."
+msgstr "最少需要用户输入的字符长度(Unicode)"
+
+#: of pywebio.input.textarea:6
+msgid ""
+"Enable a code style editor by providing the `Codemirror <https://codemirror.net/"
+">`_ options:  .. exportable-codeblock::     :name: textarea-code     :summary: "
+"`textarea()` code editor style      res = textarea('Text area', "
+"code={         'mode': \"python\",         'theme': 'darcula'     })     "
+"put_code(res, language='python')  # ..demo-only  You can simply use ``code={}`` "
+"or ``code=True`` to enable code style editor.  Some commonly used Codemirror "
+"options are listed :ref:`here <codemirror_options>`."
+msgstr ""
+
+#: of pywebio.input.textarea:6
+msgid ""
+"Enable a code style editor by providing the `Codemirror <https://codemirror.net/"
+">`_ options:"
+msgstr ""
+"通过提供 `Codemirror <https://codemirror.net/>`_ 参数让文本输入域具有代码编辑器"
+"样式:"
+
+#: of pywebio.input.textarea:8
+msgid ""
+"res = textarea('Text area', code={\n"
+"    'mode': \"python\",\n"
+"    'theme': 'darcula'\n"
+"})\n"
+"put_code(res, language='python')  # ..demo-only"
+msgstr ""
+
+#: of pywebio.input.textarea:18
+msgid ""
+"You can simply use ``code={}`` or ``code=True`` to enable code style editor."
+msgstr "可以直接使用 ``code={}`` 或 ``code=True``  开启代码编辑样式"
+
+#: of pywebio.input.textarea:20
+msgid ""
+"Some commonly used Codemirror options are listed :ref:`here "
+"<codemirror_options>`."
+msgstr ":ref:`这里 <codemirror_options>` 列举了一些常用的Codemirror选项"
+
+#: of pywebio.input.actions:29 pywebio.input.checkbox:7
+#: pywebio.input.file_upload:20 pywebio.input.radio:8 pywebio.input.select:29
+#: pywebio.input.textarea:22
+msgid "Those arguments have the same meaning as for `input()`"
+msgstr "与 `input` 输入函数的同名参数含义一致"
+
+#: of pywebio.input.textarea:23
+msgid "The string value that user input."
+msgstr "用户输入的文本"
+
+#: of pywebio.input.select:3
+msgid ""
+"By default, only one option can be selected at a time, you can set ``multiple`` "
+"parameter to enable multiple selection."
+msgstr "默认单选,可以通过设置 ``multiple`` 参数来允许多选"
+
+#: of pywebio.input.select:5
+msgid ""
+"list of options. The available formats of the list items are:  * dict::      "
+"{         \"label\":(str) option label,         \"value\":(object) option "
+"value,         \"selected\":(bool, optional) whether the option is initially "
+"selected,         \"disabled\":(bool, optional) whether the option is initially "
+"disabled     }  * tuple or list: ``(label, value, [selected,] [disabled])`` * "
+"single value: label and value of option use the same value  Attention:  1. The "
+"``value`` of option can be any JSON serializable object 2. If the ``multiple`` "
+"is not ``True``, the list of options can only have one ``selected`` item at "
+"most."
+msgstr ""
+
+#: of pywebio.input.select:5
+msgid "list of options. The available formats of the list items are:"
+msgstr "可选项列表。列表项的可用形式有:"
+
+#: of pywebio.input.actions:7 pywebio.input.select:7
+msgid "dict::"
+msgstr ""
+
+#: of pywebio.input.select:9
+msgid ""
+"{\n"
+"    \"label\":(str) option label,\n"
+"    \"value\":(object) option value,\n"
+"    \"selected\":(bool, optional) whether the option is initially selected,\n"
+"    \"disabled\":(bool, optional) whether the option is initially disabled\n"
+"}"
+msgstr ""
+"{\n"
+"    \"label\":(str) 选项标签,\n"
+"    \"value\":(object) 选项值,\n"
+"    \"selected\":(bool, optional) 是否默认选中,\n"
+"    \"disabled\":(bool, optional) 是否禁止选中\n"
+"}"
+
+#: of pywebio.input.select:16
+msgid "tuple or list: ``(label, value, [selected,] [disabled])``"
+msgstr ""
+
+#: of pywebio.input.select:17
+msgid "single value: label and value of option use the same value"
+msgstr "单值: 此时label和value使用相同的值"
+
+#: of pywebio.input.select:19
+msgid "Attention:"
+msgstr "注意:"
+
+#: of pywebio.input.select:21
+msgid "The ``value`` of option can be any JSON serializable object"
+msgstr "``options`` 中的 ``value`` 可以为任意可JSON序列化对象"
+
+#: of pywebio.input.select:22
+msgid ""
+"If the ``multiple`` is not ``True``, the list of options can only have one "
+"``selected`` item at most."
+msgstr ""
+"若 ``multiple`` 选项不为 ``True`` 则可选项列表最多仅能有一项的 ``selected`` 为 "
+"``True``。"
+
+#: of pywebio.input.select:24
+msgid "whether multiple options can be selected"
+msgstr "是否可以多选. 默认单选"
+
+#: of pywebio.input.select:25
+msgid ""
+"The value of the initial selected item. When ``multiple=True``, ``value`` must "
+"be a list. You can also set the initial selected option by setting the "
+"``selected`` field in the ``options`` list item."
+msgstr ""
+"下拉选择框初始选中项的值。当 ``multiple=True`` 时, ``value`` 需为list,否则为单"
+"个选项的值。\n"
+"你也可以通过设置 ``options`` 列表项中的 ``selected`` 字段来设置默认选中选项。\n"
+"最终选中项为 ``value`` 参数和 ``options`` 中设置的并集。"
+
+#: of pywebio.input.select:28
+msgid "Whether to select at least one item, only available when ``multiple=True``"
+msgstr "是否至少选择一项,仅在 ``multiple=True`` 时可用"
+
+#: of pywebio.input.select:30
+msgid ""
+"If ``multiple=True``, return a list of the values in the ``options`` selected "
+"by the user; otherwise, return the single value selected by the user."
+msgstr ""
+"如果 ``multiple=True`` 时,返回用户选中的 ``options`` 中的值的列表;否则,返回用"
+"户选中的 ``options`` 中的值"
+
+#: of pywebio.input.checkbox:1
+msgid ""
+"A group of check box that allowing single values to be selected/deselected."
+msgstr "勾选选项。可以多选,也可以不选。"
+
+#: of pywebio.input.checkbox:3 pywebio.input.radio:3
+msgid ""
+"List of options. The format is the same as the ``options`` parameter of the "
+"`select()` function"
+msgstr "可选项列表。格式与同 `select()` 函数的 ``options`` 参数"
+
+#: of pywebio.input.checkbox:4 pywebio.input.radio:4
+msgid "Whether to display the options on one line. Default is False"
+msgstr "是否将选项显示在一行上。默认每个选项单独占一行"
+
+#: of pywebio.input.checkbox:5
+msgid ""
+"The value list of the initial selected items. You can also set the initial "
+"selected option by setting the ``selected`` field in the ``options`` list item."
+msgstr ""
+"勾选选项初始选中项。为选项值的列表。你也可以通过设置 ``options`` 列表项中的 "
+"``selected`` 字段来设置默认选中选项。"
+
+#: of pywebio.input.checkbox:8
+msgid "A list of the values in the ``options`` selected by the user"
+msgstr "用户选中的 options 中的值的列表。当用户没有勾选任何选项时,返回空列表"
+
+#: of pywebio.input.radio:1
+msgid "A group of radio button. Only a single button can be selected."
+msgstr "单选选项"
+
+#: of pywebio.input.radio:5
+msgid ""
+"The value of the initial selected items. You can also set the initial selected "
+"option by setting the ``selected`` field in the ``options`` list item."
+msgstr "可选项列表。格式与同 `select()` 函数的 ``options`` 参数"
+
+#: of pywebio.input.radio:7
+msgid ""
+"whether to must select one option. (the user can select nothing option by "
+"default)"
+msgstr "是否一定要选择一项(默认条件下用户可以不选择任何选项)"
+
+#: of pywebio.input.radio:9
+msgid ""
+"The value of the option selected by the user, if the user does not select any "
+"value, return ``None``"
+msgstr "用户选中的选项的值, 如果用户没有选任何值,返回 ``None``"
+
+#: of pywebio.input.actions:3
+msgid ""
+"It is displayed as a group of buttons on the page. After the user clicks the "
+"button of it, it will behave differently depending on the type of the button."
+msgstr "在表单上显示为一组按钮,用户点击按钮后依据按钮类型的不同有不同的表现。"
+
+#: of pywebio.input.actions:5
+msgid ""
+"list of buttons. The available formats of the list items are:   * dict::        "
+"{          \"label\":(str) button label,          \"value\":(object) button "
+"value,          \"type\":(str, optional) button type,          \"disabled\":"
+"(bool, optional) whether the button is disabled       }     When "
+"``type='reset'/'cancel'`` or ``disabled=True``, ``value`` can be omitted  * "
+"tuple or list: ``(label, value, [type], [disabled])``  * single value: label "
+"and value of button use the same value  The ``value`` of button can be any JSON "
+"serializable object.  ``type`` can be:   * ``'submit'`` : After clicking the "
+"button, the entire form is submitted immediately, and the value of this input "
+"item in the final form is the ``value`` of the button that was clicked. "
+"``'submit'`` is the default value of ``type``  * ``'cancel'`` : Cancel form. "
+"After clicking the button, the entire form will be submitted immediately, and "
+"the form value will return ``None``  * ``'reset'`` : Reset form. After clicking "
+"the button, the entire form will be reset, and the input items will become the "
+"initial state.    Note: After clicking the ``type=reset`` button, the form will "
+"not be submitted, and the ``actions()`` call will not return"
+msgstr ""
+
+#: of pywebio.input.actions:5
+msgid "list of buttons. The available formats of the list items are:"
+msgstr "按钮列表。列表项的可用形式有:"
+
+#: of pywebio.input.actions:9
+msgid ""
+"{\n"
+"   \"label\":(str) button label,\n"
+"   \"value\":(object) button value,\n"
+"   \"type\":(str, optional) button type,\n"
+"   \"disabled\":(bool, optional) whether the button is disabled\n"
+"}"
+msgstr ""
+"{\n"
+"   \"label\":(str) 按钮标签,\n"
+"   \"value\":(object) 按钮值,\n"
+"   \"type\":(str, optional) 按钮类型,\n"
+"   \"disabled\":(bool, optional) 是否禁止选择\n"
+"}"
+
+#: of pywebio.input.actions:16
+msgid ""
+"When ``type='reset'/'cancel'`` or ``disabled=True``, ``value`` can be omitted"
+msgstr "若 ``type='reset'/'cancel'`` 或 ``disabled=True`` 可省略 ``value``"
+
+#: of pywebio.input.actions:17
+msgid "tuple or list: ``(label, value, [type], [disabled])``"
+msgstr ""
+
+#: of pywebio.input.actions:18
+msgid "single value: label and value of button use the same value"
+msgstr "单值: 此时label和value使用相同的值"
+
+#: of pywebio.input.actions:20
+msgid "The ``value`` of button can be any JSON serializable object."
+msgstr "其中, ``value`` 可以为任意可JSON序列化的对象。"
+
+#: of pywebio.input.actions:22
+msgid "``type`` can be:"
+msgstr "``type`` 可选值为:"
+
+#: of pywebio.input.actions:24
+msgid ""
+"``'submit'`` : After clicking the button, the entire form is submitted "
+"immediately, and the value of this input item in the final form is the "
+"``value`` of the button that was clicked. ``'submit'`` is the default value of "
+"``type``"
+msgstr ""
+"``'submit'`` : 点击按钮后,立即将整个表单提交,最终表单中本项的值为被点击按钮的 "
+"``value`` 值。 ``'submit'`` 为 ``type`` 的默认值"
+
+#: of pywebio.input.actions:25
+msgid ""
+"``'cancel'`` : Cancel form. After clicking the button, the entire form will be "
+"submitted immediately, and the form value will return ``None``"
+msgstr ""
+"``'cancel'`` : 取消输入。点击按钮后,立即将整个表单提交,表单值返回 ``None``"
+
+#: of pywebio.input.actions:26
+msgid ""
+"``'reset'`` : Reset form. After clicking the button, the entire form will be "
+"reset, and the input items will become the initial state. Note: After clicking "
+"the ``type=reset`` button, the form will not be submitted, and the "
+"``actions()`` call will not return"
+msgstr ""
+"``'reset'`` : 点击按钮后,将整个表单重置,输入项将变为初始状态。\n"
+"注意:点击 ``type=reset`` 的按钮后,并不会提交表单, ``actions()`` 调用也不会返"
+"回"
+
+#: of pywebio.input.actions:30
+msgid ""
+"If the user clicks the ``type=submit`` button to submit the form, return the "
+"value of the button clicked by the user. If the user clicks the ``type=cancel`` "
+"button or submits the form by other means, ``None`` is returned."
+msgstr ""
+"若用户点击点击 ``type=submit`` 按钮进行表单提交,返回用户点击的按钮的值;\n"
+"若用户点击 ``type=cancel`` 按钮或通过其它方式提交表单,则返回 ``None``"
+
+#: of pywebio.input.actions:32
+msgid ""
+"When ``actions()`` is used as the last input item in `input_group()` and "
+"contains a button with ``type='submit'``, the default submit button of the "
+"`input_group()` form will be replace with the current ``actions()``"
+msgstr ""
+"当 ``actions()`` 作为 `input_group()` 中的最后一个输入项、并且含有 "
+"``type='submit'`` 的按钮时,`input_group()` 表单默认的提交按钮会被当前 "
+"``actions()`` 替换"
+
+#: of pywebio.input.actions:34
+msgid "**usage scenes of ``actions()``**"
+msgstr "actions使用场景"
+
+#: of pywebio.input.actions:38
+msgid "Perform simple selection operations:"
+msgstr "实现简单的选择操作:"
+
+#: of pywebio.input.actions:40
+#, python-format
+msgid ""
+"confirm = actions('Confirm to delete file?', ['confirm', 'cancel'], "
+"help_text='Unrecoverable after file deletion')\n"
+"if confirm=='confirm':  # ..doc-only\n"
+"    ...  # ..doc-only\n"
+"put_markdown('You clicked the `%s` button' % confirm)  # ..demo-only"
+msgstr ""
+"confirm = actions('确认删除文件?', ['确认', '取消'], help_text='文件删除后不可"
+"恢复')\n"
+"if confirm=='确认':  # ..doc-only\n"
+"    …  # ..doc-only\n"
+"put_markdown('点击了`%s`按钮' % confirm)  # ..demo-only"
+
+#: of pywebio.input.actions:49
+msgid ""
+"Compared with other input items, when using `actions()`, the user only needs to "
+"click once to complete the submission."
+msgstr "相比于其他输入项,使用 `actions()` 用户只需要点击一次就可完成提交。"
+
+#: of pywebio.input.actions:51
+msgid "Replace the default submit button:"
+msgstr "替换默认的提交按钮:"
+
+#: of pywebio.input.actions:53
+msgid ""
+"import json  # ..demo-only\n"
+"             # ..demo-only\n"
+"info = input_group('Add user', [\n"
+"    input('username', type=TEXT, name='username', required=True),\n"
+"    input('password', type=PASSWORD, name='password', required=True),\n"
+"    actions('actions', [\n"
+"        {'label': 'Save', 'value': 'save'},\n"
+"        {'label': 'Save and add next', 'value': 'save_and_continue'},\n"
+"        {'label': 'Reset', 'type': 'reset'},\n"
+"        {'label': 'Cancel', 'type': 'cancel'},\n"
+"    ], name='action', help_text='actions'),\n"
+"])\n"
+"put_code('info = ' + json.dumps(info, indent=4))\n"
+"if info is not None:\n"
+"    save_user(info['username'], info['password'])  # ..doc-only\n"
+"    if info['action'] == 'save_and_continue':\n"
+"        add_next()  # ..doc-only\n"
+"        put_text('Save and add next...')  # ..demo-only"
+msgstr ""
+
+#: of pywebio.input.file_upload:3
+msgid ""
+"Single value or list, indicating acceptable file types. The available formats "
+"of file types are:  * A valid case-insensitive filename extension, starting "
+"with a period (\".\") character. For example: ``.jpg``, ``.pdf``, or ``.doc``. "
+"* A valid MIME type string, with no extensions.   For examples: ``application/"
+"pdf``, ``audio/*``, ``video/*``, ``image/*``.   For more information, please "
+"visit: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/"
+"MIME_types"
+msgstr ""
+
+#: of pywebio.input.file_upload:3
+msgid ""
+"Single value or list, indicating acceptable file types. The available formats "
+"of file types are:"
+msgstr "单值或列表, 表示可接受的文件类型。文件类型的可用形式有:"
+
+#: of pywebio.input.file_upload:5
+msgid ""
+"A valid case-insensitive filename extension, starting with a period (\".\") "
+"character. For example: ``.jpg``, ``.pdf``, or ``.doc``."
+msgstr ""
+"以 ``.`` 字符开始的文件扩展名(例如:``.jpg, .png, .doc``)。\n"
+"注意:截至本文档编写之时,微信内置浏览器还不支持这种语法"
+
+#: of pywebio.input.file_upload:6
+msgid ""
+"A valid MIME type string, with no extensions. For examples: ``application/"
+"pdf``, ``audio/*``, ``video/*``, ``image/*``. For more information, please "
+"visit: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/"
+"MIME_types"
+msgstr ""
+"一个有效的 MIME 类型。\n"
+"例如: ``application/pdf`` 、 ``audio/*`` 表示音频文件、``video/*`` 表示视频文"
+"件、``image/*`` 表示图片文件。\n"
+"参考 https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types"
+
+#: of pywebio.input.file_upload:11
+msgid ""
+"A hint to the user of what to be uploaded. It will appear in the input field "
+"when there is no file selected."
+msgstr "未上传文件时,文件上传框内显示的文本"
+
+#: of pywebio.input.file_upload:12
+msgid "Whether to allow upload multiple files. Default is ``False``."
+msgstr "是否允许多文件上传,默认关闭"
+
+#: of pywebio.input.file_upload:13
+msgid ""
+"The maximum size of a single file, exceeding the limit will prohibit uploading. "
+"The default is 0, which means there is no limit to the size.  ``max_size`` can "
+"be a integer indicating the number of bytes, or a case-insensitive string "
+"ending with `K` / `M` / `G` (representing kilobytes, megabytes, and gigabytes, "
+"respectively). E.g: ``max_size=500``, ``max_size='40K'``, ``max_size='3M'``"
+msgstr ""
+
+#: of pywebio.input.file_upload:13
+msgid ""
+"The maximum size of a single file, exceeding the limit will prohibit uploading. "
+"The default is 0, which means there is no limit to the size."
+msgstr ""
+"单个文件的最大大小,超过限制将会禁止上传。默认为0,表示不限制上传文件的大小。"
+
+#: of pywebio.input.file_upload:15
+msgid ""
+"``max_size`` can be a integer indicating the number of bytes, or a case-"
+"insensitive string ending with `K` / `M` / `G` (representing kilobytes, "
+"megabytes, and gigabytes, respectively). E.g: ``max_size=500``, "
+"``max_size='40K'``, ``max_size='3M'``"
+msgstr ""
+"``max_size`` 值可以为数字表示的字节数,或以 `K` / `M` / `G` 结尾表示的字符串(分"
+"别表示 千字节、兆字节、吉字节,大小写不敏感)。例如:\n"
+"``max_size=500`` , ``max_size='40K'`` , ``max_size='3M'``"
+
+#: of pywebio.input.file_upload:18
+msgid ""
+"The maximum size of all files. Only available when ``multiple=True``. The "
+"default is 0, which means there is no limit to the size. The format is the same "
+"as the ``max_size`` parameter"
+msgstr ""
+"所有文件的最大大小,超过限制将会禁止上传。仅在 ``multiple=True`` 时可用,默认不"
+"限制上传文件的大小。 格式同 ``max_size`` 参数"
+
+#: of pywebio.input.file_upload:19
+msgid ""
+"Indicates whether the user must specify a file for the input. Default is "
+"`False`."
+msgstr "是否必须要上传文件。默认为 `False`"
+
+#: of pywebio.input.file_upload:21
+msgid ""
+"When ``multiple=False``, a dict is returned::   {      'filename': file "
+"name,      'content':content of the file(bytes object),      'mime_type': "
+"MIME type of the file,      'last_modified': Last modified time(timestamp) of "
+"the file  }  If there is no file uploaded, return ``None``.  When "
+"``multiple=True``, a list is returned. The format of the list item is the same "
+"as the return value when ``multiple=False`` above. If the user does not upload "
+"a file, an empty list is returned."
+msgstr ""
+
+#: of pywebio.input.file_upload:21
+msgid "When ``multiple=False``, a dict is returned::"
+msgstr "``multiple=False`` 时(默认),返回dict::"
+
+#: of pywebio.input.file_upload:23
+msgid ""
+"{\n"
+"    'filename': file name,\n"
+"    'content':content of the file(bytes object),\n"
+"    'mime_type': MIME type of the file,\n"
+"    'last_modified': Last modified time(timestamp) of the file\n"
+"}"
+msgstr ""
+"{\n"
+"    'filename': 文件名, \n"
+"    'content':文件二进制数据(bytes object), \n"
+"    'mime_type': 文件的MIME类型, \n"
+"    'last_modified': 文件上次修改时间(时间戳) \n"
+"}"
+
+#: of pywebio.input.file_upload:30
+msgid "If there is no file uploaded, return ``None``."
+msgstr "若用户没有上传文件,返回 ``None`` 。"
+
+#: of pywebio.input.file_upload:32
+msgid ""
+"When ``multiple=True``, a list is returned. The format of the list item is the "
+"same as the return value when ``multiple=False`` above. If the user does not "
+"upload a file, an empty list is returned."
+msgstr ""
+"``multiple=True`` 时,返回列表,列表项格式同上文 ``multiple=False`` 时的返回值;"
+"若用户没有上传文件,返回空列表。"
+
+#: of pywebio.input.file_upload:36
+msgid ""
+"If uploading large files, please pay attention to the file upload size limit "
+"setting of the web framework. When using :func:`start_server <pywebio.platform."
+"start_server>` to start the PyWebIO application, the maximum file size to be "
+"uploaded allowed by the web framework can be set through the "
+"`websocket_max_message_size` parameter"
+msgstr ""
+"若上传大文件请留意Web框架的文件上传大小限制设置。在使用 :func:`start_server "
+"<pywebio.platform.start_server>` 启动PyWebIO应用时,\n"
+"可通过 `websocket_max_message_size` 参数设置允许上传的最大文件大小"
+
+#: of pywebio.input.input_group:1
+msgid "Input group. Request a set of inputs from the user at once."
+msgstr "输入组。向页面上展示一组输入"
+
+#: of pywebio.input.input_group:3
+msgid "Label of input group."
+msgstr "输入组标签"
+
+#: of pywebio.input.input_group:4
+msgid ""
+"Input items. The item of the list is the call to the single input function, and "
+"the ``name`` parameter need to be passed in the single input function."
+msgstr ""
+"输入项列表。列表的内容为对单项输入函数的调用,并在单项输入函数中传入 ``name`` 参"
+"数。"
+
+#: of pywebio.input.input_group:6
+msgid ""
+"validation function for the group. If provided, the validation function will be "
+"called when the user submits the form.  Function signature: ``callback(data) -> "
+"(name, error_msg)``. ``validate`` receives the value of the entire group as a "
+"parameter. When the form value is valid, it returns ``None``. When an input "
+"item's value is invalid, it returns the ``name`` value of the item and an error "
+"message. For example:"
+msgstr ""
+
+#: of pywebio.input.input_group:6
+msgid ""
+"validation function for the group. If provided, the validation function will be "
+"called when the user submits the form."
+msgstr "输入组校验函数。"
+
+#: of pywebio.input.input_group:8
+msgid ""
+"Function signature: ``callback(data) -> (name, error_msg)``. ``validate`` "
+"receives the value of the entire group as a parameter. When the form value is "
+"valid, it returns ``None``. When an input item's value is invalid, it returns "
+"the ``name`` value of the item and an error message. For example:"
+msgstr ""
+"函数签名:``callback(data) -> (name, error_msg)``\n"
+"``validate`` 接收整个表单的值为参数,当校验表单值有效时,返回 ``None`` ,当某项"
+"输入值无效时,返回出错输入项的 ``name`` 值和错误提示. 比如:"
+
+#: of pywebio.input.input_group:11
+msgid ""
+"def check_form(data):\n"
+"    if len(data['name']) > 6:\n"
+"        return ('name', 'Name to long!')\n"
+"    if data['age'] <= 0:\n"
+"        return ('age', 'Age cannot be negative!')\n"
+"\n"
+"data = input_group(\"Basic info\",[\n"
+"    input('Input your name', name='name'),\n"
+"    input('Repeat your age', name='age', type=NUMBER)\n"
+"], validate=check_form)\n"
+"\n"
+"put_text(data['name'], data['age'])"
+msgstr ""
+
+#: of pywebio.input.input_group:28
+msgid ""
+"Whether the form can be cancelled. Default is False. If ``cancelable=True``, a "
+"\"Cancel\" button will be displayed at the bottom of the form.  Note: If the "
+"last input item in the group is `actions()`, ``cancelable`` will be ignored."
+msgstr ""
+
+#: of pywebio.input.input_group:28
+msgid ""
+"Whether the form can be cancelled. Default is False. If ``cancelable=True``, a "
+"\"Cancel\" button will be displayed at the bottom of the form."
+msgstr ""
+"表单是否可以取消。若 ``cancelable=True`` 则会在表单底部显示一个”取消”按钮。"
+
+#: of pywebio.input.input_group:30
+msgid ""
+"Note: If the last input item in the group is `actions()`, ``cancelable`` will "
+"be ignored."
+msgstr "注意:若 ``inputs`` 中最后一项输入为 `actions()` ,则忽略 ``cancelable``"
+
+#: of pywebio.input.input_group:32
+msgid ""
+"If the user cancels the form, return ``None``, otherwise a ``dict`` is "
+"returned, whose key is the ``name`` of the input item, and whose value is the "
+"value of the input item."
+msgstr ""
+"若用户取消表单,返回 ``None`` ,否则返回一个 ``dict`` , 其键为输入项的 ``name`` "
+"值,字典值为输入项的值"

+ 185 - 0
docs/locales/zh_CN/LC_MESSAGES/libraries_support.po

@@ -0,0 +1,185 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PyWebIO 1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-17 17:57+0800\n"
+"PO-Revision-Date: 2021-02-18 11:26+0800\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"
+
+#: ../../libraries_support.rst:2
+msgid "Libraries support"
+msgstr "第三方库生态"
+
+#: ../../libraries_support.rst:7
+msgid "Data visualization"
+msgstr "数据可视化"
+
+#: ../../libraries_support.rst:8
+msgid "PyWebIO supports for data visualization with the third-party libraries."
+msgstr "PyWebIO支持使用第三方库进行数据可视化"
+
+#: ../../libraries_support.rst:11
+msgid "Bokeh"
+msgstr ""
+
+#: ../../libraries_support.rst:13
+msgid ""
+"`Bokeh <https://github.com/bokeh/bokeh>`_ is an interactive visualization "
+"library for modern web browsers. It provides elegant, concise construction of "
+"versatile graphics, and affords high-performance interactivity over large or "
+"streaming datasets."
+msgstr ""
+"`Bokeh <https://github.com/bokeh/bokeh>`_ 是一个支持创建实时交互的数据可视化库。"
+
+#: ../../libraries_support.rst:15
+msgid ""
+"You can use ``bokeh.io.output_notebook(notebook_type='pywebio')`` in the "
+"PyWebIO session to setup Bokeh environment. Then you can use ``bokeh.io."
+"show()`` to output a boken chart::"
+msgstr ""
+"在 PyWebIO 会话中调用 ``bokeh.io.output_notebook(notebook_type='pywebio')`` 来设"
+"置Bokeh输出到PyWebIO::"
+
+#: ../../libraries_support.rst:18
+msgid ""
+"from bokeh.io import output_notebook\n"
+"from bokeh.io import show\n"
+"\n"
+"output_notebook(notebook_type='pywebio')\n"
+"fig = figure(...)\n"
+"...\n"
+"show(fig)"
+msgstr ""
+
+#: ../../libraries_support.rst:26
+msgid "See related demo on :charts_demo_host:`bokeh demo </?app=bokeh>`"
+msgstr "相应demo见 :charts_demo_host:`bokeh demo </?app=bokeh>`"
+
+#: ../../libraries_support.rst:28
+msgid ""
+"In addition to creating ordinary charts, Bokeh can also build the Bokeh "
+"applications by starting the `Bokeh server <https://docs.bokeh.org/en/latest/"
+"docs/user_guide/server.html>`_. The purpose of the Bokeh server is to make it "
+"easy for Python users to create interactive web applications that can connect "
+"front-end UI events to real, running Python code."
+msgstr ""
+"除了创建普通图表,Bokeh还可以通过启动Bokeh server来显示Bokeh app,Bokeh app支持"
+"向图表的添加按钮、输入框等交互组件,并向组件注册Python回调,从而创建可以与Python"
+"代码交互的图表。"
+
+#: ../../libraries_support.rst:30
+msgid ""
+"In PyWebIO, you can also use ``bokeh.io.show()`` to display a Bokeh App. For "
+"the example, see `bokeh_app.py <https://github.com/wang0618/PyWebIO/blob/dev/"
+"demos/bokeh_app.py>`_."
+msgstr ""
+"在PyWebIO中,你也可以使用 ``bokeh.io.show()`` 来显示一个Bokeh App,代码示例见 "
+"`bokeh_app.py <https://github.com/wang0618/PyWebIO/blob/master/demos/bokeh_app."
+"py>`_。"
+
+#: ../../libraries_support.rst:32
+msgid "Bokeh App currently is only available in the default Tornado backend"
+msgstr "Bokeh App当前仅支持默认的Tornado后端"
+
+#: ../../libraries_support.rst:37
+msgid "pyecharts"
+msgstr ""
+
+#: ../../libraries_support.rst:39
+msgid ""
+"`pyecharts <https://github.com/pyecharts/pyecharts>`_  is a python plotting "
+"library which uses `Echarts <https://github.com/ecomfe/echarts>`_ as underlying "
+"implementation."
+msgstr ""
+"`pyecharts <https://github.com/pyecharts/pyecharts>`_ 是一个使用Python创建 "
+"`Echarts <https://github.com/ecomfe/echarts>`_ 可视化图表的库。"
+
+#: ../../libraries_support.rst:41
+msgid ""
+"In PyWebIO, you can use the following code to output the pyecharts chart "
+"instance::"
+msgstr ""
+"在 PyWebIO 中使用 `put_html() <pywebio.output.put_html>` 可以输出 pyecharts 库创"
+"建的图表::"
+
+#: ../../libraries_support.rst:43
+msgid ""
+"# `chart` is pyecharts chart instance\n"
+"pywebio.output.put_html(chart.render_notebook())"
+msgstr ""
+
+#: ../../libraries_support.rst:46
+msgid "See related demo on :charts_demo_host:`pyecharts demo </?app=pyecharts>`"
+msgstr "相应demo见 :charts_demo_host:`pyecharts demo </?app=pyecharts>`"
+
+#: ../../libraries_support.rst:53
+msgid "plotly"
+msgstr ""
+
+#: ../../libraries_support.rst:55
+msgid ""
+"`plotly.py <https://github.com/plotly/plotly.py>`_ is an interactive, open-"
+"source, and browser-based graphing library for Python."
+msgstr ""
+"`plotly.py <https://github.com/plotly/plotly.py>`_ 是一个非常流行的Python数据可"
+"视化库,可以生成高质量的交互式图表。"
+
+#: ../../libraries_support.rst:57
+msgid ""
+"In PyWebIO, you can use the following code to output the plotly chart instance::"
+msgstr "PyWebIO 支持输出使用 plotly 库创建的图表。使用方式为在PyWebIO会话中调用::"
+
+#: ../../libraries_support.rst:59
+msgid ""
+"# `fig` is plotly chart instance\n"
+"html = fig.to_html(include_plotlyjs=\"require\", full_html=False)\n"
+"pywebio.output.put_html(html)"
+msgstr ""
+
+#: ../../libraries_support.rst:63
+msgid "See related demo on :charts_demo_host:`plotly demo </?app=plotly>`"
+msgstr "相应demo见 :charts_demo_host:`plotly demo </?app=plotly>`"
+
+#: ../../libraries_support.rst:68
+msgid "cutecharts.py"
+msgstr ""
+
+#: ../../libraries_support.rst:70
+msgid ""
+"`cutecharts.py <https://github.com/cutecharts/cutecharts.py>`_ is a hand "
+"drawing style charts library for Python which uses `chart.xkcd <https://github."
+"com/timqian/chart.xkcd>`_ as underlying implementation."
+msgstr ""
+"`cutecharts.py <https://github.com/cutecharts/cutecharts.py>`_ 是一个可以创建具"
+"有卡通风格的可视化图表的python库。\n"
+"底层使用了 `chart.xkcd <https://github.com/timqian/chart.xkcd>`_ Javascript库。"
+
+#: ../../libraries_support.rst:72
+msgid ""
+"In PyWebIO, you can use the following code to output the cutecharts.py chart "
+"instance::"
+msgstr ""
+"在 PyWebIO 中使用 `put_html() <pywebio.output.put_html>` 可以输出 cutecharts.py "
+"库创建的图表::"
+
+#: ../../libraries_support.rst:74
+msgid ""
+"# `chart` is cutecharts chart instance\n"
+"pywebio.output.put_html(chart.render_notebook())"
+msgstr ""
+
+#: ../../libraries_support.rst:77
+msgid "See related demo on :charts_demo_host:`cutecharts demo </?app=cutecharts>`"
+msgstr "相应demo见 :charts_demo_host:`cutecharts demo </?app=cutecharts>`"

+ 129 - 0
docs/locales/zh_CN/LC_MESSAGES/misc.po

@@ -0,0 +1,129 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PyWebIO 1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-17 17:57+0800\n"
+"PO-Revision-Date: 2021-02-18 11:25+0800\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"
+
+#: ../../misc.rst:2
+msgid "Miscellaneous"
+msgstr "其他"
+
+#: ../../misc.rst:7
+msgid "Commonly used Codemirror options"
+msgstr "常用的Codemirror选项"
+
+#: ../../misc.rst:9
+msgid ""
+"``mode`` (str): The language of code. For complete list, see https://"
+"codemirror.net/mode/index.html"
+msgstr ""
+"``mode`` (str): 代码语言。支持的语言有:https://codemirror.net/mode/index."
+"html"
+
+#: ../../misc.rst:10
+msgid ""
+"``theme`` (str): The theme to style the editor with. For all available "
+"theme, see https://codemirror.net/demo/theme.html"
+msgstr ""
+"``theme`` (str): 编辑器主题。可使用的主题:https://codemirror.net/demo/theme."
+"html"
+
+#: ../../misc.rst:11
+msgid ""
+"``lineNumbers`` (bool): Whether to show line numbers to the left of the "
+"editor."
+msgstr "``lineNumbers`` (bool): 是否显示行号"
+
+#: ../../misc.rst:12
+msgid ""
+"``indentUnit`` (int): How many spaces a block (whatever that means in the "
+"edited language) should be indented. The default is 2."
+msgstr "``indentUnit`` (int): 缩进使用的空格数"
+
+#: ../../misc.rst:13
+msgid "``tabSize`` (int): The width of a tab character. Defaults to 4."
+msgstr "``tabSize`` (int): 制表符宽度"
+
+#: ../../misc.rst:14
+msgid ""
+"``lineWrapping`` (bool): Whether CodeMirror should scroll or wrap for long "
+"lines. Defaults to false (scroll)."
+msgstr "``lineWrapping`` (bool): 是否换行以显示长行"
+
+#: ../../misc.rst:16
+msgid ""
+"For complete Codemirror options, please visit: https://codemirror.net/doc/"
+"manual.html#config"
+msgstr "完整的Codemirror选项请见 https://codemirror.net/doc/manual.html#config"
+
+#: ../../misc.rst:21
+msgid "Nginx WebSocket Config Example"
+msgstr "Nginx WebSocket配置示例"
+
+#: ../../misc.rst:23
+msgid ""
+"Assuming that the backend server is running at the ``localhost:5000`` "
+"address, and the backend API of PyWebIO is bind to the ``/tool`` path, the "
+"configuration of Nginx is as follows::"
+msgstr ""
+"假设后端服务器运行在 ``localhost:5000`` 地址,并将PyWebIO的后端接口绑定到 ``/"
+"tool`` 路径上,则通过Nginx访问PyWebIO服务的配置如下::"
+
+#: ../../misc.rst:25
+msgid ""
+"map $http_upgrade $connection_upgrade {\n"
+"    default upgrade;\n"
+"    '' close;\n"
+"}\n"
+"\n"
+"server {\n"
+"    listen 80;\n"
+"\n"
+"    location / {\n"
+"        alias /path/to/pywebio/static/dir/;\n"
+"    }\n"
+"    location /tool {\n"
+"         proxy_read_timeout 300s;\n"
+"         proxy_send_timeout 300s;\n"
+"         proxy_http_version 1.1;\n"
+"         proxy_set_header Upgrade $http_upgrade;\n"
+"         proxy_set_header Connection $connection_upgrade;\n"
+"         proxy_pass http://localhost:5000;\n"
+"    }\n"
+"}"
+msgstr ""
+
+#: ../../misc.rst:47
+msgid ""
+"The above configuration file hosts the static files of PyWebIO on the ``/`` "
+"path, and reverse proxy ``/tool`` to ``localhost:5000/tool``"
+msgstr ""
+"以上配置文件将PyWebIO的静态文件托管到 ``/`` 目录下, 并将 ``/tool`` 反向代理"
+"到 ``localhost:5000``"
+
+#: ../../misc.rst:49
+msgid ""
+"The path of the static file of PyWebIO can be obtained with the command "
+"``python3 -c \"import pywebio; print(pywebio.STATIC_PATH)\"``, you can also "
+"copy the static file to other directories::"
+msgstr ""
+"PyWebIO的静态文件的路径可使用命令 ``python3 -c \"import pywebio; "
+"print(pywebio.STATIC_PATH)\"`` 获得,你也可以将静态文件复制到其他目录下::"
+
+#: ../../misc.rst:51
+msgid "cp -r `python3 -c \"import pywebio; print(pywebio.STATIC_PATH)\"` ~/web"
+msgstr ""

+ 1770 - 0
docs/locales/zh_CN/LC_MESSAGES/output.po

@@ -0,0 +1,1770 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PyWebIO 1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-17 18:31+0800\n"
+"PO-Revision-Date: 2021-02-17 21:39+0800\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"
+
+#: ../../output.rst:2
+msgid "``pywebio.output`` --- Make output to web browser"
+msgstr "``pywebio.output`` — 输出模块"
+
+#: of pywebio.output:1
+msgid ""
+"This module provides many functions to output all kinds of content to the "
+"user's browser, and supply flexible output control."
+msgstr ""
+"本模块提供了一系列函数来输出不同形式的内容到用户浏览器,并支持灵活的输出控制。"
+
+#: of pywebio.output:4
+msgid "Functions list"
+msgstr "函数清单"
+
+#: of pywebio.output:9
+msgid "**Name**"
+msgstr "**函数**"
+
+#: of pywebio.output:9
+msgid "**Description**"
+msgstr "**简介**  "
+
+#: of pywebio.output:11 pywebio.output:75
+msgid "Output Scope"
+msgstr "输出域Scope"
+
+#: of pywebio.output:11
+msgid "`set_scope`"
+msgstr "`set_scope`"
+
+#: of pywebio.output:11
+msgid "Create a new scope"
+msgstr "创建一个新的scope. "
+
+#: of pywebio.output:13
+msgid "`get_scope`"
+msgstr ""
+
+#: of pywebio.output:13
+msgid "Get the scope name in the runtime scope stack"
+msgstr "获取当前运行时scope栈中的scope名"
+
+#: of pywebio.output:15
+msgid "`clear`"
+msgstr ""
+
+#: of pywebio.output:15
+msgid "Clear the content of scope"
+msgstr "清空scope内容 "
+
+#: of pywebio.output:17
+msgid "`remove`"
+msgstr ""
+
+#: of pywebio.output:17
+msgid "Remove the scope"
+msgstr "移除Scope"
+
+#: of pywebio.output:19
+msgid "`scroll_to`"
+msgstr ""
+
+#: of pywebio.output:19
+msgid "Scroll the page to the scope"
+msgstr "将页面滚动到 scope Scope处"
+
+#: of pywebio.output:21
+msgid "`use_scope`"
+msgstr ""
+
+#: of pywebio.output:21
+msgid "Open or enter a scope"
+msgstr "开启/进入输出域"
+
+#: of pywebio.output:23 pywebio.output:84
+msgid "Content Outputting"
+msgstr "内容输出"
+
+#: of pywebio.output:23
+msgid "`put_text`"
+msgstr ""
+
+#: of pywebio.output:23 pywebio.output.put_text:1
+msgid "Output plain text"
+msgstr "输出文本"
+
+#: of pywebio.output:25
+msgid "`put_markdown`"
+msgstr "输出Markdown"
+
+#: of pywebio.output:25 pywebio.output.put_markdown:1
+msgid "Output Markdown"
+msgstr ""
+
+#: of pywebio.output:27
+msgid "`put_html`"
+msgstr ""
+
+#: of pywebio.output:27
+msgid "Output html"
+msgstr "输出Html"
+
+#: of pywebio.output:29
+msgid "`put_link`"
+msgstr ""
+
+#: of pywebio.output:29
+msgid "Output link"
+msgstr "输出链接"
+
+#: of pywebio.output:31
+msgid "`put_processbar`"
+msgstr ""
+
+#: of pywebio.output:31 pywebio.output.put_processbar:1
+msgid "Output a process bar"
+msgstr "输出进度条"
+
+#: of pywebio.output:33
+msgid "`set_processbar`"
+msgstr ""
+
+#: of pywebio.output:33 pywebio.output.set_processbar:1
+msgid "Set the progress of progress bar"
+msgstr "设置进度条进度"
+
+#: of pywebio.output:35
+msgid "`put_loading`"
+msgstr ""
+
+#: of pywebio.output:35 pywebio.output.put_loading:1
+msgid "Output loading prompt"
+msgstr "输出加载提示"
+
+#: of pywebio.output:37
+msgid "`put_code`"
+msgstr ""
+
+#: of pywebio.output:37 pywebio.output.put_code:1
+msgid "Output code block"
+msgstr "输出代码块"
+
+#: of pywebio.output:39
+msgid "`put_table`"
+msgstr ""
+
+#: of pywebio.output:39 pywebio.output.put_table:1
+msgid "Output table"
+msgstr "输出表格"
+
+#: of pywebio.output:41
+msgid "`put_buttons`"
+msgstr ""
+
+#: of pywebio.output:41 pywebio.output.put_buttons:1
+msgid "Output a group of buttons and bind click event"
+msgstr "输出一组按钮,并绑定点击事件"
+
+#: of pywebio.output:43
+msgid "`put_image`"
+msgstr ""
+
+#: of pywebio.output:43 pywebio.output.put_image:1
+msgid "Output image"
+msgstr "输出图片"
+
+#: of pywebio.output:45
+msgid "`put_file`"
+msgstr ""
+
+#: of pywebio.output:45 pywebio.output.put_file:1
+msgid "Output a link to download a file"
+msgstr "显示一个文件下载链接"
+
+#: of pywebio.output:47
+msgid "`put_collapse`"
+msgstr ""
+
+#: of pywebio.output:47 pywebio.output.put_collapse:1
+msgid "Output collapsible content"
+msgstr "输出可折叠的内容"
+
+#: of pywebio.output:49
+msgid "`put_scrollable`"
+msgstr ""
+
+#: of pywebio.output
+msgid "Output a fixed height content area,"
+msgstr "固定高度内容输出区域,内容超出则显示滚动条"
+
+#: of pywebio.output
+msgid "scroll bar is displayed when the content"
+msgstr ""
+
+#: of pywebio.output
+msgid "exceeds the limit"
+msgstr ""
+
+#: of pywebio.output:53
+msgid "`put_widget`"
+msgstr ""
+
+#: of pywebio.output:53 pywebio.output.put_widget:1
+msgid "Output your own widget"
+msgstr "输出自定义的控件"
+
+#: of pywebio.output:55 pywebio.output:103
+msgid "Other Interactions"
+msgstr "其他交互"
+
+#: of pywebio.output:55
+msgid "`toast`"
+msgstr ""
+
+#: of pywebio.output:55
+msgid "Show a notification message"
+msgstr "显示一条通知消息"
+
+#: of pywebio.output:57
+msgid "`popup`"
+msgstr ""
+
+#: of pywebio.output:57
+msgid "Show popup"
+msgstr "显示弹窗"
+
+#: of pywebio.output:59
+msgid "`close_popup`"
+msgstr ""
+
+#: of pywebio.output:59 pywebio.output.close_popup:1
+msgid "Close the current popup window."
+msgstr "关闭正在显示的弹窗"
+
+#: of pywebio.output:61 pywebio.output:111
+msgid "Layout and Style"
+msgstr "布局与样式"
+
+#: of pywebio.output:61
+msgid "`put_row`"
+msgstr ""
+
+#: of pywebio.output:61
+msgid "Use row layout to output content"
+msgstr "使用行布局输出内容"
+
+#: of pywebio.output:63
+msgid "`put_column`"
+msgstr ""
+
+#: of pywebio.output:63
+msgid "Use column layout to output content"
+msgstr "使用列布局输出内容"
+
+#: of pywebio.output:65
+msgid "`put_grid`"
+msgstr ""
+
+#: of pywebio.output:65 pywebio.output.put_grid:1
+msgid "Output content using grid layout"
+msgstr "使用网格布局输出内容"
+
+#: of pywebio.output:67
+msgid "`span`"
+msgstr ""
+
+#: of pywebio.output:67
+msgid "Cross-cell content"
+msgstr "在 `put_table()` 和 `put_grid()` 中设置内容跨单元格"
+
+#: of pywebio.output:69
+msgid "`style`"
+msgstr ""
+
+#: of pywebio.output:69 pywebio.output.style:1
+msgid "Customize the css style of output content"
+msgstr "自定义输出内容的css样式"
+
+#: of pywebio.output:71 pywebio.output:118
+msgid "Other"
+msgstr "其他"
+
+#: of pywebio.output:71
+msgid "`output`"
+msgstr ""
+
+#: of pywebio.output:71 pywebio.output.output:1
+msgid "Placeholder of output"
+msgstr "内容占位符"
+
+#: of pywebio.output.set_scope:1
+msgid "Create a new scope."
+msgstr "创建一个新的scope"
+
+#: of pywebio.output.clear pywebio.output.get_scope pywebio.output.output
+#: pywebio.output.popup pywebio.output.put_buttons pywebio.output.put_code
+#: pywebio.output.put_collapse pywebio.output.put_column pywebio.output.put_file
+#: pywebio.output.put_grid pywebio.output.put_html pywebio.output.put_image
+#: pywebio.output.put_link pywebio.output.put_loading pywebio.output.put_markdown
+#: pywebio.output.put_processbar pywebio.output.put_row
+#: pywebio.output.put_scrollable pywebio.output.put_table pywebio.output.put_text
+#: pywebio.output.put_widget pywebio.output.remove pywebio.output.scroll_to
+#: pywebio.output.set_processbar pywebio.output.set_scope pywebio.output.span
+#: pywebio.output.style pywebio.output.toast pywebio.output.use_scope
+msgid "Parameters"
+msgstr ""
+
+#: of pywebio.output.set_scope:3
+msgid "scope name"
+msgstr "scope名"
+
+#: of pywebio.output.set_scope:4
+msgid ""
+"Specify the parent scope of this scope. You can use the scope name or use a "
+"integer to index the runtime scope stack (see :ref:`User Guide <scope_param>`). "
+"When the scope does not exist, no operation is performed."
+msgstr ""
+"指定此scope的父scope. 可以直接指定父scope名或使用int索引运行时scope栈(参见 :ref:"
+"`输出函数的scope相关参数 <scope_param>`). scope不存在时,不进行任何操作."
+
+#: of pywebio.output.set_scope:5
+msgid ""
+"The location where this scope is created in the parent scope. Available values: "
+"`OutputPosition.TOP`: created at the top of the parent scope, `OutputPosition."
+"BOTTOM`: created at the bottom of the parent scope. You can also use a integer "
+"to index the position (see :ref:`User Guide <scope_param>`)"
+msgstr ""
+"在父scope中创建此scope的位置.\n"
+"可选值: `OutputPosition.TOP` : 在父scope的顶部创建, `OutputPosition.BOTTOM`: 在"
+"父scope的底部创建。\n"
+"也可以直接使用int来索引位置(参见 :ref:`输出函数的scope相关参数 <scope_param>`)"
+
+#: of pywebio.output.set_scope:8
+msgid ""
+"What to do when the specified scope already exists:   - `None`: Do nothing  - "
+"`'remove'`: Remove the old scope first and then create a new one  - `'clear'`: "
+"Just clear the contents of the old scope, but don't create a new scope  Default "
+"is `None`"
+msgstr ""
+
+#: of pywebio.output.set_scope:8
+msgid "What to do when the specified scope already exists:"
+msgstr "已经存在 ``name`` scope 时如何操作:"
+
+#: of pywebio.output.set_scope:10
+msgid "`None`: Do nothing"
+msgstr "`None` 表示不进行任何操作"
+
+#: of pywebio.output.set_scope:11
+msgid "`'remove'`: Remove the old scope first and then create a new one"
+msgstr "`’remove’` 表示先移除旧scope再创建新scope"
+
+#: of pywebio.output.set_scope:12
+msgid ""
+"`'clear'`: Just clear the contents of the old scope, but don't create a new "
+"scope"
+msgstr "`’clear’` 表示将旧scope的内容清除,不创建新scope"
+
+#: of pywebio.output.set_scope:14
+msgid "Default is `None`"
+msgstr "默认为 `None`"
+
+#: of pywebio.output.get_scope:1
+msgid "Get the scope name of runtime scope stack"
+msgstr "获取当前运行时scope栈中的scope名"
+
+#: of pywebio.output.get_scope:3
+msgid ""
+"The index of the runtime scope stack. Default is -1.  0 means the top level "
+"scope(the ROOT Scope), -1 means the current Scope, -2 means the scope used "
+"before entering the current scope, …"
+msgstr ""
+
+#: of pywebio.output.get_scope:3
+msgid "The index of the runtime scope stack. Default is -1."
+msgstr "需要获取的scope在scope栈中的索引值。默认返回当前scope名"
+
+#: of pywebio.output.get_scope:5
+msgid ""
+"0 means the top level scope(the ROOT Scope), -1 means the current Scope, -2 "
+"means the scope used before entering the current scope, …"
+msgstr ""
+"-1表示当前scope,-2表示进入当前scope前的scope,依次类推;0表示 `ROOT` scope"
+
+#: of pywebio.output.get_scope pywebio.output.output pywebio.output.style
+msgid "Returns"
+msgstr ""
+
+#: of pywebio.output.get_scope:8
+msgid ""
+"Returns the scope name with the index, and returns ``None`` when occurs index "
+"error"
+msgstr "返回Scope栈中对应索引的scope名,索引错误时返回None"
+
+#: of pywebio.output.clear:1
+msgid "Clear the content of the specified scope"
+msgstr "清空scope内容"
+
+#: of pywebio.output.clear:3 pywebio.output.remove:3
+msgid ""
+"Can specify the scope name or use a integer to index the runtime scope stack "
+"(see :ref:`User Guide <scope_param>`)"
+msgstr ""
+"可以直接指定scope名或使用int索引运行时scope栈(参见 :ref:`输出函数的scope相关参"
+"数 <scope_param>`)"
+
+#: of pywebio.output.remove:1
+msgid "Remove the specified scope"
+msgstr "移除Scope"
+
+#: of pywebio.output.scroll_to:1
+msgid "Scroll the page to the specified scope"
+msgstr "将页面滚动到 ``scope`` Scope处"
+
+#: of pywebio.output.scroll_to:3
+msgid ""
+"Target scope. Can specify the scope name or use a integer to index the runtime "
+"scope stack (see :ref:`User Guide <scope_param>`)"
+msgstr ""
+"目标scope。可以直接指定scope名或使用int索引运行时scope栈(参见 :ref:`输出函数的"
+"scope相关参数 <scope_param>`)"
+
+#: of pywebio.output.scroll_to:4
+msgid ""
+"Where to place the scope in the visible area of the page. Available value:  * "
+"``'top'`` : Keep the scope at the top of the visible area of the page * "
+"``'middle'`` : Keep the scope at the middle of the visible area of the page * "
+"``'bottom'`` : Keep the scope at the bottom of the visible area of the page"
+msgstr ""
+
+#: of pywebio.output.scroll_to:4
+msgid "Where to place the scope in the visible area of the page. Available value:"
+msgstr "将Scope置于屏幕可视区域的位置。可用值:"
+
+#: of pywebio.output.scroll_to:6
+msgid "``'top'`` : Keep the scope at the top of the visible area of the page"
+msgstr "``’top’`` : 滚动页面,让Scope位于屏幕可视区域顶部"
+
+#: of pywebio.output.scroll_to:7
+msgid ""
+"``'middle'`` : Keep the scope at the middle of the visible area of the page"
+msgstr "``’middle’`` : 滚动页面,让Scope位于屏幕可视区域中间"
+
+#: of pywebio.output.scroll_to:8
+msgid ""
+"``'bottom'`` : Keep the scope at the bottom of the visible area of the page"
+msgstr "``’bottom’`` : 滚动页面,让Scope位于屏幕可视区域底部"
+
+#: of pywebio.output.use_scope:1
+msgid "Open or enter a scope. Can be used as context manager and decorator."
+msgstr ""
+"scope的上下文管理器和装饰器。用于创建一个新的输出域并进入,或进入一个已经存在的"
+"输出域。"
+
+#: of pywebio.output.use_scope:3
+msgid "See :ref:`User manual - use_scope() <use_scope>`"
+msgstr "参见 :ref:`用户手册-use_scope() <use_scope>`"
+
+#: of pywebio.output.use_scope:5
+msgid ""
+"Scope name. If it is None, a globally unique scope name is generated. (When "
+"used as context manager, the context manager will return the scope name)"
+msgstr ""
+"scope名. 若为None则生成一个全局唯一的scope名.(以上下文管理器形式的调用时,上下"
+"文管理器会返回scope名)"
+
+#: of pywebio.output.use_scope:6
+msgid "Whether to clear the contents of the scope before entering the scope."
+msgstr "在进入scope前是否要清除scope里的内容"
+
+#: of pywebio.output.use_scope:7
+msgid "Whether to create scope when scope does not exist."
+msgstr "scope不存在时是否创建scope"
+
+#: of pywebio.output.use_scope:8
+msgid ""
+"Extra parameters passed to `set_scope()` when need to create scope. Only "
+"available when ``create_scope=True``."
+msgstr ""
+"创建scope时传入 `set_scope()` 的额外的参数. 仅在 `create_scope=True` 时有效."
+
+#: of pywebio.output.use_scope
+msgid "Usage"
+msgstr ""
+
+#: of pywebio.output.use_scope:14
+msgid ""
+"with use_scope(...) as scope_name:\n"
+"    put_xxx()\n"
+"\n"
+"@use_scope(...)\n"
+"def app():\n"
+"    put_xxx()"
+msgstr ""
+
+#: of pywebio.output.put_text:3
+msgid ""
+"Texts need to output. The type can be any object, and the `str()` function will "
+"be used for non-string objects."
+msgstr ""
+"要输出的内容。类型可以为任意对象,对非字符串对象会应用 `str()` 函数作为输出值。"
+
+#: of pywebio.output.put_text:4
+msgid "The separator between the texts"
+msgstr "输出分隔符"
+
+#: of pywebio.output.put_text:5
+msgid ""
+"Use text as an inline element (no line break at the end of the text). Default "
+"is ``False``"
+msgstr ""
+"将文本作为行内元素(连续输出的文本显示在相同的段落中)。默认每次输出的文本都作为一"
+"个独立的段落"
+
+#: of pywebio.output.put_text:6
+msgid ""
+"The target scope to output. If the scope does not exist, no operation will be "
+"performed.  Can specify the scope name or use a integer to index the runtime "
+"scope stack."
+msgstr ""
+
+#: of pywebio.output.put_text:6
+msgid ""
+"The target scope to output. If the scope does not exist, no operation will be "
+"performed."
+msgstr "内容输出的目标scope,若scope不存在,则不进行任何输出操作。"
+
+#: of pywebio.output.put_text:8
+msgid ""
+"Can specify the scope name or use a integer to index the runtime scope stack."
+msgstr "可以直接指定目标Scope名,或者使用int通过索引Scope栈来确定Scope"
+
+#: of pywebio.output.put_text:9
+msgid "The position where the content is output in target scope"
+msgstr "在scope中输出的位置。"
+
+#: of pywebio.output.put_text:11
+msgid ""
+"For more information about ``scope`` and ``position`` parameter, please refer "
+"to :ref:`User Manual <scope_param>`"
+msgstr ""
+"参数 `scope` 和 `position` 的更多使用说明参见 :ref:`用户手册 <scope_param>`"
+
+#: of pywebio.output.put_markdown:3
+msgid "Markdown string"
+msgstr "Markdown文本"
+
+#: of pywebio.output.put_markdown:4
+msgid ""
+"For each line of ``mdcontent``, if the first ``strip_indent`` characters are "
+"spaces, remove them"
+msgstr "对于每一行,若前 ``strip_indent`` 个字符都为空格,则将其去除"
+
+#: of pywebio.output.put_markdown:5
+msgid ""
+"Whether to remove the whitespace at the beginning of each line of ``mdcontent``"
+msgstr "是否去除每一行开始的空白符"
+
+#: of pywebio.output.put_markdown:6
+msgid ""
+"Configuration when parsing Markdown. PyWebIO uses `marked <https://marked.js."
+"org/>`_ library to parse Markdown, the parse options see: https://marked.js.org/"
+"using_advanced#options (Only supports members of string and boolean type)"
+msgstr ""
+"解析Markdown时的配置参数。\n"
+"PyWebIO使用 `marked <https://marked.js.org/>`_ 解析Markdown, 可配置项参见: "
+"https://marked.js.org/using_advanced#options (仅支持配置string和boolean类型的项)"
+
+#: of pywebio.output.put_html:4 pywebio.output.put_markdown:8
+msgid ""
+"Whether to use `DOMPurify <https://github.com/cure53/DOMPurify>`_ to filter the "
+"content to prevent XSS attacks."
+msgstr ""
+"是否使用 `DOMPurify <https://github.com/cure53/DOMPurify>`_ 对内容进行过滤来防止"
+"XSS攻击。"
+
+#: of pywebio.output.put_buttons:36 pywebio.output.put_code:6
+#: pywebio.output.put_collapse:7 pywebio.output.put_column:6
+#: pywebio.output.put_file:8 pywebio.output.put_grid:17 pywebio.output.put_html:5
+#: pywebio.output.put_image:9 pywebio.output.put_link:7
+#: pywebio.output.put_loading:6 pywebio.output.put_markdown:9
+#: pywebio.output.put_processbar:7 pywebio.output.put_row:18
+#: pywebio.output.put_scrollable:9 pywebio.output.put_table:11
+#: pywebio.output.put_widget:9
+msgid "Those arguments have the same meaning as for `put_text()`"
+msgstr "与 `put_text` 函数的同名参数含义一致"
+
+#: of pywebio.output.put_markdown:11
+msgid ""
+"When using Python triple quotes syntax to output multi-line Markdown in a "
+"function, if you indent the Markdown text, you can use ``strip_indent`` or "
+"``lstrip`` to prevent Markdown from parsing errors (But do not use "
+"``strip_indent`` and ``lstrip`` at the same time)::"
+msgstr ""
+"当在函数中使用Python的三引号语法输出多行内容时,为了排版美观可能会对Markdown文本"
+"进行缩进,\n"
+"这时候,可以设置 ``strip_indent`` 或 ``lstrip`` 来防止Markdown错误解析(但不要同"
+"时使用 ``strip_indent`` 和 ``lstrip`` )::"
+
+#: of pywebio.output.put_markdown:13
+msgid ""
+"# It is ugly without strip_indent or lstrip\n"
+"def hello():\n"
+"    put_markdown(r\"\"\" # H1\n"
+"This is content.\n"
+"\"\"\")\n"
+"\n"
+"# Using lstrip to get beautiful indent\n"
+"def hello():\n"
+"    put_markdown(r\"\"\" # H1\n"
+"    This is content.\n"
+"    \"\"\", lstrip=True)\n"
+"\n"
+"# Using strip_indent to get beautiful indent\n"
+"def hello():\n"
+"    put_markdown(r\"\"\" # H1\n"
+"    This is content.\n"
+"    \"\"\", strip_indent=4)"
+msgstr ""
+
+#: of pywebio.output.put_html:1
+msgid "Output HTML content"
+msgstr "输出Html内容"
+
+#: of pywebio.output.put_html:3
+msgid "html string"
+msgstr "html字符串"
+
+#: of pywebio.output.put_link:1
+msgid "Output hyperlinks to other web page or PyWebIO Application page."
+msgstr "输出链接到其他网页或PyWebIO App的超链接"
+
+#: of pywebio.output.put_link:3
+msgid "The label of the link"
+msgstr "链接名称"
+
+#: of pywebio.output.put_link:4
+msgid "Target url"
+msgstr "链接到的页面地址"
+
+#: of pywebio.output.put_link:5
+msgid ""
+"Target PyWebIO Application name. See also: :ref:`Server mode "
+"<server_and_script_mode>`"
+msgstr "链接到的PyWebIO应用名。参见 :ref:`Server模式 <server_and_script_mode>`"
+
+#: of pywebio.output.put_link:6
+msgid "Whether to open the link in a new window"
+msgstr "是否在新窗口打开链接"
+
+#: of pywebio.output.put_link:9
+msgid "The ``url`` and ``app`` parameters must specify one but not both"
+msgstr "``url`` 和 ``app`` 参数必须指定一个但不可以同时指定"
+
+#: of pywebio.output.put_processbar:3
+msgid ""
+"The name of the progress bar, which is the unique identifier of the progress bar"
+msgstr "进度条名称,为进度条的唯一标识"
+
+#: of pywebio.output.put_processbar:4
+msgid ""
+"The initial progress value of the progress bar. The value is between 0 and 1"
+msgstr "进度条初始值. 进度条的值在 0 ~ 1 之间"
+
+#: of pywebio.output.put_processbar:5 pywebio.output.set_processbar:5
+msgid ""
+"The label of process bar. The default is the percentage value of the current "
+"progress."
+msgstr "进度条显示的标签. 默认为当前进度的百分比"
+
+#: of pywebio.output.put_processbar:6
+msgid "Whether to remove the progress bar after the progress is completed"
+msgstr "是否在进度完成后关闭进度条"
+
+#: of pywebio.output.put_buttons:12 pywebio.output.put_buttons:47
+#: pywebio.output.put_collapse:9 pywebio.output.put_file:14
+#: pywebio.output.put_image:11 pywebio.output.put_loading:8
+#: pywebio.output.put_processbar:9 pywebio.output.put_scrollable:11
+#: pywebio.output.put_table:13 pywebio.output.toast:11
+msgid "Example:"
+msgstr ""
+
+#: of pywebio.output.put_processbar:11
+msgid ""
+"import time\n"
+"\n"
+"put_processbar('bar');\n"
+"for i in range(1, 11):\n"
+"    set_processbar('bar', i / 10)\n"
+"    time.sleep(0.1)"
+msgstr ""
+
+#: of pywebio.output.set_processbar:3
+msgid "The name of the progress bar"
+msgstr "设置进度条进度"
+
+#: of pywebio.output.set_processbar:4
+msgid "The progress value of the progress bar. The value is between 0 and 1"
+msgstr "进度条的值. 范围在 0 ~ 1 之间"
+
+#: of pywebio.output.set_processbar:7
+msgid "See also: `put_processbar()`"
+msgstr "参见 `put_processbar()`"
+
+#: of pywebio.output.put_loading:3
+msgid ""
+"The shape of loading prompt. The available values are: `'border'` (default)、 "
+"`'grow'`"
+msgstr ""
+"加载提示的形状, 可选值: `’border’` (默认,旋转的圆环)、 `’grow’` (大小渐变的圆"
+"点)"
+
+#: of pywebio.output.put_loading:4
+msgid ""
+"The color of loading prompt. The available values are: `'primary'` 、 "
+"`'secondary'` 、 `'success'` 、 `'danger'` 、 `'warning'` 、`'info'`  、"
+"`'light'`  、 `'dark'` (default)"
+msgstr ""
+"加载提示的颜色, 可选值: `’primary’` 、 `’secondary’` 、 `’success’` 、 "
+"`’danger’` 、 `’warning’` 、`’info’`  、`’light’`  、 `’dark’` (默认)"
+
+#: of pywebio.output.put_loading:10
+msgid ""
+"for shape in ('border', 'grow'):\n"
+"    for color in ('primary', 'secondary', 'success', 'danger', 'warning', "
+"'info', 'light', 'dark'):\n"
+"        put_text(shape, color)\n"
+"        put_loading(shape=shape, color=color)\n"
+"\n"
+"## ----\n"
+"# using style() to set the size of the loading prompt\n"
+"style(put_loading(), 'width:4rem; height:4rem')"
+msgstr ""
+
+#: of pywebio.output.put_code:3
+msgid "code string"
+msgstr "代码内容"
+
+#: of pywebio.output.put_code:4
+msgid "language of code"
+msgstr "代码语言"
+
+#: of pywebio.output.put_code:5
+msgid ""
+"The max lines of code can be displayed, no limit by default. The scroll bar "
+"will be displayed when the content exceeds."
+msgstr "代码块最多可显示的文本行数,默认不限制。内容超出时会使用滚动条。"
+
+#: of pywebio.output.put_table:3
+msgid ""
+"Table data, which can be a two-dimensional list or a list of dict. The table "
+"cell can be a string or ``put_xxx()`` call. The cell can use the :func:`span()` "
+"to set the cell span."
+msgstr ""
+"表格数据。列表项可以为 ``list`` 或者 ``dict`` , 单元格的内容可以为字符串或 "
+"``put_xxx`` 类型的输出函数。\n"
+"数组项可以使用 :func:`span()` 函数来设定单元格跨度。"
+
+#: of pywebio.output.put_table:5
+msgid ""
+"Table header. When the item of ``tdata`` is of type ``list``, if the ``header`` "
+"parameter is omitted, the first item of ``tdata`` will be used as the header. "
+"The header item can also use the :func:`span()` function to set the cell span.  "
+"When ``tdata`` is list of dict, ``header`` is used to specify the order of "
+"table headers, which cannot be omitted. In this case, the ``header`` can be a "
+"list of dict key or a list of ``(<label>, <dict key>)``."
+msgstr ""
+
+#: of pywebio.output.put_table:5
+msgid ""
+"Table header. When the item of ``tdata`` is of type ``list``, if the ``header`` "
+"parameter is omitted, the first item of ``tdata`` will be used as the header. "
+"The header item can also use the :func:`span()` function to set the cell span."
+msgstr ""
+"表头。当 ``tdata`` 的列表项为 ``list`` 类型时,若省略 ``header`` 参数,则使用 "
+"``tdata`` 的第一项作为表头。表头项可以使用 :func:`span()` 函数来设定单元格跨度。"
+
+#: of pywebio.output.put_table:8
+msgid ""
+"When ``tdata`` is list of dict, ``header`` is used to specify the order of "
+"table headers, which cannot be omitted. In this case, the ``header`` can be a "
+"list of dict key or a list of ``(<label>, <dict key>)``."
+msgstr ""
+"当 ``tdata`` 为字典列表时,使用 ``header`` 指定表头顺序,不可省略。此时, "
+"``header`` 格式可以为 <字典键>列表 或者 ``(<显示文本>, <字典键>)`` 列表。"
+
+#: of pywebio.output.put_table:15
+msgid ""
+"# 'Name' cell across 2 rows, 'Address' cell across 2 columns\n"
+"put_table([\n"
+"    [span('Name',row=2), span('Address', col=2)],\n"
+"    ['City', 'Country'],\n"
+"    ['Wang', 'Beijing', 'China'],\n"
+"    ['Liu', 'New York', 'America'],\n"
+"])\n"
+"## ----\n"
+"\n"
+"# Use `put_xxx()` in `put_table()`\n"
+"put_table([\n"
+"    ['Type', 'Content'],\n"
+"    ['html', put_html('X<sup>2</sup>')],\n"
+"    ['text', '<hr/>'],\n"
+"    ['buttons', put_buttons(['A', 'B'], onclick=...)],  # ..doc-only\n"
+"    ['buttons', put_buttons(['A', 'B'], onclick=ut_text)],  # ..demo-only\n"
+"    ['markdown', put_markdown('`Awesome PyWebIO!`')],\n"
+"    ['file', put_file('hello.text', b'hello world')],\n"
+"    ['table', put_table([['A', 'B'], ['C', 'D']])]\n"
+"])\n"
+"## ----\n"
+"\n"
+"# Set table header\n"
+"put_table([\n"
+"    ['Wang', 'M', 'China'],\n"
+"    ['Liu', 'W', 'America'],\n"
+"], header=['Name', 'Gender', 'Address'])\n"
+"## ----\n"
+"\n"
+"# When ``tdata`` is list of dict\n"
+"put_table([\n"
+"    {\"Course\":\"OS\", \"Score\": \"80\"},\n"
+"    {\"Course\":\"DB\", \"Score\": \"93\"},\n"
+"], header=[\"Course\", \"Score\"])  # or header=[(put_markdown(\"*Course*\"), "
+"\"Course\"), (put_markdown(\"*Score*\") ,\"Score\")]"
+msgstr ""
+
+#: of pywebio.output.put_table:54
+msgid "The cell of table support ``put_xxx()`` calls."
+msgstr "单元格的内容支持 ``put_xxx`` 类型的输出函数"
+
+#: of pywebio.output.span:1
+msgid "Create cross-cell content in :func:`put_table()` and :func:`put_grid()`"
+msgstr "用于在 :func:`put_table()` 和 :func:`put_grid()` 中设置内容跨单元格"
+
+#: of pywebio.output.span:3
+msgid "cell content. It can be a string or ``put_xxx()`` call."
+msgstr "单元格内容。可以为字符串或 ``put_xxx()`` 调用。"
+
+#: of pywebio.output.span:4
+msgid "Vertical span, that is, the number of spanning rows"
+msgstr "竖直方向跨度, 即:跨行的数目"
+
+#: of pywebio.output.span:5
+msgid "Horizontal span, that is, the number of spanning columns"
+msgstr "水平方向跨度, 即:跨列的数目"
+
+#: of pywebio.output.output pywebio.output.put_grid pywebio.output.put_row
+#: pywebio.output.put_widget pywebio.output.span pywebio.output.style
+msgid "Example"
+msgstr ""
+
+#: of pywebio.output.span:9
+msgid ""
+"put_table([\n"
+"    ['C'],\n"
+"    [span('E', col=2)],  # 'E' across 2 columns\n"
+"], header=[span('A', row=2), 'B'])  # 'A' across 2 rows\n"
+"\n"
+"put_grid([\n"
+"    [put_text('A'), put_text('B')],\n"
+"    [span(put_text('A'), col=2)],  # 'A' across 2 columns\n"
+"])"
+msgstr ""
+
+#: of pywebio.output.put_buttons:3
+msgid ""
+"Button list. The available formats of list items are:  * dict: ``{label:"
+"(str)button label, value:(str)button value, color:(str, optional)button color}"
+"`` * tuple or list: ``(label, value)`` * single value: label and value of "
+"option use the same value  The ``value`` of button can be any JSON serializable "
+"object. The ``color`` of button can be one of: `primary`, `secondary`, "
+"`success`, `danger`, `warning`, `info`, `light`, `dark`.  Example:  .. "
+"exportable-codeblock::     :name: put_buttons-btn_class     :summary: "
+"`put_buttons()`      put_buttons([dict(label='primary', value='p', "
+"color='primary')], onclick=...)  # ..doc-only     put_buttons([  # ..demo-"
+"only         dict(label=i, value=i, color=i)  # ..demo-only         for i in "
+"['primary' , 'secondary' , 'success' , 'danger' , 'warning' , 'info' , "
+"'light' , 'dark']  # ..demo-only     ], onclick=put_text)  # ..demo-only"
+msgstr ""
+
+#: of pywebio.output.put_buttons:3
+msgid "Button list. The available formats of list items are:"
+msgstr "按钮列表。列表项的可用形式有:"
+
+#: of pywebio.output.put_buttons:5
+msgid ""
+"dict: ``{label:(str)button label, value:(str)button value, color:(str, "
+"optional)button color}``"
+msgstr ""
+"dict: ``{label:(str)按钮标签, value:(str)按钮值, color:(str, optional)按钮颜色}"
+"``"
+
+#: of pywebio.output.put_buttons:6
+msgid "tuple or list: ``(label, value)``"
+msgstr ""
+
+#: of pywebio.output.put_buttons:7
+msgid "single value: label and value of option use the same value"
+msgstr "单值: 此时label和value使用相同的值"
+
+#: of pywebio.output.put_buttons:9
+msgid ""
+"The ``value`` of button can be any JSON serializable object. The ``color`` of "
+"button can be one of: `primary`, `secondary`, `success`, `danger`, `warning`, "
+"`info`, `light`, `dark`."
+msgstr ""
+"其中, ``value`` 可以为任意可json序列化的对象。使用dict类型的列表项时,支持使用 "
+"``color`` key设置按钮颜色,可选值为 `primary` 、\n"
+"`secondary` 、 `success` 、 `danger` 、 `warning` 、 `info` 、 `light` 、 `dark`"
+
+#: of pywebio.output.put_buttons:14
+msgid ""
+"put_buttons([dict(label='primary', value='p', color='primary')], onclick=...)  "
+"# ..doc-only\n"
+"put_buttons([  # ..demo-only\n"
+"    dict(label=i, value=i, color=i)  # ..demo-only\n"
+"    for i in ['primary' , 'secondary' , 'success' , 'danger' , 'warning' , "
+"'info' , 'light' , 'dark']  # ..demo-only\n"
+"], onclick=put_text)  # ..demo-only"
+msgstr ""
+
+#: of pywebio.output.put_buttons:25
+msgid ""
+"Callback which will be called when button is clicked. ``onclick`` can be a "
+"callable object or a list of it.  If ``onclick`` is callable object, its "
+"signature is ``onclick(btn_value)``. ``btn_value`` is ``value`` of the button "
+"that is clicked.  If ``onclick`` is a list, the item receives no parameter. In "
+"this case, each item in the list corresponds to the buttons one-to-one.  Tip: "
+"You can use ``functools.partial`` to save more context information in "
+"``onclick``.  Note: When in :ref:`Coroutine-based session  "
+"<coroutine_based_session>`, the callback can be a coroutine function."
+msgstr ""
+
+#: of pywebio.output.put_buttons:25
+msgid ""
+"Callback which will be called when button is clicked. ``onclick`` can be a "
+"callable object or a list of it."
+msgstr "按钮点击回调函数. ``onclick`` 可以是函数或者函数组成的列表."
+
+#: of pywebio.output.put_buttons:27
+msgid ""
+"If ``onclick`` is callable object, its signature is ``onclick(btn_value)``. "
+"``btn_value`` is ``value`` of the button that is clicked."
+msgstr ""
+"``onclick`` 为函数时, 签名为 ``onclick(btn_value)``. ``btn_value`` 为被点击的按"
+"钮的 ``value`` 值"
+
+#: of pywebio.output.put_buttons:29
+msgid ""
+"If ``onclick`` is a list, the item receives no parameter. In this case, each "
+"item in the list corresponds to the buttons one-to-one."
+msgstr ""
+"``onclick`` 为列表时,列表内函数的签名为 ``func()``. 此时,回调函数与 "
+"``buttons`` 一一对应"
+
+#: of pywebio.output.put_buttons:31
+msgid ""
+"Tip: You can use ``functools.partial`` to save more context information in "
+"``onclick``."
+msgstr ""
+"Tip: 可以使用 ``functools.partial`` 来在 ``onclick`` 中保存更多上下文信息."
+
+#: of pywebio.output.put_buttons:33
+msgid ""
+"Note: When in :ref:`Coroutine-based session  <coroutine_based_session>`, the "
+"callback can be a coroutine function."
+msgstr ""
+"Note: 当使用 :ref:`基于协程的会话实现 <coroutine_based_session>` 时,回调函数可"
+"以为协程函数."
+
+#: of pywebio.output.put_buttons:34
+msgid "Whether to use small size button. Default is False."
+msgstr "是否使用小号按钮,默认为False"
+
+#: of pywebio.output.put_buttons:35
+msgid "Whether to use link style button. Default is False"
+msgstr "是否将按钮显示为链接样式,默认为False"
+
+#: of pywebio.output.put_buttons:37
+msgid ""
+"Other options of the ``onclick`` callback. There are different options "
+"according to the session implementation  When in Coroutine-based Session:     * "
+"mutex_mode: Default is ``False``. If set to ``True``, new click event will be "
+"ignored when the current callback is running. This option is available only "
+"when ``onclick`` is a coroutine function.  When in Thread-based Session:     * "
+"serial_mode: Default is ``False``, and every time a callback is triggered, the "
+"callback function will be executed immediately in a new thread.     If set "
+"``serial_mode`` to ``True``     After enabling serial_mode, the button's "
+"callback will be executed serially in a resident thread in the session, and all "
+"other new click event callbacks (including the ``serial_mode=False`` callback) "
+"will be queued for the current click event to complete. If the callback "
+"function runs for a short time, you can turn on ``serial_mode`` to improve "
+"performance."
+msgstr ""
+
+#: of pywebio.output.put_buttons:37
+msgid ""
+"Other options of the ``onclick`` callback. There are different options "
+"according to the session implementation"
+msgstr "回调函数的其他参数。根据选用的 session 实现有不同参数"
+
+#: of pywebio.output.put_buttons:40
+msgid "When in Coroutine-based Session:"
+msgstr "CoroutineBasedSession 实现"
+
+#: of pywebio.output.put_buttons:40
+msgid ""
+"mutex_mode: Default is ``False``. If set to ``True``, new click event will be "
+"ignored when the current callback is running. This option is available only "
+"when ``onclick`` is a coroutine function."
+msgstr ""
+"mutex_mode: 互斥模式。默认为 ``False`` 。若为 ``True`` ,则在运行回调函数过程"
+"中,无法响应当前按钮组的新点击事件,仅当 ``onclick`` 为协程函数时有效"
+
+#: of pywebio.output.put_buttons:45
+msgid "When in Thread-based Session:"
+msgstr "ThreadBasedSession 实现"
+
+#: of pywebio.output.put_buttons:43
+msgid ""
+"serial_mode: Default is ``False``, and every time a callback is triggered, the "
+"callback function will be executed immediately in a new thread."
+msgstr ""
+"serial_mode: 串行模式模式。默认为 ``False`` ,此时每次触发回调,回调函数会在新线"
+"程中立即执行。"
+
+#: of pywebio.output.put_buttons:44
+msgid ""
+"If set ``serial_mode`` to ``True`` After enabling serial_mode, the button's "
+"callback will be executed serially in a resident thread in the session, and all "
+"other new click event callbacks (including the ``serial_mode=False`` callback) "
+"will be queued for the current click event to complete. If the callback "
+"function runs for a short time, you can turn on ``serial_mode`` to improve "
+"performance."
+msgstr ""
+"开启serial_mode后,该按钮的回调会在会话内的一个固定线程内串行执行,且其他所有新"
+"的点击事件的回调(包括 ``serial_mode=False`` 的回调)都将排队等待当前点击事件运行"
+"完成。如果回调函数运行时间很短,可以开启 ``serial_mode`` 来提高性能。"
+
+#: of pywebio.output.put_buttons:49
+#, python-format
+msgid ""
+"from functools import partial\n"
+"\n"
+"def row_action(choice, id):\n"
+"    put_text(\"You click %s button with id: %s\" % (choice, id))\n"
+"\n"
+"put_buttons(['edit', 'delete'], onclick=partial(row_action, id=1))\n"
+"## ----\n"
+"\n"
+"def edit():\n"
+"    put_text(\"You click edit button\")\n"
+"def delete():\n"
+"    put_text(\"You click delete button\")\n"
+"\n"
+"put_buttons(['edit', 'delete'], onclick=[edit, delete])"
+msgstr ""
+
+#: of pywebio.output.put_buttons:70
+msgid ""
+"After the PyWebIO session (see :ref:`Server and script mode "
+"<server_and_script_mode>` for more information about session) closed, the event "
+"callback will not work. You can call the :func:`pywebio.session.hold()` "
+"function at the end of the task function to hold the session, so that the event "
+"callback will always be available before the browser page is closed by user."
+msgstr ""
+"在PyWebIO会话(关于会话的概念见 :ref:`Server与script模式 "
+"<server_and_script_mode>` )结束后,事件回调也将不起作用,\n"
+"可以在任务函数末尾处使用 `pywebio.session.hold()` 函数来将会话保持,这样在用户关"
+"闭浏览器页面前,事件回调将一直可用。"
+
+#: of pywebio.output.put_image:3
+msgid ""
+"Source of image. It can be a string specifying image URL, a bytes-like object "
+"specifying the binary content of an image or an instance of ``PIL.Image.Image``"
+msgstr ""
+"图片内容. 可以为: 字符串类型的URL, bytes-like object 表示的图片二进制内容, "
+"``PIL.Image.Image`` 实例"
+
+#: of pywebio.output.put_image:4
+msgid "Image description."
+msgstr "图片描述"
+
+#: of pywebio.output.put_image:5
+msgid ""
+"The width of image. It can be CSS pixels (like `'30px'`) or percentage (like "
+"`'10%'`)."
+msgstr "图像的宽度,可以是CSS像素(数字px)或者百分比(数字%)。"
+
+#: of pywebio.output.put_image:6
+msgid ""
+"The height of image. It can be CSS pixels (like `'30px'`) or percentage (like "
+"`'10%'`). If only one value of ``width`` and ``height`` is specified, the "
+"browser will scale image according to its original size."
+msgstr ""
+"图像的高度,可以是CSS像素(数字px)或者百分比(数字%)。可以只指定 width 和 height "
+"中的一个值,浏览器会根据原始图像进行缩放。"
+
+#: of pywebio.output.put_image:8
+msgid ""
+"Image format, optinoal. e.g.: ``png``, ``jpeg``, ``gif``, etc. Only available "
+"when `src` is non-URL"
+msgstr ""
+"图片格式,非必须。如 ``png`` , ``jpeg`` , ``gif`` 等, 仅在 `src` 为非URL时有效"
+
+#: of pywebio.output.put_image:13
+msgid ""
+"from pywebio import STATIC_PATH  # ..demo-only\n"
+"img = open(STATIC_PATH + '/image/favicon_open_32.png', 'rb').read()  # ..demo-"
+"only\n"
+"img = open('/path/to/some/image.png', 'rb').read()  # ..doc-only\n"
+"put_image(img, width='50px')\n"
+"\n"
+"## ----\n"
+"put_image('https://www.python.org/static/img/python-logo.png')"
+msgstr ""
+
+#: of pywebio.output.put_file:3
+msgid ""
+"To show a link with the file name on the browser. When click the link, the "
+"browser automatically downloads the file."
+msgstr "在浏览器上的显示为一个以文件名为名的链接,点击链接后浏览器自动下载文件。"
+
+#: of pywebio.output.put_file:5
+msgid "File name when downloading"
+msgstr "下载保存为的文件名"
+
+#: of pywebio.output.put_file:6
+msgid "File content. It is a bytes-like object"
+msgstr "文件内容. 类型为 bytes-like object"
+
+#: of pywebio.output.put_file:7
+msgid ""
+"The label of the download link, which is the same as the file name by default."
+msgstr "下载链接的显示文本,默认和文件名相同"
+
+#: of pywebio.output.put_file:12
+msgid ""
+"After the PyWebIO session (see :ref:`Server and script mode "
+"<server_and_script_mode>` for more information about session) closed, the file "
+"download link will not work. You can call the :func:`pywebio.session.hold()` "
+"function at the end of the task function to hold the session, so that the "
+"download link will always be available before the browser page is closed by "
+"user."
+msgstr ""
+"在PyWebIO会话(关于会话的概念见 :ref:`Server与script模式 "
+"<server_and_script_mode>` )结束后,使用 ``put_file()``\n"
+"输出的文件也将无法下载,可以在任务函数末尾处使用 `pywebio.session.hold()` 函数来"
+"将会话保持,这样在用户关闭浏览器页面前,\n"
+"文件下载将一直可用。"
+
+#: of pywebio.output.put_file:16
+msgid "put_file('hello-world.txt', b'hello world!', 'download me')"
+msgstr ""
+
+#: of pywebio.output.put_collapse:3
+msgid "Title of content"
+msgstr "内容标题"
+
+#: of pywebio.output.put_collapse:5 pywebio.output.put_scrollable:4
+msgid "The content can be a string, the ``put_xxx()`` calls , or a list of them."
+msgstr "内容可以为字符串或 ``put_xxx`` 类输出函数的返回值,或者由它们组成的列表。"
+
+#: of pywebio.output.put_collapse:6
+msgid "Whether to expand the content. Default is ``False``."
+msgstr "是否默认展开折叠内容。默认不展开内容"
+
+#: of pywebio.output.put_collapse:11
+msgid ""
+"put_collapse('Collapse title', [\n"
+"    'text',\n"
+"    put_markdown('~~Strikethrough~~'),\n"
+"    put_table([\n"
+"        ['Commodity', 'Price'],\n"
+"        ['Apple', '5.5'],\n"
+"    ])\n"
+"], open=True)\n"
+"\n"
+"## ----\n"
+"put_collapse('Large text', 'Awesome PyWebIO! '*30)"
+msgstr ""
+
+#: of pywebio.output.put_scrollable:1
+msgid ""
+"Output a fixed height content area. scroll bar is displayed when the content "
+"exceeds the limit"
+msgstr "固定高度内容输出区域,内容超出则显示滚动条"
+
+#: of pywebio.output.put_scrollable:5
+msgid ""
+"The height of the area (in pixels). ``height`` parameter also accepts "
+"``(min_height, max_height)`` to indicate the range of height, for example, "
+"``(100, 200)`` means that the area has a minimum height of 100 pixels and a "
+"maximum of 200 pixels."
+msgstr ""
+"区域的高度(像素),内容超出此高度则使用滚动条。可以传入 ``(min_height, "
+"max_height)`` 来表示高度的范围,比如 ``(100, 200)`` 表示区域高度最小100像素、最"
+"高200像素。"
+
+#: of pywebio.output.put_scrollable:7
+msgid "Whether to use the horizontal scroll bar"
+msgstr "是否显示水平滚动条"
+
+#: of pywebio.output.put_scrollable:8
+msgid "Whether to show border"
+msgstr "是否显示边框"
+
+#: of pywebio.output.put_scrollable:13
+msgid ""
+"import time\n"
+"\n"
+"o = output(\"You can click the area to prevent auto scroll.\")\n"
+"put_scrollable(o, height=200, keep_bottom=True)\n"
+"\n"
+"while 1:\n"
+"    o.append(time.time())\n"
+"    time.sleep(0.5)"
+msgstr ""
+
+#: of pywebio.output.put_scrollable:26
+msgid ""
+"add ``height`` parameter,remove ``max_height`` parameter; add ``keep_bottom`` "
+"parameter"
+msgstr "添加 ``height`` 参数,移除 ``max_height`` 参数;添加 ``keep_bottom`` 参数"
+
+#: of pywebio.output.put_widget:3
+msgid ""
+"html template, using `mustache.js <https://github.com/janl/mustache.js>`_ syntax"
+msgstr "html模版,使用 `mustache.js <https://github.com/janl/mustache.js>`_ 语法"
+
+#: of pywebio.output.put_widget:4
+msgid ""
+"Data used to render the template.  The data can include the ``put_xxx()`` "
+"calls, and the JS function ``pywebio_output_parse`` can be used to parse the "
+"content of ``put_xxx()``. For string input, ``pywebio_output_parse`` will parse "
+"into text.  ⚠️:When using the ``pywebio_output_parse`` function, you need to "
+"turn off the html escaping of mustache: ``{{& pywebio_output_parse}}``, see the "
+"example below."
+msgstr ""
+
+#: of pywebio.output.put_widget:4
+msgid "Data used to render the template."
+msgstr "渲染模版使用的数据."
+
+#: of pywebio.output.put_widget:6
+msgid ""
+"The data can include the ``put_xxx()`` calls, and the JS function "
+"``pywebio_output_parse`` can be used to parse the content of ``put_xxx()``. For "
+"string input, ``pywebio_output_parse`` will parse into text."
+msgstr ""
+"数据可以包含输出函数( ``put_xxx()`` )的返回值, 可以使用 "
+"``pywebio_output_parse`` 函数来解析 ``put_xxx()`` 内容;对于字符串输入, "
+"``pywebio_output_parse`` 会将解析成文本."
+
+#: of pywebio.output.put_widget:8
+msgid ""
+"⚠️:When using the ``pywebio_output_parse`` function, you need to turn off the "
+"html escaping of mustache: ``{{& pywebio_output_parse}}``, see the example "
+"below."
+msgstr ""
+"⚠️:使用 ``pywebio_output_parse`` 函数时,需要关闭mustache的html转义: ``{{& "
+"pywebio_output_parse}}`` , 参见下文示例.\n"
+":param int scope, position: 与 `put_text` 函数的同名参数含义一致"
+
+#: of pywebio.output.put_widget:13
+msgid ""
+"tpl = '''\n"
+"<details>\n"
+"    <summary>{{title}}</summary>\n"
+"    {{#contents}}\n"
+"        {{& pywebio_output_parse}}\n"
+"    {{/contents}}\n"
+"</details>\n"
+"'''\n"
+"\n"
+"put_widget(tpl, {\n"
+"    \"title\": 'More content',\n"
+"    \"contents\": [\n"
+"        'text',\n"
+"        put_markdown('~~Strikethrough~~')\n"
+"        put_table([\n"
+"            ['Commodity', 'Price'],\n"
+"            ['Apple', '5.5'],\n"
+"            ['Banana', '7'],\n"
+"        ])\n"
+"    ]\n"
+"})"
+msgstr ""
+
+#: of pywebio.output.toast:1
+msgid "Show a notification message."
+msgstr "显示一条通知消息"
+
+#: of pywebio.output.toast:3
+msgid "Notification content."
+msgstr "通知内容"
+
+#: of pywebio.output.toast:4
+msgid ""
+"The duration of the notification display, in seconds. `0` means not to close "
+"automatically (at this time, a close button will be displayed next to the "
+"message, and the user can close the message manually)"
+msgstr ""
+"通知显示持续的时间,单位为秒。 `0` 表示不自动关闭(此时消息旁会显示一个关闭图标,"
+"用户可以手动关闭消息)"
+
+#: of pywebio.output.toast:5
+msgid ""
+"Where to display the notification message. Available values are `'left'`, "
+"`'center'` and `'right'`."
+msgstr "通知消息显示的位置,可以为 `’left’` / `’center’` / `’right’`"
+
+#: of pywebio.output.toast:6
+msgid ""
+"Background color of the notification. Available values are `'info'`, `'error'`, "
+"`'warn'`, `'success'` or hexadecimal color value starting with `'#'`"
+msgstr ""
+"通知消息的背景颜色,可以为 `’info’` / `’error’` / `’warn’` / `’success’` 或以 "
+"`’#’` 开始的十六进制颜色值"
+
+#: of pywebio.output.toast:7
+msgid ""
+"The callback function when the notification message is clicked. The callback "
+"function receives no parameters.  Note: When in :ref:`Coroutine-based session "
+"<coroutine_based_session>`, the callback can be a coroutine function."
+msgstr ""
+
+#: of pywebio.output.toast:7
+msgid ""
+"The callback function when the notification message is clicked. The callback "
+"function receives no parameters."
+msgstr "点击通知消息时的回调函数,回调函数不接受任何参数。"
+
+#: of pywebio.output.toast:9
+msgid ""
+"Note: When in :ref:`Coroutine-based session <coroutine_based_session>`, the "
+"callback can be a coroutine function."
+msgstr ""
+"Note: 当使用 :ref:`基于协程的会话实现 <coroutine_based_session>` 时,回调函数可"
+"以为协程函数."
+
+#: of pywebio.output.toast:13
+msgid ""
+"def show_msg():\n"
+"    put_text(\"You clicked the notification.\")\n"
+"\n"
+"toast('New messages', position='right', color='#2188ff', duration=0, "
+"onclick=show_msg)"
+msgstr ""
+
+#: of pywebio.output.popup:1
+msgid "Show a popup."
+msgstr "显示弹窗"
+
+#: of pywebio.output.popup:3
+msgid ""
+"⚠️: In PyWebIO, you can't shoe multiple popup windows at the same time. Before "
+"displaying a new pop-up window, the existing popup on the page will be "
+"automatically closed. You can use `close_popup()` to close the popup manually."
+msgstr ""
+"⚠️: PyWebIO不允许同时显示多个弹窗,在显示新弹窗前,会自动关闭页面上存在的弹窗。可"
+"以使用 `close_popup()` 主动关闭弹窗"
+
+#: of pywebio.output.popup:5
+msgid "The title of the popup."
+msgstr "弹窗标题"
+
+#: of pywebio.output.popup:7
+msgid ""
+"The content of the popup can be a string, the put_xxx() calls , or a list of "
+"them."
+msgstr ""
+"弹窗内容. 可以为字符串或 ``put_xxx`` 类输出函数的返回值,或者为它们组成的列表。"
+
+#: of pywebio.output.popup:8
+msgid ""
+"The size of popup window. Available values are: ``'large'``, ``'normal'`` and "
+"``'small'``."
+msgstr "弹窗窗口大小,可选值: ``’large’``, ``’normal’`` and ``’small’``."
+
+#: of pywebio.output.popup:9
+msgid ""
+"If enabled, the popup can be closed implicitly by clicking the content outside "
+"the popup window or pressing the ``Esc`` key. Default is ``False``."
+msgstr "是否可以通过点击弹窗外的内容或按下 ``Esc`` 键来关闭弹窗,默认为 ``False``"
+
+#: of pywebio.output.popup:10
+msgid ""
+"Whether the user can close the popup window. By default, the user can close the "
+"popup by clicking the close button in the upper right of the popup window. When "
+"set to ``False``, the popup window can only be closed by :func:`popup_close()`, "
+"at this time the ``implicit_close`` parameter will be ignored."
+msgstr ""
+"是否可由用户关闭弹窗. 默认情况下,用户可以通过点击弹窗右上角的关闭按钮来关闭弹"
+"窗。\n"
+"设置为 ``False`` 时弹窗仅能通过 :func:`popup_close()` 关闭,此时 "
+"``implicit_close`` 参数将被忽略."
+
+#: of pywebio.output.popup:13
+msgid ""
+"``popup()`` can be used in 3 ways: direct call, context manager, and decorator."
+msgstr "``popup()`` 支持直接传入内容、上下文管理器、装饰器三种形式的调用"
+
+#: of pywebio.output.popup:15
+msgid "direct call:"
+msgstr "直接传入内容:"
+
+#: of pywebio.output.popup:17
+msgid ""
+"popup('popup title', 'popup text content', size=PopupSize.SMALL)\n"
+"## ----\n"
+"\n"
+"popup('Popup title', [\n"
+"    put_html('<h3>Popup Content</h3>'),\n"
+"    'html: <br/>',\n"
+"    put_table([['A', 'B'], ['C', 'D']]),\n"
+"    put_buttons(['close_popup()'], onclick=lambda _: close_popup())\n"
+"])"
+msgstr ""
+
+#: of pywebio.output.popup:31
+msgid "context manager:"
+msgstr "作为上下文管理器使用:"
+
+#: of pywebio.output.popup:33
+msgid ""
+"with popup('Popup title') as s:\n"
+"    put_html('<h3>Popup Content</h3>')\n"
+"    put_text('html: <br/>')\n"
+"    put_buttons([('clear()', s)], onclick=clear)\n"
+"\n"
+"put_text('Also work!', scope=s)"
+msgstr ""
+
+#: of pywebio.output.popup:45
+msgid ""
+"The context manager will open a new output scope and return the scope name. The "
+"output in the context manager will be displayed on the popup window by default. "
+"After the context manager exits, the popup window will not be closed. You can "
+"still use the ``scope`` parameter of the output function to output to the popup."
+msgstr ""
+
+#: of pywebio.output.popup:48
+msgid "decorator:"
+msgstr "作为装饰器使用:"
+
+#: of pywebio.output.popup:50
+msgid ""
+"@popup('Popup title')\n"
+"def show_popup():\n"
+"    put_html('<h3>Popup Content</h3>')\n"
+"    put_text(\"I'm in a popup!\")\n"
+"    ...\n"
+"\n"
+"show_popup()"
+msgstr ""
+
+#: of pywebio.output.close_popup:3
+msgid "See also: `popup()`"
+msgstr ""
+
+#: of pywebio.output.put_row:1
+msgid "Use row layout to output content. The content is arranged horizontally"
+msgstr "使用行布局输出内容. 内容在水平方向从左往右排列成一行"
+
+#: of pywebio.output.put_column:3 pywebio.output.put_row:3
+msgid ""
+"Content list, the item is ``put_xxx()`` call or ``None``. ``None`` represents "
+"the space between the output"
+msgstr ""
+"子元素列表, 列表项为 ``put_xxx()`` 调用或者 ``None`` , ``None`` 表示空白行间距"
+
+#: of pywebio.output.put_row:4
+msgid ""
+"| Used to indicate the width of the items, is a list of width values separated "
+"by space. | Each width value corresponds to the items one-to-one. (``None`` "
+"item should also correspond to a width value). | By default, ``size`` assigns a "
+"width of 10 pixels to the ``None`` item, and distributes the width equally to "
+"the remaining items.  Available format of width value are:   - pixels: like "
+"``100px``  - percentage: Indicates the percentage of available width. like "
+"``33.33%``  - ``fr`` keyword: Represents a scale relationship, 2fr represents "
+"twice the width of 1fr  - ``auto`` keyword: Indicates that the length is "
+"determined by the browser  - ``minmax(min, max)`` : Generate a length range, "
+"indicating that the length is within this range. It accepts two parameters, "
+"minimum and maximum.    For example: ``minmax(100px, 1fr)`` means the length is "
+"not less than 100px and not more than 1fr"
+msgstr ""
+
+#: of pywebio.output.put_row
+msgid ""
+"Used to indicate the width of the items, is a list of width values separated by "
+"space."
+msgstr "用于指示子元素的宽度, 为空格分割的宽度值列表."
+
+#: of pywebio.output.put_row
+msgid ""
+"Each width value corresponds to the items one-to-one. (``None`` item should "
+"also correspond to a width value)."
+msgstr ""
+"宽度值需要和 ``content`` 中子元素一一对应( ``None`` 子元素也要对应宽度值)."
+
+#: of pywebio.output.put_row
+msgid ""
+"By default, ``size`` assigns a width of 10 pixels to the ``None`` item, and "
+"distributes the width equally to the remaining items."
+msgstr "size 默认给 ``None`` 元素分配10像素宽度,并为剩余元素平均分配宽度."
+
+#: of pywebio.output.put_row:9
+msgid "Available format of width value are:"
+msgstr "宽度值可用格式:"
+
+#: of pywebio.output.put_row:11
+msgid "pixels: like ``100px``"
+msgstr "像素值: 例如: ``100px``"
+
+#: of pywebio.output.put_row:12
+msgid "percentage: Indicates the percentage of available width. like ``33.33%``"
+msgstr "百分比: 表示占可用宽度的百分比. 例如: ``33.33%``"
+
+#: of pywebio.output.put_row:13
+msgid ""
+"``fr`` keyword: Represents a scale relationship, 2fr represents twice the width "
+"of 1fr"
+msgstr "``fr`` 关键字: 表示比例关系, 2fr 表示的宽度为 1fr 的两倍"
+
+#: of pywebio.output.put_row:14
+msgid "``auto`` keyword: Indicates that the length is determined by the browser"
+msgstr "``auto`` 关键字: 表示由浏览器自己决定长度"
+
+#: of pywebio.output.put_row:15
+msgid ""
+"``minmax(min, max)`` : Generate a length range, indicating that the length is "
+"within this range. It accepts two parameters, minimum and maximum. For example: "
+"``minmax(100px, 1fr)`` means the length is not less than 100px and not more "
+"than 1fr"
+msgstr ""
+"``minmax(min, max)`` : 产生一个长度范围,表示长度就在这个范围之中。它接受两个参"
+"数,分别为最小值和最大值。\n"
+"例如: ``minmax(100px, 1fr)`` 表示长度不小于100px,不大于1fr"
+
+#: of pywebio.output.put_row:22
+msgid ""
+"# Two code blocks of equal width, separated by 10 pixels\n"
+"put_row([put_code('A'), None, put_code('B')])\n"
+"## ----\n"
+"\n"
+"# The width ratio of the left and right code blocks is 2:3, which is equivalent "
+"to size='2fr 10px 3fr'\n"
+"put_row([put_code('A'), None, put_code('B')], size='40% 10px 60%')"
+msgstr ""
+
+#: of pywebio.output.put_column:1
+msgid "Use column layout to output content. The content is arranged vertically"
+msgstr "使用列布局输出内容. 内容在竖直方向从上往下排列成一列"
+
+#: of pywebio.output.put_column:4
+msgid ""
+"Used to indicate the width of the items, is a list of width values separated by "
+"space. The format is the same as the ``size`` parameter of the `put_row()` "
+"function."
+msgstr ""
+"用于指示子元素的高度, 为空格分割的高度值列表. 可用格式参考 `put_row()` 函数的 "
+"``size`` 参数注释."
+
+#: of pywebio.output.put_grid:3
+msgid ""
+"Content of grid, which is a two-dimensional list. The item of list is "
+"``put_xxx()`` call or ``None``. ``None`` represents the space between the "
+"output. The item can use the `span()` to set the cell span."
+msgstr ""
+"输出内容. ``put_xxx()`` / None 组成的二维数组, None 表示空白. 数组项可以使用 :"
+"func:`span()` 函数设置元素在网格的跨度."
+
+#: of pywebio.output.put_grid:5
+msgid "The width of grid cell."
+msgstr "网格元素的宽度. "
+
+#: of pywebio.output.put_grid:6
+msgid "The height of grid cell."
+msgstr "网格元素的高度."
+
+#: of pywebio.output.put_grid:7
+msgid ""
+"The width of each column of the grid. The width values are separated by a "
+"space. Can not use ``cell_widths`` and ``cell_width`` at the same time"
+msgstr "网格每一列的宽度. 宽度值用空格分隔. 不可以和 `cell_width` 参数同时使用."
+
+#: of pywebio.output.put_grid:9
+msgid ""
+"The height of each row of the grid. The height values are separated by a space. "
+"Can not use ``cell_heights`` and ``cell_height`` at the same time"
+msgstr "网格每一行的高度. 高度值用空格分隔. 不可以和 `cell_height` 参数同时使用."
+
+#: of pywebio.output.put_grid:11
+msgid ""
+"Controls how auto-placed items get inserted in the grid. Can be "
+"``'row'``(default) or ``'column'`` .   | ``'row'`` : Places items by filling "
+"each row  | ``'column'`` : Places items by filling each column"
+msgstr ""
+
+#: of pywebio.output.put_grid:11
+msgid ""
+"Controls how auto-placed items get inserted in the grid. Can be "
+"``'row'``(default) or ``'column'`` ."
+msgstr "排列方向. 为 ``’row’`` 或 ``’column’`` ."
+
+#: of pywebio.output.put_grid
+msgid "``'row'`` : Places items by filling each row"
+msgstr "``’row’`` 时表示,content中的每一个子数组代表网格的一行;"
+
+#: of pywebio.output.put_grid
+msgid "``'column'`` : Places items by filling each column"
+msgstr "``’column’`` 时表示,content中的每一个子数组代表网格的一列."
+
+#: of pywebio.output.put_grid:19
+msgid ""
+"The format of width/height value in ``cell_width``,``cell_height``,"
+"``cell_widths``,``cell_heights`` can refer to the ``size`` parameter of the "
+"`put_row()` function."
+msgstr ""
+"``cell_width``,``cell_height``,``cell_widths``,``cell_heights`` 参数中的宽度/高"
+"度值格式参考 `put_row()` 函数的 ``size`` 参数注释."
+
+#: of pywebio.output.put_grid:23
+msgid ""
+"put_grid([\n"
+"    [put_text('A'), put_text('B'), put_text('C')],\n"
+"    [None, span(put_text('D'), col=2, row=1)],\n"
+"    [put_text('E'), put_text('F'), put_text('G')],\n"
+"], cell_width='100px', cell_height='100px')"
+msgstr ""
+
+#: of pywebio.output.style:3
+msgid "The output content can be a ``put_xxx()`` call or a list of it."
+msgstr ""
+"输出内容,可以为 ``put_xxx()`` 调用或其列表。outputs为列表时将为每个列表项都添加"
+"自定义的css样式。"
+
+#: of pywebio.output.style:5
+msgid "css style string"
+msgstr "css样式字符串"
+
+#: of pywebio.output.style:6
+msgid ""
+"The output contents with css style added:  Note: If ``outputs`` is a list of "
+"``put_xxx()`` calls, the style will be set for each item of the list. And the "
+"return value can be used in anywhere accept a list of ``put_xxx()`` calls."
+msgstr ""
+
+#: of pywebio.output.style:6
+msgid "The output contents with css style added:"
+msgstr "添加了css样式的输出内容"
+
+#: of pywebio.output.style:8
+msgid ""
+"Note: If ``outputs`` is a list of ``put_xxx()`` calls, the style will be set "
+"for each item of the list. And the return value can be used in anywhere accept "
+"a list of ``put_xxx()`` calls."
+msgstr ""
+"Note: 若 ``outputs`` 为list,则 ``outputs`` 中每一项都会被添加css样式, 其返回值"
+"可用于任何接受 ``put_xxx()`` 列表的地方。"
+
+#: of pywebio.output.style:12
+msgid ""
+"style(put_text('Red'), 'color:red')\n"
+"\n"
+"## ----\n"
+"style([\n"
+"    put_text('Red'),\n"
+"    put_markdown('~~del~~')\n"
+"], 'color:red')\n"
+"\n"
+"## ----\n"
+"put_table([\n"
+"    ['A', 'B'],\n"
+"    ['C', style(put_text('Red'), 'color:red')],\n"
+"])\n"
+"\n"
+"## ----\n"
+"put_collapse('title', style([\n"
+"    put_text('text'),\n"
+"    put_markdown('~~del~~'),\n"
+"], 'margin-left:20px'))"
+msgstr ""
+
+#: of pywebio.output.output:3
+msgid ""
+"``output()`` can be passed in anywhere that ``put_xxx()`` can passed in. A "
+"handler it returned by ``output()``, and after being output, the content can "
+"also be modified by the handler (See code example below)."
+msgstr ""
+"``output()`` 可以传入任何接收 ``put_xxx()`` 调用的地方,``output()`` 返回一个"
+"handler,通过该handler可对自身内容进行修改(见下方示例)"
+
+#: of pywebio.output.output:5
+msgid ""
+"The initial contents to be output. The item is ``put_xxx()`` call, and any "
+"other type will be coverted to ``put_text(content)``."
+msgstr ""
+"要输出的初始内容. 元素为 ``put_xxx()`` 调用,其他类型会被转换成 "
+"``put_text(content)``"
+
+#: of pywebio.output.output:7
+msgid "An OutputHandler instance, the methods of the instance are as follows:"
+msgstr "OutputHandler 实例, 实例支持的方法如下:"
+
+#: of pywebio.output.output:9
+msgid "``reset(*contents)`` : Reset original contents to ``contents``"
+msgstr "``reset(*contents)`` : 重置内容为 ``contents``"
+
+#: of pywebio.output.output:10
+msgid "``append(*contents)`` : Append ``contents`` to original contents"
+msgstr "``append(*contents)`` : 在末尾追加内容"
+
+#: of pywebio.output.output:11
+msgid "``insert(idx, *contents)`` : insert ``contents`` into original contents."
+msgstr "``insert(idx, *contents)`` : 插入内容. ``idx`` 表示内容插入位置:"
+
+#: of pywebio.output.output
+msgid ""
+"when idx>=0, the output content is inserted before the element of the ``idx`` "
+"index."
+msgstr "idx>=0 时表示输出内容到原内容的idx索引的元素的前面;"
+
+#: of pywebio.output.output
+msgid ""
+"when idx<0, the output content is inserted after the element of the ``idx`` "
+"index."
+msgstr "idx<0 时表示输出内容到到原内容的idx索引元素之后."
+
+#: of pywebio.output.output:16
+msgid "Among them, the parameter ``contents`` is the same as ``output()``."
+msgstr "其中,参数 ``contents`` 同 ``output()`` 。"
+
+#: of pywebio.output.output:20
+msgid ""
+"hobby = output(put_text('Coding'))  # equal to output('Coding')\n"
+"put_table([\n"
+"   ['Name', 'Hobbies'],\n"
+"   ['Wang', hobby]      # hobby is initialized to Coding\n"
+"])\n"
+"## ----\n"
+"\n"
+"hobby.reset('Movie')  # hobby is reset to Movie\n"
+"## ----\n"
+"hobby.append('Music', put_text('Drama'))  # append Music, Drama to hobby\n"
+"## ----\n"
+"hobby.insert(0, put_markdown('**Coding**'))  # insert the Coding into the top "
+"of the hobby"
+msgstr ""

+ 570 - 0
docs/locales/zh_CN/LC_MESSAGES/platform.po

@@ -0,0 +1,570 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PyWebIO 1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-17 17:57+0800\n"
+"PO-Revision-Date: 2021-02-18 11:28+0800\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"
+
+#: ../../platform.rst:2
+msgid "``pywebio.platform`` --- Support to Web framework"
+msgstr "``pywebio.platform`` — Web框架支持"
+
+#: of pywebio.platform:1
+msgid "The ``platform`` module provides support for different web frameworks."
+msgstr "``platform`` 模块为PyWebIO提供了对不同Web框架的支持。"
+
+#: of pywebio.platform:3
+msgid ""
+"See also: :ref:`Integration with Web Framework <integration_web_framework>` "
+"section of user manual."
+msgstr ""
+"具体用法参见用户手册 :ref:`与Web框架集成 <integration_web_framework>` 小节"
+
+#: of pywebio.platform:6
+msgid "Tornado support"
+msgstr "Tornado相关"
+
+#: of pywebio.platform.tornado.start_server:1
+msgid ""
+"Start a Tornado server to provide the PyWebIO application as a web service."
+msgstr "启动一个 Tornado server 将PyWebIO应用作为Web服务提供。"
+
+#: of pywebio.platform.tornado.start_server:3
+msgid ""
+"Tornado is the default backend server for PyWebIO applications, and "
+"``start_server`` can be imported directly using ``from pywebio import "
+"start_server``."
+msgstr ""
+"Tornado为PyWebIO应用的默认后端Server,可以直接使用 ``from pywebio import "
+"start_server`` 导入。"
+
+#: of pywebio.platform.aiohttp.start_server pywebio.platform.aiohttp.webio_handler
+#: pywebio.platform.django.start_server pywebio.platform.django.webio_view
+#: pywebio.platform.flask.start_server pywebio.platform.flask.webio_view
+#: pywebio.platform.run_event_loop pywebio.platform.seo
+#: pywebio.platform.tornado.start_server
+msgid "Parameters"
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:6
+msgid ""
+"PyWebIO application. Can be a task function, a list of functions, or a "
+"dictionary.  When it is a dictionary, whose key is task name and value is task "
+"function. When it is a list, using function name as task name.  You can select "
+"the task to run through the ``app`` URL parameter (for example, visit ``http://"
+"host:port/?app=foo`` to run the ``foo`` task), By default, the ``index`` task "
+"function is used. When the ``index`` task does not exist, PyWebIO will provide "
+"a default index home page. See also :ref:`Server mode "
+"<server_and_script_mode>`  When the task function is a coroutine function, use :"
+"ref:`Coroutine-based session <coroutine_based_session>` implementation, "
+"otherwise, use thread-based session implementation."
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:6
+msgid ""
+"PyWebIO application. Can be a task function, a list of functions, or a "
+"dictionary."
+msgstr "PyWebIO应用. 可以是任务函数或者任务函数的字典或列表。"
+
+#: of pywebio.platform.tornado.start_server:9
+msgid ""
+"When it is a dictionary, whose key is task name and value is task function. "
+"When it is a list, using function name as task name."
+msgstr "类型为字典时,字典键为任务名,类型为列表时,函数名为任务名。"
+
+#: of pywebio.platform.tornado.start_server:12
+msgid ""
+"You can select the task to run through the ``app`` URL parameter (for example, "
+"visit ``http://host:port/?app=foo`` to run the ``foo`` task), By default, the "
+"``index`` task function is used. When the ``index`` task does not exist, "
+"PyWebIO will provide a default index home page. See also :ref:`Server mode "
+"<server_and_script_mode>`"
+msgstr ""
+"可以通过 ``app`` URL参数选择要运行的任务(例如访问 ``http://host:port/?app=foo`` "
+"来运行 ``foo`` 任务),\n"
+"默认使用运行 ``index`` 任务函数,当 ``index`` 任务不存在时,PyWebIO会提供一个默"
+"认的索引页作为主页。\n"
+"参见 :ref:`Server模式 <server_and_script_mode>`"
+
+#: of pywebio.platform.tornado.start_server:16
+msgid ""
+"When the task function is a coroutine function, use :ref:`Coroutine-based "
+"session <coroutine_based_session>` implementation, otherwise, use thread-based "
+"session implementation."
+msgstr ""
+"任务函数为协程函数时,使用 :ref:`基于协程的会话实现 <coroutine_based_session>` "
+";任务函数为普通函数时,使用基于线程的会话实现。"
+
+#: of pywebio.platform.aiohttp.start_server:5
+#: pywebio.platform.django.start_server:5 pywebio.platform.flask.start_server:5
+#: pywebio.platform.tornado.start_server:18
+msgid ""
+"The port the server listens on. When set to ``0``, the server will "
+"automatically select a available port."
+msgstr "服务监听的端口。设置为 ``0`` 时,表示自动选择可用端口。"
+
+#: of pywebio.platform.aiohttp.start_server:7
+#: pywebio.platform.django.start_server:7 pywebio.platform.flask.start_server:7
+#: pywebio.platform.tornado.start_server:20
+msgid ""
+"The host the server listens on. ``host`` may be either an IP address or "
+"hostname. If it’s a hostname, the server will listen on all IP addresses "
+"associated with the name. ``host`` may be an empty string or None to listen on "
+"all available interfaces."
+msgstr ""
+"服务绑定的地址。 ``host`` 可以是IP地址或者为hostname。如果为hostname,服务会监听"
+"所有与该hostname关联的IP地址。\n"
+"通过设置 ``host`` 为空字符串或 ``None`` 来将服务绑定到所有可用的地址上。"
+
+#: of pywebio.platform.tornado.start_server:21
+msgid ""
+"Tornado Server's debug mode. If enabled, the server will automatically reload "
+"for code changes. See `tornado doc <https://www.tornadoweb.org/en/stable/guide/"
+"running.html#debug-mode>`_ for more detail."
+msgstr ""
+"是否开启Tornado Server的debug模式,开启后,代码发生修改后服务器会自动重启。\n"
+"详情请参阅 `tornado 文档 <https://www.tornadoweb.org/en/stable/guide/running."
+"html#debug-mode>`_"
+
+#: of pywebio.platform.aiohttp.start_server:9
+#: pywebio.platform.aiohttp.webio_handler:5 pywebio.platform.django.start_server:8
+#: pywebio.platform.django.webio_view:5 pywebio.platform.flask.start_server:8
+#: pywebio.platform.flask.webio_view:5 pywebio.platform.tornado.start_server:23
+msgid ""
+"Whether to load front-end static resources from CDN, the default is ``True``. "
+"Can also use a string to directly set the url of PyWebIO static resources."
+msgstr ""
+"是否从CDN加载前端静态资源,默认为 ``True`` 。支持传入自定义的URL来指定静态资源的"
+"部署地址"
+
+#: of pywebio.platform.tornado.start_server:25
+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 wildcards:   - ``*`` matches everything  - ``?`` matches any single "
+"character  - ``[seq]`` matches any character in *seq*  - ``[!seq]`` matches any "
+"character not in *seq*   Such as: ``https://*.example.com`` 、 ``*://*.example."
+"com``   For detail, see `Python Doc <https://docs.python.org/zh-tw/3/library/"
+"fnmatch.html>`_"
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:25
+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 wildcards:"
+msgstr ""
+"除当前域名外,服务器还允许的请求的来源列表。来源包含协议、域名和端口部分,允许使"
+"用 Unix shell 风格的匹配模式:"
+
+#: of pywebio.platform.tornado.start_server:29
+msgid "``*`` matches everything"
+msgstr "``*`` 为通配符"
+
+#: of pywebio.platform.tornado.start_server:30
+msgid "``?`` matches any single character"
+msgstr "``?`` 匹配单个字符"
+
+#: of pywebio.platform.tornado.start_server:31
+msgid "``[seq]`` matches any character in *seq*"
+msgstr "``[seq]`` 匹配seq中的任何字符"
+
+#: of pywebio.platform.tornado.start_server:32
+msgid "``[!seq]`` matches any character not in *seq*"
+msgstr "``[!seq]`` 匹配任何不在seq中的字符"
+
+#: of pywebio.platform.tornado.start_server:34
+msgid "Such as: ``https://*.example.com`` 、 ``*://*.example.com``"
+msgstr "比如 ``https://*.example.com`` 、 ``*://*.example.com``"
+
+#: of pywebio.platform.tornado.start_server:36
+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:37
+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 indicate that the server accepts/rejects the request. If "
+"``check_origin`` is set, the ``allowed_origins`` parameter will be ignored."
+msgstr ""
+"请求来源检查函数。接收请求来源(包含协议、域名和端口部分)字符串作为参数,\n"
+"返回 ``True/False`` 指示服务器接受/拒绝该请求。若设置了 ``check_origin`` , "
+"``allowed_origins`` 参数将被忽略"
+
+#: of pywebio.platform.aiohttp.start_server:15
+#: pywebio.platform.tornado.start_server:40
+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:41
+msgid ""
+"Max bytes of a message which Tornado can accept. Messages larger than the "
+"``websocket_max_message_size`` (default 10MiB) will not be accepted."
+msgstr "Tornado Server最大可接受的WebSockets消息大小。单位为字节,默认为10MiB。"
+
+#: of pywebio.platform.tornado.start_server:43
+msgid ""
+"If set to a number, all websockets will be pinged every n seconds. This can "
+"help keep the connection alive through certain proxy servers which close idle "
+"connections, and it can detect if the websocket has failed without being "
+"properly closed."
+msgstr ""
+"当被设置后,服务器会以 ``websocket_ping_interval`` 秒周期性地向每个WebSockets连"
+"接发送'ping'消息。\n"
+"如果应用处在某些反向代理服务器之后,设置 ``websocket_ping_interval`` 可以避免"
+"WebSockets连接被代理服务器当作空闲连接而关闭。\n"
+"同时,若WebSockets连接在某些情况下被异常关闭,应用也可以及时感知。"
+
+#: of pywebio.platform.tornado.start_server:46
+msgid ""
+"If the ping interval is set, and the server doesn’t receive a ‘pong’ in this "
+"many seconds, it will close the websocket. The default is three times the ping "
+"interval, with a minimum of 30 seconds. Ignored if ``websocket_ping_interval`` "
+"is not set."
+msgstr ""
+"如果设置了 ``websocket_ping_interval`` ,而服务没有在发送'ping'消息后的 "
+"``websocket_ping_timeout`` 秒\n"
+"内收到'pong'消息,应用会将连接关闭。默认的超时时间为 "
+"``websocket_ping_interval`` 的三倍。"
+
+#: of pywebio.platform.tornado.start_server:49
+msgid ""
+"Additional keyword arguments passed to the constructor of ``tornado.web."
+"Application``. For details, please refer: https://www.tornadoweb.org/en/stable/"
+"web.html#tornado.web.Application.settings"
+msgstr ""
+"传递给 ``tornado.web.Application`` 构造函数的额外的关键字参数\n"
+"可设置项参考: https://www.tornadoweb.org/en/stable/web.html#tornado.web."
+"Application.settings"
+
+#: of pywebio.platform.tornado.webio_handler:1
+msgid ""
+"Get the ``RequestHandler`` class for running PyWebIO applications in Tornado. "
+"The ``RequestHandler`` communicates with the browser by WebSocket protocol."
+msgstr ""
+"获取在Tornado中运行PyWebIO应用的RequestHandler类。RequestHandler类基于WebSocket"
+"协议与浏览器进行通讯。"
+
+#: of pywebio.platform.tornado.webio_handler:4
+msgid ""
+"The arguments of ``webio_handler()`` have the same meaning as for :func:"
+"`pywebio.platform.tornado.start_server`"
+msgstr ""
+"关于各参数的详细说明见 :func:`pywebio.platform.tornado.start_server` 的同名参"
+"数。"
+
+#: of pywebio.platform:11
+msgid "Flask support"
+msgstr ""
+
+#: of pywebio.platform.flask.webio_view:1
+msgid ""
+"Get the view function for running PyWebIO applications in Flask. The view "
+"communicates with the browser by HTTP protocol."
+msgstr "获取在Flask中运行PyWebIO任务的视图函数。基于http请求与前端页面进行通讯"
+
+#: of pywebio.platform.aiohttp.webio_handler:4
+#: pywebio.platform.django.webio_view:4 pywebio.platform.flask.webio_view:4
+msgid "PyWebIO application."
+msgstr "PyWebIO应用"
+
+#: of pywebio.platform.django.webio_view:7 pywebio.platform.flask.webio_view:7
+msgid "Session expiration time."
+msgstr "会话过期时间。"
+
+#: of pywebio.platform.django.webio_view:8 pywebio.platform.flask.webio_view:8
+msgid "Session cleanup interval, in seconds."
+msgstr "会话清理间隔(秒)。"
+
+#: of pywebio.platform.aiohttp.webio_handler:7
+#: pywebio.platform.django.webio_view:9 pywebio.platform.flask.webio_view:9
+msgid "Allowed request source list."
+msgstr "除当前域名外,服务器还允许的请求的来源列表。"
+
+#: of pywebio.platform.aiohttp.webio_handler:8
+#: pywebio.platform.django.webio_view:10 pywebio.platform.flask.webio_view:10
+msgid "The validation function for request source."
+msgstr "请求来源检查函数"
+
+#: of pywebio.platform.flask.webio_view:12
+msgid ""
+"The arguments of ``webio_view()`` 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服务提供。"
+
+#: of pywebio.platform.aiohttp.start_server:3
+#: pywebio.platform.django.start_server:3 pywebio.platform.flask.start_server:3
+msgid ""
+"PyWebIO application. The argument has the same meaning and format as for :func:"
+"`pywebio.platform.tornado.start_server`"
+msgstr ""
+"PyWebIO应用. 格式同 :func:`pywebio.platform.tornado.start_server` 的 "
+"``applications`` 参数"
+
+#: of pywebio.platform.aiohttp.start_server:11
+#: pywebio.platform.django.start_server:10 pywebio.platform.flask.start_server:10
+msgid ""
+"Allowed request source list. The argument has the same meaning as for :func:"
+"`pywebio.platform.tornado.start_server`"
+msgstr ""
+"除当前域名外,服务器还允许的请求的来源列表。格式同 :func:`pywebio.platform."
+"tornado.start_server` 的 ``allowed_origins`` 参数"
+
+#: of pywebio.platform.aiohttp.start_server:13
+#: pywebio.platform.django.start_server:12 pywebio.platform.flask.start_server:12
+msgid ""
+"The validation function for request source. The argument has the same meaning "
+"and format as for :func:`pywebio.platform.tornado.start_server`"
+msgstr ""
+"请求来源检查函数。格式同 :func:`pywebio.platform.tornado.start_server` 的 "
+"``check_origin`` 参数"
+
+#: of pywebio.platform.django.start_server:14
+#: pywebio.platform.flask.start_server:14
+msgid ""
+"Session expiration time. If no client message is received within "
+"``session_expire_seconds``, the session will be considered expired."
+msgstr ""
+"会话过期时间。若 session_expire_seconds 秒内没有收到客户端的请求,则认为会话过"
+"期。"
+
+#: of pywebio.platform.django.start_server:16
+#: pywebio.platform.flask.start_server:16
+msgid ""
+"Session cleanup interval, in seconds. The server will periodically clean up "
+"expired sessions and release the resources occupied by the sessions."
+msgstr "会话清理间隔(秒)。服务端会周期性清理过期的会话,释放会话占用的资源。"
+
+#: of pywebio.platform.flask.start_server:18
+msgid ""
+"Flask debug mode. If enabled, the server will automatically reload for code "
+"changes."
+msgstr "是否开启Flask Server的debug模式,开启后,代码发生修改后服务器会自动重启。"
+
+#: of pywebio.platform.flask.start_server:20
+msgid ""
+"Additional keyword arguments passed to the ``flask.Flask.run``. For details, "
+"please refer: https://flask.palletsprojects.com/en/1.1.x/api/#flask.Flask.run"
+msgstr ""
+"传递给 ``flask.Flask.run`` 函数的额外的关键字参数\n"
+"可设置项参考: https://flask.palletsprojects.com/en/1.1.x/api/#flask.Flask.run"
+
+#: of pywebio.platform:16
+msgid "Django support"
+msgstr ""
+
+#: of pywebio.platform.django.webio_view:1
+msgid ""
+"Get the view function for running PyWebIO applications in Django. The view "
+"communicates with the browser by HTTP protocol."
+msgstr "获取在django中运行PyWebIO任务的视图函数。 基于http请求与前端进行通讯"
+
+#: of pywebio.platform.django.webio_view:12
+msgid ""
+"The arguments of ``webio_view()`` 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服务提供。"
+
+#: of pywebio.platform.django.start_server:18
+msgid ""
+"Django debug mode. See `Django doc <https://docs.djangoproject.com/en/3.0/ref/"
+"settings/#debug>`_ for more detail."
+msgstr ""
+"开启 Django debug mode。参见 `Django doc <https://docs.djangoproject.com/en/3.0/"
+"ref/settings/#debug>`_ ."
+
+#: of pywebio.platform.django.start_server:20
+msgid ""
+"Additional settings to django server. For details, please refer: https://docs."
+"djangoproject.com/en/3.0/ref/settings/ . Among them, ``DEBUG``, "
+"``ALLOWED_HOSTS``, ``ROOT_URLCONF``, ``SECRET_KEY`` are set by PyWebIO and "
+"cannot be specified in ``django_options``."
+msgstr ""
+"django应用的其他设置,见 https://docs.djangoproject.com/en/3.0/ref/settings/ .\n"
+"其中 ``DEBUG`` 、 ``ALLOWED_HOSTS`` 、 ``ROOT_URLCONF`` 、 ``SECRET_KEY`` 被"
+"PyWebIO设置,无法在 ``django_options`` 中指定"
+
+#: of pywebio.platform:21
+msgid "aiohttp support"
+msgstr ""
+
+#: of pywebio.platform.aiohttp.webio_handler:1
+msgid ""
+"Get the `Request Handler <https://docs.aiohttp.org/en/stable/web_quickstart."
+"html#aiohttp-web-handler>`_ coroutine for running PyWebIO applications in "
+"aiohttp. The handler communicates with the browser by WebSocket protocol."
+msgstr ""
+"获取在aiohttp中运行PyWebIO任务函数的 `Request Handler <https://docs.aiohttp.org/"
+"en/stable/web_quickstart.html#aiohttp-web-handler>`_ 协程。Request Handler基于"
+"WebSocket协议与浏览器进行通讯。"
+
+#: of pywebio.platform.aiohttp.webio_handler:9
+msgid ""
+"The  parameters passed to the constructor of ``aiohttp.web.WebSocketResponse``."
+msgstr ""
+"创建 aiohttp WebSocketResponse 时使用的参数。见 https://docs.aiohttp.org/en/"
+"stable/web_reference.html#websocketresponse"
+
+#: of pywebio.platform.aiohttp.webio_handler:11
+msgid ""
+"The arguments of ``webio_handler()`` have the same meaning as for :func:"
+"`pywebio.platform.aiohttp.start_server`"
+msgstr ""
+"关于 ``applications`` 、 ``allowed_origins`` 、 ``check_origin`` 参数的详细说明"
+"见 :func:`pywebio.platform.aiohttp.start_server` 的同名参数。"
+
+#: of pywebio.platform.aiohttp.webio_handler
+msgid "Returns"
+msgstr ""
+
+#: of pywebio.platform.aiohttp.webio_handler:13
+msgid "aiohttp Request Handler"
+msgstr ""
+
+#: of pywebio.platform.aiohttp.start_server:1
+msgid ""
+"Start a aiohttp server to provide the PyWebIO application as a web service."
+msgstr "启动一个 aiohttp server 将PyWebIO应用作为Web服务提供。"
+
+#: of pywebio.platform.aiohttp.start_server:8
+msgid "aiohttp debug mode."
+msgstr "是否开启asyncio的Debug模式"
+
+#: of pywebio.platform.aiohttp.start_server:16
+msgid ""
+"The  parameters passed to the constructor of ``aiohttp.web.WebSocketResponse``. "
+"For details, please refer: https://docs.aiohttp.org/en/stable/web_reference."
+"html#websocketresponse"
+msgstr ""
+"创建 aiohttp WebSocketResponse 时使用的参数。见 https://docs.aiohttp.org/en/"
+"stable/web_reference.html#websocketresponse"
+
+#: of pywebio.platform.aiohttp.start_server:18
+msgid ""
+"Additional keyword arguments passed to the constructor of ``aiohttp.web."
+"Application``. For details, please refer: https://docs.aiohttp.org/en/stable/"
+"web_reference.html#application"
+msgstr ""
+"需要传给 aiohttp Application 的参数。可用参数见 https://docs.aiohttp.org/en/"
+"stable/web_reference.html#application"
+
+#: of pywebio.platform:26
+msgid "Other"
+msgstr "其他"
+
+#: of pywebio.platform.seo:1
+msgid ""
+"Set the SEO information of the PyWebIO application (web page information "
+"provided when indexed by search engines)"
+msgstr "设置PyWebIO应用的SEO信息(在被搜索引擎索引时提供的网页信息)"
+
+#: of pywebio.platform.seo:3
+msgid "Application title"
+msgstr "应用标题"
+
+#: of pywebio.platform.seo:4
+msgid "Application description"
+msgstr "应用简介"
+
+#: of pywebio.platform.seo:5
+msgid "PyWebIO task function"
+msgstr "PyWebIO任务函数"
+
+#: of pywebio.platform.seo:7
+msgid ""
+"If not ``seo()`` is not used, the `docstring <https://www.python.org/dev/peps/"
+"pep-0257/>`_ of the task function will be regarded as SEO information by "
+"default."
+msgstr "除了使用 ``seo()`` 函数,PyWebIO默认会将任务函数的函数注释作为SEO信息::"
+
+#: of pywebio.platform.seo:9
+msgid "``seo()`` can be used in 2 ways: direct call and decorator::"
+msgstr "可以通过装饰器或直接调用的方式使用 ``seo()`` ::"
+
+#: of pywebio.platform.seo:11
+msgid ""
+"@seo(\"title\", \"description\")\n"
+"def foo():\n"
+"    pass\n"
+"\n"
+"def bar():\n"
+"    pass\n"
+"\n"
+"def hello():\n"
+"    \"\"\"Application title\n"
+"\n"
+"    Application description...\n"
+"    (A empty line is used to separate the description and title)\n"
+"    \"\"\"\n"
+"\n"
+"start_server([\n"
+"    foo,\n"
+"    hello,\n"
+"    seo(\"title\", \"description\", bar),\n"
+"])"
+msgstr ""
+"@seo(\"title\", \"description\")\n"
+"def foo():\n"
+"    pass\n"
+"\n"
+"def bar():\n"
+"    pass\n"
+"\n"
+"def hello():\n"
+"    \"\"\"应用标题\n"
+"\n"
+"    应用简介… \n"
+"    (应用简介和标题之间使用一个空行分隔)\n"
+"    \"\"\"\n"
+"\n"
+"start_server([\n"
+"    foo,\n"
+"    hello,\n"
+"    seo(\"title\", \"description\", bar),\n"
+"])"
+
+#: of pywebio.platform.run_event_loop:1
+msgid "run asyncio event loop"
+msgstr "运行 asyncio 事件循环"
+
+#: of pywebio.platform.run_event_loop:3
+msgid ""
+"See also: :ref:`Integration coroutine-based session with Web framework "
+"<coroutine_web_integration>`"
+msgstr ""
+
+#: of pywebio.platform.run_event_loop:5
+msgid ""
+"Set the debug mode of the event loop. See also: https://docs.python.org/3/"
+"library/asyncio-dev.html#asyncio-debug-mode"
+msgstr ""

+ 435 - 0
docs/locales/zh_CN/LC_MESSAGES/releases.po

@@ -0,0 +1,435 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+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"
+"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
+msgid "Release notes"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:2
+msgid "What's new in PyWebIO 0.2"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:5
+msgid "2020 4/30"
+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
+msgid "Highlights"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:10
+msgid "支持与Django、aiohttp Web框架整合"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:11
+msgid "支持使用 plotly、pyecharts 等第三方库进行数据可视化"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:12
+msgid "与Web框架整合时支持同时使用基于线程和协程的会话实现"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:13
+msgid ""
+"添加 `defer_call() <pywebio.session.defer_call>` 、 `hold() <pywebio.session."
+"hold>` 会话控制函数"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:14
+msgid ""
+"添加 `put_image() <pywebio.output.put_image>` 输出图像、 `remove(anchor)  "
+"<pywebio.output.remove>` 移除内容"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:15
+msgid "加入动画提升UI体验"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:16
+msgid "添加测试用例,构建CI工作流"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:19 ../../releases/v0.3.0.rst:16
+#: ../../releases/v1.0.0.rst:29
+msgid "Detailed changes by module"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:22 ../../releases/v0.3.0.rst:19
+msgid "UI"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:24
+msgid "添加元素显示动画"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:25
+msgid "页面底部添加footer"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:28
+msgid "`pywebio.input`"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:30
+msgid ""
+"`input_group() <pywebio.input.input_group>` 添加 ``cancelable`` 参数来允许用户"
+"取消输入"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:31
+msgid ""
+"`actions() <pywebio.input.actions>` 函数 ``button`` 参数支持 ``reset`` 和 "
+"``cancel`` 按钮类型"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:34 ../../releases/v0.3.0.rst:25
+msgid "`pywebio.output`"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:36
+msgid ""
+"输出函数使用 ``anchor`` 参数指定输出锚点时,若锚点已经存在,则将锚点处的内容替"
+"换为当前内容。"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:37
+msgid "`clear_range() <pywebio.output.clear_range>` 添加添加锚点存在检查"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:38
+msgid ""
+"`scroll_to(anchor, position) <pywebio.output.scroll_to>` 添加 ``position`` 参数"
+"精细化控制滚动位置"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:41
+msgid "`pywebio.platform`"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:43
+msgid "`start_server` 和 `webio_view` 、 `webio_handle` 添加跨域支持"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:46
+msgid "`pywebio.session`"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:48
+msgid ""
+"Session 关闭时,清理更彻底:任何还在进行的PyWebIO调用都会抛出 "
+"``SessionClosedException`` 异常"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:49
+msgid "fix: Session 对象构造函数无法识别 ``functools.partial`` 处理的任务函数"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:2
+msgid "What's new in PyWebIO 0.3"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:5
+msgid "2020 5/13"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:10
+msgid "支持输出 bokeh 数据可视化图表, :ref:`文档 <visualization>`"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:11
+msgid ""
+"添加 :func:`session.get_info() <pywebio.session.get_info>` 获取会话相关信息"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:12
+msgid "前端js代码迁移typescript"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:13
+msgid ""
+"`output.put_table() <pywebio.output.put_table>` 支持跨行/列单元格, 单元格内容"
+"支持使用 ``put_xxx`` 类输出函数"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:21
+msgid "当与服务器连接断开时,点击前端的交互式按钮会报错提示。"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:27
+msgid "锚点名字支持使用空格"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:28
+msgid "弃用 `table_cell_buttons() <pywebio.output.table_cell_buttons>`"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:2
+msgid "What's new in PyWebIO 1.0"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:5
+msgid "2021 1/17"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:7
+msgid ""
+"经过快一年的开发,PyWebIO 1.0 终于完成了。与上一版本 v0.3 相比有非常多的变化:"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:11
+msgid ""
+"``start_server`` 对多任务函数的支持,PyWebIO应用可以包含多个任务函数,并提供了 "
+"`go_app() <pywebio.session.go_app>` 用于任务函数之间的跳转"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:12
+msgid "不再使用基于锚点的输出控制模型,改用基于Scope的模型"
+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>` )"
+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>`"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:17
+msgid ""
+"添加 `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>`"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:19
+msgid ""
+"更新UI: 显示输入时,使用浮动式输入框;发生未捕获异常时,前端使用console日志记录"
+"异常"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:22 ../../releases/v1.1.0.rst:18
+msgid "Backwards-incompatible changes"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:23
+msgid "不再使用基于锚点的输出控制模型"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:24
+msgid "不支持固定高度的输出区,移除 `pywebio.output.set_output_fixed_height()`"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:25
+msgid ""
+"移除 `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()` 替代"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:30
+msgid "`input() <pywebio.input.input>` 支持 ``action`` 参数动态设置输入项的值"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:31
+msgid ""
+"`file_upload() <pywebio.input.file_upload>` 支持多文件上传,支持限制上传文件大"
+"小,添加上传进度显示"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:32
+msgid "`put_buttons() <pywebio.output.put_buttons>` 支持指定按钮颜色"
+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,"
+"而是作为纯文本"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:34
+msgid "`put_text() <pywebio.output.put_text>` 支持输出多个对象"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:35
+msgid "`put_image() <pywebio.output.put_image>` 支持使用Url指定图片"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:2
+msgid "What's new in PyWebIO 1.1"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:5
+msgid "2021 2/7"
+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."
+msgstr ""
+"距离写下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."
+msgstr ""
+"添加安全性支持: `put_html() <pywebio.output.put_html>`, `put_markdown() "
+"<pywebio.output.put_markdown>` 中支持使用 ``sanitize`` 参数开启防 XSS 攻击"
+
+#: ../../releases/v1.1.0.rst:12
+msgid "UI internationalization support"
+msgstr "UI国际化支持"
+
+#: ../../releases/v1.1.0.rst:13
+msgid ""
+"SEO support: Set SEO info through `pywebio.platform.seo()` or function "
+"docstring"
+msgstr "添加SEO支持: 通过任务函数的注释或 `pywebio.platform.seo()` 来设置SEO信息"
+
+#: ../../releases/v1.1.0.rst:14
+msgid "CDN support, more convenient to web framework integration"
+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"
+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` 参数"
+
+#: ../../releases/v1.1.0.rst:20
+msgid "Deprecated `pywebio.session.data()`, use `pywebio.session.local` instead"
+msgstr ""
+"废弃 `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>`"
+msgstr ""
+"整合到Web框架的应用,访问地址发生变化,参见 :ref:`Web框架整合文档 "
+"<integration_web_framework>`"
+
+#: ../../releases/v1.1.0.rst:22
+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` 替代"
+
+#: ../../releases/v1.1.0.rst:25
+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` 参数限制最大显示行数"
+
+#: ../../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` 参数"
+"设定自动滚动到底部"
+
+#: ../../releases/v1.1.0.rst:28
+msgid ""
+"`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>`"
+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>` 中的参数添加转义"
+
+#: ../../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()`` "
+"方法接受字符串作为输出内容"
+
+#: ../../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>`"
+msgstr ""
+"修复: `file_upload() <pywebio.input.file_upload>` 的 `max_size` and "
+"`max_total_size` 参数解析错误"
+
+#: ../../releases/v1.1.0.rst:32
+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)"
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:4
+msgid ""
+"`output()  <pywebio.output.output>` 的 ``reset()``, ``append()``, ``insert()`` "
+"方法接受任意类型作为输出内容"
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:5
+msgid "SEO优化:对于爬虫UA,总是返回静态的应用索引页面"
+msgstr ""

+ 131 - 0
docs/locales/zh_CN/LC_MESSAGES/releases/v0.2.0.po

@@ -0,0 +1,131 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PyWebIO 1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-09 19:41+0800\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\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"
+
+#: ../../releases/v0.2.0.rst:2
+msgid "What's new in PyWebIO 0.2"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:5
+msgid "2020 4/30"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:8
+msgid "Highlights"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:10
+msgid "支持与Django、aiohttp Web框架整合"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:11
+msgid "支持使用 plotly、pyecharts 等第三方库进行数据可视化"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:12
+msgid "与Web框架整合时支持同时使用基于线程和协程的会话实现"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:13
+msgid ""
+"添加 `defer_call() <pywebio.session.defer_call>` 、 `hold() "
+"<pywebio.session.hold>` 会话控制函数"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:14
+msgid ""
+"添加 `put_image() <pywebio.output.put_image>` 输出图像、 `remove(anchor)  "
+"<pywebio.output.remove>` 移除内容"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:15
+msgid "加入动画提升UI体验"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:16
+msgid "添加测试用例,构建CI工作流"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:19
+msgid "Detailed changes by module"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:22
+msgid "UI"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:24
+msgid "添加元素显示动画"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:25
+msgid "页面底部添加footer"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:28
+msgid "`pywebio.input`"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:30
+msgid "`input_group() <pywebio.input.input_group>` 添加 ``cancelable`` 参数来允许用户取消输入"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:31
+msgid ""
+"`actions() <pywebio.input.actions>` 函数 ``button`` 参数支持 ``reset`` 和 "
+"``cancel`` 按钮类型"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:34
+msgid "`pywebio.output`"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:36
+msgid "输出函数使用 ``anchor`` 参数指定输出锚点时,若锚点已经存在,则将锚点处的内容替换为当前内容。"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:37
+msgid "`clear_range() <pywebio.output.clear_range>` 添加添加锚点存在检查"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:38
+msgid ""
+"`scroll_to(anchor, position) <pywebio.output.scroll_to>` 添加 ``position`` "
+"参数精细化控制滚动位置"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:41
+msgid "`pywebio.platform`"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:43
+msgid "`start_server` 和 `webio_view` 、 `webio_handle` 添加跨域支持"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:46
+msgid "`pywebio.session`"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:48
+msgid "Session 关闭时,清理更彻底:任何还在进行的PyWebIO调用都会抛出 ``SessionClosedException`` 异常"
+msgstr ""
+
+#: ../../releases/v0.2.0.rst:49
+msgid "fix: Session 对象构造函数无法识别 ``functools.partial`` 处理的任务函数"
+msgstr ""
+

+ 73 - 0
docs/locales/zh_CN/LC_MESSAGES/releases/v0.3.0.po

@@ -0,0 +1,73 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PyWebIO 1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-09 19:41+0800\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\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"
+
+#: ../../releases/v0.3.0.rst:2
+msgid "What's new in PyWebIO 0.3"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:5
+msgid "2020 5/13"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:8
+msgid "Highlights"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:10
+msgid "支持输出 bokeh 数据可视化图表, :ref:`文档 <visualization>`"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:11
+msgid "添加 :func:`session.get_info() <pywebio.session.get_info>` 获取会话相关信息"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:12
+msgid "前端js代码迁移typescript"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:13
+msgid ""
+"`output.put_table() <pywebio.output.put_table>` 支持跨行/列单元格, 单元格内容支持使用 "
+"``put_xxx`` 类输出函数"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:16
+msgid "Detailed changes by module"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:19
+msgid "UI"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:21
+msgid "当与服务器连接断开时,点击前端的交互式按钮会报错提示。"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:25
+msgid "`pywebio.output`"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:27
+msgid "锚点名字支持使用空格"
+msgstr ""
+
+#: ../../releases/v0.3.0.rst:28
+msgid "弃用 `table_cell_buttons() <pywebio.output.table_cell_buttons>`"
+msgstr ""
+

+ 135 - 0
docs/locales/zh_CN/LC_MESSAGES/releases/v1.0.0.po

@@ -0,0 +1,135 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PyWebIO 1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-09 19:41+0800\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\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"
+
+#: ../../releases/v1.0.0.rst:2
+msgid "What's new in PyWebIO 1.0"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:5
+msgid "2021 1/17"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:7
+msgid "经过快一年的开发,PyWebIO 1.0 终于完成了。与上一版本 v0.3 相比有非常多的变化:"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:10
+msgid "Highlights"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:11
+msgid ""
+"``start_server`` 对多任务函数的支持,PyWebIO应用可以包含多个任务函数,并提供了 `go_app() "
+"<pywebio.session.go_app>` 用于任务函数之间的跳转"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:12
+msgid "不再使用基于锚点的输出控制模型,改用基于Scope的模型"
+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>` )"
+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>`"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:17
+msgid ""
+"添加 `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>`"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:19
+msgid "更新UI: 显示输入时,使用浮动式输入框;发生未捕获异常时,前端使用console日志记录异常"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:22
+msgid "Backwards-incompatible changes"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:23
+msgid "不再使用基于锚点的输出控制模型"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:24
+msgid "不支持固定高度的输出区,移除 `pywebio.output.set_output_fixed_height()`"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:25
+msgid ""
+"移除 `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()` 替代"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:29
+msgid "Detailed changes by module"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:30
+msgid "`input() <pywebio.input.input>` 支持 ``action`` 参数动态设置输入项的值"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:31
+msgid "`file_upload() <pywebio.input.file_upload>` 支持多文件上传,支持限制上传文件大小,添加上传进度显示"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:32
+msgid "`put_buttons() <pywebio.output.put_buttons>` 支持指定按钮颜色"
+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,而是作为纯文本"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:34
+msgid "`put_text() <pywebio.output.put_text>` 支持输出多个对象"
+msgstr ""
+
+#: ../../releases/v1.0.0.rst:35
+msgid "`put_image() <pywebio.output.put_image>` 支持使用Url指定图片"
+msgstr ""
+

+ 137 - 0
docs/locales/zh_CN/LC_MESSAGES/releases/v1.1.0.po

@@ -0,0 +1,137 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PyWebIO 1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-09 19:41+0800\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\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"
+
+#: ../../releases/v1.1.0.rst:2
+msgid "What's new in PyWebIO 1.1"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:5
+msgid "2021 2/7"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:7
+msgid ""
+"距离写下PyWebIO的第一行代码过去已经整整一年了🎂 ,2020年发生了太多的事情,但对我来说又多了一份特殊的意义。新的一年继续努力💪 "
+",将PyWebIO做得越来越好。"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:10
+msgid "Highlights"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:11
+msgid ""
+"添加安全性支持: `put_html() <pywebio.output.put_html>`, `put_markdown() "
+"<pywebio.output.put_markdown>` 中支持使用 ``sanitize`` 参数开启防 XSS 攻击"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:12
+msgid "UI国际化支持"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:13
+msgid "添加SEO支持: 通过任务函数的注释或 `pywebio.platform.seo()` 来设置SEO信息"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:14
+msgid "CDN支持,Web框架整合更加方便,仅需引入一条路由即可"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:15
+msgid "应用访问速度提升,不再使用探测请求的方式确定通信协议"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:18
+msgid "Backwards-incompatible changes"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:19
+msgid "移除使用 django 和 flask 框架 `start_server()` 中的 `disable_asyncio` 参数"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:20
+msgid "废弃 `pywebio.session.data()` ,使用 `pywebio.session.local` 作为会话本地状态存储对象"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:21
+msgid "整合到Web框架的应用,访问地址发生变化,参见 :ref:`Web框架整合文档 <integration_web_framework>`"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:22
+msgid ""
+"`put_scrollable() <pywebio.output.put_scrollable>` 废弃 `max_height` 参数,使用 "
+"`height` 替代"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:25
+msgid "Detailed changes"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:26
+msgid "`put_code() <pywebio.output.put_code>` 支持使用 `rows` 参数限制最大显示行数"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:27
+msgid ""
+"`put_scrollable() <pywebio.output.put_scrollable>` 支持使用 `keep_bottom` "
+"参数设定自动滚动到底部"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:28
+msgid "`put_markdown() <pywebio.output.put_markdown>` 支持配置Markdown解析参数"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:29
+msgid ""
+"为 `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>` 中的参数添加转义"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:30
+msgid ""
+"`output()  <pywebio.output.output>` 的 ``reset()``, ``append()``, "
+"``insert()`` 方法接受字符串作为输出内容"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:31
+msgid ""
+"修复: `file_upload() <pywebio.input.file_upload>` 的 `max_size` and "
+"`max_total_size` 参数解析错误"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:32
+msgid "修复: py3.6自动打开浏览器失败"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:36
+msgid "Update in v1.1.1 (2021 2/7)"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:37
+msgid ""
+"`output()  <pywebio.output.output>` 的 ``reset()``, ``append()``, "
+"``insert()`` 方法接受任意类型作为输出内容"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:38
+msgid "SEO优化:对于爬虫UA,总是返回静态的应用索引页面"
+msgstr ""
+

+ 671 - 0
docs/locales/zh_CN/LC_MESSAGES/session.po

@@ -0,0 +1,671 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PyWebIO 1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-18 11:52+0800\n"
+"PO-Revision-Date: 2021-02-18 11: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"
+"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"
+msgstr "``pywebio.session`` — 会话相关"
+
+#: of pywebio.session.run_async:1
+msgid ""
+"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>` 的会话上下文中"
+"调用"
+
+#: of pywebio.session.download pywebio.session.eval_js pywebio.session.go_app
+#: pywebio.session.register_thread pywebio.session.run_async
+#: pywebio.session.run_asyncio_coroutine pywebio.session.run_js
+msgid "Parameters"
+msgstr ""
+
+#: of pywebio.session.run_async:5
+msgid "Coroutine object"
+msgstr "协程对象"
+
+#: of pywebio.session.eval_js pywebio.session.get_info pywebio.session.run_async
+msgid "Returns"
+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."
+msgstr ""
+"`TaskHandle <pywebio.session.coroutinebased.TaskHandle>` 实例。 通过 TaskHandle "
+"可以查询协程运行状态和关闭协程。"
+
+#: of pywebio.session.run_async:8
+msgid ""
+"See also: :ref:`Concurrency in coroutine-based sessions "
+"<coroutine_based_concurrency>`"
+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."
+msgstr ""
+"若会话线程和运行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>`."
+msgstr "仅能在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中调用。"
+
+#: of pywebio.session.run_asyncio_coroutine:5
+msgid "Coroutine object in `asyncio`"
+msgstr "`asyncio` 库中的协程对象"
+
+#: of pywebio.session.run_asyncio_coroutine:7 pywebio.session.run_js:8
+#: pywebio.session.set_env:10
+msgid "Example::"
+msgstr ""
+
+#: of pywebio.session.run_asyncio_coroutine:9
+msgid ""
+"async def app():\n"
+"    put_text('hello')\n"
+"    await run_asyncio_coroutine(asyncio.sleep(1))\n"
+"    put_text('world')\n"
+"\n"
+"pywebio.platform.flask.start_server(app)"
+msgstr ""
+
+#: of pywebio.session.download:1
+msgid ""
+"Send file to user, and the user browser will download the file to the local"
+msgstr "向用户推送文件,用户浏览器会将文件下载到本地"
+
+#: of pywebio.session.download:3
+msgid "File name when downloading"
+msgstr "下载保存为的文件名"
+
+#: of pywebio.session.download:4
+msgid "File content. It is a bytes-like object"
+msgstr "文件内容. 类型为 bytes-like object"
+
+#: of pywebio.session.download:6 pywebio.session.eval_js:9
+#: pywebio.session.get_info:40
+msgid "Example:"
+msgstr ""
+
+#: of pywebio.session.download:8
+msgid ""
+"put_buttons(['Click to download'], [lambda: download('hello-world.txt', b'hello "
+"world!')])"
+msgstr ""
+
+#: of pywebio.session.run_js:1
+msgid "Execute JavaScript code in user browser."
+msgstr "在用户浏览器中运行JavaScript代码."
+
+#: of pywebio.session.run_js:3
+msgid "The code is run in the browser's JS global scope."
+msgstr "代码运行在浏览器的JS全局作用域中"
+
+#: of pywebio.session.run_js:5
+msgid "JavaScript code"
+msgstr "js代码"
+
+#: of pywebio.session.eval_js:4 pywebio.session.run_js:6
+msgid "Local variables passed to js code. Variables need to be JSON-serializable."
+msgstr "传递给js代码的局部变量。变量值需要可以被json序列化"
+
+#: of pywebio.session.run_js:10
+msgid "run_js('console.log(a + b)', a=1, b=2)"
+msgstr ""
+
+#: of pywebio.session.eval_js:1
+msgid ""
+"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."
+msgstr "js表达式. 表达式的值需要能JSON序列化"
+
+#: of pywebio.session.eval_js:5
+msgid "The value of the expression."
+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."
+msgstr ""
+"注意⚠️:在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中,需要使用 "
+"``await eval_js(expression)`` 语法来进行调用。"
+
+#: of pywebio.session.eval_js:11
+msgid ""
+"current_url = eval_js(\"window.location.href\")\n"
+"put_text(current_url)  # ..demo-only\n"
+"\n"
+"## ----\n"
+"function_res = eval_js('''(function(){\n"
+"    var a = 1;\n"
+"    a += b;\n"
+"    return a;\n"
+"})()''', b=100)\n"
+"put_text(function_res)  # ..demo-only"
+msgstr ""
+
+#: of pywebio.session.register_thread:1
+msgid ""
+"Register the thread so that PyWebIO interactive functions are available in the "
+"thread."
+msgstr "注册线程,以便在线程内调用 PyWebIO 交互函数。"
+
+#: of pywebio.session.register_thread:3
+msgid "Can only be used in the thread-based session."
+msgstr "仅能在默认的基于线程的会话上下文中调用。"
+
+#: of pywebio.session.register_thread:5
+msgid "See :ref:`Concurrent in Server mode <thread_in_server_mode>`"
+msgstr "参见 :ref:`Server模式下并发与会话的结束 <thread_in_server_mode>`"
+
+#: of pywebio.session.register_thread:7
+msgid "Thread object"
+msgstr "线程对象"
+
+#: of pywebio.session.defer_call:1
+msgid "Set the function to be called when the session closes."
+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."
+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."
+msgstr "在会话中可以多次调用 `defer_call()` ,会话结束后将会顺序执行设置的函数。"
+
+#: of pywebio.session.defer_call:7
+msgid "``defer_call()`` can also be used as decorator::"
+msgstr "`defer_call` 同样支持以装饰器的方式使用::"
+
+#: of pywebio.session.defer_call:9
+msgid ""
+"@defer_call\n"
+"def cleanup():\n"
+"   pass"
+msgstr ""
+
+#: of pywebio.session.defer_call:13
+msgid ""
+"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."
+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."
+msgstr ""
+"在PyWebIO会话结束后,页面和服务端的连接便会断开,\n"
+"页面上需要和服务端通信才可实现的功能(比如:下载通过 `put_file() <pywebio.output."
+"put_file>` 输出的文件,\n"
+"`put_buttons() <pywebio.output.put_buttons>` 按钮回调)便无法使用。\n"
+"可以在任务函数末尾处调用 ``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."
+msgstr ""
+"注意⚠️:在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中,需要使用 "
+"``await hold()`` 语法来进行调用。"
+
+#: of pywebio.session:12
+msgid "The session-local object for current session."
+msgstr "当前会话的数据对象(session-local object)。"
+
+#: of pywebio.session:14
+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."
+msgstr ""
+"``local`` 是一个可以通过属性访问的字典,访问不存在的属性时会返回 ``None`` 而不是"
+"抛出异常。``local`` 不支持字典的方法,支持使用 ``in`` 操作符来判断键是否存在,可"
+"以使用 ``local._dict`` 获取底层的字典表示。"
+
+#: of pywebio.session
+msgid "Usage Scenes"
+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对象保存状态会比通"
+"过函数参数传递更方便。"
+
+#: of pywebio.session:22
+msgid "Here is a example of a session independent counter implementation::"
+msgstr "以下是一个会话独立的计数器的实现示例::"
+
+#: of pywebio.session:24
+msgid ""
+"from pywebio.session import local\n"
+"def add():\n"
+"    local.cnt = (local.cnt or 0) + 1\n"
+"\n"
+"def show():\n"
+"    put_text(local.cnt or 0)\n"
+"\n"
+"def main():\n"
+"    put_buttons(['Add counter', 'Show counter'], [add, show])\n"
+"    hold()"
+msgstr ""
+
+#: of pywebio.session:35
+msgid "The way to pass state through function parameters is::"
+msgstr "而通过函数参数传递状态的实现方式为::"
+
+#: of pywebio.session:37
+msgid ""
+"from functools import partial\n"
+"def add(cnt):\n"
+"    cnt[0] += 1\n"
+"\n"
+"def show(cnt):\n"
+"    put_text(cnt[0])\n"
+"\n"
+"def main():\n"
+"    cnt = [0]  # Trick: to pass by reference\n"
+"    put_buttons(['Add counter', 'Show counter'], [partial(add, cnt), "
+"partial(show, cnt)])\n"
+"    hold()"
+msgstr ""
+
+#: of pywebio.session:49
+msgid "Of course, you can also use function closures to achieved the same::"
+msgstr "当然,还可以通过函数闭包来实现相同的功能::"
+
+#: of pywebio.session:51
+msgid ""
+"def main():\n"
+"    cnt = 0\n"
+"\n"
+"    def add():\n"
+"        nonlocal cnt\n"
+"        cnt += 1\n"
+"\n"
+"    def show():\n"
+"        put_text(cnt)\n"
+"\n"
+"    put_buttons(['Add counter', 'Show counter'], [add, show])\n"
+"    hold()"
+msgstr ""
+
+#: of pywebio.session
+msgid "``local`` usage"
+msgstr "local 支持的操作"
+
+#: of pywebio.session:68
+msgid ""
+"local.name = \"Wang\"\n"
+"local.age = 22\n"
+"assert local.foo is None\n"
+"local[10] = \"10\"\n"
+"\n"
+"for key in local:\n"
+"    print(key)\n"
+"\n"
+"assert 'bar' not in local\n"
+"assert 'name' in local\n"
+"\n"
+"print(local._dict)"
+msgstr ""
+
+#: of pywebio.session.data:1
+msgid "Get the session-local object of current session."
+msgstr "获取当前会话的数据对象(session-local object)。"
+
+#: of pywebio.session.data:4
+msgid "Use `local <pywebio.session.local>` instead."
+msgstr ""
+
+#: of pywebio.session.set_env:1
+msgid "Config the environment of current session."
+msgstr "当前会话的环境设置"
+
+#: of pywebio.session.set_env:3
+msgid "Available configuration are:"
+msgstr "可配置项有:"
+
+#: of pywebio.session.set_env:5
+msgid "``title`` (str): Title of current page."
+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): 是否启用输出动画(在输出内容时,使用过渡动画),默"
+"认启用"
+
+#: 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."
+msgstr ""
+"``auto_scroll_bottom`` (bool): 是否在内容输出时将页面自动滚动到底部,默认关闭。"
+"注意,开启后,只有输出到ROOT Scope才可以触发自动滚动。"
+
+#: of pywebio.session.set_env:8
+msgid ""
+"``http_pull_interval`` (int): The period of HTTP polling messages (in "
+"milliseconds, default 1000ms), only available in sessions based on HTTP "
+"connection."
+msgstr ""
+"``http_pull_interval`` (int): HTTP轮询后端消息的周期(单位为毫秒,默认1000ms),"
+"仅在基于HTTP连接的会话(使用Flask或Django后端)中可用"
+
+#: of pywebio.session.set_env:12
+msgid "set_env(title='Awesome PyWebIO!!', output_animation=False)"
+msgstr ""
+
+#: of pywebio.session.go_app:1
+msgid ""
+"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
+msgid "Target PyWebIO task name."
+msgstr "目标 PyWebIO 任务名"
+
+#: of pywebio.session.go_app:4
+msgid "Whether to open in a new window, the default is `True`"
+msgstr "是否在新窗口打开,默认为 `True`"
+
+#: of pywebio.session.go_app:6
+msgid "See also: :ref:`Server mode <server_and_script_mode>`"
+msgstr "参见: :ref:`Server 模式 <server_and_script_mode>`"
+
+#: of pywebio.session.get_info:1
+msgid "Get information about the current session"
+msgstr "获取当前会话的相关信息"
+
+#: of pywebio.session.get_info:3
+msgid ""
+"Object of session information, whose attributes are:  * ``user_agent`` : The "
+"Object of the user browser information, whose attributes are       * "
+"``is_mobile`` (bool): whether user agent is identified as a mobile phone "
+"(iPhone, Android phones, Blackberry, Windows Phone devices etc)      * "
+"``is_tablet`` (bool): whether user agent is identified as a tablet device "
+"(iPad, Kindle Fire, Nexus 7 etc)      * ``is_pc`` (bool): whether user agent is "
+"identified to be running a traditional \"desktop\" OS (Windows, OS X, "
+"Linux)      * ``is_touch_capable`` (bool): whether user agent has touch "
+"capabilities       * ``browser.family`` (str): Browser family. such as 'Mobile "
+"Safari'      * ``browser.version`` (tuple): Browser version. such as (5, "
+"1)      * ``browser.version_string`` (str): Browser version string. such as "
+"'5.1'       * ``os.family`` (str): User OS family. such as 'iOS'      * ``os."
+"version`` (tuple): User OS version. such as (5, 1)      * ``os.version_string`` "
+"(str): User OS version string. such as '5.1'       * ``device.family`` (str): "
+"User agent's device family. such as 'iPhone'      * ``device.brand`` (str): "
+"Device brand. such as 'Apple'      * ``device.model`` (str): Device model. such "
+"as 'iPhone'  * ``user_language`` (str): Language used by the user's operating "
+"system. (e.g., ``'zh-CN'``) * ``server_host`` (str): PyWebIO server host, "
+"including domain and port, the port can be omitted when 80. * ``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``). * ``user_ip`` (str): "
+"User's ip address. * ``backend`` (str): The current PyWebIO backend server "
+"implementation. The possible values are ``'tornado'``, ``'flask'``, "
+"``'django'`` , ``'aiohttp'``. * ``request`` (object): The request object when "
+"creating the current session. Depending on the backend server, the type of "
+"``request`` can be:       * When using Tornado, ``request`` is instance "
+"of        `tornado.httputil.HTTPServerRequest <https://www.tornadoweb.org/en/"
+"stable/httputil.html#tornado.httputil.HTTPServerRequest>`_      * When using "
+"Flask, ``request`` is instance of `flask.Request <https://flask.palletsprojects."
+"com/en/1.1.x/api/#incoming-request-data>`_      * 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 "
+"aiohttp, ``request`` is instance of `aiohttp.web.BaseRequest <https://docs."
+"aiohttp.org/en/stable/web_reference.html#aiohttp.web.BaseRequest>`_"
+msgstr ""
+
+#: of pywebio.session.get_info:3
+msgid "Object of session information, whose attributes are:"
+msgstr "表示会话信息的对象,属性有:"
+
+#: of pywebio.session.get_info:5
+msgid ""
+"``user_agent`` : The Object of the user browser information, whose attributes "
+"are"
+msgstr "``user_agent`` : 表示用户浏览器信息的对象,属性有"
+
+#: of pywebio.session.get_info:7
+msgid ""
+"``is_mobile`` (bool): whether user agent is identified as a mobile phone "
+"(iPhone, Android phones, Blackberry, Windows Phone devices etc)"
+msgstr ""
+"``is_mobile`` (bool): 用户使用的设备是否为手机 (比如 iPhone, Android phones, "
+"Blackberry, Windows Phone 等设备)"
+
+#: of pywebio.session.get_info:8
+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 "
+"等设备)"
+
+#: of pywebio.session.get_info:9
+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 的"
+"设备)"
+
+#: of pywebio.session.get_info:10
+msgid "``is_touch_capable`` (bool): whether user agent has touch capabilities"
+msgstr "``is_touch_capable`` (bool): 用户使用的设备是否支持触控"
+
+#: of pywebio.session.get_info:12
+msgid "``browser.family`` (str): Browser family. such as 'Mobile Safari'"
+msgstr "``browser.family`` (str): 浏览器家族. 比如 'Mobile Safari'"
+
+#: of pywebio.session.get_info:13
+msgid "``browser.version`` (tuple): Browser version. such as (5, 1)"
+msgstr "``browser.version`` (tuple): 浏览器版本元组. 比如 (5, 1)"
+
+#: of pywebio.session.get_info:14
+msgid "``browser.version_string`` (str): Browser version string. such as '5.1'"
+msgstr "``browser.version_string`` (str): 浏览器版本字符串. 比如  '5.1'"
+
+#: of pywebio.session.get_info:16
+msgid "``os.family`` (str): User OS family. such as 'iOS'"
+msgstr "``os.family`` (str): 操作系统家族. 比如 'iOS'"
+
+#: of pywebio.session.get_info:17
+msgid "``os.version`` (tuple): User OS version. such as (5, 1)"
+msgstr "``os.version`` (tuple): 操作系统版本元组. 比如 (5, 1)"
+
+#: of pywebio.session.get_info:18
+msgid "``os.version_string`` (str): User OS version string. such as '5.1'"
+msgstr "``os.version_string`` (str): 操作系统版本字符串. 比如 '5.1'"
+
+#: of pywebio.session.get_info:20
+msgid "``device.family`` (str): User agent's device family. such as 'iPhone'"
+msgstr "``device.family`` (str): 设备家族. 比如 'iPhone'"
+
+#: of pywebio.session.get_info:21
+msgid "``device.brand`` (str): Device brand. such as 'Apple'"
+msgstr "``device.brand`` (str): 设备品牌. 比如 'Apple'"
+
+#: of pywebio.session.get_info:22
+msgid "``device.model`` (str): Device model. such as 'iPhone'"
+msgstr "``device.model`` (str): 设备型号. 比如 'iPhone'"
+
+#: of pywebio.session.get_info:24
+msgid ""
+"``user_language`` (str): Language used by the user's operating system. (e.g., "
+"``'zh-CN'``)"
+msgstr "``user_language`` (str): 用户操作系统使用的语言. 比如 ``’zh-CN’``"
+
+#: of pywebio.session.get_info:25
+msgid ""
+"``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.get_info:26
+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``)."
+msgstr ""
+"``origin`` (str): 当前用户的页面地址. 包含 协议、主机、端口 部分. 比如 "
+"``’http://localhost:8080'`` .\n"
+"可能为空,但保证当用户的页面地址不在当前服务器下(即 主机、端口部分和 "
+"``server_host`` 不一致)时有值."
+
+#: of pywebio.session.get_info:28
+msgid "``user_ip`` (str): User's ip address."
+msgstr "用户的ip地址."
+
+#: of pywebio.session.get_info:29
+msgid ""
+"``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.get_info:30
+msgid ""
+"``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.get_info:32
+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>`_ 实例"
+
+#: of pywebio.session.get_info:34
+msgid ""
+"When using Flask, ``request`` is instance of `flask.Request <https://flask."
+"palletsprojects.com/en/1.1.x/api/#incoming-request-data>`_"
+msgstr ""
+"使用Flask后端时, ``request`` 为 `flask.Request <https://flask.palletsprojects."
+"com/en/1.1.x/api/#incoming-request-data>`_ 实例"
+
+#: of pywebio.session.get_info:35
+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.get_info:36
+msgid ""
+"When using aiohttp, ``request`` is instance of `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>`_ 实例"
+
+#: of pywebio.session.get_info:38
+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"
+msgstr ""
+"会话信息对象的 ``user_agent`` 属性是通过 user-agents 库进行解析生成的。参见 "
+"https://github.com/selwin/python-user-agents#usage"
+
+#: of pywebio.session.get_info:42
+msgid ""
+"import json\n"
+"\n"
+"info = get_info()\n"
+"put_code(json.dumps({\n"
+"    k: str(v)\n"
+"    for k,v in info.items()\n"
+"}, indent=4), 'json')"
+msgstr ""
+
+#: of pywebio.session.coroutinebased.TaskHandle:1
+msgid "协程任务句柄"
+msgstr ""
+
+#: of pywebio.session.coroutinebased.TaskHandle:3
+msgid "See also: `run_async() <pywebio.session.run_async>`"
+msgstr ""
+
+#: of pywebio.session.coroutinebased.TaskHandle.close:1
+msgid "关闭协程任务"
+msgstr ""
+
+#: of pywebio.session.coroutinebased.TaskHandle.closed:1
+msgid "返回任务是否关闭"
+msgstr ""

+ 928 - 0
docs/locales/zh_CN/LC_MESSAGES/spec.po

@@ -0,0 +1,928 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) WangWeimin
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PyWebIO 1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-18 11:52+0800\n"
+"PO-Revision-Date: 2021-02-18 10:50+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"
+
+#: ../../spec.rst:2
+msgid "Server-Client communication protocol"
+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服务端与客户端通信的协议。"
+
+#: ../../spec.rst:6
+msgid ""
+"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."
+msgstr ""
+"使用 Tornado或aiohttp 后端时,服务器与客户端通过 WebSocket 通信,使用 Flask或Django "
+"后端时,服务器与客户端通过 Http 通信。"
+
+#: ../../spec.rst:10
+msgid "**WebSocket communication**"
+msgstr "**WebSocket 通信:**"
+
+#: ../../spec.rst:12
+msgid ""
+"The server and the client send json-serialized message through WebSocket "
+"connection"
+msgstr "服务器与客户端通过WebSocket连接发送json序列化之后的PyWebIO消息"
+
+#: ../../spec.rst:14
+msgid "**Http communication**"
+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消息列表"
+
+#: ../../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"
+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"
+
+#: ../../spec.rst:22
+msgid "The following describes the format of command and event"
+msgstr "以下介绍command和event的格式"
+
+#: ../../spec.rst:25
+msgid "Command"
+msgstr ""
+
+#: ../../spec.rst:27
+msgid ""
+"Command is sent by the server to the client. The basic format of command "
+"is::"
+msgstr "command由服务器->客户端,基本格式为::"
+
+#: ../../spec.rst:29
+msgid ""
+"{\n"
+"    \"command\": \"\"\n"
+"    \"task_id\": \"\"\n"
+"    \"spec\": {}\n"
+"}"
+msgstr ""
+
+#: ../../spec.rst:35
+msgid "Each fields are described as follows:"
+msgstr "各字段含义如下:"
+
+#: ../../spec.rst:37
+msgid "``command`` : command name"
+msgstr "``command`` 字段表示指令名"
+
+#: ../../spec.rst:39
+msgid "``task_id`` : Id of the task that send the command"
+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"
+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 的对应函数的参数大部分含义一致,但是也有些许不同。"
+
+#: ../../spec.rst:46
+msgid "The following describes the ``spec`` fields of different commands:"
+msgstr "以下分别对不同指令的 ``spec`` 字段进行说明:"
+
+#: ../../spec.rst:49
+msgid "input_group"
+msgstr ""
+
+#: ../../spec.rst:50
+msgid "Show a form in user's browser."
+msgstr "显示一个输入表单"
+
+#: ../../spec.rst:52
+msgid "fields of ``spec``"
+msgstr "``spec`` 可用字段"
+
+#: ../../spec.rst:55
+msgid "Field"
+msgstr "字段"
+
+#: ../../spec.rst:56
+msgid "Required"
+msgstr "是否必选"
+
+#: ../../spec.rst:57
+msgid "Type"
+msgstr "类型"
+
+#: ../../spec.rst:58
+msgid "Description"
+msgstr "字段说明"
+
+#: ../../spec.rst:60
+msgid "label"
+msgstr ""
+
+#: ../../spec.rst:61 ../../spec.rst:71
+msgid "False"
+msgstr ""
+
+#: ../../spec.rst:62
+msgid "str"
+msgstr ""
+
+#: ../../spec.rst:63
+msgid "Title of the form"
+msgstr "表单标题"
+
+#: ../../spec.rst:65
+msgid "inputs"
+msgstr ""
+
+#: ../../spec.rst:66
+msgid "True"
+msgstr ""
+
+#: ../../spec.rst:67
+msgid "list"
+msgstr ""
+
+#: ../../spec.rst:68
+msgid "Input items"
+msgstr "输入项"
+
+#: ../../spec.rst:70
+msgid "cancelable"
+msgstr ""
+
+#: ../../spec.rst:72
+msgid "bool"
+msgstr ""
+
+#: ../../spec.rst
+msgid "Whether the form can be cancelled。"
+msgstr "表单是否可以取消"
+
+#: ../../spec.rst
+msgid ""
+"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."
+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:"
+msgstr "``inputs`` 字段为输入项组成的列表,每一输入项为一个 ``dict``,字段如下:"
+
+#: ../../spec.rst:79
+msgid "label: Label of input field, required."
+msgstr "label: 输入标签名。必选"
+
+#: ../../spec.rst:80
+msgid "type: Input type, required."
+msgstr "type: 输入类型。必选"
+
+#: ../../spec.rst:81
+msgid "name: Identifier of the input field, required."
+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"
+msgstr "auto_focus: 自动获取输入焦点. 输入项列表中最多只能由一项的auto_focus为真"
+
+#: ../../spec.rst:83
+msgid "help_text: Help text for the input"
+msgstr "help_text: 帮助文字"
+
+#: ../../spec.rst:84
+msgid "Additional HTML attribute of the input element"
+msgstr "输入项HTML元素额外的HTML属性"
+
+#: ../../spec.rst:85
+msgid "Other attributes of different input types"
+msgstr "* 不同输入类型的特有属性"
+
+#: ../../spec.rst:87
+msgid "Currently supported ``type`` are:"
+msgstr "输入类型目前有:"
+
+#: ../../spec.rst:89
+msgid "text: Plain text input"
+msgstr "text: 文本输入"
+
+#: ../../spec.rst:90
+msgid "number: Number input"
+msgstr "number: 数字输入"
+
+#: ../../spec.rst:91
+msgid "password: Password input"
+msgstr "password: 密码输入"
+
+#: ../../spec.rst:92
+msgid "checkbox: Checkbox"
+msgstr "checkbox: 多选项"
+
+#: ../../spec.rst:93
+msgid "radio: Radio"
+msgstr "radio: 单选项"
+
+#: ../../spec.rst:94
+msgid "select: Drop-down selection"
+msgstr "select: 下拉选择框(可单选/多选)"
+
+#: ../../spec.rst:95
+msgid "textarea: Multi-line text input"
+msgstr "textarea: 大段文本输入"
+
+#: ../../spec.rst:96
+msgid "file: File uploading"
+msgstr "file: 文件上传"
+
+#: ../../spec.rst:97
+msgid "actions: Actions selection."
+msgstr ""
+
+#: ../../spec.rst:99
+msgid "Correspondence between different input types and html input elements:"
+msgstr "输入类型与html输入元素的对应关系:"
+
+#: ../../spec.rst:101
+msgid "text: input[type=text]"
+msgstr ""
+
+#: ../../spec.rst:102
+msgid "number: input[type=number]"
+msgstr ""
+
+#: ../../spec.rst:103
+msgid "password: input[type=password]"
+msgstr ""
+
+#: ../../spec.rst:104
+msgid "checkbox: input[type=checkbox]"
+msgstr ""
+
+#: ../../spec.rst:105
+msgid "radio: input[type=radio]"
+msgstr ""
+
+#: ../../spec.rst:106
+msgid ""
+"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"
+msgstr ""
+
+#: ../../spec.rst:108
+msgid "file: input[type=file]"
+msgstr ""
+
+#: ../../spec.rst:109
+msgid ""
+"actions: button[type=submit] https://developer.mozilla.org/zh-"
+"CN/docs/Web/HTML/Element/button"
+msgstr ""
+
+#: ../../spec.rst:111
+msgid "Unique attributes of different input types:"
+msgstr ""
+
+#: ../../spec.rst:113
+msgid ""
+"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}``"
+msgstr ""
+
+#: ../../spec.rst:117
+msgid "textarea:"
+msgstr ""
+
+#: ../../spec.rst:119
+msgid ""
+"code: Codemirror options, same as ``code`` parameter of "
+":func:`pywebio.input.textarea`"
+msgstr "code: Codemirror 参数, 见 :func:`pywebio.input.textarea` 的 ``code`` 参数"
+
+#: ../../spec.rst:121
+msgid "select:"
+msgstr ""
+
+#: ../../spec.rst:123 ../../spec.rst:127 ../../spec.rst:132
+msgid "options: ``{label:, value: , [selected:,] [disabled:]}``"
+msgstr ""
+
+#: ../../spec.rst:125
+msgid "checkbox:"
+msgstr ""
+
+#: ../../spec.rst:128 ../../spec.rst:133
+msgid "inline"
+msgstr ""
+
+#: ../../spec.rst:130
+msgid "radio:"
+msgstr ""
+
+#: ../../spec.rst:135
+msgid "actions"
+msgstr ""
+
+#: ../../spec.rst:137
+msgid ""
+"buttons: ``{label:, value:, [type: 'submit'/'reset'/'cancel'], "
+"[disabled:]}`` ."
+msgstr ""
+
+#: ../../spec.rst:140
+msgid "file:"
+msgstr ""
+
+#: ../../spec.rst:142
+msgid "multiple: Whether to allow upload multiple files."
+msgstr "是否允许多文件上传"
+
+#: ../../spec.rst:143
+msgid "max_size: The maximum size of a single file, in bytes."
+msgstr "单个文件的最大大小(字节),超过限制将会禁止上传"
+
+#: ../../spec.rst:144
+msgid "max_total_size: The maximum size of all files, in bytes."
+msgstr "所有文件的最大大小(字节),超过限制将会禁止上传"
+
+#: ../../spec.rst:147
+msgid "update_input"
+msgstr ""
+
+#: ../../spec.rst:149
+msgid ""
+"Update the input item, you can update the ``spec`` of the input item of "
+"the currently displayed form"
+msgstr "更新输入项,用于对当前显示表单中输入项的 ``spec`` 进行更新"
+
+#: ../../spec.rst:151
+msgid "The ``spec`` fields of ``update_input`` commands:"
+msgstr "命令 ``spec`` 可用字段:"
+
+#: ../../spec.rst:153
+msgid "target_name: str The name of the target input item."
+msgstr ""
+
+#: ../../spec.rst:154
+msgid ""
+"target_value: str, optional. Used to filter options in checkbox, radio, "
+"actions type"
+msgstr ""
+
+#: ../../spec.rst:155
+msgid "attributes: dist, fields need to be updated"
+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"
+msgstr ""
+
+#: ../../spec.rst:158
+msgid "value: Set the value of the item"
+msgstr ""
+
+#: ../../spec.rst:159
+msgid "placeholder"
+msgstr ""
+
+#: ../../spec.rst:160
+msgid "invalid_feedback"
+msgstr ""
+
+#: ../../spec.rst:161
+msgid "valid_feedback"
+msgstr ""
+
+#: ../../spec.rst:162
+msgid "other fields of item's ``spec`` // not support to inline and label fields"
+msgstr ""
+
+#: ../../spec.rst:166
+msgid "close_session"
+msgstr ""
+
+#: ../../spec.rst:167
+msgid ""
+"Indicates that the server has closed the connection. ``spec`` of the "
+"command is empty."
+msgstr "指示服务器端已经关闭连接。 ``spec`` 为空"
+
+#: ../../spec.rst:171
+msgid "destroy_form"
+msgstr ""
+
+#: ../../spec.rst:172
+msgid "Destroy the current form. ``spec`` of the command is empty."
+msgstr ""
+
+#: ../../spec.rst:174
+msgid ""
+"Note: The form will not be automatically destroyed after it is submitted,"
+" it needs to be explicitly destroyed using this command"
+msgstr "表单在页面上提交之后不会自动销毁,需要使用此命令显式销毁"
+
+#: ../../spec.rst:177
+msgid "output"
+msgstr ""
+
+#: ../../spec.rst:178
+msgid "Output content"
+msgstr ""
+
+#: ../../spec.rst:180
+msgid "The ``spec`` fields of ``output`` commands:"
+msgstr ""
+
+#: ../../spec.rst:182
+msgid "type: content type"
+msgstr ""
+
+#: ../../spec.rst:183
+msgid "style: str, Additional css style"
+msgstr ""
+
+#: ../../spec.rst:184
+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:185
+msgid "position: int, see :ref:`scope - User manual <scope_param>`"
+msgstr "int, 在输出域中输出的位置, 见 :ref:`输出函数的scope相关参数 <scope_param>`"
+
+#: ../../spec.rst:186
+msgid "Other attributes of different types"
+msgstr "不同type时的特有字段"
+
+#: ../../spec.rst:188
+msgid "Unique attributes of different types:"
+msgstr "``type`` 的可选值及特有字段:"
+
+#: ../../spec.rst:190
+msgid "type: markdown"
+msgstr ""
+
+#: ../../spec.rst:192 ../../spec.rst:198 ../../spec.rst:203
+msgid "content: str"
+msgstr ""
+
+#: ../../spec.rst:193
+msgid "options: dict, `marked.js <https://github.com/markedjs/marked>`_ options"
+msgstr ""
+
+#: ../../spec.rst:194 ../../spec.rst:199
+msgid "sanitize: bool, Whether to enable a XSS sanitizer for HTML"
+msgstr ""
+"sanitize: bool, 是否使用 `DOMPurify <https://github.com/cure53/DOMPurify>`_ "
+"对内容进行过滤来防止XSS攻击。"
+
+#: ../../spec.rst:196
+msgid "type: html"
+msgstr ""
+
+#: ../../spec.rst:201
+msgid "type: text"
+msgstr ""
+
+#: ../../spec.rst:204
+msgid ""
+"inline: bool, Use text as an inline element (no line break at the end of "
+"the text)"
+msgstr ""
+
+#: ../../spec.rst:206
+msgid "type: buttons"
+msgstr ""
+
+#: ../../spec.rst:208
+msgid "callback_id:"
+msgstr ""
+
+#: ../../spec.rst:209
+msgid "buttons:[ {value:, label:, [color:]},...]"
+msgstr ""
+
+#: ../../spec.rst:210
+msgid "small: bool, Whether to enable small button"
+msgstr "small: bool,是否显示为小按钮样式"
+
+#: ../../spec.rst:211
+msgid "link: bool, Whether to make button seem as link."
+msgstr "link: bool,是否显示为链接样式"
+
+#: ../../spec.rst:213
+msgid "type: file"
+msgstr ""
+
+#: ../../spec.rst:215
+msgid "name: File name when downloading"
+msgstr "name: 下载保存为的文件名"
+
+#: ../../spec.rst:216
+msgid "content: File content with base64 encoded"
+msgstr "content: 文件base64编码的内容"
+
+#: ../../spec.rst:218
+msgid "type: table"
+msgstr ""
+
+#: ../../spec.rst:220
+msgid ""
+"data: Table data, which is a two-dimensional list, the first row is table"
+" header."
+msgstr ""
+
+#: ../../spec.rst:221
+msgid ""
+"span: cell span info. Format: {\"[row id],[col id]\": {\"row\":row span, "
+"\"col\":col span }}"
+msgstr ""
+
+#: ../../spec.rst:224
+msgid "popup"
+msgstr ""
+
+#: ../../spec.rst:225
+msgid "Show popup"
+msgstr ""
+
+#: ../../spec.rst:227 ../../spec.rst:240
+msgid "The ``spec`` fields of ``popup`` commands:"
+msgstr ""
+
+#: ../../spec.rst:229
+msgid "title"
+msgstr ""
+
+#: ../../spec.rst:230 ../../spec.rst:242
+msgid "content"
+msgstr ""
+
+#: ../../spec.rst:231
+msgid "size: ``large``, ``normal``, ``small``"
+msgstr ""
+
+#: ../../spec.rst:232
+msgid "implicit_close"
+msgstr ""
+
+#: ../../spec.rst:233
+msgid "closable"
+msgstr ""
+
+#: ../../spec.rst:234
+msgid "dom_id: DOM id of popup container element"
+msgstr ""
+
+#: ../../spec.rst:237
+msgid "toast"
+msgstr ""
+
+#: ../../spec.rst:238
+msgid "Show a notification message"
+msgstr ""
+
+#: ../../spec.rst:243
+msgid "duration"
+msgstr ""
+
+#: ../../spec.rst:244
+msgid "position: `'left'` / `'center'` / `'right'`"
+msgstr ""
+
+#: ../../spec.rst:245
+msgid "color: hexadecimal color value starting with '#'"
+msgstr ""
+
+#: ../../spec.rst:246
+msgid "callback_id"
+msgstr ""
+
+#: ../../spec.rst:250
+msgid "close_popup"
+msgstr ""
+
+#: ../../spec.rst:251
+msgid "Close the current popup window."
+msgstr ""
+
+#: ../../spec.rst:253
+msgid "``spec`` of the command is empty."
+msgstr ""
+
+#: ../../spec.rst:256
+msgid "set_env"
+msgstr ""
+
+#: ../../spec.rst:257
+msgid "Config the environment of current session."
+msgstr ""
+
+#: ../../spec.rst:259
+msgid "The ``spec`` fields of ``set_env`` commands:"
+msgstr ""
+
+#: ../../spec.rst:261
+msgid "title (str)"
+msgstr ""
+
+#: ../../spec.rst:262
+msgid "output_animation (bool)"
+msgstr ""
+
+#: ../../spec.rst:263
+msgid "auto_scroll_bottom (bool)"
+msgstr ""
+
+#: ../../spec.rst:264
+msgid "http_pull_interval (int)"
+msgstr ""
+
+#: ../../spec.rst:267
+msgid "output_ctl"
+msgstr ""
+
+#: ../../spec.rst:268
+msgid "Output control"
+msgstr ""
+
+#: ../../spec.rst:270
+msgid "The ``spec`` fields of ``output_ctl`` commands:"
+msgstr ""
+
+#: ../../spec.rst:272
+msgid "set_scope: scope name"
+msgstr ""
+
+#: ../../spec.rst:274
+msgid "container: Specify css selector to the parent scope of target scope."
+msgstr "container: 新创建的scope的父scope的css选择器"
+
+#: ../../spec.rst:275
+msgid "position: int, The index where this scope is created in the parent scope."
+msgstr "position: int, 在父scope中创建此scope的位置."
+
+#: ../../spec.rst:276
+msgid "if_exist: What to do when the specified scope already exists:"
+msgstr "scope已经存在时如何操作:"
+
+#: ../../spec.rst:278
+msgid "null: Do nothing"
+msgstr "null/不指定: 表示立即返回不进行任何操作"
+
+#: ../../spec.rst:279
+msgid "`'remove'`: Remove the old scope first and then create a new one"
+msgstr "`’remove’` : 先移除旧scope再创建新scope"
+
+#: ../../spec.rst:280
+msgid ""
+"`'clear'`: Just clear the contents of the old scope, but don’t create a "
+"new scope"
+msgstr "`’clear’` : 将旧scope的内容清除,不创建新scope"
+
+#: ../../spec.rst:282
+msgid "clear: css selector of the scope need to clear"
+msgstr "clear: 需要清空的scope的css选择器"
+
+#: ../../spec.rst:283
+msgid "clear_before"
+msgstr ""
+
+#: ../../spec.rst:284
+msgid "clear_after"
+msgstr ""
+
+#: ../../spec.rst:285
+msgid "clear_range:[,]"
+msgstr ""
+
+#: ../../spec.rst:286
+msgid "scroll_to"
+msgstr ""
+
+#: ../../spec.rst:287
+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位于屏幕可视区域顶部/中部/底部"
+
+#: ../../spec.rst:288
+msgid "remove: Remove the specified scope"
+msgstr "remove: 将给定的scope连同scope处的内容移除"
+
+#: ../../spec.rst:291
+msgid "run_script"
+msgstr ""
+
+#: ../../spec.rst:292
+msgid "run javascript code in user's browser"
+msgstr ""
+
+#: ../../spec.rst:294
+msgid "The ``spec`` fields of ``run_script`` commands:"
+msgstr ""
+
+#: ../../spec.rst:296
+msgid "code: str, code"
+msgstr "code: 字符串格式的要运行的js代码"
+
+#: ../../spec.rst:297
+msgid "args: dict, Local variables passed to js code"
+msgstr "args: 传递给代码的局部变量。字典类型,字典键表示变量名,字典值表示变量值(变量值需要可以被json序列化)"
+
+#: ../../spec.rst:300
+msgid "download"
+msgstr ""
+
+#: ../../spec.rst:301
+msgid "Send file to user"
+msgstr ""
+
+#: ../../spec.rst:303
+msgid "The ``spec`` fields of ``download`` commands:"
+msgstr ""
+
+#: ../../spec.rst:305
+msgid "name: str, File name when downloading"
+msgstr ""
+
+#: ../../spec.rst:306
+msgid "content: str, File content in base64 encoding."
+msgstr ""
+
+#: ../../spec.rst:309
+msgid "Event"
+msgstr ""
+
+#: ../../spec.rst:311
+msgid "Event is sent by the client to the server. The basic format of event is::"
+msgstr "Event消息由客户端发往服务端。基本格式::"
+
+#: ../../spec.rst:313
+msgid ""
+"{\n"
+"    event: event name\n"
+"    task_id: \"\"\n"
+"    data: object/str\n"
+"}"
+msgstr ""
+
+#: ../../spec.rst:319
+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`` 字段如下:"
+
+#: ../../spec.rst:323
+msgid "input_event"
+msgstr ""
+
+#: ../../spec.rst:324
+msgid "Triggered when the form changes"
+msgstr "表单发生更改时触发"
+
+#: ../../spec.rst:326
+msgid ""
+"event_name: Current available value is ``'blur'``, which indicates that "
+"the input item loses focus"
+msgstr "event_name: 目前可用值 ``’blur’``,表示输入项失去焦点"
+
+#: ../../spec.rst:327
+msgid "name: name of input item"
+msgstr "name: 输入项name"
+
+#: ../../spec.rst:328
+msgid "value: value of input item"
+msgstr "value: 输入项值"
+
+#: ../../spec.rst:330
+msgid "note: checkbox and radio do not generate blur events"
+msgstr "注意: checkbox radio 不产生blur事件"
+
+#: ../../spec.rst:335
+msgid "callback"
+msgstr ""
+
+#: ../../spec.rst:336
+msgid "Triggered when the user clicks the button in the page"
+msgstr "用户点击显示区的按钮时触发"
+
+#: ../../spec.rst:338
+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"
+msgstr ""
+"在 ``callback`` 事件中,``task_id`` 为对应的 ``button`` 组件的 ``callback_id`` 字段;\n"
+"事件的 ``data`` 为被点击button的 ``value``"
+
+#: ../../spec.rst:342
+msgid "from_submit"
+msgstr ""
+
+#: ../../spec.rst:343
+msgid "Triggered when the user submits the form"
+msgstr "用户提交表单时触发"
+
+#: ../../spec.rst:345
+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."
+msgstr "事件 ``data`` 字段为表单 ``name`` -> 表单值 的字典"
+
+#: ../../spec.rst:348
+msgid "from_cancel"
+msgstr ""
+
+#: ../../spec.rst:349
+msgid "Cancel input form"
+msgstr "表单取消输入"
+
+#: ../../spec.rst:351
+msgid "The ``data`` of the event is ``None``"
+msgstr ""
+
+#: ../../spec.rst:354
+msgid "js_yield"
+msgstr ""
+
+#: ../../spec.rst:355
+msgid "submit data from js"
+msgstr "js代码提交数据"
+
+#: ../../spec.rst:357
+msgid "The ``data`` of the event is the data need to submit"
+msgstr "事件 ``data`` 字段为相应的数据"
+
+#~ msgid ""
+#~ "other fields of item's ``spec`` // "
+#~ "not support to inline adn label "
+#~ "fields"
+#~ msgstr ""
+