# 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-11-16 23:25+0800\n"
"PO-Revision-Date: 2021-11-16 23:26+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 3.0\n"

#: ../../input.rst:2
msgid "``pywebio.input`` --- Get input from web browser"
msgstr "``pywebio.input`` — 输入模块"

#: of pywebio.input:1
msgid "This module provides 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:24
msgid ""
"By default, the user can submit empty input 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:27
msgid ""
"The input functions in this module is blocking, and the input form will be destroyed after "
"successful submission. If you want the form to always be displayed on the page and receive "
"input continuously, you can consider the :doc:`pin <./pin>` module."
msgstr ""
"本模块中的输入函数都是阻塞式的，输入表单会在成功提交后销毁。如果你想让表单可以一直显示在页面上"
"并可以持续性接收输入，你可以考虑使用 :doc:`pin <./pin>` 模块。"

#: of pywebio.input:32
msgid "Functions list"
msgstr "函数清单"

#: of pywebio.input:36
msgid "Function name"
msgstr "函数"

#: of pywebio.input:37
msgid "Description"
msgstr "简介"

#: of pywebio.input:39
msgid "`input <pywebio.input.input>`"
msgstr ""

#: of pywebio.input:40 pywebio.input.input:1
msgid "Text input"
msgstr "文本输入"

#: of pywebio.input:42
msgid "`textarea <pywebio.input.textarea>`"
msgstr ""

#: of pywebio.input:43
msgid "Multi-line text input"
msgstr "多行文本输入"

#: of pywebio.input:45
msgid "`select <pywebio.input.select>`"
msgstr ""

#: of pywebio.input:46 pywebio.input.select:1
msgid "Drop-down selection"
msgstr "下拉选择框"

#: of pywebio.input:48
msgid "`checkbox <pywebio.input.checkbox>`"
msgstr ""

#: of pywebio.input:49
msgid "Checkbox"
msgstr "勾选选项"

#: of pywebio.input:51
msgid "`radio <pywebio.input.radio>`"
msgstr ""

#: of pywebio.input:52
msgid "Radio"
msgstr "单选选项"

#: of pywebio.input:54
msgid "`slider <pywebio.input.slider>`"
msgstr ""

#: of pywebio.input:55
msgid "Slider"
msgstr "滑块输入"

#: of pywebio.input:57
msgid "`actions <pywebio.input.actions>`"
msgstr ""

#: of pywebio.input:58 pywebio.input.actions:1
msgid "Actions selection"
msgstr "按钮选项"

#: of pywebio.input:60
msgid "`file_upload <pywebio.input.file_upload>`"
msgstr ""

#: of pywebio.input:61 pywebio.input.file_upload:1
msgid "File uploading"
msgstr "文件上传"

#: of pywebio.input:63
msgid "`input_group <pywebio.input.input_group>`"
msgstr ""

#: of pywebio.input:64
msgid "Input group"
msgstr "输入组"

#: of pywebio.input:66
msgid "`input_update <pywebio.input.input_update>`"
msgstr ""

#: of pywebio.input:67
msgid "Update input item"
msgstr "更新输入项"

#: of pywebio.input:71
msgid "Functions doc"
msgstr "函数文档"

#: of pywebio.input.actions pywebio.input.checkbox pywebio.input.file_upload pywebio.input.input
#: pywebio.input.input_group pywebio.input.input_update pywebio.input.radio pywebio.input.select
#: pywebio.input.slider 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:8
msgid ""
"Input value validation function. If provided, the validation function will be called when "
"user completes the input field 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:8
msgid ""
"Input value validation function. If provided, the validation function will be called when "
"user completes the input field or submits the form."
msgstr "输入值校验函数。 如果提供，当用户输入完毕或提交表单后校验函数将被调用。"

#: of pywebio.input.input:11
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:14
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:25
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:27
msgid "The initial value of the input"
msgstr "输入框的初始值"

#: of pywebio.input.input:29
msgid ""
"Put a button on the right side of the input field, and user 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:29
msgid ""
"Put a button on the right side of the input field, and user can click the button to set the "
"value for the input."
msgstr "在输入框右侧显示一个按钮，用户可通过点击按钮为输入框设置值。"

#: of pywebio.input.input:31
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:33
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:36
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:38
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:40
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:41
msgid "``label`` : The text displayed to the user"
msgstr "``label`` 参数用于显示在用户表单项上"

#: of pywebio.input.input:43
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:45
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:50
msgid "Usage example:"
msgstr "使用示例"

#: of pywebio.input.input:52
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:72
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:75
msgid ""
"A callback function which will be called when the value of this input field changed.  The "
"``onchange`` callback is invoked with one argument, the current value of input field. A "
"typical usage scenario of ``onchange`` is to update other input item by using `input_update()`"
msgstr ""

#: of pywebio.input.input:75
msgid "A callback function which will be called when the value of this input field changed."
msgstr "当输入项的值发生变化时的回调函数。"

#: of pywebio.input.input:77
msgid ""
"The ``onchange`` callback is invoked with one argument, the current value of input field. A "
"typical usage scenario of ``onchange`` is to update other input item by using `input_update()`"
msgstr ""
"``onchange`` 回调函数接收一个参数——输入项改变后的值。 ``onchange`` 的典型用途是配合 "
"`input_update()` 来在一个表单中实现相互依赖的输入。"

#: of pywebio.input.input:80
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:81
msgid "Whether a value is required for the input to be submittable, default is ``False``"
msgstr "当前输入是否为必填项，默认为 ``False``"

#: of pywebio.input.input:82
msgid "Whether the value is readonly(not editable)"
msgstr "输入框是否为只读"

#: of pywebio.input.input:83
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:84
msgid ""
"Help text for the input. The text will be displayed below the input field with small font"
msgstr "输入框的帮助文本。帮助文本会以小号字体显示在输入框下方"

#: of pywebio.input.input:85
#, 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:87
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:6
msgid ""
"The minimum number of characters (UTF-16 code units) required that the user should enter."
msgstr "最少需要用户输入的字符长度(Unicode)"

#: of pywebio.input.textarea:7
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. You can use ``Esc`` or ``F11`` "
"to toggle fullscreen of code style textarea.  Some commonly used Codemirror options are "
"listed :ref:`here <codemirror_options>`."
msgstr ""

#: of pywebio.input.textarea:7
msgid ""
"Enable a code style editor by providing the `Codemirror <https://codemirror.net/>`_ options:"
msgstr "通过提供 `Codemirror <https://codemirror.net/>`_ 参数让文本输入域具有代码编辑器样式:"

#: of pywebio.input.textarea:9
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:19
msgid ""
"You can simply use ``code={}`` or ``code=True`` to enable code style editor. You can use "
"``Esc`` or ``F11`` to toggle fullscreen of code style textarea."
msgstr ""
"可以直接使用 ``code={}`` 或 ``code=True``  开启代码编辑样式。代码编辑区支持使用 ``Esc`` 或 "
"``F11`` 切换全屏。"

#: of pywebio.input.textarea:22
msgid "Some commonly used Codemirror options are listed :ref:`here <codemirror_options>`."
msgstr ":ref:`这里 <codemirror_options>` 列举了一些常用的Codemirror选项"

#: of pywebio.input.actions:39 pywebio.input.checkbox:7 pywebio.input.file_upload:23
#: pywebio.input.radio:8 pywebio.input.select:29 pywebio.input.slider:8
#: pywebio.input.textarea:24
msgid "Those arguments have the same meaning as for `input()`"
msgstr "与 `input` 输入函数的同名参数含义一致"

#: of pywebio.input.textarea:26
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:8 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:6
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,          \"color\":(str, optional) button color       }     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   The ``color`` of button can be one of: `primary`, `secondary`, "
"`success`, `danger`, `warning`, `info`, `light`,  `dark`."
msgstr ""

#: of pywebio.input.actions:6
msgid "list of buttons. The available formats of the list items are:"
msgstr "按钮列表。列表项的可用形式有："

#: of pywebio.input.actions:10
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"
"   \"color\":(str, optional) button color\n"
"}"
msgstr ""
"{\n"
"   \"label\":(str) 按钮标签,\n"
"   \"value\":(object) 按钮值,\n"
"   \"type\":(str, optional) 按钮类型,\n"
"   \"disabled\":(bool, optional) 是否禁止选择,\n"
"   \"color\":(str, optional) 按钮颜色\n"
"\n"
"}"

#: of pywebio.input.actions:18
msgid "When ``type='reset'/'cancel'`` or ``disabled=True``, ``value`` can be omitted"
msgstr "若 ``type='reset'/'cancel'`` 或 ``disabled=True`` 可省略 ``value``"

#: of pywebio.input.actions:19
msgid "tuple or list: ``(label, value, [type], [disabled])``"
msgstr ""

#: of pywebio.input.actions:20
msgid "single value: label and value of button use the same value"
msgstr "单值: 此时label和value使用相同的值"

#: of pywebio.input.actions:22
msgid "The ``value`` of button can be any JSON serializable object."
msgstr "其中， ``value`` 可以为任意可JSON序列化的对象。"

#: of pywebio.input.actions:24
msgid "``type`` can be:"
msgstr "``type`` 可选值为:"

#: of pywebio.input.actions:26
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:29
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:31
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:36
msgid ""
"The ``color`` of button can be one of: `primary`, `secondary`, `success`, `danger`, "
"`warning`, `info`, `light`, `dark`."
msgstr ""
"按钮的 ``color`` 值可以为：  `primary`, `secondary`, `success`, `danger`, `warning`, `info`, "
"`light`, `dark` ."

#: of pywebio.input.actions:40
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:44
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:47
msgid "**usage scenes of actions() **"
msgstr "**actions() 的使用场景**"

#: of pywebio.input.actions:51
msgid "Perform simple selection operations:"
msgstr "实现简单的选择操作:"

#: of pywebio.input.actions:53
#, python-format
msgid ""
"confirm = actions('Confirm to delete file?', ['confirm', 'cancel'],\n"
"                      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:63
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:65
msgid "Replace the default submit button:"
msgstr "替换默认的提交按钮:"

#: of pywebio.input.actions:67
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', 'color': 'warning'},\n"
"        {'label': 'Cancel', 'type': 'cancel', 'color': 'danger'},\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:14
msgid "The maximum size of a single file, exceeding the limit will prohibit uploading."
msgstr "单个文件的最大大小，超过限制将会禁止上传。"

#: of pywebio.input.file_upload:14
msgid "The default is 0, which means there is no limit to the size."
msgstr "默认为0，表示不限制上传文件的大小。"

#: of pywebio.input.file_upload:16
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:20
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:22
msgid "Indicates whether the user must specify a file for the input. Default is ``False``."
msgstr "是否必须要上传文件。默认为 ``False``"

#: of pywebio.input.file_upload:24
msgid ""
"When ``multiple=False``, a dict is returned::   {      'filename': file name，      "
"'content'：content of the file (in bytes),      '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:24
msgid "When ``multiple=False``, a dict is returned::"
msgstr "``multiple=False`` 时(默认)，返回dict::"

#: of pywebio.input.file_upload:26
msgid ""
"{\n"
"    'filename': file name，\n"
"    'content'：content of the file (in bytes),\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:33
msgid "If there is no file uploaded, return ``None``."
msgstr "若用户没有上传文件，返回 ``None`` 。"

#: of pywebio.input.file_upload:35
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:40
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.tornado.start_server>` or :"
"func:`path_deploy() <pywebio.platform.path_deploy>` to start the PyWebIO application, the "
"maximum file size to be uploaded allowed by the web framework can be set through the "
"``max_payload_size`` parameter."
msgstr ""
"若上传大文件请留意Web框架的文件上传大小限制设置。在使用 :func:`start_server() <pywebio."
"platform.tornado.start_server>` 或 :func:`path_deploy() <pywebio.platform.path_deploy>` 启动"
"PyWebIO应用时，\n"
"可通过 `max_payload_size` 参数设置Web框架允许上传的最大文件大小"

#: of pywebio.input.file_upload:45
msgid ""
"# Upload a file and save to server                      # ..doc-only\n"
"f = input.file_upload(\"Upload a file\")                  # ..doc-only\n"
"open('asset/'+f['filename'], 'wb').write(f['content'])  # ..doc-only\n"
"\n"
"imgs = file_upload(\"Select some pictures:\", accept=\"image/*\", multiple=True)\n"
"for img in imgs:\n"
"    put_image(img['content'])"
msgstr ""

#: of pywebio.input.slider:1
msgid "Range input."
msgstr "滑块输入"

#: of pywebio.input.slider:3
msgid "The initial value of the slider."
msgstr "滑块的初始值"

#: of pywebio.input.slider:4
msgid "The minimum permitted value."
msgstr "滑块最小允许的值"

#: of pywebio.input.slider:5
msgid "The maximum permitted value."
msgstr "滑块最大允许的值"

#: of pywebio.input.slider:6
msgid ""
"The stepping interval. Only available when ``value``, ``min_value`` and ``max_value`` are all "
"integer."
msgstr "滑动的步长。仅当 ``value``、 ``min_value`` 和 ``max_value`` 全为int时有效"

#: of pywebio.input.slider
msgid "return int/float"
msgstr ""

#: of pywebio.input.slider:9
msgid ""
"If one of ``value``, ``min_value`` and ``max_value`` is float, the return value is a float, "
"otherwise an int is returned."
msgstr ""
"若 ``value``, ``min_value`` 和 ``max_value`` 中含有float类型，则返回值为float，否则返回值为int"
"类型"

#: 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:13
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:30
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:30
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`` 则会在表单底部显示一个“取消”按钮，默认为 ``False`` 。"

#: of pywebio.input.input_group:33
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:35
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`` 值，字典值为输"
"入项的值"

#: of pywebio.input.input_update:1
msgid ""
"Update attributes of input field. This function can only be called in ``onchange`` callback "
"of input functions."
msgstr "更新输入项的属性。本函数仅能在输入函数的 ``onchange``  回调中使用。"

#: of pywebio.input.input_update:4
msgid ""
"The ``name`` of the target input item. Optional, default is the name of input field which "
"triggers ``onchange``"
msgstr "目标输入项的  ``name`` 。可选，默认为当前触发 ``onchange`` 回调的输入项"

#: of pywebio.input.input_update:6
msgid ""
"The input parameters need to be updated. Note that those parameters can not be updated: "
"``type``, ``name``, ``validate``, ``action``, ``code``, ``onchange``, ``multiple``"
msgstr ""
"需要更新的输入项参数。注意一下参数无法被更新：``type``, ``name``, ``validate``, ``action``, "
"``code``, ``onchange``, ``multiple``"

#: of pywebio.input.input_update:10
msgid "An example of implementing dependent input items in an input group:"
msgstr "一个具有依赖关系的输入项的示例："

#: of pywebio.input.input_update:12
msgid ""
"country2city = {\n"
"    'China': ['Beijing', 'Shanghai', 'Hong Kong'],\n"
"    'USA': ['New York', 'Los Angeles', 'San Francisco'],\n"
"}\n"
"countries = list(country2city.keys())\n"
"location = input_group(\"Select a location\", [\n"
"    select('Country', options=countries, name='country',\n"
"           onchange=lambda c: input_update('city', options=country2city[c])),\n"
"    select('City', options=country2city[countries[0]], name='city'),\n"
"])\n"
"put_text(location)  # ..demo-only"
msgstr ""
