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