# Copyright (C) Weimin Wang
# This file is distributed under the same license as the PyWebIO package.
#
# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
# Pikhosh <pikhosh@gmail.com>, 2022.
msgid ""
msgstr ""
"Project-Id-Version: PyWebIO 1.5.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-02-26 16:35+0330\n"
"PO-Revision-Date: 2022-02-28 14:37+0330\n"
"Last-Translator: Pikhosh <pikhosh@gmail.com>\n"
"Language-Team: Persian <>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.9.1\n"
"Language: fa\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Lokalize 21.12.2\n"

#: of pywebio.pin:2
msgid "``pywebio.pin`` --- Persistent input"
msgstr "``pywebio.pin`` --- ورودی مداوم"

#: of pywebio.pin:4
msgid "*pin == Persistent input == Pinning input widget to the page*"
msgstr ""

#: of pywebio.pin:7
msgid "Overview"
msgstr "بررسی اجمالی"

#: of pywebio.pin:9
msgid ""
"As you already know, the input function of PyWebIO is blocking and the "
"input form will be destroyed after successful submission. In most cases, "
"it enough to use this way to get input. However in some cases, you may "
"want to make the input form **not** disappear after submission, and can "
"continue to receive input."
msgstr ""

#: of pywebio.pin:15
msgid ""
"So PyWebIO provides the ``pin`` module to achieve persistent input by "
"pinning input widgets to the page."
msgstr ""

#: of pywebio.pin:17
msgid "The ``pin`` module achieves persistent input in 3 parts:"
msgstr ""

#: of pywebio.pin:19
msgid ""
"First, this module provides some pin widgets. Pin widgets are not "
"different from output widgets in ``pywebio.output`` module, besides that "
"they can also receive input."
msgstr ""

#: of pywebio.pin:23
msgid "This code outputs an text input pin widget:"
msgstr ""

#: of pywebio.pin:25
msgid "put_input('input', label='This is a input widget')"
msgstr ""

#: of pywebio.pin:31
msgid ""
"In fact, the usage of pin widget function is same as the output function."
" You can use it as part of the combined output, or you can output pin "
"widget to a scope:"
msgstr ""

#: of pywebio.pin:34
msgid ""
"put_row([\n"
"    put_input('input'),\n"
"    put_select('select', options=['A', 'B', 'C'])\n"
"])\n"
"\n"
"with use_scope('search-area'):\n"
"    put_input('search', placeholder='Search')"
msgstr ""

#: of pywebio.pin:46
msgid "Then, you can use the `pin` object to get the value of pin widget:"
msgstr ""

#: of pywebio.pin:48
msgid ""
"put_input('pin_name')\n"
"put_buttons(['Get Pin Value'], lambda _: put_text(pin.pin_name))"
msgstr ""

#: of pywebio.pin:55
msgid ""
"The first parameter that the pin widget function receives is the name of "
"the pin widget. You can get the current value of the pin widget via the "
"attribute of the same name of the `pin` object."
msgstr ""

#: of pywebio.pin:58
msgid ""
"In addition, the `pin` object also supports getting the value of the pin "
"widget by index, that is to say::"
msgstr ""

#: of pywebio.pin:60
msgid "pin['pin_name'] == pin.pin_name"
msgstr ""

#: of pywebio.pin:62
msgid ""
"There are also two useful functions when you use the pin module: "
"`pin_wait_change()` and `pin_update()`."
msgstr ""

#: of pywebio.pin:64
msgid ""
"Since the pin widget functions is not blocking, `pin_wait_change()` is "
"used to wait for the value of one of a list of pin widget to change, it "
"'s a blocking function."
msgstr ""

#: of pywebio.pin:67
msgid "`pin_update()` can be used to update attributes of pin widgets."
msgstr ""

#: of pywebio.pin:70
msgid "Pin widgets"
msgstr "ویجت های Pin"

#: of pywebio.pin:71
msgid ""
"Each pin widget function corresponds to an input function of :doc:`input "
"<./input>` module. (For performance reasons, no pin widget for "
"`file_upload() <pywebio.input.file_upload>` input function)"
msgstr ""

#: of pywebio.pin:74
msgid ""
"The function of pin widget supports most of the parameters of the "
"corresponding input function. Here lists the difference between the two "
"in parameters:"
msgstr ""

#: of pywebio.pin:77
msgid ""
"The first parameter of pin widget function is always the name of the "
"widget, and if you output two pin widgets with the same name, the "
"previous one will expire."
msgstr ""

#: of pywebio.pin:79
msgid ""
"Pin functions don't support the ``on_change`` and ``validate`` callbacks,"
" and the ``required`` parameter."
msgstr ""

#: of pywebio.pin:80
msgid ""
"Pin functions have additional ``scope`` and ``position`` parameters for "
"output control."
msgstr ""

#: of pywebio.pin.put_input:1
msgid "Output an input widget. Refer to: `pywebio.input.input()`"
msgstr ""

#: of pywebio.pin.put_textarea:1
msgid "Output a textarea widget. Refer to: `pywebio.input.textarea()`"
msgstr ""

#: of pywebio.pin.put_select:1
msgid "Output a select widget. Refer to: `pywebio.input.select()`"
msgstr ""

#: of pywebio.pin.put_checkbox:1
msgid "Output a checkbox widget. Refer to: `pywebio.input.checkbox()`"
msgstr ""

#: of pywebio.pin.put_radio:1
msgid "Output a radio widget. Refer to: `pywebio.input.radio()`"
msgstr ""

#: of pywebio.pin.put_slider:1
msgid "Output a slide widget. Refer to: `pywebio.input.slider()`"
msgstr ""

#: of pywebio.pin.put_actions:1
msgid "Output a group of action button. Refer to: `pywebio.input.actions()`"
msgstr ""

#: of pywebio.pin.put_actions:3
msgid ""
"Unlike the ``actions()``, ``put_actions()`` won't submit any form, it "
"will only set the value of the pin widget. Only 'submit' type button is "
"available in pin widget version."
msgstr ""

#: of pywebio.pin:91
msgid "Pin utils"
msgstr ""

#: of pywebio.pin:94
msgid "Pin widgets value getter and setter."
msgstr ""

#: of pywebio.pin:96
msgid ""
"You can use attribute or key index of ``pin`` object to get the current "
"value of a pin widget. When accessing the value of a widget that does not"
" exist, it returns ``None`` instead of throwing an exception."
msgstr ""

#: of pywebio.pin:99
msgid "You can also use the ``pin`` object to set the value of pin widget:"
msgstr ""

#: of pywebio.pin:101
msgid ""
"import time  # ..demo-only\n"
"put_input('counter', type='number', value=0)\n"
"\n"
"while True:\n"
"    pin.counter = pin.counter + 1  # Equivalent to: pin['counter'] = "
"pin['counter'] + 1\n"
"    time.sleep(1)"
msgstr ""

#: of pywebio.pin:112
msgid ""
"Note: When using :ref:`coroutine-based session "
"<coroutine_based_session>`, you need to use the ``await pin.name`` (or "
"``await pin['name']``) syntax to get pin widget value."
msgstr ""

#: of pywebio.pin.pin_wait_change:1
msgid ""
"``pin_wait_change()`` listens to a list of pin widgets, when the value of"
" any widgets changes, the function returns with the name and value of the"
" changed widget."
msgstr ""

#: of pywebio.pin.pin_update pywebio.pin.pin_wait_change
msgid "Parameters"
msgstr "پارامتر ها"

#: of pywebio.pin.pin_wait_change:4
msgid "List of names of pin widget"
msgstr ""

#: of pywebio.pin.pin_wait_change:5
msgid ""
"If ``timeout`` is a positive number, ``pin_wait_change()`` blocks at most"
" ``timeout`` seconds and returns ``None`` if no changes to the widgets "
"within that time. Set to ``None`` (the default) to disable timeout."
msgstr ""

#: of pywebio.pin.pin_wait_change
msgid "return dict/None"
msgstr ""

#: of pywebio.pin.pin_wait_change:7
msgid ""
"``{\"name\": name of the changed widget, \"value\": current value of the "
"changed widget }`` , when a timeout occurs, return ``None``."
msgstr ""

#: of pywebio.pin.pin_wait_change:10
msgid "Example:"
msgstr "مثال:"

#: of pywebio.pin.pin_wait_change:12
#, python-format
msgid ""
"put_input('a', type='number', value=0)\n"
"put_input('b', type='number', value=0)\n"
"\n"
"while True:\n"
"    changed = pin_wait_change('a', 'b')\n"
"    with use_scope('res', clear=True):\n"
"        put_code(changed)\n"
"        put_text(\"a + b = %s\" % (pin.a + pin.b))"
msgstr ""

#: of pywebio.pin.pin_wait_change:25
msgid ""
":demo_host:`Here </markdown_previewer>` is an demo of using "
"`pin_wait_change()` to make a markdown previewer."
msgstr ""

#: of pywebio.pin.pin_wait_change:27
msgid ""
"Note that: updating value with the :data:`pin` object or `pin_update()` "
"does not trigger `pin_wait_change()` to return."
msgstr ""

#: of pywebio.pin.pin_wait_change:30
msgid ""
"When using :ref:`coroutine-based session <coroutine_based_session>`, you "
"need to use the ``await pin_wait_change()`` syntax to invoke this "
"function."
msgstr ""

#: of pywebio.pin.pin_update:1
msgid "Update attributes of pin widgets."
msgstr ""

#: of pywebio.pin.pin_update:3
msgid "The ``name`` of the target input widget."
msgstr ""

#: of pywebio.pin.pin_update:4
msgid ""
"The pin widget parameters need to be updated. Note that those parameters "
"can not be updated: ``type``, ``name``, ``code``, ``multiple``"
msgstr ""

