Browse Source

Add Persian language and translation of index section

And translations of some other texts
Pikhosh 3 years ago
parent
commit
4221137158
34 changed files with 10518 additions and 0 deletions
  1. BIN
      docs/locales/fa/LC_MESSAGES/FAQ.mo
  2. 71 0
      docs/locales/fa/LC_MESSAGES/FAQ.po
  3. BIN
      docs/locales/fa/LC_MESSAGES/advanced.mo
  4. 664 0
      docs/locales/fa/LC_MESSAGES/advanced.po
  5. BIN
      docs/locales/fa/LC_MESSAGES/arch.mo
  6. 493 0
      docs/locales/fa/LC_MESSAGES/arch.po
  7. BIN
      docs/locales/fa/LC_MESSAGES/cookbook.mo
  8. 455 0
      docs/locales/fa/LC_MESSAGES/cookbook.po
  9. BIN
      docs/locales/fa/LC_MESSAGES/exceptions.mo
  10. 43 0
      docs/locales/fa/LC_MESSAGES/exceptions.po
  11. BIN
      docs/locales/fa/LC_MESSAGES/guide.mo
  12. 1357 0
      docs/locales/fa/LC_MESSAGES/guide.po
  13. BIN
      docs/locales/fa/LC_MESSAGES/index.mo
  14. 260 0
      docs/locales/fa/LC_MESSAGES/index.po
  15. BIN
      docs/locales/fa/LC_MESSAGES/input.mo
  16. 1120 0
      docs/locales/fa/LC_MESSAGES/input.po
  17. BIN
      docs/locales/fa/LC_MESSAGES/libraries_support.mo
  18. 264 0
      docs/locales/fa/LC_MESSAGES/libraries_support.po
  19. BIN
      docs/locales/fa/LC_MESSAGES/misc.mo
  20. 122 0
      docs/locales/fa/LC_MESSAGES/misc.po
  21. BIN
      docs/locales/fa/LC_MESSAGES/outdate.mo
  22. 259 0
      docs/locales/fa/LC_MESSAGES/outdate.po
  23. BIN
      docs/locales/fa/LC_MESSAGES/output.mo
  24. 1791 0
      docs/locales/fa/LC_MESSAGES/output.po
  25. BIN
      docs/locales/fa/LC_MESSAGES/pin.mo
  26. 320 0
      docs/locales/fa/LC_MESSAGES/pin.po
  27. BIN
      docs/locales/fa/LC_MESSAGES/platform.mo
  28. 650 0
      docs/locales/fa/LC_MESSAGES/platform.po
  29. BIN
      docs/locales/fa/LC_MESSAGES/releases.mo
  30. 872 0
      docs/locales/fa/LC_MESSAGES/releases.po
  31. BIN
      docs/locales/fa/LC_MESSAGES/session.mo
  32. 659 0
      docs/locales/fa/LC_MESSAGES/session.po
  33. BIN
      docs/locales/fa/LC_MESSAGES/spec.mo
  34. 1118 0
      docs/locales/fa/LC_MESSAGES/spec.po

BIN
docs/locales/fa/LC_MESSAGES/FAQ.mo


+ 71 - 0
docs/locales/fa/LC_MESSAGES/FAQ.po

@@ -0,0 +1,71 @@
+# 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-26 20:27+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"
+
+#: ../../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 ""
+"You can consider the :doc:`pin <./pin>` module. It achieves persistent "
+"input by pinning input widgets to the page."
+msgstr ""
+"شما می توانید ماژول :doc:`pin <./pin>` را در نظر بگیرید. اون به ورودی "
+"مداوم با پین کردن ویجت های ورودی به صفحه دست پیدا می کند."
+
+#: ../../FAQ.rst:14
+msgid "How to output an input widget such as a search bar?"
+msgstr "چجوری یک ویجت ورودی رو به عنوان خروجی نشون بدم مثل یه نوار جست جو؟"
+
+#: ../../FAQ.rst:16
+msgid "You can consider the :doc:`pin <./pin>` module."
+msgstr "شما می توانید ماژول :doc:`pin <./pin>` را در نظر بگیرید."
+
+#: ../../FAQ.rst:20
+msgid "Why the callback of ``put_buttons()`` does not work?"
+msgstr "چرا فراخوانی ``put_buttons()`` کار نمی کنه؟"
+
+#: ../../FAQ.rst:22
+msgid ""
+"You might use the old version of PyWebIO, upgrade it to the latest "
+"version or see `the old document "
+"<https://pywebio.readthedocs.io/en/v1.3.3/FAQ.html>`_"
+msgstr ""
+"شما ممکن است از نسخه قدیمی PyWebIO استفاده کنید، به آخرین "
+"نسخه ارتقا اش دهید یا `the old document "
+"<https://pywebio.readthedocs.io/en/v1.3.3/FAQ.html>`_را ببینید"
+
+#: ../../FAQ.rst:25
+msgid "Why I cannot download the file using ``put_file()``?"
+msgstr "چرا من نمی تونم با استفاده از ``put_file()`` فایل رو دانلود کنم؟"
+
+#: ../../FAQ.rst:27
+msgid "The reason is the same as above."
+msgstr "دلیل مشابه بالاست."
+

BIN
docs/locales/fa/LC_MESSAGES/advanced.mo


+ 664 - 0
docs/locales/fa/LC_MESSAGES/advanced.po

@@ -0,0 +1,664 @@
+# 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 12:30+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"
+
+#: ../../advanced.rst:2
+msgid "Advanced topic"
+msgstr "موضوع پیشرفته"
+
+#: ../../advanced.rst:4
+msgid "This section will introduce the advanced features of PyWebIO."
+msgstr ""
+
+#: ../../advanced.rst:10
+msgid "Start multiple applications with start_server()"
+msgstr ""
+
+#: ../../advanced.rst:12
+msgid ""
+"`start_server() <pywebio.platform.tornado.start_server>` accepts a "
+"function as PyWebIO application. In addition, `start_server() "
+"<pywebio.platform.tornado.start_server>` also accepts a list of "
+"application function or a dictionary of it to start multiple "
+"applications. You can use `pywebio.session.go_app() "
+"<pywebio.session.go_app>` or `put_link() <pywebio.output.put_link>` to "
+"jump between application::"
+msgstr ""
+
+#: ../../advanced.rst:17
+msgid ""
+"def task_1():\n"
+"    put_text('task_1')\n"
+"    put_buttons(['Go task 2'], [lambda: go_app('task_2')])\n"
+"\n"
+"def task_2():\n"
+"    put_text('task_2')\n"
+"    put_buttons(['Go task 1'], [lambda: go_app('task_1')])\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"
+"# equal to `start_server({'index': index, 'task_1': task_1, 'task_2': "
+"task_2})`\n"
+"start_server([index, task_1, task_2])"
+msgstr ""
+
+#: ../../advanced.rst:32
+msgid ""
+"When the first parameter of `start_server() "
+"<pywebio.platform.tornado.start_server>` is a dictionary, whose key is "
+"application name and value is application function. When it is a list, "
+"PyWebIO will use function name as application name."
+msgstr ""
+
+#: ../../advanced.rst:35
+msgid ""
+"You can select which application to access through the ``app`` URL "
+"parameter (for example, visit ``http://host:port/?app=foo`` to access the"
+" ``foo`` application), By default, the ``index`` application is opened "
+"when no ``app`` URL parameter provided. When the ``index`` application "
+"doesn't exist, PyWebIO will provide a default index application."
+msgstr ""
+
+#: ../../advanced.rst:44
+msgid "Integration with web framework"
+msgstr ""
+
+#: ../../advanced.rst:46
+msgid ""
+"The PyWebIO application can be integrated into an existing Python Web "
+"project, the PyWebIO application and the Web project share a web "
+"framework. PyWebIO currently supports integration with Flask, Tornado, "
+"Django, aiohttp and FastAPI(Starlette) web frameworks."
+msgstr ""
+
+#: ../../advanced.rst:50
+msgid "The integration methods of those web frameworks are as follows:"
+msgstr ""
+
+#: ../../advanced.rst:54
+msgid "Tornado"
+msgstr ""
+
+#: ../../advanced.rst:58
+msgid "**Tornado**"
+msgstr ""
+
+#: ../../advanced.rst:60
+msgid ""
+"Use `pywebio.platform.tornado.webio_handler()` to get the "
+"`WebSocketHandler "
+"<https://www.tornadoweb.org/en/stable/websocket.html#tornado.websocket.WebSock"
+"etHandler>`_"
+" class for running PyWebIO applications in Tornado::"
+msgstr ""
+
+#: ../../advanced.rst:64
+msgid ""
+"import tornado.ioloop\n"
+"import tornado.web\n"
+"from pywebio.platform.tornado import webio_handler\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 ""
+
+#: ../../advanced.rst:81
+msgid ""
+"In above code, we add a routing rule to bind the ``WebSocketHandler`` of "
+"the PyWebIO application to the ``/tool`` path. After starting the Tornado"
+" server, you can visit ``http://localhost/tool`` to open the PyWebIO "
+"application."
+msgstr ""
+
+#: ../../advanced.rst:86
+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 ""
+
+#: ../../advanced.rst:90
+msgid "Flask"
+msgstr ""
+
+#: ../../advanced.rst:94
+msgid "**Flask**"
+msgstr ""
+
+#: ../../advanced.rst:96
+msgid ""
+"Use `pywebio.platform.flask.webio_view()` to get the view function for "
+"running PyWebIO applications in Flask::"
+msgstr ""
+
+#: ../../advanced.rst:98
+msgid ""
+"from pywebio.platform.flask import webio_view\n"
+"from flask import Flask\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 ""
+
+#: ../../advanced.rst:110
+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 Flask "
+"application, visit ``http://localhost/tool`` to open the PyWebIO "
+"application."
+msgstr ""
+
+#: ../../advanced.rst:113
+msgid "Django"
+msgstr ""
+
+#: ../../advanced.rst:117
+msgid "**Django**"
+msgstr ""
+
+#: ../../advanced.rst:119
+msgid ""
+"Use `pywebio.platform.django.webio_view()` to get the view function for "
+"running PyWebIO applications in Django::"
+msgstr ""
+
+#: ../../advanced.rst:121
+msgid ""
+"# urls.py\n"
+"\n"
+"from django.urls import 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 ""
+
+#: ../../advanced.rst:134
+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 ""
+
+#: ../../advanced.rst:137
+msgid "aiohttp"
+msgstr ""
+
+#: ../../advanced.rst:141
+msgid "**aiohttp**"
+msgstr ""
+
+#: ../../advanced.rst:143
+msgid ""
+"Use `pywebio.platform.aiohttp.webio_handler()` to get the `Request "
+"Handler <https://docs.aiohttp.org/en/stable/web_quickstart.html#aiohttp-"
+"web-handler>`_ coroutine for running PyWebIO applications in aiohttp::"
+msgstr ""
+
+#: ../../advanced.rst:147
+msgid ""
+"from aiohttp import web\n"
+"from pywebio.platform.aiohttp import 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 ""
+
+#: ../../advanced.rst:156
+msgid ""
+"After starting the aiohttp server, visit ``http://localhost/tool`` to "
+"open the PyWebIO application"
+msgstr ""
+
+#: ../../advanced.rst:160
+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 ""
+
+#: ../../advanced.rst:165
+msgid "FastAPI/Starlette"
+msgstr ""
+
+#: ../../advanced.rst:169
+msgid "**FastAPI/Starlette**"
+msgstr ""
+
+#: ../../advanced.rst:171
+msgid ""
+"Use `pywebio.platform.fastapi.webio_routes()` to get the "
+"FastAPI/Starlette routes for running PyWebIO applications. You can mount "
+"the routes to your FastAPI/Starlette app."
+msgstr ""
+
+#: ../../advanced.rst:174
+msgid "FastAPI::"
+msgstr ""
+
+#: ../../advanced.rst:176
+msgid ""
+"from fastapi import FastAPI\n"
+"from pywebio.platform.fastapi import webio_routes\n"
+"\n"
+"app = FastAPI()\n"
+"\n"
+"@app.get(\"/app\")\n"
+"def read_main():\n"
+"   return {\"message\": \"Hello World from main app\"}\n"
+"\n"
+"# `task_func` is PyWebIO task function\n"
+"app.mount(\"/tool\", FastAPI(routes=webio_routes(task_func)))"
+msgstr ""
+
+#: ../../advanced.rst:188
+msgid "Starlette::"
+msgstr ""
+
+#: ../../advanced.rst:190
+msgid ""
+"from starlette.applications import Starlette\n"
+"from starlette.responses import JSONResponse\n"
+"from starlette.routing import Route, Mount\n"
+"from pywebio.platform.fastapi import webio_routes\n"
+"\n"
+"async def homepage(request):\n"
+"   return JSONResponse({'hello': 'world'})\n"
+"\n"
+"app = Starlette(routes=[\n"
+"   Route('/', homepage),\n"
+"   Mount('/tool', routes=webio_routes(task_func))  # `task_func` is "
+"PyWebIO task function\n"
+"])"
+msgstr ""
+
+#: ../../advanced.rst:203
+msgid ""
+"After starting the server by using ``uvicorn <module>:app`` , visit "
+"``http://localhost:8000/tool/`` to open the PyWebIO application"
+msgstr ""
+
+#: ../../advanced.rst:205
+msgid ""
+"See also: `FastAPI doc <https://fastapi.tiangolo.com/advanced/sub-"
+"applications/>`_ , `Starlette doc <https://www.starlette.io/routing"
+"/#submounting-routes>`_"
+msgstr ""
+
+#: ../../advanced.rst:209
+msgid ""
+"PyWebIO uses the WebSocket protocol to communicate with the browser in "
+"FastAPI/Starlette. If your 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 ""
+
+#: ../../advanced.rst:217
+msgid "Notes"
+msgstr ""
+
+#: ../../advanced.rst:218
+msgid "**Deployment in production**"
+msgstr ""
+
+#: ../../advanced.rst:220
+msgid ""
+"In your production system, you may want to deploy the web applications "
+"with some WSGI/ASGI servers such as uWSGI, Gunicorn, and Uvicorn. Since "
+"PyWebIO applications store session state in memory of process, when you "
+"use HTTP-based sessions (Flask and Django) and spawn multiple workers to "
+"handle requests, the request may be dispatched to a process that does not"
+" hold the session to which the request belongs. So you can only start one"
+" worker to handle requests when using Flask or Django backend."
+msgstr ""
+
+#: ../../advanced.rst:225
+msgid ""
+"If you still want to use multiple processes to increase concurrency, one "
+"way is to use Uvicorn+FastAPI, or you can also start multiple "
+"Tornado/aiohttp processes and add external load balancer (such as HAProxy"
+" or nginx) before them. Those backends use the WebSocket protocol to "
+"communicate with the browser in PyWebIO, so there is no the issue as "
+"described above."
+msgstr ""
+
+#: ../../advanced.rst:229
+msgid "**Static resources Hosting**"
+msgstr ""
+
+#: ../../advanced.rst:231
+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 ""
+
+#: ../../advanced.rst:235
+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 URL of PyWebIO "
+"static resources directory."
+msgstr ""
+
+#: ../../advanced.rst:238
+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 ""
+
+#: ../../advanced.rst:243
+msgid ""
+"``start_server()`` and ``path_deploy()`` also support ``cdn`` parameter, "
+"if it is set to ``False``, the static resource will be hosted in local "
+"server automatically, without manual hosting."
+msgstr ""
+
+#: ../../advanced.rst:250
+msgid "Coroutine-based session"
+msgstr ""
+
+#: ../../advanced.rst:251
+msgid ""
+"In most cases, you don’t need the coroutine-based session. All functions "
+"or methods in PyWebIO that are only used for coroutine sessions are "
+"specifically noted in the document."
+msgstr ""
+
+#: ../../advanced.rst:254
+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 ""
+
+#: ../../advanced.rst:258
+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 ""
+
+#: ../../advanced.rst:264
+msgid "Using coroutine session"
+msgstr ""
+
+#: ../../advanced.rst:266
+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 ""
+
+#: ../../advanced.rst:269
+#, 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 ""
+
+#: ../../advanced.rst:283
+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 ""
+
+#: ../../advanced.rst:287
+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 ""
+
+#: ../../advanced.rst:306
+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 ""
+
+#: ../../advanced.rst:309
+msgid ""
+"Other functions that need to use ``await`` syntax in the coroutine "
+"session are:"
+msgstr ""
+
+#: ../../advanced.rst:311
+msgid ""
+"`pywebio.session.run_asyncio_coroutine(coro_obj) "
+"<pywebio.session.run_asyncio_coroutine>`"
+msgstr ""
+
+#: ../../advanced.rst:312
+msgid "`pywebio.session.eval_js(expression) <pywebio.session.eval_js>`"
+msgstr ""
+
+#: ../../advanced.rst:316
+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 ""
+
+#: ../../advanced.rst:319
+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 ""
+
+#: ../../advanced.rst:322
+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 ""
+
+#: ../../advanced.rst:329
+msgid "Concurrency in coroutine-based sessions"
+msgstr ""
+
+#: ../../advanced.rst:331
+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 ""
+
+#: ../../advanced.rst:336
+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 ""
+
+#: ../../advanced.rst:355
+msgid ""
+"`run_async(coro) <pywebio.session.run_async>` returns a `TaskHandler "
+"<pywebio.session.coroutinebased.TaskHandler>`, which can be used to query"
+" the running status of the coroutine or close the coroutine."
+msgstr ""
+
+#: ../../advanced.rst:359
+msgid "Close of session"
+msgstr ""
+
+#: ../../advanced.rst:361
+msgid ""
+"Similar to thread-based session, when user close the browser page, the "
+"session will be closed."
+msgstr ""
+
+#: ../../advanced.rst:363
+msgid ""
+"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 ""
+
+#: ../../advanced.rst:368
+msgid ""
+"`defer_call(func) <pywebio.session.defer_call>` also available in "
+"coroutine session."
+msgstr ""
+
+#: ../../advanced.rst:373
+msgid "Integration with Web Framework"
+msgstr ""
+
+#: ../../advanced.rst:375
+msgid ""
+"The PyWebIO application that using coroutine-based session can also be "
+"integrated to the web framework."
+msgstr ""
+
+#: ../../advanced.rst:377
+msgid ""
+"However, there are some limitations when using coroutine-based sessions "
+"to integrate into Flask or Django:"
+msgstr ""
+
+#: ../../advanced.rst:379
+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 ""
+
+#: ../../advanced.rst:382
+msgid ""
+"Secondly, you need to start a new thread to run the event loop before "
+"starting a Flask/Django server."
+msgstr ""
+
+#: ../../advanced.rst:384
+msgid "Example of coroutine-based session integration into Flask:"
+msgstr ""
+
+#: ../../advanced.rst:386
+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 ""
+
+#: ../../advanced.rst:411
+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 ""
+

BIN
docs/locales/fa/LC_MESSAGES/arch.mo


+ 493 - 0
docs/locales/fa/LC_MESSAGES/arch.po

@@ -0,0 +1,493 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) Weimin Wang
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
+#
+#, fuzzy
+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: 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.9.1\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_context:1
+msgid "called when every http request"
+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:20
+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 need_keep_alive"
+msgstr ""
+
+#: of pywebio.session.base.Session:20
+msgid "defer_call"
+msgstr ""
+
+#: of pywebio.session.base.Session:25
+msgid "由Backend调用:"
+msgstr ""
+
+#: of pywebio.session.base.Session:23
+msgid "send_client_event get_task_commands close"
+msgstr ""
+
+#: of pywebio.session.base.Session:28
+msgid "Task和Backend都可调用:"
+msgstr ""
+
+#: of pywebio.session.base.Session:28
+msgid "closed"
+msgstr ""
+
+#: of pywebio.session.base.Session:33
+msgid "Session是不同的后端Backend与协程交互的桥梁:"
+msgstr ""
+
+#: of pywebio.session.base.Session:31
+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.close
+#: pywebio.session.base.Session.defer_call
+#: pywebio.session.base.Session.get_scope_name
+msgid "Parameters"
+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.close:1
+msgid "Close current session"
+msgstr ""
+
+#: of pywebio.session.base.Session.close:3
+msgid "Don't block thread. Used in closing from backend."
+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 ""
+

BIN
docs/locales/fa/LC_MESSAGES/cookbook.mo


+ 455 - 0
docs/locales/fa/LC_MESSAGES/cookbook.po

@@ -0,0 +1,455 @@
+# 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 12:33+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"
+
+#: ../../cookbook.rst:2
+msgid "Cookbook"
+msgstr "دستور های پخت"
+
+#: ../../cookbook.rst:8
+msgid "Interaction related"
+msgstr ""
+
+#: ../../cookbook.rst:11
+msgid "Equivalent to \"Press any key to continue\""
+msgstr ""
+
+#: ../../cookbook.rst:13
+msgid ""
+"actions(buttons=[\"Continue\"])\n"
+"put_text(\"Go next\")  # ..demo-only"
+msgstr ""
+
+#: ../../cookbook.rst:22
+msgid "Output pandas dataframe"
+msgstr ""
+
+#: ../../cookbook.rst:24
+msgid ""
+"import numpy as np\n"
+"import pandas as pd\n"
+"\n"
+"df = pd.DataFrame(np.random.randn(6, 4), columns=list(\"ABCD\"))\n"
+"put_html(df.to_html(border=0))"
+msgstr ""
+
+#: ../../cookbook.rst:34
+msgid ""
+"`pandas.DataFrame.to_html — pandas documentation "
+"<https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_html.html"
+"#pandas-dataframe-to-html>`_"
+msgstr ""
+
+#: ../../cookbook.rst:37
+msgid "Output Matplotlib figure"
+msgstr ""
+
+#: ../../cookbook.rst:39
+msgid ""
+"Simply do not call ``matplotlib.pyplot.show``, directly save the figure "
+"to in-memory buffer and output the buffer via "
+":func:`pywebio.output.put_image`:"
+msgstr ""
+
+#: ../../cookbook.rst:42
+msgid ""
+"import matplotlib\n"
+"import matplotlib.pyplot as plt\n"
+"import io\n"
+"import pywebio\n"
+"\n"
+"matplotlib.use('agg')  # required, use a non-interactive backend\n"
+"\n"
+"fig, ax = plt.subplots()  # Create a figure containing a single axes.\n"
+"ax.plot([1, 2, 3, 4], [1, 4, 2, 3])  # Plot some data on the axes.\n"
+"\n"
+"buf = io.BytesIO()\n"
+"fig.savefig(buf)\n"
+"pywebio.output.put_image(buf.getvalue())"
+msgstr ""
+
+#: ../../cookbook.rst:60
+msgid ""
+"The ``matplotlib.use('agg')`` is required so that the server does not try"
+" to create (and then destroy) GUI windows that will never be seen."
+msgstr ""
+
+#: ../../cookbook.rst:63
+msgid ""
+"When using Matplotlib in a web server (multiple threads environment), "
+"pyplot may cause some conflicts in some cases, read the following "
+"articles for more information:"
+msgstr ""
+
+#: ../../cookbook.rst:66
+msgid ""
+"`Multi Threading in Python and Pyplot | by Ranjitha Korrapati | Medium "
+"<https://medium.com/@ranjitha.korrapati/multi-threading-in-python-and-"
+"pyplot-46f325e6a9d0>`_"
+msgstr ""
+
+#: ../../cookbook.rst:68
+msgid ""
+"`Embedding in a web application server (Flask) — Matplotlib documentation"
+" "
+"<https://matplotlib.org/stable/gallery/user_interfaces/web_application_server_"
+"sgskip.html>`_"
+msgstr ""
+
+#: ../../cookbook.rst:72
+msgid "Blocking confirm model"
+msgstr ""
+
+#: ../../cookbook.rst:74
+msgid ""
+"The following code uses the lock mechanism to make the button callback "
+"function synchronous:"
+msgstr ""
+
+#: ../../cookbook.rst:78
+msgid ""
+"import threading\n"
+"from pywebio import output\n"
+"\n"
+"def confirm(title, content=None, timeout=None):\n"
+"    \"\"\"Show a confirm model.\n"
+"\n"
+"    :param str title: Model title.\n"
+"    :param list/put_xxx() content: Model content.\n"
+"    :param None/float timeout: Seconds for operation time out.\n"
+"    :return: Return `True` when the \"CONFIRM\" button is clicked,\n"
+"        return `False` when the \"CANCEL\" button is clicked,\n"
+"        return `None` when a timeout is given and the operation times "
+"out.\n"
+"    \"\"\"\n"
+"    if not isinstance(content, list):\n"
+"        content = [content]\n"
+"\n"
+"    event = threading.Event()\n"
+"    result = None\n"
+"\n"
+"    def onclick(val):\n"
+"        nonlocal result\n"
+"        result = val\n"
+"        event.set()\n"
+"\n"
+"    content.append(output.put_buttons([\n"
+"        {'label': 'CONFIRM', 'value': True},\n"
+"        {'label': 'CANCEL', 'value': False, 'color': 'danger'},\n"
+"    ], onclick=onclick))\n"
+"    output.popup(title=title, content=content, closable=False)\n"
+"\n"
+"    event.wait(timeout=timeout)  # wait the model buttons are clicked\n"
+"    output.close_popup()\n"
+"    return result\n"
+"\n"
+"\n"
+"res = confirm('Confirm', 'You have 5 seconds to make s choice', "
+"timeout=5)\n"
+"output.put_text(\"Your choice is:\", res)"
+msgstr ""
+
+#: ../../cookbook.rst:121
+msgid "Input in the popup"
+msgstr ""
+
+#: ../../cookbook.rst:124
+msgid ""
+"In the following code, we define a ``popup_input()`` function, which can "
+"be used to get input in popup:"
+msgstr ""
+
+#: ../../cookbook.rst:128
+msgid ""
+"def popup_input(pins, names, title='Please fill out the form'):\n"
+"    \"\"\"Show a form in popup window.\n"
+"\n"
+"    :param list pins: pin output list.\n"
+"    :param list pins: pin name list.\n"
+"    :param str title: model title.\n"
+"    :return: return the form as dict, return None when user cancel the "
+"form.\n"
+"    \"\"\"\n"
+"    if not isinstance(pins, list):\n"
+"        pins = [pins]\n"
+"\n"
+"    from pywebio.utils import random_str\n"
+"    action_name = 'action_' + random_str(10)\n"
+"\n"
+"    pins.append(put_actions(action_name, buttons=[\n"
+"        {'label': 'Submit', 'value': True},\n"
+"        {'label': 'Cancel', 'value': False, 'color': 'danger'},\n"
+"    ]))\n"
+"    popup(title=title, content=pins, closable=False)\n"
+"\n"
+"    change_info = pin_wait_change(action_name)\n"
+"    result = None\n"
+"    if change_info['name'] == action_name and change_info['value']:\n"
+"        result = {name: pin[name] for name in names}\n"
+"    close_popup()\n"
+"    return result\n"
+"\n"
+"\n"
+"from pywebio.pin import put_input\n"
+"\n"
+"result = popup_input([\n"
+"    put_input('name', label='Input your name'),\n"
+"    put_input('age', label='Input your age', type=\"number\")\n"
+"], names=['name', 'age'])\n"
+"put_text(result)"
+msgstr ""
+
+#: ../../cookbook.rst:168
+msgid ""
+"The code uses :doc:`pin module </pin>` to add input widgets to popup "
+"window, and uses the lock mechanism to wait the form buttons to be "
+"clicked."
+msgstr ""
+
+#: ../../cookbook.rst:173
+msgid "Redirect stdout to PyWebIO application"
+msgstr ""
+
+#: ../../cookbook.rst:176
+msgid ""
+"The following code shows how to redirect stdout of python code and "
+"subprocess to PyWebIO application:"
+msgstr ""
+
+#: ../../cookbook.rst:180
+msgid ""
+"import io\n"
+"import time\n"
+"import subprocess  # ..doc-only\n"
+"from contextlib import redirect_stdout\n"
+"\n"
+"# redirect `print()` to pywebio\n"
+"class WebIO(io.IOBase):\n"
+"    def write(self, content):\n"
+"        put_text(content, inline=True)\n"
+"\n"
+"with redirect_stdout(WebIO()):\n"
+"    for i in range(10):\n"
+"        print(i, time.time())\n"
+"        time.sleep(0.2)\n"
+"\n"
+"## ----\n"
+"import subprocess  # ..demo-only\n"
+"# redirect a subprocess' stdout to pywebio\n"
+"process = subprocess.Popen(\"ls -ahl\", shell=True, "
+"stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\n"
+"while True:\n"
+"    output = process.stdout.readline()\n"
+"    if output:\n"
+"        put_text(output.decode('utf8'), inline=True)\n"
+"\n"
+"    if not output and process.poll() is not None:\n"
+"        break"
+msgstr ""
+
+#: ../../cookbook.rst:213
+msgid "Add missing syntax highlight for code output"
+msgstr ""
+
+#: ../../cookbook.rst:215
+msgid ""
+"When output code via `put_markdown()` or `put_code()`, PyWebIO provides "
+"syntax highlight for some common languages. If you find your code have no"
+" syntax highlight, you can add the syntax highlighter by two following "
+"steps:"
+msgstr ""
+
+#: ../../cookbook.rst:218
+msgid ""
+"Go to `prismjs CDN page "
+"<https://www.jsdelivr.com/package/npm/prismjs?version=1.23.0&path=components"
+">`_"
+" to get your syntax highlighter link."
+msgstr ""
+
+#: ../../cookbook.rst:219
+msgid ""
+"Use :func:`config(js_file=...) <pywebio.config>` to load the syntax "
+"highlight module"
+msgstr ""
+
+#: ../../cookbook.rst:223
+msgid ""
+"@config(js_file=\"https://cdn.jsdelivr.net/npm/prismjs@1.23.0/components"
+"/prism-diff.min.js\")\n"
+"def main():\n"
+"    put_code(\"\"\"\n"
+"+ AAA\n"
+"- BBB\n"
+"CCC\n"
+"    \"\"\".strip(), language='diff')\n"
+"\n"
+"    put_markdown(\"\"\"\n"
+"    ```diff\n"
+"    + AAA\n"
+"    - BBB\n"
+"    CCC\n"
+"    ```\n"
+"    \"\"\", lstrip=True)"
+msgstr ""
+
+#: ../../cookbook.rst:242
+msgid "Web application related"
+msgstr ""
+
+#: ../../cookbook.rst:245
+msgid "Get URL parameters of current page"
+msgstr ""
+
+#: ../../cookbook.rst:247
+msgid ""
+"You can use URL parameter (known also as \"query strings\" or \"URL query"
+" parameters\") to pass information to your web application. In PyWebIO "
+"application, you can use the following code to get the URL parameters as "
+"a Python dict."
+msgstr ""
+
+#: ../../cookbook.rst:250
+msgid ""
+"# `query` is a dict\n"
+"query = eval_js(\"Object.fromEntries(new "
+"URLSearchParams(window.location.search))\")\n"
+"put_text(query)"
+msgstr ""
+
+#: ../../cookbook.rst:260
+msgid "Add Google AdSense/Analytics code"
+msgstr ""
+
+#: ../../cookbook.rst:262
+msgid ""
+"When you setup Google AdSense/Analytics, you will get a javascript file "
+"and a piece of code that needs to be inserted into your application page,"
+" you can use :func:`pywebio.config()` to inject js file and code to your "
+"PyWebIO application::"
+msgstr ""
+
+#: ../../cookbook.rst:265
+msgid ""
+"from pywebio import start_server, output, config\n"
+"\n"
+"js_file = \"https://www.googletagmanager.com/gtag/js?id=G-xxxxxxx\"\n"
+"js_code = \"\"\"\n"
+"window.dataLayer = window.dataLayer || [];\n"
+"function gtag(){dataLayer.push(arguments);}\n"
+"gtag('js', new Date());\n"
+"\n"
+"gtag('config', 'G-xxxxxxx');\n"
+"\"\"\"\n"
+"\n"
+"@config(js_file=js_file, js_code=js_code)\n"
+"def main():\n"
+"    output.put_text(\"hello world\")\n"
+"\n"
+"start_server(main, port=8080)"
+msgstr ""
+
+#: ../../cookbook.rst:284
+msgid "Refresh page on connection lost"
+msgstr ""
+
+#: ../../cookbook.rst:286
+msgid ""
+"Add the following code to the beginning of your PyWebIO application main "
+"function::"
+msgstr ""
+
+#: ../../cookbook.rst:288
+msgid ""
+"session.run_js('WebIO._state.CurrentSession.on_session_close(()="
+">{setTimeout(()=>location.reload(),"
+" 4000})')"
+msgstr ""
+
+#: ../../cookbook.rst:291
+msgid "Cookie and localStorage manipulation"
+msgstr ""
+
+#: ../../cookbook.rst:294
+msgid ""
+"You can use `pywebio.session.run_js()` and `pywebio.session.eval_js()` to"
+" deal with cookies or localStorage with js."
+msgstr ""
+
+#: ../../cookbook.rst:296
+msgid "``localStorage`` manipulation:"
+msgstr ""
+
+#: ../../cookbook.rst:298
+msgid ""
+"set_localstorage = lambda key, value: run_js(\"localStorage.setItem(key, "
+"value)\", key=key, value=value)\n"
+"get_localstorage = lambda key: eval_js(\"localStorage.getItem(key)\", "
+"key=key)\n"
+"\n"
+"set_localstorage('hello', 'world')\n"
+"val = get_localstorage('hello')\n"
+"put_text(val)"
+msgstr ""
+
+#: ../../cookbook.rst:310
+msgid "Cookie manipulation:"
+msgstr ""
+
+#: ../../cookbook.rst:314
+msgid ""
+"# https://stackoverflow.com/questions/14573223/set-cookie-and-get-cookie-"
+"with-javascript\n"
+"run_js(\"\"\"\n"
+"window.setCookie = function(name,value,days) {\n"
+"    var expires = \"\";\n"
+"    if (days) {\n"
+"        var date = new Date();\n"
+"        date.setTime(date.getTime() + (days*24*60*60*1000));\n"
+"        expires = \"; expires=\" + date.toUTCString();\n"
+"    }\n"
+"    document.cookie = name + \"=\" + (value || \"\")  + expires + \"; "
+"path=/\";\n"
+"}\n"
+"window.getCookie = function(name) {\n"
+"    var nameEQ = name + \"=\";\n"
+"    var ca = document.cookie.split(';');\n"
+"    for(var i=0;i < ca.length;i++) {\n"
+"        var c = ca[i];\n"
+"        while (c.charAt(0)==' ') c = c.substring(1,c.length);\n"
+"        if (c.indexOf(nameEQ) == 0) return "
+"c.substring(nameEQ.length,c.length);\n"
+"    }\n"
+"    return null;\n"
+"}\n"
+"\"\"\")\n"
+"\n"
+"def setcookie(key, value, days=0):\n"
+"    run_js(\"setCookie(key, value, days)\", key=key, value=value, "
+"days=days)\n"
+"\n"
+"def getcookie(key):\n"
+"    return eval_js(\"getCookie(key)\", key=key)\n"
+"\n"
+"setcookie('hello', 'world')\n"
+"val = getcookie('hello')\n"
+"put_text(val)"
+msgstr ""
+

BIN
docs/locales/fa/LC_MESSAGES/exceptions.mo


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

@@ -0,0 +1,43 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) Weimin Wang
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
+#
+#, fuzzy
+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: 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.9.1\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 ""
+
+#: of pywebio.exceptions.SessionClosedException:1
+msgid "The session has been closed abnormally"
+msgstr ""
+
+#: of pywebio.exceptions.SessionNotFoundException:1
+msgid "Session not found"
+msgstr ""
+

BIN
docs/locales/fa/LC_MESSAGES/guide.mo


+ 1357 - 0
docs/locales/fa/LC_MESSAGES/guide.po

@@ -0,0 +1,1357 @@
+# 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-26 23:39+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"
+
+#: ../../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 pattern that backend implement api and "
+"frontend display content. In PyWebIO, you only need to write code in "
+"Python."
+msgstr ""
+
+#: ../../guide.rst:8
+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 ""
+
+#: ../../guide.rst:15
+msgid ""
+"This user guide introduces you the most of the features of PyWebIO. There"
+" is a demo link at the top right of the example codes in this document, "
+"where you can run the example code online and see what happens."
+msgstr ""
+
+#: ../../guide.rst:19
+msgid "Input"
+msgstr "ورودی"
+
+#: ../../guide.rst:21
+msgid ""
+"The input functions are defined in the :doc:`pywebio.input </input>` "
+"module and can be imported using ``from pywebio.input import *``."
+msgstr ""
+
+#: ../../guide.rst:23
+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 ""
+
+#: ../../guide.rst:27
+msgid "Basic input"
+msgstr "ورودی پایه"
+
+#: ../../guide.rst:29
+msgid "Here are some basic types of input."
+msgstr "در اینجا برخی از انواع پایه ورودی آورده شده."
+
+#: ../../guide.rst:31
+msgid "Text input:"
+msgstr "ورودی متن:"
+
+#: ../../guide.rst:33
+#, python-format
+msgid ""
+"age = input(\"How old are you?\", type=NUMBER)\n"
+"put_text('age = %r' % age)  # ..demo-only"
+msgstr ""
+"age = input(\"شما چند سال دارید؟\", type=NUMBER)\n"
+"put_text('سن = %r' % age)  # ..demo-only"
+
+#: ../../guide.rst:40
+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:43
+msgid "Here are some other types of input functions:"
+msgstr "در اینجا برخی از انواع دیگر توابع ورودی آورده شده:"
+
+#: ../../guide.rst:45
+#, 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 ""
+"# Password input\n"
+"password = input(\"پسورد را وارد کنید\", type=PASSWORD)\n"
+"put_text('پسورد = %r' % password)  # ..demo-only\n"
+"## ----\n"
+"\n"
+"# Drop-down selection\n"
+"gift = select('شما چه هدیه ای را می خواهید؟', ['keyboard', 'ipad'])\n"
+"put_text('هدیه = %r' % gift)  # ..demo-only\n"
+"## ----\n"
+"\n"
+"# Checkbox\n"
+"agree = checkbox(\"شرط کاربر\", options=['من با شرایط و ضوابط موافقت می"
+" کنم'])\n"
+"put_text('موافقت = %r' % agree)  # ..demo-only\n"
+"## ----\n"
+"\n"
+"# Single choice\n"
+"answer = radio(\"یکی را انتخاب کنید\", options=['A', 'B', 'C', 'D'])\n"
+"put_text('پاسخ = %r' % answer)  # ..demo-only\n"
+"## ----\n"
+"\n"
+"# Multi-line text input\n"
+"text = textarea('ناحیه متن', rows=3, placeholder='قدری متن')\n"
+"put_text('متن = %r' % text)  # ..demo-only\n"
+"## ----\n"
+"\n"
+"# File Upload\n"
+"img = file_upload(\"یک تصویر انتخاب کنید:\", accept=\"image/*\")\n"
+"if img:    # ..demo-only\n"
+"    put_image(img['content'], title=img['filename'])  # ..demo-only"
+
+#: ../../guide.rst:81
+msgid "Parameter of input functions"
+msgstr "پارامتر توابع ورودی"
+
+#: ../../guide.rst:83
+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 ""
+
+#: ../../guide.rst:86
+msgid ""
+"input('This is label', type=TEXT, placeholder='This is placeholder',\n"
+"        help_text='This is help text', required=True)"
+msgstr ""
+"input('این لیبل است', type=TEXT, placeholder='این placeholder است',\n"
+"        help_text='این help text است', required=True)"
+
+#: ../../guide.rst:93 ../../guide.rst:129 ../../guide.rst:279
+#: ../../guide.rst:586
+msgid "The results of the above example are as follows:"
+msgstr "نتایج مثال بالا به شرح زیر است:"
+
+#: ../../guide.rst:97
+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 ""
+
+#: ../../guide.rst:100
+#, 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 ""
+"def check_age(p):  # return None when the check passes, otherwise return "
+"the error message\n"
+"    if p < 10:\n"
+"        return 'خیلی جوان!!'\n"
+"    if p > 60:\n"
+"        return 'خیلی پیر!!'\n"
+"\n"
+"age = input(\"شما چند سال دارید؟\", type=NUMBER, validate=check_age)\n"
+"put_text('age = %r' % age)  # ..demo-only"
+
+#: ../../guide.rst:113
+msgid ""
+"When the user input an illegal value, the input field is displayed as "
+"follows:"
+msgstr ""
+
+#: ../../guide.rst:117
+msgid ""
+"You can use ``code`` parameter in :func:`pywebio.input.textarea()` to "
+"make a code editing textarea."
+msgstr ""
+
+#: ../../guide.rst:119
+msgid ""
+"code = textarea('Code Edit', code={\n"
+"    'mode': \"python\",\n"
+"    'theme': 'darcula',\n"
+"}, value='import something\\n# Write your python code')\n"
+"put_code(code, language='python')  # ..demo-only"
+msgstr ""
+"code = textarea('ویرایش کد', code={\n"
+"    'mode': \"python\",\n"
+"    'theme': 'darcula',\n"
+"}, value='import something\\n# کد پایتون خودتان را بنویسید')\n"
+"put_code(code, language='python')  # ..demo-only"
+
+#: ../../guide.rst:135
+msgid "Input Group"
+msgstr "گروه ورودی"
+
+#: ../../guide.rst:137
+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`` of the "
+"single input as its key and the input data as its value:"
+msgstr ""
+
+#: ../../guide.rst:142
+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 ""
+"def check_age(p):  # ..demo-only\n"
+"    if p < 10:                  # ..demo-only\n"
+"        return 'خیلی جوان!!'    # ..demo-only\n"
+"    if p > 60:                  # ..demo-only\n"
+"        return 'خیلی پیر!!'      # ..demo-only\n"
+"                                # ..demo-only\n"
+"data = input_group(\"اطلاعات پایه\",[\n"
+"  input('نام خود را وارد کنید', name='name'),\n"
+"  input('سن خود را وارد کنید', name='age', type=NUMBER, validate=check_age)\n"
+"])\n"
+"put_text(data['name'], data['age'])"
+
+#: ../../guide.rst:158
+msgid ""
+"The input group also supports using ``validate`` parameter to set the "
+"validation function, which accepts the entire form data as parameter:"
+msgstr ""
+
+#: ../../guide.rst:160
+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):  # 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 ""
+"def check_age(p):  # single input item validation  # ..demo-only\n"
+"    if p < 10:                  # ..demo-only\n"
+"        return 'خیلی جوان!!'    # ..demo-only\n"
+"    if p > 60:                  # ..demo-only\n"
+"        return 'خیلی پیر!!'      # ..demo-only\n"
+"                                # ..demo-only\n"
+"def check_form(data):  # return (input name, error msg) when validation "
+"fail\n"
+"    if len(data['name']) > 6:\n"
+"        return ('name', 'نام خیلی طولانی است!')\n"
+"    if data['age'] <= 0:\n"
+"        return ('age', 'سن نمی تواند منفی باشد!')\n"
+"\n"
+"data = input_group(\"اطلاعات پایه\",[           # ..demo-only\n"
+"   input('نام خود را وارد کنید', name='name'),   # ..demo-only\n"
+"   input('سن خود را وارد کنید', name='age', type=NUMBER, validate=check_age)  "
+"# ..demo-only\n"
+"], validate=check_form)              # ..demo-only\n"
+"put_text(data['name'], data['age'])    # ..demo-only"
+
+#: ../../guide.rst:183
+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 ""
+
+#: ../../guide.rst:188
+msgid "Output"
+msgstr "خروجی"
+
+#: ../../guide.rst:190
+msgid ""
+"The output functions are all defined in the :doc:`pywebio.output "
+"</output>` module and can be imported using ``from pywebio.output import "
+"*``."
+msgstr ""
+
+#: ../../guide.rst:193
+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:197
+msgid "Basic Output"
+msgstr "خروجی پایه"
+
+#: ../../guide.rst:199
+msgid ""
+"Using output functions, you can output a variety of content, such as "
+"text, tables, images and so on:"
+msgstr ""
+
+#: ../../guide.rst:201
+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"
+"# Image Output\n"
+"put_image(open('/path/to/some/image.png', 'rb').read())  # local image # "
+"..doc-only\n"
+"put_image('http://example.com/some-image.png')  # internet image # ..doc-"
+"only\n"
+"put_image('https://www.python.org/static/img/python-logo.png')  # ..demo-"
+"only\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"
+"# Show a PopUp\n"
+"popup('popup title', 'popup text content')\n"
+"\n"
+"# Show a notification message\n"
+"toast('New message 🔔')"
+msgstr ""
+"# Text Output\n"
+"put_text(\"سلام دنیا!\")\n"
+"## ----\n"
+"\n"
+"# Table Output\n"
+"put_table([\n"
+"    ['کالا', 'قیمت'],\n"
+"    ['سیب', '5.5'],\n"
+"    ['موز', '7'],\n"
+"])\n"
+"## ----\n"
+"\n"
+"# Image Output\n"
+"put_image(open('/path/to/some/image.png', 'rb').read())  # local image # "
+"..doc-only\n"
+"put_image('http://example.com/some-image.png')  # internet image # ..doc-"
+"only\n"
+"put_image('https://www.python.org/static/img/python-logo.png')  # ..demo-"
+"only\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"
+"# Show a PopUp\n"
+"popup('popup title', 'popup text content')\n"
+"\n"
+"# Show a notification message\n"
+"toast('New message 🔔')"
+
+#: ../../guide.rst:238
+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 ""
+
+#: ../../guide.rst:245
+msgid ""
+"If you use PyWebIO in interactive execution environment of Python shell, "
+"IPython or jupyter notebook, you need call `show()` method explicitly to "
+"show output::"
+msgstr ""
+
+#: ../../guide.rst:248
+msgid ""
+">>> put_text(\"Hello world!\").show()\n"
+">>> put_table([\n"
+"...     ['A', 'B'],\n"
+"...     [put_markdown(...), put_text('C')]\n"
+"... ]).show()"
+msgstr ""
+
+#: ../../guide.rst:258
+msgid "Combined Output"
+msgstr "خروجی ترکیبی"
+
+#: ../../guide.rst:260
+msgid ""
+"The output functions whose name starts with ``put_`` can be combined with"
+" some output functions as part of the final output:"
+msgstr ""
+
+#: ../../guide.rst:262
+msgid ""
+"You can pass ``put_xxx()`` calls to `put_table() "
+"<pywebio.output.put_table>` as cell content:"
+msgstr ""
+
+#: ../../guide.rst:264
+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:283
+msgid ""
+"Similarly, you can pass ``put_xxx()`` calls to `popup() "
+"<pywebio.output.popup>` as the popup content:"
+msgstr ""
+
+#: ../../guide.rst:285
+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_button('close_popup()', onclick=close_popup)\n"
+"])"
+msgstr ""
+
+#: ../../guide.rst:296
+msgid ""
+"In addition, you can use `put_widget() <pywebio.output.put_widget>` to "
+"make your own output widgets that can accept ``put_xxx()`` calls."
+msgstr ""
+
+#: ../../guide.rst:298
+msgid ""
+"For a full list of functions that accept ``put_xxx()`` calls as content, "
+"see :ref:`Output functions list <output_func_list>`"
+msgstr ""
+
+#: ../../guide.rst:300
+msgid "**Context Manager**"
+msgstr ""
+
+#: ../../guide.rst:302
+msgid ""
+"Some output functions that accept ``put_xxx()`` calls as content can be "
+"used as context manager:"
+msgstr ""
+
+#: ../../guide.rst:304
+msgid ""
+"with put_collapse('This is title'):\n"
+"    for i in range(4):\n"
+"        put_text(i)\n"
+"\n"
+"    put_table([\n"
+"        ['Commodity', 'Price'],\n"
+"        ['Apple', '5.5'],\n"
+"        ['Banana', '7'],\n"
+"    ])"
+msgstr ""
+
+#: ../../guide.rst:318
+msgid ""
+"For a full list of functions that support context manager, see "
+":ref:`Output functions list <output_func_list>`"
+msgstr ""
+
+#: ../../guide.rst:324
+msgid "Click Callback"
+msgstr "فراخوانی کلیک"
+
+#: ../../guide.rst:326
+msgid ""
+"As we can see from the above, the interaction of PyWebIO has two parts: "
+"input and output. The input function of PyWebIO is blocking, a form will "
+"be displayed on the user's web browser when calling input function, the "
+"input function will not return until the user submits the form. The "
+"output function is used to output content to the browser in real time. "
+"The input and output behavior of PyWebIO 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 programming "
+"way."
+msgstr ""
+
+#: ../../guide.rst:332
+msgid ""
+"In addition, PyWebIO also supports event callbacks: PyWebIO allows you to"
+" output some buttons and bind callbacks to them. The provided callback "
+"function will be executed when the button is clicked."
+msgstr ""
+
+#: ../../guide.rst:335
+msgid "This is an example:"
+msgstr "این یک مثال است:"
+
+#: ../../guide.rst:337
+#, 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:353
+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 ""
+
+#: ../../guide.rst:358
+msgid "Of course, PyWebIO also supports outputting individual button:"
+msgstr ""
+
+#: ../../guide.rst:360
+#, python-format
+msgid ""
+"def btn_click(btn_val):\n"
+"    put_text(\"You click %s button\" % btn_val)\n"
+"\n"
+"put_buttons(['A', 'B', 'C'], onclick=btn_click)  # a group of buttons\n"
+"\n"
+"put_button(\"Click me\", onclick=lambda: toast(\"Clicked\"))  # single "
+"button"
+msgstr ""
+
+#: ../../guide.rst:371
+msgid ""
+"In fact, all output can be bound to click events, not just buttons. You "
+"can call ``onclick()`` method after the output function (function name "
+"like ``put_xxx()``) call:"
+msgstr ""
+
+#: ../../guide.rst:374
+msgid ""
+"put_image('some-image.png').onclick(lambda: toast('You click an image'))"
+"  # ..doc-only\n"
+"put_image('https://www.python.org/static/img/python-"
+"logo.png').onclick(lambda: toast('You click an image'))  # ..demo-only\n"
+"\n"
+"# set onclick in combined output\n"
+"put_table([\n"
+"    ['Commodity', 'Price'],\n"
+"    ['Apple', put_text('5.5').onclick(lambda: toast('You click the "
+"text'))],\n"
+"])"
+msgstr ""
+
+#: ../../guide.rst:387
+msgid ""
+"The return value of ``onclick()`` method is the object itself so it can "
+"be used in combined output."
+msgstr ""
+
+#: ../../guide.rst:392
+msgid "Output Scope"
+msgstr "محدوده خروجی"
+
+#: ../../guide.rst:394
+msgid ""
+"PyWebIO uses the scope model to give more control to the location of "
+"content output. The output scope is a container of output content. You "
+"can create a scope in somewhere and append content to it."
+msgstr ""
+
+#: ../../guide.rst:397
+msgid ""
+"Each output function (function name like ``put_xxx()``) will output its "
+"content to a scope, the default is \"current scope\". The \"current "
+"scope\" is set by `use_scope() <pywebio.output.use_scope>`."
+msgstr ""
+
+#: ../../guide.rst:402
+msgid "**use_scope()**"
+msgstr ""
+
+#: ../../guide.rst:404
+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 ""
+
+#: ../../guide.rst:406
+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 ""
+
+#: ../../guide.rst:418 ../../guide.rst:439
+msgid "The results of the above code are as follows::"
+msgstr "نتایج کد بالا به شرح زیر است::"
+
+#: ../../guide.rst:420
+msgid ""
+"text1 in scope1\n"
+"text2 in scope1\n"
+"text in parent scope of scope1"
+msgstr ""
+
+#: ../../guide.rst:424
+msgid ""
+"You can use ``clear`` parameter in `use_scope() "
+"<pywebio.output.use_scope>` to clear the existing content before entering"
+" the scope:"
+msgstr ""
+
+#: ../../guide.rst:426
+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 ""
+
+#: ../../guide.rst:441
+msgid ""
+"text in scope2\n"
+"text in parent scope of scope2"
+msgstr ""
+
+#: ../../guide.rst:444
+msgid "`use_scope() <pywebio.output.use_scope>` can also be used as decorator:"
+msgstr ""
+
+#: ../../guide.rst:446
+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:461
+msgid ""
+"When calling ``show_time()`` for the first time, a ``time`` scope will be"
+" created, 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 ""
+
+#: ../../guide.rst:464
+msgid ""
+"Scopes can be nested. At the beginning, PyWebIO applications have only "
+"one ``ROOT`` scope. You can create new scope in a scope. For example, the"
+" following code will create 3 scopes:"
+msgstr ""
+
+#: ../../guide.rst:467
+#, 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:489
+msgid "The above code will generate the following scope layout::"
+msgstr ""
+
+#: ../../guide.rst:491
+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:507
+msgid "**put_scope()**"
+msgstr ""
+
+#: ../../guide.rst:509
+msgid ""
+"We already know that the scope is a container of output content. So can "
+"we use this container as a sub-item of a output (like, set a cell in "
+"table as a container)? Yes, you can use `put_scope() "
+"<pywebio.output.put_scope>` to create a scope explicitly. The function "
+"name starts with ``put_``, which means it can be pass to the functions "
+"that accept ``put_xxx()`` calls."
+msgstr ""
+
+#: ../../guide.rst:514
+msgid ""
+"put_table([\n"
+"    ['Name', 'Hobbies'],\n"
+"    ['Tom', put_scope('hobby', content=put_text('Coding'))]  # hobby is "
+"initialized to coding\n"
+"])\n"
+"\n"
+"## ----\n"
+"with use_scope('hobby', clear=True):\n"
+"    put_text('Movie')  # hobby is reset to Movie\n"
+"\n"
+"## ----\n"
+"# append Music, Drama to hobby\n"
+"with use_scope('hobby'):\n"
+"    put_text('Music')\n"
+"    put_text('Drama')\n"
+"\n"
+"## ----\n"
+"# insert the Coding into the top of the hobby\n"
+"put_markdown('**Coding**', scope='hobby', position=0)"
+msgstr ""
+
+#: ../../guide.rst:538
+msgid ""
+"It is not allowed to have two scopes with the same name in the "
+"application."
+msgstr ""
+
+#: ../../guide.rst:540
+msgid "**Scope control**"
+msgstr ""
+
+#: ../../guide.rst:542
+msgid ""
+"In addition to `use_scope() <pywebio.output.use_scope>` and `put_scope() "
+"<pywebio.output.put_scope>`, PyWebIO also provides the following scope "
+"control functions:"
+msgstr ""
+
+#: ../../guide.rst:545
+msgid "`clear(scope) <pywebio.output.clear>` : Clear the contents of the scope"
+msgstr ""
+
+#: ../../guide.rst:546
+msgid "`remove(scope) <pywebio.output.remove>` : Remove scope"
+msgstr ""
+
+#: ../../guide.rst:547
+msgid ""
+"`scroll_to(scope) <pywebio.output.scroll_to>` : Scroll the page to the "
+"scope"
+msgstr ""
+
+#: ../../guide.rst:549
+msgid ""
+"Also, all output functions (function name like ``put_xxx()``) support a "
+"``scope`` parameter to specify the destination scope to output, and "
+"support a ``position`` parameter to specify the insert position in target"
+" scope. Refer :ref:`output module <scope_param>` for more information."
+msgstr ""
+
+#: ../../guide.rst:554
+msgid "Layout"
+msgstr "چیدمان"
+
+#: ../../guide.rst:556
+msgid ""
+"In general, using the output functions introduced above is enough to "
+"output what you want, but these outputs are arranged vertically. If you "
+"want to create 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:560
+msgid ""
+"The ``pywebio.output`` module provides 3 layout functions, and you can "
+"create complex layouts by combining them:"
+msgstr ""
+
+#: ../../guide.rst:562
+msgid ""
+"`put_row() <pywebio.output.put_row>` : Use row layout to output content. "
+"The content is arranged horizontally"
+msgstr ""
+
+#: ../../guide.rst:563
+msgid ""
+"`put_column() <pywebio.output.put_column>` : Use column layout to output "
+"content. The content is arranged vertically"
+msgstr ""
+
+#: ../../guide.rst:564
+msgid ""
+"`put_grid() <pywebio.output.put_grid>` : Output content using grid layout"
+msgstr ""
+
+#: ../../guide.rst:566
+msgid "Here is an example by combining ``put_row()`` and ``put_column()``:"
+msgstr ""
+
+#: ../../guide.rst:568
+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:591
+msgid "The layout function also supports customizing the size of each part::"
+msgstr ""
+
+#: ../../guide.rst:593
+#, python-format
+msgid ""
+"put_row([put_image(...), put_image(...)], size='40% 60%')  # The ratio of"
+" the width of two images is 2:3"
+msgstr ""
+
+#: ../../guide.rst:595
+msgid ""
+"For more information, please refer to the :ref:`layout functions "
+"documentation <style_and_layout>`."
+msgstr ""
+
+#: ../../guide.rst:600
+msgid "Style"
+msgstr "استایل"
+
+#: ../../guide.rst:602
+msgid ""
+"If you are familiar with `CSS <https://en.wikipedia.org/wiki/CSS>`_ "
+"styles, you can use the ``style()`` method of output return to set a "
+"custom style for the output."
+msgstr ""
+
+#: ../../guide.rst:605
+msgid "You can set the CSS style for a single ``put_xxx()`` output:"
+msgstr ""
+
+#: ../../guide.rst:607
+msgid ""
+"put_text('hello').style('color: red; font-size: 20px')\n"
+"\n"
+"## ----\n"
+"# in combined output\n"
+"put_row([\n"
+"    put_text('hello').style('color: red'),\n"
+"    put_markdown('markdown')\n"
+"]).style('margin-top: 20px')"
+msgstr ""
+
+#: ../../guide.rst:620
+msgid ""
+"The return value of ``style()`` method is the object itself so it can be "
+"used in combined output."
+msgstr ""
+
+#: ../../guide.rst:625
+msgid "Run application"
+msgstr "اجرای اپلیکیشن"
+
+#: ../../guide.rst:627
+msgid ""
+"In PyWebIO, there are two modes to run PyWebIO applications: running as a"
+" script and using `pywebio.start_server() "
+"<pywebio.platform.tornado.start_server>` or "
+"`pywebio.platform.path_deploy() <pywebio.platform.path_deploy>` to run as"
+" a web service."
+msgstr ""
+
+#: ../../guide.rst:632
+msgid "Overview"
+msgstr "بررسی اجمالی"
+
+#: ../../guide.rst:636 ../../guide.rst:701
+msgid "**Server mode**"
+msgstr "**حالت سرور**"
+
+#: ../../guide.rst:638
+msgid ""
+"In server mode, PyWebIO will start a web server to continuously provide "
+"services. When the user accesses the service address, PyWebIO will open a"
+" new session and run PyWebIO application in it."
+msgstr ""
+
+#: ../../guide.rst:641
+msgid ""
+"`start_server() <pywebio.platform.tornado.start_server>` is the most "
+"common way to start a web server to serve given PyWebIO applications::"
+msgstr ""
+
+#: ../../guide.rst:644
+msgid ""
+"from pywebio import *\n"
+"\n"
+"def main():  # PyWebIO application function\n"
+"    name = input.input(\"what's your name\")\n"
+"    output.put_text(\"hello\", name)\n"
+"\n"
+"start_server(main, port=8080, debug=True)"
+msgstr ""
+
+#: ../../guide.rst:652
+msgid ""
+"Now head over to http://127.0.0.1:8080/, and you should see your hello "
+"greeting."
+msgstr ""
+
+#: ../../guide.rst:654
+msgid ""
+"By using ``debug=True`` to enable debug mode, the server will "
+"automatically reload if code changes."
+msgstr ""
+
+#: ../../guide.rst:656
+msgid ""
+"The `start_server() <pywebio.platform.tornado.start_server>` provide a "
+"remote access support, when enabled (by passing `remote_access=True` to "
+"`start_server()`), you will get a public, shareable address for the "
+"current application, others can access your application in their browser "
+"via this address. Because the processing happens on your device (as long "
+"as your device stays on!), you don't have to worry about any "
+"dependencies. Using remote access makes it easy to temporarily share the "
+"application with others."
+msgstr ""
+
+#: ../../guide.rst:662
+msgid ""
+"Another way to deploy PyWebIO application as web service is using "
+"`path_deploy() <pywebio.platform.path_deploy>`. `path_deploy() "
+"<pywebio.platform.path_deploy>` is used to deploy the PyWebIO "
+"applications from a directory. Just define PyWebIO applications in python"
+" files under this directory, and you can access them via the path in the "
+"URL. Refer to :ref:`platform module <dir_deploy>` for more information."
+msgstr ""
+
+#: ../../guide.rst:669
+msgid ""
+"Note that in Server mode, all functions from ``pywebio.input``, "
+"``pywebio.output`` and ``pywebio.session`` modules can only be called in "
+"the context of PyWebIO application functions. For example, the following "
+"code is **not allowed**::"
+msgstr ""
+
+#: ../../guide.rst:672
+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:679 ../../guide.rst:696
+msgid "**Script mode**"
+msgstr "**حالت اسکریپت**"
+
+#: ../../guide.rst:681
+msgid ""
+"If you never call ``start_server()`` or ``path_deploy()`` in your code, "
+"then you are running PyWebIO application as script mode."
+msgstr ""
+
+#: ../../guide.rst:683
+msgid ""
+"In script mode, a web browser page will be open automatically when "
+"running to the first call to PyWebIO interactive functions, and all "
+"subsequent PyWebIO interactions will take place on this page. When the "
+"script exit, the page will be inactive."
+msgstr ""
+
+#: ../../guide.rst:686
+msgid ""
+"If the user closes the browser before the script exiting, then subsequent"
+" calls to PyWebIO's interactive functions will cause a `SessionException "
+"<pywebio.exceptions.SessionException>` exception."
+msgstr ""
+
+#: ../../guide.rst:692
+msgid "Concurrent"
+msgstr "هم زمان"
+
+#: ../../guide.rst:694
+msgid "PyWebIO can be used in a multi-threading environment."
+msgstr ""
+
+#: ../../guide.rst:698
+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 ""
+
+#: ../../guide.rst:703
+msgid ""
+"In server mode, if you need to use PyWebIO interactive functions in new "
+"thread, you need to use `pywebio.session.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>`."
+msgstr ""
+
+#: ../../guide.rst:710
+msgid "Example of using multi-threading in Server mode::"
+msgstr ""
+
+#: ../../guide.rst:712
+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:736
+msgid "Close of session"
+msgstr ""
+
+#: ../../guide.rst:738
+msgid ""
+"When user close the browser page, the session will be closed. 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 ""
+
+#: ../../guide.rst:743
+msgid ""
+"In most cases, you don't need to catch those exceptions, because let "
+"those exceptions to abort the running is the right way to exit."
+msgstr ""
+
+#: ../../guide.rst:745
+msgid ""
+"You can use `pywebio.session.defer_call(func) "
+"<pywebio.session.defer_call>` to set the function to be called when the "
+"session closes. `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 ""
+
+#: ../../guide.rst:751
+msgid "More about PyWebIO"
+msgstr ""
+
+#: ../../guide.rst:752
+msgid ""
+"By now, you already get the most important features of PyWebIO and can "
+"start to write awesome PyWebIO applications. However, there are some "
+"other useful features we don't cover in the above. Here we just make a "
+"briefly explain about them. When you need them in your application, you "
+"can refer to their document."
+msgstr ""
+
+#: ../../guide.rst:756
+msgid ""
+"Also, :doc:`here </cookbook>` is a cookbook where you can find some "
+"useful code snippets for your PyWebIO application."
+msgstr ""
+
+#: ../../guide.rst:759
+msgid "``session`` module"
+msgstr "ماژول ``session``"
+
+#: ../../guide.rst:760
+msgid ""
+"The :doc:`pywebio.session </session>` module give you more control to "
+"session."
+msgstr ""
+
+#: ../../guide.rst:762
+msgid ""
+"Use `set_env() <pywebio.session.set_env>` to configure the title, page "
+"appearance, input panel and so on for current session."
+msgstr ""
+
+#: ../../guide.rst:764
+msgid ""
+"The `info <pywebio.session.info>` object provides a lot information about"
+" the current session, such as the user IP address, user language and user"
+" browser information."
+msgstr ""
+
+#: ../../guide.rst:767
+msgid ""
+"`local <pywebio.session.local>` is a session-local storage, it used to "
+"save data whose values are session specific."
+msgstr ""
+
+#: ../../guide.rst:769
+msgid ""
+"`run_js() <pywebio.session.run_js>` let you execute JavaScript code in "
+"user's browser, and `eval_js() <pywebio.session.eval_js>` let you execute"
+" JavaScript expression and get the value of it."
+msgstr ""
+
+#: ../../guide.rst:773
+msgid "``pin`` module"
+msgstr "ماژول ``pin``"
+
+#: ../../guide.rst:774
+msgid ""
+"As you already know, the input function of PyWebIO is blocking and the "
+"input form will be destroyed after successful submission. In some cases, "
+"you may want to make the input form not disappear after submission, and "
+"can continue to receive input. So PyWebIO provides the :doc:`pywebio.pin "
+"</pin>` module to achieve persistent input by pinning input widgets to "
+"the page."
+msgstr ""
+
+#: ../../guide.rst:779
+msgid "``platform`` module"
+msgstr "ماژول ``platform``"
+
+#: ../../guide.rst:781
+msgid ""
+"The :doc:`pywebio.platform </platform>` module provides support for "
+"deploying PyWebIO applications in different ways."
+msgstr ""
+
+#: ../../guide.rst:783
+msgid ""
+"There are two protocols (WebSocket and HTTP) can be used in server to "
+"communicates with the browser. The WebSocket is used by default. If you "
+"want to use HTTP protocol, you can choose other ``start_server()`` "
+"functions in this module."
+msgstr ""
+
+#: ../../guide.rst:786
+msgid ""
+"You might want to set some web page related configuration (such as SEO "
+"information, js and css injection) for your PyWebIO application, "
+"`pywebio.config() <pywebio.config>` can be helpful."
+msgstr ""
+
+#: ../../guide.rst:790
+msgid "Advanced features"
+msgstr "ویژگی های پیشرفته"
+
+#: ../../guide.rst:792
+msgid ""
+"The PyWebIO application can be integrated into an existing Python web "
+"project, the PyWebIO application and the web project share a web "
+"framework. Refer to :ref:`Advanced Topic: Integration with Web Framework "
+"<integration_web_framework>` for more information."
+msgstr ""
+
+#: ../../guide.rst:796
+msgid ""
+"PyWebIO also provides support for coroutine-based sessions. Refer to "
+":ref:`Advanced Topic: Coroutine-based session <coroutine_based_session>` "
+"for more information."
+msgstr ""
+
+#: ../../guide.rst:799
+msgid ""
+"If you try to bundles your PyWebIO application into a stand-alone "
+"executable file, to make users can run the application without installing"
+" a Python interpreter or any modules, you might want to refer to "
+":ref:`Libraries support: Build stand-alone App <stand_alone_app>`"
+msgstr ""
+
+#: ../../guide.rst:802
+msgid ""
+"If you want to make some data visualization in your PyWebIO application, "
+"you can't miss :ref:`Libraries support: Data visualization "
+"<visualization>`"
+msgstr ""
+
+#: ../../guide.rst:805
+msgid "Last but not least"
+msgstr "آخرین اما نه کم اهمیت ترین"
+
+#: ../../guide.rst:807
+msgid ""
+"This is basically all features of PyWebIO, you can continue to read the "
+"rest of the documents, or start writing your PyWebIO applications now."
+msgstr ""
+
+#: ../../guide.rst:809
+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"
+" :ref:`callback mechanism <callback>` or  :doc:`pin <./pin>` module."
+msgstr ""
+
+#: ../../guide.rst:814
+msgid "OK, Have fun with PyWebIO!"
+msgstr "خیلی خب، با PyWebIO اوقات خوشی را داشته باشید!"
+

BIN
docs/locales/fa/LC_MESSAGES/index.mo


+ 260 - 0
docs/locales/fa/LC_MESSAGES/index.po

@@ -0,0 +1,260 @@
+# 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 13:32+0330\n"
+"Last-Translator: Pikhosh <pikhosh@gmail.com>\n"
+"Language-Team: English <>\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: en_US\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Lokalize 21.12.2\n"
+
+#: ../../index.rst:80
+msgid "Manual"
+msgstr "کتابچه راهنما"
+
+#: ../../index.rst:99
+msgid "Implement Doc"
+msgstr "مستندات پیاده سازی"
+
+#: ../../index.rst:2
+msgid "PyWebIO"
+msgstr ""
+
+#: ../../index.rst:4
+msgid ""
+"PyWebIO provides a diverse set of imperative functions to obtain user "
+"input and output content 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 function), without the need to have knowledge of HTML and"
+" JS. PyWebIO is ideal for quickly building interactive applications that "
+"don't require a complicated user interface."
+msgstr ""
+"PyWebIO مجموعه ای از توابع ضروری را برای به دست آوردن ورودی "
+"کاربر و خروجی دادن محتوا روی مرورگر را ارائه می کند، تبدیل مرورگر به یک "
+"«ترمینال متن غنی»، و می تواند برای ساخت وب اپلیکیشن های ساده "
+"یا اپلیکیشن های دارای رابط کاربری گرافیکی مبتنی بر مرورگر استفاده شود. با"
+" استفاده از PyWebIO، توسعه دهندگان می توانند اپلیکیشن ها را درست "
+"مثل نوشتن اسکریپت های ترمینال (تعامل بر پایه "
+"تابع Input و Print) بنویسند، بدون نیاز به داشتن دانش HTML و"
+" جاوا اسکریپت. PyWebIO برای ساخت سریع اپلیکیشن های تعاملی که "
+"یک رابط کاربری پیچیده نیاز ندارند ایده آل است."
+
+#: ../../index.rst:11
+msgid "Features"
+msgstr "ویژگی ها"
+
+#: ../../index.rst:13
+msgid "Use synchronization instead of callback-based method to get input"
+msgstr "استفاده از همگام سازی بجای متد مبتنی بر فراخوانی برای دریافت ورودی"
+
+#: ../../index.rst:14
+msgid "Non-declarative layout, simple and efficient"
+msgstr "چیدمان Non-declarative، ساده و کارآمد"
+
+#: ../../index.rst:15
+msgid ""
+"Less intrusive: old script code can be transformed into a Web service "
+"only by modifying the input and output operation"
+msgstr ""
+"کمتر مزاحم: کد اسکریپت قدیم می تواند به یک وب سرویس تبدیل شود فقط با اصلاح"
+" عملیات ورودی و خروجی"
+
+#: ../../index.rst:16
+msgid ""
+"Support integration into existing web services, currently supports Flask,"
+" Django, Tornado, aiohttp and FastAPI(Starlette) framework"
+msgstr ""
+"پشتیبانی از ادغام با وب سرویس های موجود، در حال حاضر پشتیبانی از Flask,"
+" Django, Tornado, aiohttp و فریم ورک FastAPI(Starlette)"
+
+#: ../../index.rst:17
+msgid "Support for ``asyncio`` and coroutine"
+msgstr "پشتیبانی برای ``asyncio`` و coroutine"
+
+#: ../../index.rst:18
+msgid "Support data visualization with third-party libraries"
+msgstr "پشتیبانی از بصری سازی داده با کتابخانه های شخص ثالث"
+
+#: ../../index.rst:21
+msgid "Installation"
+msgstr "نصب"
+
+#: ../../index.rst:23
+msgid "Stable version::"
+msgstr "نسخه پایدار::"
+
+#: ../../index.rst:25
+msgid "pip3 install -U pywebio"
+msgstr ""
+
+#: ../../index.rst:27
+msgid "Development version::"
+msgstr "نسخه توسعه::"
+
+#: ../../index.rst:29
+msgid ""
+"pip3 install -U "
+"https://code.aliyun.com/wang0618/pywebio/repository/archive.zip"
+msgstr ""
+
+#: ../../index.rst:31
+msgid "**Prerequisites**: PyWebIO requires Python 3.5.2 or newer"
+msgstr "**پیش نیاز ها**: PyWebIO به Python 3.5.2 یا جدید تر نیاز دارد"
+
+#: ../../index.rst:36
+msgid "Hello, world"
+msgstr "سلام، دنیا"
+
+#: ../../index.rst:38
+msgid ""
+"Here is a simple PyWebIO script to calculate the `BMI "
+"<https://en.wikipedia.org/wiki/Body_mass_index>`_ ::"
+msgstr ""
+"در اینجا یک اسکریپت PyWebIO ساده برای محاسبه `شاخص توده بدنی "
+"<https://en.wikipedia.org/wiki/Body_mass_index>`_ آورده شده است::"
+
+#: ../../index.rst:40
+#, 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 ""
+"# یک اسکریپت ساده برای محاسبه شاخص توده بدنی\n"
+"from pywebio.input import input, FLOAT\n"
+"from pywebio.output import put_text\n"
+"\n"
+"def bmi():\n"
+"    height = input(\"قد خود را وارد کنید(سانتی متر):\", type=FLOAT)\n"
+"    weight = input(\"وزن خود را وارد کنید(کیلوگرم):\", type=FLOAT)\n"
+"\n"
+"    BMI = weight / (height / 100) ** 2\n"
+"\n"
+"    top_status = [(16, 'کمبود وزن شدید'), (18.5, 'کمبود وزن'),\n"
+"                  (25, 'عادی'), (30, 'اضافه وزن'),\n"
+"                  (35, 'چاق متوسط'), (float('inf'), 'چاق "
+"شدید')]\n"
+"\n"
+"    for top, status in top_status:\n"
+"        if BMI <= top:\n"
+"            put_text('شاخص توده بدنی شما: %.1f. دسته بندی: %s' % (BMI,"
+" status))\n"
+"            break\n"
+"\n"
+"if __name__ == '__main__':\n"
+"    bmi()"
+
+#: ../../index.rst:62
+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:69
+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 </bmi>` )."
+msgstr ""
+"در آخرین خط کد بالا، تغییر فراخوانی تابع ``bmi()`` "
+"به `pywebio.start_server(bmi, port=80) "
+"<pywebio.platform.tornado.start_server>` یک وب سرویس شاخص توده بدنی را روی "
+"پورت 80 راه اندازی می کند ( :demo_host:`دمو آنلاین </bmi>` )."
+
+#: ../../index.rst:73
+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()`` را با یک وب "
+"فریم ورک موجود ادغام کنید، می توانید بخش :ref:`Integration with a web"
+" framework "
+"<integration_web_framework>` این مستندات را ببینید."
+
+#: ../../index.rst:77
+msgid "Documentation"
+msgstr "مستندات"
+
+#: ../../index.rst:78
+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:106
+msgid "Indices and tables"
+msgstr "ایندکس ها و جداول"
+
+#: ../../index.rst:108
+msgid ":ref:`genindex`"
+msgstr ""
+
+#: ../../index.rst:109
+msgid ":ref:`modindex`"
+msgstr ""
+
+#: ../../index.rst:110
+msgid ":ref:`search`"
+msgstr ""
+
+#: ../../index.rst:114
+msgid "Discussion and support"
+msgstr "بحث و پشتیبانی"
+
+#: ../../index.rst:116
+msgid ""
+"Need help when use PyWebIO? Make a new discussion on `Github Discussions "
+"<https://github.com/wang0618/PyWebIO/discussions>`_."
+msgstr ""
+"هنگام استفاده از PyWebIOنیاز به کمک دارید؟ یک بحث جدید در `Github Discussions "
+"<https://github.com/wang0618/PyWebIO/discussions>`_ بسازید."
+
+#: ../../index.rst:118
+msgid ""
+"Report bugs on the `GitHub issue "
+"<https://github.com/wang0618/pywebio/issues>`_."
+msgstr ""
+"باگ ها را در `GitHub issue "
+"<https://github.com/wang0618/pywebio/issues>`_ گزارش کنید."
+

BIN
docs/locales/fa/LC_MESSAGES/input.mo


+ 1120 - 0
docs/locales/fa/LC_MESSAGES/input.po

@@ -0,0 +1,1120 @@
+# 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 12:34+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"
+
+#: ../../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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.input.input:41
+msgid "``label`` : The text displayed to the user"
+msgstr ""
+
+#: of pywebio.input.input:43
+msgid ""
+"When calling ``set_value`` with two arguments, the input item in web page"
+" will become read-only."
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.input.textarea:6
+msgid ""
+"The minimum number of characters (UTF-16 code units) required that the "
+"user should enter."
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.input.textarea:22
+msgid ""
+"Some commonly used Codemirror options are listed :ref:`here "
+"<codemirror_options>`."
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.input.select:28
+msgid ""
+"Whether to select at least one item, only available when ``multiple=True``"
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.input.checkbox:8
+msgid "A list of the values in the ``options`` selected by the user"
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.input.actions:18
+msgid ""
+"When ``type='reset'/'cancel'`` or ``disabled=True``, ``value`` can be "
+"omitted"
+msgstr ""
+
+#: 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 ""
+
+#: of pywebio.input.actions:22
+msgid "The ``value`` of button can be any JSON serializable object."
+msgstr ""
+
+#: of pywebio.input.actions:24
+msgid "``type`` can be:"
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.input.actions:36
+msgid ""
+"The ``color`` of button can be one of: `primary`, `secondary`, `success`,"
+" `danger`, `warning`, `info`, `light`, `dark`."
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.input.actions:47
+msgid "**usage scenes of actions() **"
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.input.file_upload:22
+msgid ""
+"Indicates whether the user must specify a file for the input. Default is "
+"``False``."
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.input.file_upload:33
+msgid "If there is no file uploaded, return ``None``."
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.input.input_group:33
+msgid ""
+"Note: If the last input item in the group is `actions()`, ``cancelable`` "
+"will be ignored."
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+

BIN
docs/locales/fa/LC_MESSAGES/libraries_support.mo


+ 264 - 0
docs/locales/fa/LC_MESSAGES/libraries_support.po

@@ -0,0 +1,264 @@
+# 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 12:32+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"
+
+#: ../../libraries_support.rst:2
+msgid "Libraries support"
+msgstr "پشتیبانی کتابخانه ها"
+
+#: ../../libraries_support.rst:7
+msgid "Build stand-alone App"
+msgstr ""
+
+#: ../../libraries_support.rst:8
+msgid ""
+"`PyInstaller <https://pyinstaller.readthedocs.io/en/stable/>`_ bundles a "
+"Python application and all its dependencies into a folder or executable. "
+"The user can run the packaged app without installing a Python interpreter"
+" or any modules."
+msgstr ""
+
+#: ../../libraries_support.rst:10
+msgid ""
+"You can use PyInstaller to packages PyWebIO application into a stand-"
+"alone executable or folder:"
+msgstr ""
+
+#: ../../libraries_support.rst:12
+msgid "Create a pyinstaller spec (specification) file::"
+msgstr ""
+
+#: ../../libraries_support.rst:14
+msgid "pyi-makespec <options> app.py"
+msgstr ""
+
+#: ../../libraries_support.rst:16
+msgid "You need replace ``app.py`` to your PyWebIO application file name."
+msgstr ""
+
+#: ../../libraries_support.rst:18
+msgid "Edit the spec file, change the ``datas`` parameter of ``Analysis``::"
+msgstr ""
+
+#: ../../libraries_support.rst:20
+msgid ""
+"from pywebio.utils import pyinstaller_datas\n"
+"\n"
+"a = Analysis(\n"
+"    ...\n"
+"    datas=pyinstaller_datas(),\n"
+"    ..."
+msgstr ""
+
+#: ../../libraries_support.rst:27
+msgid ""
+"Build the application by passing the spec file to the pyinstaller "
+"command::"
+msgstr ""
+
+#: ../../libraries_support.rst:29
+msgid "pyinstaller app.spec"
+msgstr ""
+
+#: ../../libraries_support.rst:32
+msgid ""
+"If you want to create a one-file bundled executable, you need pass "
+"``--onefile`` option in first step."
+msgstr ""
+
+#: ../../libraries_support.rst:34
+msgid ""
+"For more information, please visit: "
+"https://pyinstaller.readthedocs.io/en/stable/spec-files.html"
+msgstr ""
+
+#: ../../libraries_support.rst:40
+msgid "Data visualization"
+msgstr ""
+
+#: ../../libraries_support.rst:41
+msgid "PyWebIO supports for data visualization with the third-party libraries."
+msgstr ""
+
+#: ../../libraries_support.rst:44
+msgid "Bokeh"
+msgstr ""
+
+#: ../../libraries_support.rst:46
+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 ""
+
+#: ../../libraries_support.rst:48
+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 ""
+
+#: ../../libraries_support.rst:51
+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:59
+msgid "See related demo on :charts_demo_host:`bokeh demo </?app=bokeh>`"
+msgstr ""
+
+#: ../../libraries_support.rst:61
+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 ""
+
+#: ../../libraries_support.rst:63
+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 ""
+
+#: ../../libraries_support.rst:65
+msgid "Bokeh App currently is only available in the default Tornado backend"
+msgstr ""
+
+#: ../../libraries_support.rst:70
+msgid "pyecharts"
+msgstr ""
+
+#: ../../libraries_support.rst:72
+msgid ""
+"`pyecharts <https://github.com/pyecharts/pyecharts>`_  is a python "
+"plotting library which uses `Echarts "
+"<https://github.com/ecomfe/echarts>`_ as underlying implementation."
+msgstr ""
+
+#: ../../libraries_support.rst:74
+msgid ""
+"In PyWebIO, you can use the following code to output the pyecharts chart "
+"instance::"
+msgstr ""
+
+#: ../../libraries_support.rst:76
+msgid ""
+"# `chart` is pyecharts chart instance\n"
+"pywebio.output.put_html(chart.render_notebook())"
+msgstr ""
+
+#: ../../libraries_support.rst:79
+msgid ""
+"See related demo on :charts_demo_host:`pyecharts demo </?app=pyecharts>`"
+msgstr ""
+
+#: ../../libraries_support.rst:86
+msgid "plotly"
+msgstr ""
+
+#: ../../libraries_support.rst:88
+msgid ""
+"`plotly.py <https://github.com/plotly/plotly.py>`_ is an interactive, "
+"open-source, and browser-based graphing library for Python."
+msgstr ""
+
+#: ../../libraries_support.rst:90
+msgid ""
+"In PyWebIO, you can use the following code to output the plotly chart "
+"instance::"
+msgstr ""
+
+#: ../../libraries_support.rst:92
+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:96
+msgid "See related demo on :charts_demo_host:`plotly demo </?app=plotly>`"
+msgstr ""
+
+#: ../../libraries_support.rst:101
+msgid "pyg2plot"
+msgstr ""
+
+#: ../../libraries_support.rst:103
+msgid ""
+"`pyg2plot <https://github.com/hustcc/PyG2Plot>`_ is a python plotting "
+"library which uses `G2Plot <https://github.com/antvis/G2Plot>`_ as "
+"underlying implementation."
+msgstr ""
+
+#: ../../libraries_support.rst:105
+msgid ""
+"In PyWebIO, you can use the following code to output the pyg2plot chart "
+"instance::"
+msgstr ""
+
+#: ../../libraries_support.rst:107
+msgid ""
+"# `chart` is pyg2plot chart instance\n"
+"pywebio.output.put_html(chart.render_notebook())"
+msgstr ""
+
+#: ../../libraries_support.rst:110
+msgid "See related demo on :charts_demo_host:`plotly demo </?app=pyg2plot>`"
+msgstr ""
+
+#: ../../libraries_support.rst:113
+msgid "cutecharts.py"
+msgstr ""
+
+#: ../../libraries_support.rst:115
+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 ""
+
+#: ../../libraries_support.rst:117
+msgid ""
+"In PyWebIO, you can use the following code to output the cutecharts.py "
+"chart instance::"
+msgstr ""
+
+#: ../../libraries_support.rst:119
+msgid ""
+"# `chart` is cutecharts chart instance\n"
+"pywebio.output.put_html(chart.render_notebook())"
+msgstr ""
+
+#: ../../libraries_support.rst:122
+msgid ""
+"See related demo on :charts_demo_host:`cutecharts demo </?app=cutecharts>`"
+msgstr ""
+

BIN
docs/locales/fa/LC_MESSAGES/misc.mo


+ 122 - 0
docs/locales/fa/LC_MESSAGES/misc.po

@@ -0,0 +1,122 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) Weimin Wang
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
+#
+#, fuzzy
+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: 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.9.1\n"
+
+#: ../../misc.rst:2
+msgid "Miscellaneous"
+msgstr ""
+
+#: ../../misc.rst:7
+msgid "Commonly used Codemirror options"
+msgstr ""
+
+#: ../../misc.rst:9
+msgid ""
+"``mode`` (str): The language of code. For complete list, see "
+"https://codemirror.net/mode/index.html"
+msgstr ""
+
+#: ../../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 ""
+
+#: ../../misc.rst:11
+msgid ""
+"``lineNumbers`` (bool): Whether to show line numbers to the left of the "
+"editor."
+msgstr ""
+
+#: ../../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 ""
+
+#: ../../misc.rst:13
+msgid "``tabSize`` (int): The width of a tab character. Defaults to 4."
+msgstr ""
+
+#: ../../misc.rst:14
+msgid ""
+"``lineWrapping`` (bool): Whether CodeMirror should scroll or wrap for "
+"long lines. Defaults to false (scroll)."
+msgstr ""
+
+#: ../../misc.rst:16
+msgid ""
+"For complete Codemirror options, please visit: "
+"https://codemirror.net/doc/manual.html#config"
+msgstr ""
+
+#: ../../misc.rst:21
+msgid "Nginx WebSocket Config Example"
+msgstr ""
+
+#: ../../misc.rst:23
+msgid ""
+"Assuming that the PyWebIO application is running at the "
+"``localhost:5000`` address, if you want to access your PyWebIO "
+"application via ``http://server_ip/some_path/tool``, a sample Nginx "
+"configuration is as follows::"
+msgstr ""
+
+#: ../../misc.rst:25
+msgid ""
+"map $http_upgrade $connection_upgrade {\n"
+"    default upgrade;\n"
+"    '' close;\n"
+"}\n"
+"\n"
+"server {\n"
+"    listen 80;\n"
+"\n"
+"    location /some_path/ {\n"
+"        alias /path/to/pywebio/static/dir/;\n"
+"    }\n"
+"    location /some_path/tool {\n"
+"         proxy_read_timeout 300s;\n"
+"         proxy_send_timeout 300s;\n"
+"         proxy_http_version 1.1;\n"
+"         proxy_set_header Host $http_host;\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:48
+msgid ""
+"The above configuration file hosts the static files of PyWebIO on the "
+"``/some_path/`` path, and reverse proxy ``/some_path/tool`` to "
+"``localhost:5000``."
+msgstr ""
+
+#: ../../misc.rst:50
+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 ""
+
+#: ../../misc.rst:52
+msgid "cp -r `python3 -c \"import pywebio; print(pywebio.STATIC_PATH)\"` ~/web"
+msgstr ""
+

BIN
docs/locales/fa/LC_MESSAGES/outdate.mo


+ 259 - 0
docs/locales/fa/LC_MESSAGES/outdate.po

@@ -0,0 +1,259 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) Weimin Wang
+# This file is distributed under the same license as the PyWebIO package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
+#
+#, fuzzy
+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: 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.9.1\n"
+
+#: ../../outdate.rst:2
+msgid "The outdated functions"
+msgstr ""
+
+#: ../../outdate.rst:4
+msgid ""
+"This section shows document of the deprecated functions in case you use "
+"the previous version of PyWebIO."
+msgstr ""
+
+#: ../../outdate.rst:6
+msgid ""
+"Those functions still work in latest PyWebIO, however they may be removed"
+" in future version."
+msgstr ""
+
+#: ../../outdate.rst:9
+msgid "``output`` module"
+msgstr ""
+
+#: of pywebio.output.style:1
+msgid "Customize the css style of output content"
+msgstr ""
+
+#: of pywebio.output.style:3
+msgid "See :ref:`User Guide <style>` for new way to set css style for output."
+msgstr ""
+
+#: of pywebio.output.output pywebio.output.style pywebio.platform.page.seo
+msgid "Parameters"
+msgstr ""
+
+#: of pywebio.output.style:6
+msgid "The output content can be a ``put_xxx()`` call or a list of it."
+msgstr ""
+
+#: of pywebio.output.style:8
+msgid "css style string"
+msgstr ""
+
+#: of pywebio.output.output pywebio.output.style
+msgid "Returns"
+msgstr ""
+
+#: of pywebio.output.style:9
+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:9
+msgid "The output contents with css style added:"
+msgstr ""
+
+#: of pywebio.output.style:11
+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 ""
+
+#: of pywebio.output.output pywebio.output.style
+msgid "Example"
+msgstr ""
+
+#: of pywebio.output.style:16
+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:1
+msgid "Placeholder of output"
+msgstr ""
+
+#: of pywebio.output.output:3
+msgid "See :ref:`User Guide <put_scope>` for new way to set css style for output."
+msgstr ""
+
+#: of pywebio.output.output:6
+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 ""
+
+#: of pywebio.output.output:9
+msgid ""
+"The initial contents to be output. The item is ``put_xxx()`` call, and "
+"any other type will be converted to ``put_text(content)``."
+msgstr ""
+
+#: of pywebio.output.output:11
+msgid "An OutputHandler instance, the methods of the instance are as follows:"
+msgstr ""
+
+#: of pywebio.output.output:13
+msgid "``reset(*contents)`` : Reset original contents to ``contents``"
+msgstr ""
+
+#: of pywebio.output.output:14
+msgid "``append(*contents)`` : Append ``contents`` to original contents"
+msgstr ""
+
+#: of pywebio.output.output:15
+msgid "``insert(idx, *contents)`` : insert ``contents`` into original contents."
+msgstr ""
+
+#: of pywebio.output.output
+msgid ""
+"when idx>=0, the output content is inserted before the element of the "
+"``idx`` index."
+msgstr ""
+
+#: of pywebio.output.output
+msgid ""
+"when idx<0, the output content is inserted after the element of the "
+"``idx`` index."
+msgstr ""
+
+#: of pywebio.output.output:20
+msgid "Among them, the parameter ``contents`` is the same as ``output()``."
+msgstr ""
+
+#: of pywebio.output.output:24
+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 ""
+
+#: ../../outdate.rst:16
+msgid "``session`` module"
+msgstr ""
+
+#: of pywebio.session.get_info:1
+msgid "Get information about the current session"
+msgstr ""
+
+#: of pywebio.session.get_info:3
+msgid "Use `info <pywebio.session.info>` instead."
+msgstr ""
+
+#: of pywebio.session.data:1
+msgid "Get the session-local object of current session."
+msgstr ""
+
+#: of pywebio.session.data:4
+msgid "Use `local <pywebio.session.local>` instead."
+msgstr ""
+
+#: ../../outdate.rst:23
+msgid "``platform`` module"
+msgstr ""
+
+#: of pywebio.platform.page.seo:1
+msgid ""
+"Set the SEO information of the PyWebIO application (web page information "
+"provided when indexed by search engines)"
+msgstr ""
+
+#: of pywebio.platform.page.seo:3
+msgid "Application title"
+msgstr ""
+
+#: of pywebio.platform.page.seo:4
+msgid "Application description"
+msgstr ""
+
+#: of pywebio.platform.page.seo:5
+msgid "PyWebIO task function"
+msgstr ""
+
+#: of pywebio.platform.page.seo:7
+msgid ""
+"If ``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 ""
+
+#: of pywebio.platform.page.seo:9
+msgid "``seo()`` can be used in 2 ways: direct call and decorator::"
+msgstr ""
+
+#: of pywebio.platform.page.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 ""
+
+#: of pywebio.platform.page.seo:32
+msgid "Use :func:`pywebio.config` instead."
+msgstr ""
+

BIN
docs/locales/fa/LC_MESSAGES/output.mo


+ 1791 - 0
docs/locales/fa/LC_MESSAGES/output.po

@@ -0,0 +1,1791 @@
+# 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 12:35+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"
+
+#: ../../output.rst:2
+msgid "``pywebio.output`` --- Make output to web browser"
+msgstr "``pywebio.output`` --- ایجاد خروجی به مرورگر وب"
+
+#: of pywebio.output:1
+msgid ""
+"This module provides functions to output all kinds of content to the "
+"user's browser, and supply flexible output control."
+msgstr ""
+
+#: of pywebio.output:8
+msgid "Functions list"
+msgstr ""
+
+#: of pywebio.output:12
+msgid ""
+"The following table shows the output-related functions provided by "
+"PyWebIO."
+msgstr ""
+
+#: of pywebio.output:13
+msgid ""
+"The functions marked with ``*`` indicate that they accept ``put_xxx`` "
+"calls as arguments."
+msgstr ""
+
+#: of pywebio.output:14
+msgid ""
+"The functions marked with ``†`` indicate that they can use as context "
+"manager."
+msgstr ""
+
+#: of pywebio.output:17
+msgid "**Name**"
+msgstr ""
+
+#: of pywebio.output:17
+msgid "**Description**"
+msgstr ""
+
+#: of pywebio.output:19 pywebio.output:87
+msgid "Output Scope"
+msgstr ""
+
+#: of pywebio.output:19
+msgid "`put_scope`"
+msgstr ""
+
+#: of pywebio.output:19
+msgid "Create a new scope"
+msgstr ""
+
+#: of pywebio.output:21
+msgid "`use_scope`:sup:`†`"
+msgstr ""
+
+#: of pywebio.output:21
+msgid "Enter a scope"
+msgstr ""
+
+#: of pywebio.output:23
+msgid "`get_scope`"
+msgstr ""
+
+#: of pywebio.output:23
+msgid "Get the current scope name in the runtime scope stack"
+msgstr ""
+
+#: of pywebio.output:25
+msgid "`clear`"
+msgstr ""
+
+#: of pywebio.output:25
+msgid "Clear the content of scope"
+msgstr ""
+
+#: of pywebio.output:27
+msgid "`remove`"
+msgstr ""
+
+#: of pywebio.output:27
+msgid "Remove the scope"
+msgstr ""
+
+#: of pywebio.output:29
+msgid "`scroll_to`"
+msgstr ""
+
+#: of pywebio.output:29
+msgid "Scroll the page to the scope"
+msgstr ""
+
+#: of pywebio.output:31 pywebio.output:101
+msgid "Content Outputting"
+msgstr ""
+
+#: of pywebio.output:31
+msgid "`put_text`"
+msgstr ""
+
+#: of pywebio.output:31 pywebio.output.put_text:1
+msgid "Output plain text"
+msgstr ""
+
+#: of pywebio.output:33
+msgid "`put_markdown`"
+msgstr ""
+
+#: of pywebio.output:33 pywebio.output.put_markdown:1
+msgid "Output Markdown"
+msgstr ""
+
+#: of pywebio.output
+msgid "`put_info`:sup:`*†`"
+msgstr ""
+
+#: of pywebio.output
+msgid "`put_success`:sup:`*†`"
+msgstr ""
+
+#: of pywebio.output
+msgid "`put_warning`:sup:`*†`"
+msgstr ""
+
+#: of pywebio.output
+msgid "`put_error`:sup:`*†`"
+msgstr ""
+
+#: of pywebio.output:35 pywebio.output:164
+msgid "Output Messages."
+msgstr ""
+
+#: of pywebio.output:40
+msgid "`put_html`"
+msgstr ""
+
+#: of pywebio.output:40
+msgid "Output html"
+msgstr ""
+
+#: of pywebio.output:42
+msgid "`put_link`"
+msgstr ""
+
+#: of pywebio.output:42
+msgid "Output link"
+msgstr ""
+
+#: of pywebio.output:44
+msgid "`put_processbar`"
+msgstr ""
+
+#: of pywebio.output:44 pywebio.output.put_processbar:1
+msgid "Output a process bar"
+msgstr ""
+
+#: of pywebio.output:46
+msgid "`put_loading`:sup:`†`"
+msgstr ""
+
+#: of pywebio.output:46 pywebio.output.put_loading:1
+msgid "Output loading prompt"
+msgstr ""
+
+#: of pywebio.output:48
+msgid "`put_code`"
+msgstr ""
+
+#: of pywebio.output:48 pywebio.output.put_code:1
+msgid "Output code block"
+msgstr ""
+
+#: of pywebio.output:50
+msgid "`put_table`:sup:`*`"
+msgstr ""
+
+#: of pywebio.output:50 pywebio.output.put_table:1
+msgid "Output table"
+msgstr ""
+
+#: of pywebio.output
+msgid "`put_button`"
+msgstr ""
+
+#: of pywebio.output
+msgid "`put_buttons`"
+msgstr ""
+
+#: of pywebio.output:52
+msgid "Output button and bind click event"
+msgstr ""
+
+#: of pywebio.output:55
+msgid "`put_image`"
+msgstr ""
+
+#: of pywebio.output:55 pywebio.output.put_image:1
+msgid "Output image"
+msgstr ""
+
+#: of pywebio.output:57
+msgid "`put_file`"
+msgstr ""
+
+#: of pywebio.output:57 pywebio.output.put_file:1
+msgid "Output a link to download a file"
+msgstr ""
+
+#: of pywebio.output:59
+msgid "`put_tabs`:sup:`*`"
+msgstr ""
+
+#: of pywebio.output:59
+msgid "Output tabs"
+msgstr ""
+
+#: of pywebio.output:61
+msgid "`put_collapse`:sup:`*†`"
+msgstr ""
+
+#: of pywebio.output:61 pywebio.output.put_collapse:1
+msgid "Output collapsible content"
+msgstr ""
+
+#: of pywebio.output:63
+msgid "`put_scrollable`:sup:`*†`"
+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:67
+msgid "`put_widget`:sup:`*`"
+msgstr ""
+
+#: of pywebio.output:67 pywebio.output.put_widget:1
+msgid "Output your own widget"
+msgstr ""
+
+#: of pywebio.output:69 pywebio.output:191
+msgid "Other Interactions"
+msgstr ""
+
+#: of pywebio.output:69
+msgid "`toast`"
+msgstr ""
+
+#: of pywebio.output:69
+msgid "Show a notification message"
+msgstr ""
+
+#: of pywebio.output:71
+msgid "`popup`:sup:`*†`"
+msgstr ""
+
+#: of pywebio.output:71
+msgid "Show popup"
+msgstr ""
+
+#: of pywebio.output:73
+msgid "`close_popup`"
+msgstr ""
+
+#: of pywebio.output:73 pywebio.output.close_popup:1
+msgid "Close the current popup window."
+msgstr ""
+
+#: of pywebio.output:75 pywebio.output:199
+msgid "Layout and Style"
+msgstr ""
+
+#: of pywebio.output:75
+msgid "`put_row`:sup:`*†`"
+msgstr ""
+
+#: of pywebio.output:75
+msgid "Use row layout to output content"
+msgstr ""
+
+#: of pywebio.output:77
+msgid "`put_column`:sup:`*†`"
+msgstr ""
+
+#: of pywebio.output:77
+msgid "Use column layout to output content"
+msgstr ""
+
+#: of pywebio.output:79
+msgid "`put_grid`:sup:`*`"
+msgstr ""
+
+#: of pywebio.output:79 pywebio.output.put_grid:1
+msgid "Output content using grid layout"
+msgstr ""
+
+#: of pywebio.output:81
+msgid "`span`"
+msgstr ""
+
+#: of pywebio.output:81
+msgid "Cross-cell content"
+msgstr ""
+
+#: of pywebio.output:83
+msgid "`style`:sup:`*`"
+msgstr ""
+
+#: of pywebio.output:83 pywebio.output.style:1
+msgid "Customize the css style of output content"
+msgstr ""
+
+#: of pywebio.output:91
+msgid ":ref:`Use Guide: Output Scope <output_scope>`"
+msgstr ""
+
+#: of pywebio.output.put_scope:1
+msgid "Output a scope"
+msgstr ""
+
+#: of pywebio.output pywebio.output.clear pywebio.output.get_scope
+#: pywebio.output.popup pywebio.output.put_button 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_scope pywebio.output.put_scrollable
+#: pywebio.output.put_table pywebio.output.put_tabs pywebio.output.put_text
+#: pywebio.output.put_widget pywebio.output.remove pywebio.output.scroll_to
+#: pywebio.output.set_processbar pywebio.output.span pywebio.output.style
+#: pywebio.output.toast pywebio.output.use_scope
+msgid "Parameters"
+msgstr ""
+
+#: of pywebio.output.put_scope:4
+msgid "The initial content of the scope, can be ``put_xxx()`` or a list of it."
+msgstr ""
+
+#: of pywebio.output:169 pywebio.output.put_buttons:46
+#: 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:10 pywebio.output.put_link:7
+#: pywebio.output.put_loading:6 pywebio.output.put_markdown:10
+#: pywebio.output.put_processbar:7 pywebio.output.put_row:19
+#: pywebio.output.put_scope:5 pywebio.output.put_scrollable:11
+#: pywebio.output.put_table:13 pywebio.output.put_tabs:5
+#: pywebio.output.put_widget:11
+msgid "Those arguments have the same meaning as for `put_text()`"
+msgstr ""
+
+#: of pywebio.output.use_scope:1
+msgid "Open or enter a scope. Can be used as context manager and decorator."
+msgstr ""
+
+#: of pywebio.output.use_scope:3
+msgid "See :ref:`User manual - use_scope() <use_scope>`"
+msgstr ""
+
+#: 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 ""
+
+#: of pywebio.output.use_scope:7
+msgid "Whether to clear the contents of the scope before entering the scope."
+msgstr ""
+
+#: of pywebio.output.use_scope
+msgid "Usage"
+msgstr ""
+
+#: of pywebio.output.use_scope:13
+msgid ""
+"with use_scope(...) as scope_name:\n"
+"    put_xxx()\n"
+"\n"
+"@use_scope(...)\n"
+"def app():\n"
+"    put_xxx()"
+msgstr ""
+
+#: of pywebio.output.get_scope:1
+msgid "Get the scope name of runtime scope stack"
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.output.get_scope 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 ""
+
+#: of pywebio.output.clear:1
+msgid "Clear the content of the specified scope"
+msgstr ""
+
+#: of pywebio.output.clear:3 pywebio.output.remove:3
+msgid "Target scope name. Default is the current scope."
+msgstr ""
+
+#: of pywebio.output.remove:1
+msgid "Remove the specified scope"
+msgstr ""
+
+#: of pywebio.output.scroll_to:1
+msgid "Scroll the page to the specified scope"
+msgstr ""
+
+#: of pywebio.output.scroll_to:3
+msgid "Target scope. Default is the current scope."
+msgstr ""
+
+#: 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 ""
+
+#: of pywebio.output.scroll_to:6
+msgid "``'top'`` : Keep the scope at the top of the visible area of the page"
+msgstr ""
+
+#: of pywebio.output.scroll_to:7
+msgid ""
+"``'middle'`` : Keep the scope at the middle of the visible area of the "
+"page"
+msgstr ""
+
+#: of pywebio.output.scroll_to:8
+msgid ""
+"``'bottom'`` : Keep the scope at the bottom of the visible area of the "
+"page"
+msgstr ""
+
+#: of pywebio.output:105
+msgid "**Scope related parameters of output function**"
+msgstr ""
+
+#: of pywebio.output:107
+msgid ""
+"The output function will output the content to the \"current scope\" by "
+"default, and the \"current scope\" for the runtime context can be set by "
+"`use_scope()`."
+msgstr ""
+
+#: of pywebio.output:110
+msgid ""
+"In addition, all output functions support a ``scope`` parameter to "
+"specify the destination scope to output:"
+msgstr ""
+
+#: of pywebio.output:112
+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 ""
+
+#: of pywebio.output:122
+msgid "The results of the above code are as follows::"
+msgstr ""
+
+#: of pywebio.output:124
+msgid ""
+"text1 in scope3\n"
+"text2 in scope3\n"
+"text in ROOT scope"
+msgstr ""
+
+#: of pywebio.output:128
+msgid ""
+"A scope can contain multiple output items, the default behavior of output"
+" function is to append its content to target scope. The ``position`` "
+"parameter of output function can be used to specify the insert position "
+"in target scope."
+msgstr ""
+
+#: of pywebio.output:131
+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 ""
+
+#: of pywebio.output:134
+msgid ""
+"The ``position`` parameter of output functions accepts 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 ""
+
+#: of pywebio.output:138
+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 ""
+
+#: of pywebio.output:154
+msgid "**Output functions**"
+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 ""
+
+#: 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 ""
+
+#: of pywebio.output.put_text:8
+msgid ""
+"Can specify the scope name or use a integer to index the runtime scope "
+"stack."
+msgstr ""
+
+#: of pywebio.output.put_text:9
+msgid "The position where the content is output in target scope"
+msgstr ""
+
+#: of pywebio.output.put_text:11
+msgid ""
+"For more information about ``scope`` and ``position`` parameter, please "
+"refer to :ref:`User Manual <scope_param>`"
+msgstr ""
+
+#: of pywebio.output.put_markdown:3
+msgid "Markdown string"
+msgstr ""
+
+#: of pywebio.output.put_markdown:4
+msgid ""
+"Whether to remove the leading whitespace in each line of ``mdcontent``. "
+"The number of the whitespace to remove will be decided cleverly."
+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 ""
+
+#: of pywebio.output.put_html:4 pywebio.output.put_markdown:9
+msgid ""
+"Whether to use `DOMPurify <https://github.com/cure53/DOMPurify>`_ to "
+"filter the content to prevent XSS attacks."
+msgstr ""
+
+#: of pywebio.output.put_markdown:12
+msgid ""
+"When using Python triple quotes syntax to output multi-line Markdown in a"
+" function, you can indent the Markdown text to keep a good code format. "
+"PyWebIO will cleverly remove the indent for you when show the Markdown::"
+msgstr ""
+
+#: of pywebio.output.put_markdown:16
+msgid ""
+"# good code format\n"
+"def hello():\n"
+"    put_markdown(r\"\"\" # H1\n"
+"    This is content.\n"
+"    \"\"\")"
+msgstr ""
+
+#: of pywebio.output.put_markdown:22
+msgid "Enable `lstrip` by default. Deprecate `strip_indent`."
+msgstr ""
+
+#: of pywebio.output:166
+msgid ""
+"Message contents. The item is ``put_xxx()`` call, and any other type will"
+" be converted to ``put_text(content)``."
+msgstr ""
+
+#: of pywebio.output:168
+msgid "Whether to show a dismiss button on the right of the message."
+msgstr ""
+
+#: of pywebio.output.put_html:1
+msgid "Output HTML content"
+msgstr ""
+
+#: of pywebio.output.put_html:3
+msgid "html string"
+msgstr ""
+
+#: of pywebio.output.put_link:1
+msgid "Output hyperlinks to other web page or PyWebIO Application page."
+msgstr ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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_button:10 pywebio.output.put_buttons:20
+#: pywebio.output.put_buttons:63 pywebio.output.put_collapse:9
+#: pywebio.output.put_file:10 pywebio.output.put_image:12
+#: pywebio.output.put_processbar:9 pywebio.output.put_scrollable:13
+#: pywebio.output.put_table:15 pywebio.output.toast:14
+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.put_processbar:22
+msgid "use `set_processbar()` to set the progress of progress bar"
+msgstr ""
+
+#: of pywebio.output.set_processbar:1
+msgid "Set the progress of progress bar"
+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 ""
+
+#: of pywebio.output.set_processbar:7
+msgid "See also: `put_processbar()`"
+msgstr ""
+
+#: of pywebio.output.put_loading:3
+msgid ""
+"The shape of loading prompt. The available values are: `'border'` "
+"(default)、 `'grow'`"
+msgstr ""
+
+#: 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 ""
+
+#: of pywebio.output.put_loading:8
+msgid "`put_loading()` can be used in 2 ways: direct call and context manager:"
+msgstr ""
+
+#: 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"
+"import time  # ..demo-only\n"
+"# Use as context manager, the loading prompt will disappear automatically"
+" when the context block exits.\n"
+"with put_loading():\n"
+"    time.sleep(3)  # Some time-consuming operations\n"
+"    put_text(\"The answer of the universe is 42\")\n"
+"\n"
+"## ----\n"
+"# using style() to set the size of the loading prompt\n"
+"put_loading().style('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 ""
+
+#: 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 ""
+
+#: of pywebio.output.put_table:10
+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 ""
+
+#: of pywebio.output.put_table:17
+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=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"
+"])\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:56
+msgid "The cell of table support ``put_xxx()`` calls."
+msgstr ""
+
+#: of pywebio.output.span:1
+msgid "Create cross-cell content in :func:`put_table()` and :func:`put_grid()`"
+msgstr ""
+
+#: of pywebio.output.span:3
+msgid "cell content. It can be a string or ``put_xxx()`` call."
+msgstr ""
+
+#: 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.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:1
+msgid "Output a group of buttons and bind click event"
+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,         "
+"\"disabled\":(bool, optional) whether the button is disabled     }  * "
+"tuple or list: ``(label, value)`` * single value: label and value of "
+"option use the same value  The ``value`` of button can be any type. 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='success', value='s', "
+"color='success')], 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::"
+msgstr ""
+
+#: of pywebio.output.put_buttons:7
+msgid ""
+"{\n"
+"    \"label\":(str)button label,\n"
+"    \"value\":(str)button value,\n"
+"    \"color\":(str, optional)button color,\n"
+"    \"disabled\":(bool, optional) whether the button is disabled\n"
+"}"
+msgstr ""
+
+#: of pywebio.output.put_buttons:14
+msgid "tuple or list: ``(label, value)``"
+msgstr ""
+
+#: of pywebio.output.put_buttons:15
+msgid "single value: label and value of option use the same value"
+msgstr ""
+
+#: of pywebio.output.put_buttons:17
+msgid ""
+"The ``value`` of button can be any type. The ``color`` of button can be "
+"one of: `primary`, `secondary`, `success`, `danger`, `warning`, `info`, "
+"`light`, `dark`."
+msgstr ""
+
+#: of pywebio.output.put_buttons:22
+msgid ""
+"put_buttons([dict(label='success', value='s', color='success')], "
+"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:33
+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:33
+msgid ""
+"Callback which will be called when button is clicked. ``onclick`` can be "
+"a callable object or a list of it."
+msgstr ""
+
+#: of pywebio.output.put_buttons:35
+msgid ""
+"If ``onclick`` is callable object, its signature is "
+"``onclick(btn_value)``. ``btn_value`` is ``value`` of the button that is "
+"clicked."
+msgstr ""
+
+#: of pywebio.output.put_buttons:37
+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 ""
+
+#: of pywebio.output.put_buttons:39
+msgid ""
+"Tip: You can use ``functools.partial`` to save more context information "
+"in ``onclick``."
+msgstr ""
+
+#: of pywebio.output.put_buttons:41
+msgid ""
+"Note: When in :ref:`Coroutine-based session  <coroutine_based_session>`, "
+"the callback can be a coroutine function."
+msgstr ""
+
+#: of pywebio.output.put_buttons:42
+msgid "Whether to use small size button. Default is False."
+msgstr ""
+
+#: of pywebio.output.put_buttons:43
+msgid "Whether to use link style button. Default is False"
+msgstr ""
+
+#: of pywebio.output.put_buttons:44
+msgid "Whether to use outline style button. Default is False"
+msgstr ""
+
+#: of pywebio.output.put_buttons:45
+msgid "Whether to group the buttons together. Default is False"
+msgstr ""
+
+#: of pywebio.output.put_buttons:47
+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:47
+msgid ""
+"Other options of the ``onclick`` callback. There are different options "
+"according to the session implementation"
+msgstr ""
+
+#: of pywebio.output.put_buttons:51
+msgid "When in Coroutine-based Session:"
+msgstr ""
+
+#: of pywebio.output.put_buttons:50
+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 ""
+
+#: of pywebio.output.put_buttons:61
+msgid "When in Thread-based Session:"
+msgstr ""
+
+#: of pywebio.output.put_buttons:54
+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 ""
+
+#: of pywebio.output.put_buttons:57
+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 ""
+
+#: of pywebio.output.put_buttons:65
+#, 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:84
+msgid ""
+"Add ``disabled`` button support. The ``value`` of button can be any "
+"object."
+msgstr ""
+
+#: of pywebio.output.put_button:1
+msgid "Output a single button and bind click event to it."
+msgstr ""
+
+#: of pywebio.output.put_button:3
+msgid "Button label"
+msgstr ""
+
+#: of pywebio.output.put_button:4
+msgid "Callback which will be called when button is clicked."
+msgstr ""
+
+#: of pywebio.output.put_button:5
+msgid ""
+"The color of the button, can be one of: `primary`, `secondary`, "
+"`success`, `danger`, `warning`, `info`, `light`, `dark`."
+msgstr ""
+
+#: of pywebio.output.put_button:7
+msgid "Whether the button is disabled"
+msgstr ""
+
+#: of pywebio.output.put_button:8
+msgid "Those arguments have the same meaning as for `put_buttons()`"
+msgstr ""
+
+#: of pywebio.output.put_button:12
+msgid ""
+"put_button(\"click me\", onclick=lambda: toast(\"Clicked\"), "
+"color='success', outline=True)"
+msgstr ""
+
+#: of pywebio.output.put_button:20
+msgid "add ``disabled`` parameter"
+msgstr ""
+
+#: 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 ""
+
+#: of pywebio.output.put_image:5
+msgid "Image description."
+msgstr ""
+
+#: of pywebio.output.put_image:6
+msgid ""
+"The width of image. It can be CSS pixels (like `'30px'`) or percentage "
+"(like `'10%'`)."
+msgstr ""
+
+#: of pywebio.output.put_image:7
+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 ""
+
+#: of pywebio.output.put_image:9
+msgid ""
+"Image format, optinoal. e.g.: ``png``, ``jpeg``, ``gif``, etc. Only "
+"available when `src` is non-URL"
+msgstr ""
+
+#: of pywebio.output.put_image:14
+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 downloaded as"
+msgstr ""
+
+#: of pywebio.output.put_file:6
+msgid "File content. It is a bytes-like object"
+msgstr ""
+
+#: 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 ""
+"content = open('./some-file', 'rb').read()  # ..doc-only\n"
+"content = open('README.md', 'rb').read()    # ..demo-only\n"
+"put_file('hello-world.txt', content, 'download me')"
+msgstr ""
+
+#: of pywebio.output.put_tabs:1
+msgid "Output tabs."
+msgstr ""
+
+#: of pywebio.output.put_tabs:3
+msgid ""
+"Tab list, each item is a dict: ``{\"title\": \"Title\", \"content\": "
+"...}`` . The ``content`` can be a string, the ``put_xxx()`` calls , or a "
+"list of them."
+msgstr ""
+
+#: of pywebio.output.put_tabs:7
+msgid ""
+"put_tabs([\n"
+"    {'title': 'Text', 'content': 'Hello world'},\n"
+"    {'title': 'Markdown', 'content': put_markdown('~~Strikethrough~~')},\n"
+"    {'title': 'More content', 'content': [\n"
+"        put_table([\n"
+"            ['Commodity', 'Price'],\n"
+"            ['Apple', '5.5'],\n"
+"            ['Banana', '7'],\n"
+"        ]),\n"
+"        put_link('pywebio', 'https://github.com/wang0618/PyWebIO')\n"
+"    ]},\n"
+"])"
+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 ""
+
+#: 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. Set ``None`` if you don't want to "
+"limit the height"
+msgstr ""
+
+#: of pywebio.output.put_scrollable:9
+msgid "Whether to keep the content area scrolled to the bottom when updated."
+msgstr ""
+
+#: of pywebio.output.put_scrollable:10
+msgid "Whether to show border"
+msgstr ""
+
+#: of pywebio.output.put_scrollable:15
+msgid ""
+"import time\n"
+"\n"
+"put_scrollable(put_scope('scrollable'), height=200, keep_bottom=True)\n"
+"put_text(\"You can click the area to prevent auto scroll.\", "
+"scope='scrollable')\n"
+"\n"
+"while 1:\n"
+"    put_text(time.time(), scope='scrollable')\n"
+"    time.sleep(0.5)"
+msgstr ""
+
+#: of pywebio.output.put_scrollable:28
+msgid ""
+"add ``height`` parameter,remove ``max_height`` parameter; add "
+"``keep_bottom`` parameter"
+msgstr ""
+
+#: of pywebio.output.put_scrollable:32
+msgid "remove ``horizon_scroll`` parameter"
+msgstr ""
+
+#: of pywebio.output.put_widget:3
+msgid ""
+"html template, using `mustache.js <https://github.com/janl/mustache.js>`_"
+" syntax"
+msgstr ""
+
+#: 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 ""
+
+#: of pywebio.output.put_widget:9
+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 ""
+
+#: of pywebio.output.put_widget:15
+msgid ""
+"tpl = '''\n"
+"<details {{#open}}open{{/open}}>\n"
+"    <summary>{{title}}</summary>\n"
+"    {{#contents}}\n"
+"        {{& pywebio_output_parse}}\n"
+"    {{/contents}}\n"
+"</details>\n"
+"'''\n"
+"\n"
+"put_widget(tpl, {\n"
+"    \"open\": True,\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 ""
+
+#: of pywebio.output.toast:6
+msgid ""
+"Where to display the notification message. Available values are `'left'`,"
+" `'center'` and `'right'`."
+msgstr ""
+
+#: of pywebio.output.toast:7
+msgid ""
+"Background color of the notification. Available values are `'info'`, "
+"`'error'`, `'warn'`, `'success'` or hexadecimal color value starting with"
+" `'#'`"
+msgstr ""
+
+#: of pywebio.output.toast:9
+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:9
+msgid ""
+"The callback function when the notification message is clicked. The "
+"callback function receives no parameters."
+msgstr ""
+
+#: of pywebio.output.toast:12
+msgid ""
+"Note: When in :ref:`Coroutine-based session <coroutine_based_session>`, "
+"the callback can be a coroutine function."
+msgstr ""
+
+#: of pywebio.output.toast:16
+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 show 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 ""
+
+#: of pywebio.output.popup:6
+msgid "The title of the popup."
+msgstr ""
+
+#: of pywebio.output.popup:8
+msgid ""
+"The content of the popup can be a string, the put_xxx() calls , or a list"
+" of them."
+msgstr ""
+
+#: of pywebio.output.popup:9
+msgid ""
+"The size of popup window. Available values are: ``'large'``, ``'normal'``"
+" and ``'small'``."
+msgstr ""
+
+#: of pywebio.output.popup:10
+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 ""
+
+#: of pywebio.output.popup:12
+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 ""
+
+#: of pywebio.output.popup:17
+msgid ""
+"``popup()`` can be used in 3 ways: direct call, context manager, and "
+"decorator."
+msgstr ""
+
+#: of pywebio.output.popup:19
+msgid "direct call:"
+msgstr ""
+
+#: of pywebio.output.popup:21
+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:35
+msgid "context manager:"
+msgstr ""
+
+#: of pywebio.output.popup:37
+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:49
+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:54
+msgid "decorator:"
+msgstr ""
+
+#: of pywebio.output.popup:56
+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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.output.put_row:12
+msgid ""
+"percentage: Indicates the percentage of available width. like ``33.33%``"
+msgstr ""
+
+#: of pywebio.output.put_row:13
+msgid ""
+"``fr`` keyword: Represents a scale relationship, 2fr represents twice the"
+" width of 1fr"
+msgstr ""
+
+#: of pywebio.output.put_row:14
+msgid ""
+"``auto`` keyword: Indicates that the length is determined by the browser"
+msgstr ""
+
+#: 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 ""
+
+#: of pywebio.output.put_row:23
+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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.output.put_grid
+msgid "``'row'`` : Places items by filling each row"
+msgstr ""
+
+#: of pywebio.output.put_grid
+msgid "``'column'`` : Places items by filling each column"
+msgstr ""
+
+#: 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 ""
+
+#: of pywebio.output.put_grid:24
+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 "See :ref:`User Guide <style>` for new way to set css style for output."
+msgstr ""
+
+#: of pywebio.output.style:6
+msgid "The output content can be a ``put_xxx()`` call or a list of it."
+msgstr ""
+
+#: of pywebio.output.style:8
+msgid "css style string"
+msgstr ""
+
+#: of pywebio.output.style:9
+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:9
+msgid "The output contents with css style added:"
+msgstr ""
+
+#: of pywebio.output.style:11
+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 ""
+
+#: of pywebio.output.style:16
+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 ""
+

BIN
docs/locales/fa/LC_MESSAGES/pin.mo


+ 320 - 0
docs/locales/fa/LC_MESSAGES/pin.po

@@ -0,0 +1,320 @@
+# 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 12:43+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 ""
+
+#: 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 ""
+

BIN
docs/locales/fa/LC_MESSAGES/platform.mo


+ 650 - 0
docs/locales/fa/LC_MESSAGES/platform.po

@@ -0,0 +1,650 @@
+# 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 12:40+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"
+
+#: ../../platform.rst:2
+msgid "``pywebio.platform`` --- Deploy applications"
+msgstr "``pywebio.platform`` --- دیپلوی کردن اپلیکیشن ها"
+
+#: of pywebio.platform:1
+msgid ""
+"The ``platform`` module provides support for deploying PyWebIO "
+"applications in different ways."
+msgstr ""
+
+#: of pywebio.platform:8
+msgid ":ref:`Use Guide: Server mode and Script mode <server_and_script_mode>`"
+msgstr ""
+
+#: of pywebio.platform:10
+msgid ""
+":ref:`Advanced Topic: Integration with Web Framework "
+"<integration_web_framework>`"
+msgstr ""
+
+#: of pywebio.platform:16
+msgid "Directory Deploy"
+msgstr ""
+
+#: of pywebio.platform:18
+msgid ""
+"You can use ``path_deploy()`` or ``path_deploy_http()`` to deploy the "
+"PyWebIO applications from a directory. The python file under this "
+"directory need contain the ``main`` function to be seen as the PyWebIO "
+"application. You can access the application by using the file path as the"
+" URL."
+msgstr ""
+
+#: of pywebio.platform:22
+msgid ""
+"Note that users can't view and access files or folders whose name begin "
+"with the underscore in this directory."
+msgstr ""
+
+#: of pywebio.platform:24
+msgid "For example, given the following folder structure::"
+msgstr ""
+
+#: of pywebio.platform:26
+msgid ""
+".\n"
+"├── A\n"
+"│   └── a.py\n"
+"├── B\n"
+"│   └── b.py\n"
+"└── c.py"
+msgstr ""
+
+#: of pywebio.platform:33
+msgid "All three python files contain ``main`` PyWebIO application function."
+msgstr ""
+
+#: of pywebio.platform:35
+msgid ""
+"If you use this directory in `path_deploy() "
+"<pywebio.platform.path_deploy>`, you can access the PyWebIO application "
+"in ``b.py`` by using URL ``http://<host>:<port>/A/b``. And if the files "
+"have been modified after run `path_deploy() "
+"<pywebio.platform.path_deploy>`, you can use ``reload`` URL parameter to "
+"reload application in the file: ``http://<host>:<port>/A/b?reload``"
+msgstr ""
+
+#: of pywebio.platform:40
+msgid ""
+"You can also use the command ``pywebio-path-deploy`` to start a server "
+"just like using `path_deploy() <pywebio.platform.path_deploy>`. For more "
+"information, refer ``pywebio-path-deploy --help``"
+msgstr ""
+
+#: of pywebio.platform.path_deploy.path_deploy:1
+#: pywebio.platform.path_deploy.path_deploy_http:1
+msgid "Deploy the PyWebIO applications from a directory."
+msgstr ""
+
+#: of pywebio.platform.path_deploy.path_deploy:3
+msgid "The server communicates with the browser using WebSocket protocol."
+msgstr ""
+
+#: of pywebio.platform.httpbased.run_event_loop pywebio.platform.page.config
+#: pywebio.platform.path_deploy.path_deploy
+#: pywebio.platform.tornado.start_server
+#: pywebio.platform.tornado_http.start_server
+msgid "Parameters"
+msgstr ""
+
+#: of pywebio.platform.path_deploy.path_deploy:5
+msgid "Base directory to load PyWebIO application."
+msgstr ""
+
+#: of pywebio.platform.path_deploy.path_deploy:6
+msgid "The port the server listens on."
+msgstr ""
+
+#: of pywebio.platform.path_deploy.path_deploy:7
+msgid "The host the server listens on."
+msgstr ""
+
+#: of pywebio.platform.path_deploy.path_deploy:8
+msgid ""
+"Whether to provide a default index page when request a directory, default"
+" is ``True``. ``index`` also accepts a function to custom index page, "
+"which receives the requested directory path as parameter and return HTML "
+"content in string.  You can override the index page by add a `index.py` "
+"PyWebIO app file to the directory."
+msgstr ""
+
+#: of pywebio.platform.path_deploy.path_deploy:8
+msgid ""
+"Whether to provide a default index page when request a directory, default"
+" is ``True``. ``index`` also accepts a function to custom index page, "
+"which receives the requested directory path as parameter and return HTML "
+"content in string."
+msgstr ""
+
+#: of pywebio.platform.path_deploy.path_deploy:12
+msgid ""
+"You can override the index page by add a `index.py` PyWebIO app file to "
+"the directory."
+msgstr ""
+
+#: of pywebio.platform.path_deploy.path_deploy:13
+msgid ""
+"Directory to store the application static files. The files in this "
+"directory can be accessed via ``http://<host>:<port>/static/files``. For "
+"example, if there is a ``A/B.jpg`` file in ``static_dir`` path, it can be"
+" accessed via ``http://<host>:<port>/static/A/B.jpg``."
+msgstr ""
+
+#: of pywebio.platform.path_deploy.path_deploy:17
+#: pywebio.platform.tornado.start_server:31
+msgid ""
+"The client can reconnect to server within ``reconnect_timeout`` seconds "
+"after an unexpected disconnection. If set to 0 (default), once the client"
+" disconnects, the server session will be closed."
+msgstr ""
+
+#: of pywebio.platform.path_deploy.path_deploy:20
+msgid ""
+"The rest arguments of ``path_deploy()`` have the same meaning as for "
+":func:`pywebio.platform.tornado.start_server`"
+msgstr ""
+
+#: of pywebio.platform.path_deploy.path_deploy_http:3
+msgid "The server communicates with the browser using HTTP protocol."
+msgstr ""
+
+#: of pywebio.platform.path_deploy.path_deploy_http:5
+msgid ""
+"The ``base``, ``port``, ``host``, ``index``, ``static_dir`` arguments of "
+"``path_deploy_http()`` have the same meaning as for "
+":func:`pywebio.platform.path_deploy`"
+msgstr ""
+
+#: of pywebio.platform.path_deploy.path_deploy_http:8
+msgid ""
+"The rest arguments of ``path_deploy_http()`` have the same meaning as for"
+" :func:`pywebio.platform.tornado_http.start_server`"
+msgstr ""
+
+#: of pywebio.platform:50
+msgid "Application Deploy"
+msgstr ""
+
+#: of pywebio.platform:52
+msgid ""
+"The ``start_server()`` functions can start a Python Web server and serve "
+"given PyWebIO applications on it."
+msgstr ""
+
+#: of pywebio.platform:54
+msgid ""
+"The ``webio_handler()`` and ``webio_view()`` functions can be used to "
+"integrate PyWebIO applications into existing Python Web project."
+msgstr ""
+
+#: of pywebio.platform:56
+msgid ""
+"The ``wsgi_app()`` and ``asgi_app()`` is used to get the WSGI or ASGI app"
+" for running PyWebIO applications. This is helpful when you don't want to"
+" start server with the Web framework built-in's. For example, you want to"
+" use other WSGI server, or you are deploying app in a cloud environment. "
+"Note that only Flask, Django and FastApi backend support it."
+msgstr ""
+
+#: of pywebio.platform:63
+msgid ""
+"Added the ``cdn`` parameter in ``start_server()``, ``webio_handler()`` "
+"and ``webio_view()``."
+msgstr ""
+
+#: of pywebio.platform:67
+msgid "Added the ``static_dir`` parameter in ``start_server()``."
+msgstr ""
+
+#: of pywebio.platform:71
+msgid "Added the ``wsgi_app()`` and ``asgi_app()``."
+msgstr ""
+
+#: of pywebio.platform:74
+msgid "Tornado support"
+msgstr ""
+
+#: of pywebio.platform:76
+msgid ""
+"There are two protocols (WebSocket and HTTP) can be used to communicates "
+"with the browser:"
+msgstr ""
+
+#: of pywebio.platform:79
+msgid "WebSocket"
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:1
+#: pywebio.platform.tornado_http.start_server:1
+msgid ""
+"Start a Tornado server to provide the PyWebIO application as a web "
+"service."
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:3
+msgid "The Tornado server communicates with the browser by WebSocket protocol."
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:5
+msgid ""
+"Tornado is the default backend server for PyWebIO applications, and "
+"``start_server`` can be imported directly using ``from pywebio import "
+"start_server``."
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:8
+msgid ""
+"PyWebIO application. Can be a task function, a list of functions, or a "
+"dictionary. Refer to :ref:`Advanced topic: Multiple applications in "
+"start_server() <multiple_app>` for more information.  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:8
+msgid ""
+"PyWebIO application. Can be a task function, a list of functions, or a "
+"dictionary. Refer to :ref:`Advanced topic: Multiple applications in "
+"start_server() <multiple_app>` for more information."
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:12
+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 ""
+
+#: of pywebio.platform.tornado.start_server:14
+msgid ""
+"The port the server listens on. When set to ``0``, the server will "
+"automatically select a available port."
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:16
+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 ""
+
+#: of pywebio.platform.tornado.start_server:19
+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 ""
+
+#: of pywebio.platform.tornado.start_server:21
+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 ""
+
+#: of pywebio.platform.tornado.start_server:23
+msgid ""
+"The directory to store the application static files. The files in this "
+"directory can be accessed via ``http://<host>:<port>/static/files``. For "
+"example, if there is a ``A/B.jpg`` file in ``static_dir`` path, it can be"
+" accessed via ``http://<host>:<port>/static/A/B.jpg``."
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:27
+msgid ""
+"Whether to enable remote access, when enabled, you can get a temporary "
+"public network access address for the current application, others can "
+"access your application via this address."
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:30
+#: pywebio.platform.tornado.start_server:49
+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:33
+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:33
+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 ""
+
+#: of pywebio.platform.tornado.start_server:37
+msgid "``*`` matches everything"
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:38
+msgid "``?`` matches any single character"
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:39
+msgid "``[seq]`` matches any character in *seq*"
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:40
+msgid "``[!seq]`` matches any character not in *seq*"
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:42
+msgid "Such as: ``https://*.example.com`` 、 ``*://*.example.com``"
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:44
+msgid ""
+"For detail, see `Python Doc <https://docs.python.org/zh-"
+"tw/3/library/fnmatch.html>`_"
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:45
+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 ""
+
+#: of pywebio.platform.tornado.start_server:50
+msgid ""
+"Max size of a websocket message which Tornado can accept. Messages larger"
+" than the ``max_payload_size`` (default 200MB) will not be accepted. "
+"``max_payload_size`` can be a integer indicating the number of bytes, or "
+"a string ending with `K` / `M` / `G` (representing kilobytes, megabytes, "
+"and gigabytes, respectively). E.g: ``500``, ``'40K'``, ``'3M'``"
+msgstr ""
+
+#: of pywebio.platform.tornado.start_server:55
+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 ""
+
+#: 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 ""
+
+#: 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 ""
+
+#: of pywebio.platform:85
+msgid "HTTP"
+msgstr ""
+
+#: of pywebio.platform.tornado_http.start_server:3
+msgid "The Tornado server communicates with the browser by HTTP protocol."
+msgstr ""
+
+#: of pywebio.platform.tornado_http.start_server:5
+msgid ""
+"Session expiration time, in seconds(default 60s). If no client message is"
+" received within ``session_expire_seconds``, the session will be "
+"considered expired."
+msgstr ""
+
+#: of pywebio.platform.tornado_http.start_server:7
+msgid ""
+"Session cleanup interval, in seconds(default 120s). The server will "
+"periodically clean up expired sessions and release the resources occupied"
+" by the sessions."
+msgstr ""
+
+#: of pywebio.platform.tornado_http.start_server:9
+msgid "Max size of a request body which Tornado can accept."
+msgstr ""
+
+#: of pywebio.platform.tornado_http.start_server:11
+msgid ""
+"The rest arguments of ``start_server()`` have the same meaning as for "
+":func:`pywebio.platform.tornado.start_server`"
+msgstr ""
+
+#: of pywebio.platform.tornado_http.webio_handler:1
+msgid ""
+"Get the ``RequestHandler`` class for running PyWebIO applications in "
+"Tornado. The ``RequestHandler``  communicates with the browser by HTTP "
+"protocol."
+msgstr ""
+
+#: of pywebio.platform.tornado_http.webio_handler:4
+msgid ""
+"The arguments of ``webio_handler()`` have the same meaning as for "
+":func:`pywebio.platform.tornado_http.start_server`"
+msgstr ""
+
+#: of pywebio.platform:92
+msgid "Flask support"
+msgstr ""
+
+#: of pywebio.platform:94
+msgid ""
+"When using the Flask as PyWebIO backend server, you need to install Flask"
+" by yourself and make sure the version is not less than ``0.10``. You can"
+" install it with the following command::"
+msgstr ""
+
+#: of pywebio.platform:97
+msgid "pip3 install -U flask>=0.10"
+msgstr ""
+
+#: of pywebio.platform:105
+msgid "Django support"
+msgstr ""
+
+#: of pywebio.platform:107
+msgid ""
+"When using the Django as PyWebIO backend server, you need to install "
+"Django by yourself and make sure the version is not less than ``2.2``. "
+"You can install it with the following command::"
+msgstr ""
+
+#: of pywebio.platform:110
+msgid "pip3 install -U django>=2.2"
+msgstr ""
+
+#: of pywebio.platform:117
+msgid "aiohttp support"
+msgstr ""
+
+#: of pywebio.platform:119
+msgid ""
+"When using the aiohttp as PyWebIO backend server, you need to install "
+"aiohttp by yourself and make sure the version is not less than ``3.1``. "
+"You can install it with the following command::"
+msgstr ""
+
+#: of pywebio.platform:122
+msgid "pip3 install -U aiohttp>=3.1"
+msgstr ""
+
+#: of pywebio.platform:128
+msgid "FastAPI/Starlette support"
+msgstr ""
+
+#: of pywebio.platform:130
+msgid ""
+"When using the FastAPI/Starlette as PyWebIO backend server, you need to "
+"install ``fastapi`` or ``starlette`` by yourself. Also other dependency "
+"packages are required. You can install them with the following command::"
+msgstr ""
+
+#: of pywebio.platform:133
+msgid "pip3 install -U fastapi starlette uvicorn aiofiles websockets"
+msgstr ""
+
+#: of pywebio.platform:140
+msgid "Other"
+msgstr ""
+
+#: of pywebio.platform.page.config:1
+msgid "PyWebIO application configuration"
+msgstr ""
+
+#: of pywebio.platform.page.config:3
+msgid "Application title"
+msgstr ""
+
+#: of pywebio.platform.page.config:4
+msgid "Application description"
+msgstr ""
+
+#: of pywebio.platform.page.config:5
+msgid ""
+"Application theme. Available themes are: ``dark``, ``sketchy``, "
+"``minty``, ``yeti``. You can also use environment variable "
+"``PYWEBIO_THEME`` to specify the theme (with high priority).  "
+":demo_host:`Theme preview demo </theme>`  .. collapse:: Open Source "
+"Credits      The dark theme is modified from ForEvolve's `bootstrap-dark "
+"<https://github.com/ForEvolve/bootstrap-dark>`_.     The sketchy, minty "
+"and yeti theme are from `bootswatch <https://bootswatch.com/4/>`_."
+msgstr ""
+
+#: of pywebio.platform.page.config:5
+msgid ""
+"Application theme. Available themes are: ``dark``, ``sketchy``, "
+"``minty``, ``yeti``. You can also use environment variable "
+"``PYWEBIO_THEME`` to specify the theme (with high priority)."
+msgstr ""
+
+#: of pywebio.platform.page.config:8
+msgid ":demo_host:`Theme preview demo </theme>`"
+msgstr ""
+
+#: of pywebio.platform.page.config:12
+msgid ""
+"The dark theme is modified from ForEvolve's `bootstrap-dark "
+"<https://github.com/ForEvolve/bootstrap-dark>`_. The sketchy, minty and "
+"yeti theme are from `bootswatch <https://bootswatch.com/4/>`_."
+msgstr ""
+
+#: of pywebio.platform.page.config:15
+msgid "The javascript code that you want to inject to page."
+msgstr ""
+
+#: of pywebio.platform.page.config:16
+msgid ""
+"The javascript files that inject to page, can be a URL in str or a list "
+"of it."
+msgstr ""
+
+#: of pywebio.platform.page.config:17
+msgid "The CSS style that you want to inject to page."
+msgstr ""
+
+#: of pywebio.platform.page.config:18
+msgid "The CSS files that inject to page, can be a URL in str or a list of it."
+msgstr ""
+
+#: of pywebio.platform.page.config:20
+msgid ""
+"``config()`` can be used in 2 ways: direct call and decorator. If you "
+"call ``config()`` directly, the configuration will be global. If you use "
+"``config()`` as decorator, the configuration will only work on single "
+"PyWebIO application function. ::"
+msgstr ""
+
+#: of pywebio.platform.page.config:25
+msgid ""
+"config(title=\"My application\")\n"
+"\n"
+"@config(css_style=\"* { color:red }\")\n"
+"def app():\n"
+"    put_text(\"hello PyWebIO\")"
+msgstr ""
+
+#: of pywebio.platform.page.config:31
+msgid ""
+"``title`` and ``description`` are used for SEO, which are provided when "
+"indexed by search engines. If no ``title`` and ``description`` set for a "
+"PyWebIO application function, the `docstring "
+"<https://www.python.org/dev/peps/pep-0257/>`_ of the function will be "
+"used as title and description by default::"
+msgstr ""
+
+#: of pywebio.platform.page.config:35
+msgid ""
+"def app():\n"
+"    \"\"\"Application title\n"
+"\n"
+"    Application description...\n"
+"    (A empty line is used to separate the description and title)\n"
+"    \"\"\"\n"
+"    pass"
+msgstr ""
+
+#: of pywebio.platform.page.config:43
+msgid "The above code is equal to::"
+msgstr ""
+
+#: of pywebio.platform.page.config:45
+msgid ""
+"@config(title=\"Application title\", description=\"Application "
+"description...\")\n"
+"def app():\n"
+"    pass"
+msgstr ""
+
+#: of pywebio.platform.page.config:51
+msgid "add ``theme`` parameter"
+msgstr ""
+
+#: of pywebio.platform.httpbased.run_event_loop:1
+msgid "run asyncio event loop"
+msgstr ""
+
+#: of pywebio.platform.httpbased.run_event_loop:3
+msgid ""
+"See also: :ref:`Integration coroutine-based session with Web framework "
+"<coroutine_web_integration>`"
+msgstr ""
+
+#: of pywebio.platform.httpbased.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 ""
+

BIN
docs/locales/fa/LC_MESSAGES/releases.mo


+ 872 - 0
docs/locales/fa/LC_MESSAGES/releases.po

@@ -0,0 +1,872 @@
+# 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-26 20:30+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"
+
+#: ../../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
+#: ../../releases/v1.2.0.rst:8 ../../releases/v1.3.0.rst:8
+#: ../../releases/v1.4.rst:8 ../../releases/v1.5.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 ../../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 ""
+
+#: ../../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 ""
+
+#: ../../releases/v1.1.0.rst:12
+msgid "UI internationalization support"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:13
+msgid ""
+"SEO support: Set SEO info through `pywebio.platform.seo()` or function "
+"docstring"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:14
+msgid "CDN support, more convenient to web framework integration"
+msgstr ""
+
+#: ../../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 ""
+
+#: ../../releases/v1.1.0.rst:20
+msgid ""
+"Deprecated `pywebio.session.data()`, use `pywebio.session.local` instead"
+msgstr ""
+
+#: ../../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 ""
+
+#: ../../releases/v1.1.0.rst:22
+msgid ""
+"Remove `max_height` parameter of `put_scrollable() "
+"<pywebio.output.put_scrollable>`, use `height` instead"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:25 ../../releases/v1.2.0.rst:16
+#: ../../releases/v1.3.0.rst:15 ../../releases/v1.4.rst:13
+#: ../../releases/v1.5.rst:13
+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 ""
+
+#: ../../releases/v1.1.0.rst:27
+msgid ""
+"`put_scrollable() <pywebio.output.put_scrollable>` add `keep_bottom` "
+"parameter"
+msgstr ""
+
+#: ../../releases/v1.1.0.rst:28
+msgid ""
+"`put_markdown() <pywebio.output.put_markdown>` add ``options`` to config "
+"Markdown parsing options."
+msgstr ""
+
+#: ../../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 ""
+
+#: ../../releases/v1.1.0.rst:30
+msgid ""
+"Methods ``reset()``, ``append()``, ``insert()`` of `output()  "
+"<pywebio.output.output>`  accept string content"
+msgstr ""
+
+#: ../../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 ""
+
+#: ../../releases/v1.1.0.rst:32
+msgid "Fix: Auto open browser failed in python 3.6"
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:2
+msgid "What's new in PyWebIO 1.2"
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:5
+msgid "2021 3/18"
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:9
+msgid ""
+"Support reconnect to server in websocket connection by setting "
+"``reconnect_timeout`` parameter in `start_server() "
+"<pywebio.platform.tornado.start_server>`."
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:10
+msgid ""
+"Add `path_deploy() <pywebio.platform.path_deploy>`, `path_deploy_http() "
+"<pywebio.platform.path_deploy>` and ``pywebio-path-deploy`` command to "
+"deploy PyWebIO applications from a directory."
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:11
+msgid "All documents and demos are now available in English version."
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:12
+msgid ""
+"Some output-related functions support context manager, see :ref:`output "
+"functions list <output_func_list>` ."
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:17
+msgid "Add `put_info()`, `put_error()`, `put_warning()`, `put_success()`"
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:18
+msgid ""
+"Add `pywebio.utils.pyinstaller_datas()` to get PyWebIO data files when "
+"using pyinstaller to bundle PyWebIO application."
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:19
+msgid "Add documentation for data visualization using pyg2plot."
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:20
+msgid ""
+"The ``reset()``, ``append()``, ``insert()`` of `output() "
+"<pywebio.output.output>` accept any type as content."
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:21
+msgid ""
+"Add ``static_dir`` parameter to ``start_server()`` to serve static files."
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:22
+msgid ""
+"Deprecated `pywebio.session.get_info()`, use `pywebio.session.info` "
+"instead."
+msgstr ""
+
+#: ../../releases/v1.2.0.rst:23
+msgid "Alert not supporting message when the user using IE browser."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:2
+msgid "What's new in PyWebIO 1.3"
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:5
+msgid "2021/6/12"
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:9
+msgid "New module :doc:`pin </pin>` to provide persistent input support."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:10
+msgid ""
+"Add a remote access service to `start_server()`. See :ref:`server mode - "
+"User Guide <server_mode>` for detail."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:11 ../../releases/v1.3.0.rst:19
+msgid ""
+"Add `input_update() <pywebio.input.input_update>`, add ``onchange`` "
+"callback in input functions."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:12 ../../releases/v1.3.0.rst:36
+msgid "Add support for FastAPI and Starlette."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:17
+msgid ":doc:`input </input>` module"
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:20
+msgid "Add `pywebio.input.slider()` to get range input."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:22
+msgid ":doc:`output </output>` module"
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:24
+msgid ""
+"Mark `style() <pywebio.output.style>` as deprecated, see :ref:`style - "
+"User Guide <style>` for new method."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:25
+msgid "Add `pywebio.output.put_tabs()` to output tabs."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:26
+msgid ""
+"`put_html() <pywebio.output.put_html>` adds compatibility with ipython "
+"rich output."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:27
+msgid ""
+"Add `group` and `outline` parameters in `put_buttons() "
+"<pywebio.output.put_buttons>`."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:29
+msgid ":doc:`session </session>` module"
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:31
+msgid "Add promise support in `eval_js() <pywebio.session.eval_js>`."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:32
+msgid "Support config input panel via `set_env() <pywebio.session.set_env>`."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:34
+msgid ":doc:`platform </platform>` module"
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:37
+msgid "Add `wsgi_app()` / `asgi_app()` for Flask/Dgango/FastAPI backend."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:38
+msgid "Add remote access service to `start_server()`"
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:39
+msgid ""
+"Add "
+"``max_file_upload``/``payload_size_limit``/``upload_size_limit``/``max_payload"
+"_size``"
+" parameters to `start_server()`."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:41
+msgid "So many other improvements."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:44 ../../releases/v1.4.rst:24
+#: ../../releases/v1.5.rst:28
+msgid "Bug fix"
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:45
+msgid "Fix table style."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:46
+msgid "Fix large file uploading error."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:47
+msgid "Fix server start error when enabled ``auto_open_webbrowser``."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:48
+msgid "Fix file names overflow in file input."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:49
+msgid ""
+"Fix `put_image() <pywebio.output.put_image>` raise 'unknown file "
+"extension' error when use PIL Image as ``src``."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:50
+msgid ""
+"Sanitize the returned ``filename`` of `file_upload() "
+"<pywebio.input.file_upload>` to avoid interpreting as path accidentally."
+msgstr ""
+
+#: ../../releases/v1.3.0.rst:51
+msgid "So many other bugs fixed."
+msgstr ""
+
+#: ../../releases/v1.4.rst:2
+msgid "What's new in PyWebIO 1.4"
+msgstr ""
+
+#: ../../releases/v1.4.rst:5
+msgid "2021/10/4"
+msgstr ""
+
+#: ../../releases/v1.4.rst:9
+msgid "automatically hold session when needed"
+msgstr ""
+
+#: ../../releases/v1.4.rst:10
+msgid "support for binding onclick callback on any output widget"
+msgstr ""
+
+#: ../../releases/v1.4.rst:14
+msgid ""
+"migrate to a `open-source <https://github.com/wang0618/localshare>`_ "
+"remote access service"
+msgstr ""
+
+#: ../../releases/v1.4.rst:15
+msgid ""
+"add ``output_max_width`` parameter to `set_env() "
+"<pywebio.session.set_env>`"
+msgstr ""
+
+#: ../../releases/v1.4.rst:16
+msgid "can use ``Esc``/``F11`` to toggle fullscreen of codemirror textarea"
+msgstr ""
+
+#: ../../releases/v1.4.rst:17
+msgid ""
+"`pin_wait_change() <pywebio.pin.pin_wait_change>` support `timeout` "
+"parameter"
+msgstr ""
+
+#: ../../releases/v1.4.rst:18
+msgid "add `pywebio.config() <pywebio.config>`"
+msgstr ""
+
+#: ../../releases/v1.4.rst:19
+msgid "add `pywebio.output.put_button() <pywebio.output.put_button>`"
+msgstr ""
+
+#: ../../releases/v1.4.rst:20
+msgid "add `pywebio.pin.put_actions() <pywebio.pin.put_actions>`"
+msgstr ""
+
+#: ../../releases/v1.4.rst:21
+msgid "rearrange document"
+msgstr ""
+
+#: ../../releases/v1.4.rst:25
+msgid ""
+"fix(#148): form can't be submit after validation failed - `e262ea43 "
+"<https://github.com/pywebio/PyWebIO/commit/e262ea43dc8a4fe3addd6c84f2fdd4f290a"
+"53f20>`_"
+msgstr ""
+
+#: ../../releases/v1.4.rst:26
+msgid ""
+"fix some codemirror issues: codemirror refresh and mode auto load - "
+"`b7957891 "
+"<https://github.com/pywebio/PyWebIO/commit/b7957891832a20fe47dd3b907e061a4d2b3"
+"5de73>`_,"
+" `50cc41a9 "
+"<https://github.com/pywebio/PyWebIO/commit/50cc41a9d35f566ffe4c995165c841c1ae4"
+"971c4>`_"
+msgstr ""
+
+#: ../../releases/v1.4.rst:27
+msgid ""
+"fix: `run_js()` return `None` when empty-value - `89ce352d "
+"<https://github.com/pywebio/PyWebIO/commit/89ce352d069eec28f3ccc4e7657892a4337"
+"4c3fc>`_"
+msgstr ""
+
+#: ../../releases/v1.4.rst:28
+msgid ""
+"fix: whole output crash when a sub output fail - `31b26d09 "
+"<https://github.com/pywebio/PyWebIO/commit/31b26d0985d700633946c750a01d25c96c6"
+"34eaa>`_"
+msgstr ""
+
+#: ../../releases/v1.5.rst:2
+msgid "What's new in PyWebIO 1.5"
+msgstr ""
+
+#: ../../releases/v1.5.rst:5
+msgid "2021/11/20"
+msgstr ""
+
+#: ../../releases/v1.5.rst:9
+msgid "theme support via :func:`pywebio.config()`, :demo_host:`demo </theme>`"
+msgstr ""
+
+#: ../../releases/v1.5.rst:10
+msgid ""
+"deprecate :func:`pywebio.output.output()`, use "
+"`pywebio.output.use_scope()` instead (``output()`` still work)"
+msgstr ""
+
+#: ../../releases/v1.5.rst:14
+msgid ""
+"enable `lstrip` by default in `put_markdown() "
+"<pywebio.output.put_markdown>`, and the behavior of `lstrip` is more "
+"clever than previous version. Deprecate `strip_indent` since `lstrip` is "
+"sufficient."
+msgstr ""
+
+#: ../../releases/v1.5.rst:16
+msgid ""
+"button disabled state support in `pywebio.output.put_buttons()` and "
+"`pywebio.output.put_button()`, and button value can be any type"
+msgstr ""
+
+#: ../../releases/v1.5.rst:18
+msgid "buttons in `pywebio.input.actions()` support color setting"
+msgstr ""
+
+#: ../../releases/v1.5.rst:19
+msgid ""
+"russian language support for frontend labels and messages. Thanks to "
+"`@Priler <https://github.com/pywebio/PyWebIO/pull/173>`_."
+msgstr ""
+
+#: ../../releases/v1.5.rst:20
+msgid ""
+"improve default index page of `pywebio.platform.path_deploy()`: improve "
+"pywebio app detection and show app title."
+msgstr ""
+
+#: ../../releases/v1.5.rst:21
+msgid "compatible with latest aiohttp(v3.8)"
+msgstr ""
+
+#: ../../releases/v1.5.rst:22
+msgid ""
+"enable `websocket_ping_interval` by default in tornado server to avoid "
+"idle connections being close in some cloud platform (like heroku)"
+msgstr ""
+
+#: ../../releases/v1.5.rst:24
+msgid "exception traceback will be show in page when enable debug"
+msgstr ""
+
+#: ../../releases/v1.5.rst:25
+msgid ""
+"`slider <pywebio.input.slider>` input add indicator to show its current "
+"value"
+msgstr ""
+
+#: ../../releases/v1.5.rst:29
+msgid ""
+"deep copy `options` and `buttons` parameters to avoid potential error - "
+"`81d57ba4 "
+"<https://github.com/pywebio/PyWebIO/commit/81d57ba46bec2ed2657f944f9cb594da970"
+"9d146>`_,"
+" `cb5ac8d5 "
+"<https://github.com/pywebio/PyWebIO/commit/cb5ac8d512386fc442abf6646621c3ef1e3"
+"ab26a>`_"
+" - `e262ea43 "
+"<https://github.com/pywebio/PyWebIO/commit/e262ea43dc8a4fe3addd6c84f2fdd4f290a"
+"53f20>`_"
+msgstr ""
+
+#: ../../releases/v1.5.rst:30
+msgid ""
+"fix page width exceeding screen width (mostly on mobile devices) - "
+"`536d09e3 "
+"<https://github.com/pywebio/PyWebIO/commit/536d09e3c432a750b24b9633f076ebf9a18"
+"75f79>`_"
+msgstr ""
+
+#: ../../releases/v1.5.rst:31
+msgid ""
+"fix `put_buttons()` issue when buttons have same value - `cb5ac8d5 "
+"<https://github.com/pywebio/PyWebIO/commit/cb5ac8d512386fc442abf6646621c3ef1e3"
+"ab26a>`_"
+msgstr ""
+
+#: ../../releases/v1.5.rst:32
+msgid ""
+"fix layout issue when use `put_markdown()` - `364059ae "
+"<https://github.com/pywebio/PyWebIO/commit/364059ae8ac02e6d77dc031eaa1139863b0"
+"9a6e3>`_"
+msgstr ""
+
+#: ../../releases/v1.5.rst:33
+msgid ""
+"fix style issue in `put_tabs()` widget - `f056f1ac "
+"<https://github.com/pywebio/PyWebIO/commit/f056f1aca3a10d8fe18bd49b21d52e073d0"
+"8dcdc>`_"
+msgstr ""
+
+#: ../../releases/v1.5.rst:34
+msgid ""
+"fix sibling import issue in `path_deploy()` - `35209a7e "
+"<https://github.com/pywebio/PyWebIO/commit/35209a7e79b9ef8d0fdc2b5833576b31383"
+"0bc93>`_"
+msgstr ""
+
+#: ../../releases/v1.5.rst:35
+msgid ""
+"fix \"Address already in use\" error when enable remote access in some "
+"cases - `8dd9877d "
+"<https://github.com/pywebio/PyWebIO/commit/8dd9877d81eba43eadce9c136125ffb08d8"
+"fe98a>`_"
+msgstr ""
+
+#: ../../releases/v1.5.rst:38
+msgid "v1.5.1 (2021/12/21)"
+msgstr ""
+
+#: ../../releases/v1.5.rst:40
+msgid ""
+"fix setitem error of `pin.pin` object - `3f5cf1e5 "
+"<https://github.com/pywebio/PyWebIO/commit/3f5cf1e5aff1e4d17647672df568aa66007"
+"e1b7d>`_"
+msgstr ""
+
+#: ../../releases/v1.5.rst:41
+msgid ""
+"fix thread-based session tot closed properly - `22fbbf86..3bc7d36b> "
+"<https://github.com/pywebio/PyWebIO/compare/22fbbf866fb1bfc7e46bf24b59b343dd92"
+"b51936..3bc7d36bf6eed205356c401624ab3ff508c7e935>`_"
+msgstr ""
+
+#: ../../releases/v1.5.rst:42
+msgid ""
+"fix OverflowError on 32-bit Windows - `4ac7f0e5 "
+"<https://github.com/pywebio/PyWebIO/commit/4ac7f0e52c17ba0ef9c2041d6b46ce37f73"
+"6daac>`_"
+msgstr ""
+
+#: ../../releases/v1.5.rst:43
+msgid ""
+"fix a sample error from cookbook - `99593db4 "
+"<https://github.com/pywebio/PyWebIO/commit/99593db468726deab415a31c125d71a2dda"
+"589c0>`_"
+msgstr ""
+
+#: ../../releases/v1.5.rst:44
+msgid ""
+"fix spawn 2 remote access processes when enable debug in flask backed - "
+"`073f8ace "
+"<https://github.com/pywebio/PyWebIO/commit/073f8ace680b8cd6b9d891fc6c056555be9"
+"ba9ae>`_"
+msgstr ""
+
+#: ../../releases/v1.5.rst:48
+msgid "v1.5.2 (2021/12/30)"
+msgstr ""
+
+#: ../../releases/v1.5.rst:49
+msgid ""
+"fix `#243 <https://github.com/pywebio/PyWebIO/issues/243>`_: thread keep "
+"alive after session closed"
+msgstr ""
+
+#: ../../releases/v1.5.rst:50
+msgid ""
+"fix `#247 <https://github.com/pywebio/PyWebIO/issues/247>`_: can't use "
+"coroutine callback in `put_button()`"
+msgstr ""
+

BIN
docs/locales/fa/LC_MESSAGES/session.mo


+ 659 - 0
docs/locales/fa/LC_MESSAGES/session.po

@@ -0,0 +1,659 @@
+# 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 12: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"
+
+#: ../../session.rst:2
+msgid "``pywebio.session`` --- More control to session"
+msgstr "``pywebio.session`` --- کنترل بیشتر به نشست"
+
+#: 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 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.download:3
+msgid "File name when downloading"
+msgstr ""
+
+#: of pywebio.session.download:4
+msgid "File content. It is a bytes-like object"
+msgstr ""
+
+#: of pywebio.session:137 pywebio.session.download:6 pywebio.session.eval_js:12
+msgid "Example:"
+msgstr ""
+
+#: of pywebio.session.download:8
+msgid ""
+"put_button('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 ""
+
+#: of pywebio.session.run_js:3
+msgid "The code is run in the browser's JS global scope."
+msgstr ""
+
+#: of pywebio.session.run_js:5
+msgid "JavaScript code"
+msgstr ""
+
+#: of pywebio.session.eval_js:6 pywebio.session.run_js:6
+msgid ""
+"Local variables passed to js code. Variables need to be JSON-serializable."
+msgstr ""
+
+#: of pywebio.session.run_asyncio_coroutine:8 pywebio.session.run_js:8
+#: pywebio.session.set_env:20
+msgid "Example::"
+msgstr ""
+
+#: 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 ""
+
+#: of pywebio.session.eval_js:3
+msgid ""
+"JavaScript expression. The value of the expression need to be JSON-"
+"serializable. If the value of the expression is a `promise "
+"<https://developer.mozilla.org/en-"
+"US/docs/Web/JavaScript/Reference/Global_Objects/Promise>`_, ``eval_js()``"
+" will wait for the promise to resolve and return the value of it. When "
+"the promise is rejected, `None` is returned."
+msgstr ""
+
+#: of pywebio.session.eval_js pywebio.session.run_async
+msgid "Returns"
+msgstr ""
+
+#: of pywebio.session.eval_js:7
+msgid "The value of the expression."
+msgstr ""
+
+#: of pywebio.session.eval_js:9
+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 ""
+
+#: of pywebio.session.eval_js:14
+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\n"
+"\n"
+"## ----\n"
+"promise_res = eval_js('''new Promise(resolve => {\n"
+"    setTimeout(() => {\n"
+"        resolve('Returned inside callback.');\n"
+"    }, 2000);\n"
+"});''')\n"
+"put_text(promise_res)  # ..demo-only"
+msgstr ""
+
+#: of pywebio.session.eval_js:39
+msgid "The JS expression support return promise."
+msgstr ""
+
+#: of pywebio.session.register_thread:1
+msgid ""
+"Register the thread so that PyWebIO interactive functions are available "
+"in the thread."
+msgstr ""
+
+#: 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 ""
+
+#: 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:6
+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 ""
+
+#: of pywebio.session.defer_call:9
+msgid "``defer_call()`` can also be used as decorator::"
+msgstr ""
+
+#: of pywebio.session.defer_call:11
+msgid ""
+"@defer_call\n"
+"def cleanup():\n"
+"   pass"
+msgstr ""
+
+#: of pywebio.session.defer_call:15
+msgid ""
+"PyWebIO interactive functions cannot be called inside the deferred "
+"functions."
+msgstr ""
+
+#: of pywebio.session:9
+msgid "The session-local object for current session."
+msgstr ""
+
+#: of pywebio.session:11
+msgid ""
+"``local`` is a dictionary object that can be accessed through attributes,"
+" it aim to be used to save some session-local state of your application. "
+"Attributes of ``local`` are not shared between sessions, each session "
+"sees only the attributes it itself placed in there."
+msgstr ""
+
+#: of pywebio.session
+msgid "Usage Scenes"
+msgstr ""
+
+#: of pywebio.session:17
+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 ""
+
+#: of pywebio.session:20
+msgid "Here is a example of a session independent counter implementation::"
+msgstr ""
+
+#: of pywebio.session:22
+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])"
+msgstr ""
+
+#: of pywebio.session:32
+msgid "The way to pass state through function parameters is::"
+msgstr ""
+
+#: of pywebio.session:34
+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)])"
+msgstr ""
+
+#: of pywebio.session:45
+msgid "Of course, you can also use function closures to achieved the same::"
+msgstr ""
+
+#: of pywebio.session:47
+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])"
+msgstr ""
+
+#: of pywebio.session
+msgid "Operations supported by local object"
+msgstr ""
+
+#: of pywebio.session:61
+msgid ""
+"``local`` is a dictionary object 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 ""
+
+#: 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.set_env:1
+msgid "configure 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 ""
+
+#: of pywebio.session.set_env:6
+msgid ""
+"``output_animation`` (bool): Whether to enable output animation, enabled "
+"by default"
+msgstr ""
+
+#: 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 ""
+
+#: of pywebio.session.set_env:9
+msgid ""
+"``http_pull_interval`` (int): The period of HTTP polling messages (in "
+"milliseconds, default 1000ms), only available in sessions based on HTTP "
+"connection."
+msgstr ""
+
+#: of pywebio.session.set_env:11
+msgid ""
+"``input_panel_fixed`` (bool): Whether to make input panel fixed at "
+"bottom, enabled by default"
+msgstr ""
+
+#: of pywebio.session.set_env:12
+msgid ""
+"``input_panel_min_height`` (int): The minimum height of input panel (in "
+"pixel, default 300px), it should be larger than 75px. Available only when"
+" ``input_panel_fixed=True``"
+msgstr ""
+
+#: of pywebio.session.set_env:14
+msgid ""
+"``input_panel_init_height`` (int): The initial height of input panel (in "
+"pixel, default 300px), it should be larger than 175px. Available only "
+"when ``input_panel_fixed=True``"
+msgstr ""
+
+#: of pywebio.session.set_env:16
+msgid ""
+"``input_auto_focus`` (bool): Whether to focus on input automatically "
+"after showing input panel, default is ``True``"
+msgstr ""
+
+#: of pywebio.session.set_env:17
+msgid ""
+"``output_max_width`` (str): The max width of the page content area (in "
+"pixel or percentage, e.g. ``'1080px'``, ``'80%'``. Default is 880px)."
+msgstr ""
+
+#: of pywebio.session.set_env:22
+msgid "set_env(title='Awesome PyWebIO!!', output_animation=False)"
+msgstr ""
+
+#: of pywebio.session.set_env:26
+msgid "Added the ``output_max_width`` parameter"
+msgstr ""
+
+#: of pywebio.session.go_app:1
+msgid ""
+"Jump to another task of a same PyWebIO application. Only available in "
+"PyWebIO Server mode"
+msgstr ""
+
+#: of pywebio.session.go_app:3
+msgid "Target PyWebIO task name."
+msgstr ""
+
+#: of pywebio.session.go_app:4
+msgid "Whether to open in a new window, the default is `True`"
+msgstr ""
+
+#: of pywebio.session.go_app:6
+msgid "See also: :ref:`Server mode <server_and_script_mode>`"
+msgstr ""
+
+#: of pywebio.session:88
+msgid "The session information data object, whose attributes are:"
+msgstr ""
+
+#: of pywebio.session:90
+msgid ""
+"``user_agent`` : The Object of the user browser information, whose "
+"attributes are"
+msgstr ""
+
+#: of pywebio.session:92
+msgid ""
+"``is_mobile`` (bool): whether user agent is identified as a mobile phone "
+"(iPhone, Android phones, Blackberry, Windows Phone devices etc)"
+msgstr ""
+
+#: of pywebio.session:94
+msgid ""
+"``is_tablet`` (bool): whether user agent is identified as a tablet device"
+" (iPad, Kindle Fire, Nexus 7 etc)"
+msgstr ""
+
+#: of pywebio.session:95
+msgid ""
+"``is_pc`` (bool): whether user agent is identified to be running a "
+"traditional \"desktop\" OS (Windows, OS X, Linux)"
+msgstr ""
+
+#: of pywebio.session:96
+msgid "``is_touch_capable`` (bool): whether user agent has touch capabilities"
+msgstr ""
+
+#: of pywebio.session:98
+msgid "``browser.family`` (str): Browser family. such as 'Mobile Safari'"
+msgstr ""
+
+#: of pywebio.session:99
+msgid "``browser.version`` (tuple): Browser version. such as (5, 1)"
+msgstr ""
+
+#: of pywebio.session:100
+msgid "``browser.version_string`` (str): Browser version string. such as '5.1'"
+msgstr ""
+
+#: of pywebio.session:102
+msgid "``os.family`` (str): User OS family. such as 'iOS'"
+msgstr ""
+
+#: of pywebio.session:103
+msgid "``os.version`` (tuple): User OS version. such as (5, 1)"
+msgstr ""
+
+#: of pywebio.session:104
+msgid "``os.version_string`` (str): User OS version string. such as '5.1'"
+msgstr ""
+
+#: of pywebio.session:106
+msgid "``device.family`` (str): User agent's device family. such as 'iPhone'"
+msgstr ""
+
+#: of pywebio.session:107
+msgid "``device.brand`` (str): Device brand. such as 'Apple'"
+msgstr ""
+
+#: of pywebio.session:108
+msgid "``device.model`` (str): Device model. such as 'iPhone'"
+msgstr ""
+
+#: of pywebio.session:110
+msgid ""
+"``user_language`` (str): Language used by the user's operating system. "
+"(e.g., ``'zh-CN'``)"
+msgstr ""
+
+#: of pywebio.session:111
+msgid ""
+"``server_host`` (str): PyWebIO server host, including domain and port, "
+"the port can be omitted when 80."
+msgstr ""
+
+#: of pywebio.session:112
+msgid ""
+"``origin`` (str): Indicate where the user from. Including protocol, host,"
+" and port parts. Such as ``'http://localhost:8080'``. It may be empty, "
+"but it is guaranteed to have a value when the user's page address is not "
+"under the server host. (that is, the host, port part are inconsistent "
+"with ``server_host``)."
+msgstr ""
+
+#: of pywebio.session:115
+msgid "``user_ip`` (str): User's ip address."
+msgstr ""
+
+#: of pywebio.session:116
+msgid ""
+"``backend`` (str): The current PyWebIO backend server implementation. The"
+" possible values are ``'tornado'``, ``'flask'``, ``'django'`` , "
+"``'aiohttp'`` , ``'starlette'``."
+msgstr ""
+
+#: of pywebio.session:118
+msgid ""
+"``protocol`` (str): The communication protocol between PyWebIO server and"
+" browser. The possible values are ``'websocket'``, ``'http'``"
+msgstr ""
+
+#: of pywebio.session:120
+msgid ""
+"``request`` (object): The request object when creating the current "
+"session. Depending on the backend server, the type of ``request`` can be:"
+msgstr ""
+
+#: of pywebio.session:123
+msgid ""
+"When using Tornado, ``request`` is instance of "
+"`tornado.httputil.HTTPServerRequest "
+"<https://www.tornadoweb.org/en/stable/httputil.html#tornado.httputil.HTTPServe"
+"rRequest>`_"
+msgstr ""
+
+#: of pywebio.session:125
+msgid ""
+"When using Flask, ``request`` is instance of `flask.Request "
+"<https://flask.palletsprojects.com/en/1.1.x/api/#incoming-request-data>`_"
+msgstr ""
+
+#: of pywebio.session:126
+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 ""
+
+#: of pywebio.session:127
+msgid ""
+"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:128
+msgid ""
+"When using FastAPI/Starlette, ``request`` is instance of "
+"`starlette.websockets.WebSocket <https://www.starlette.io/websockets/>`_"
+msgstr ""
+
+#: of pywebio.session:130
+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 ""
+
+#: of pywebio.session:135
+msgid "Added the ``protocol`` attribute."
+msgstr ""
+
+#: of pywebio.session:139
+msgid ""
+"import json\n"
+"from pywebio.session import info as session_info\n"
+"\n"
+"put_code(json.dumps({\n"
+"    k: str(getattr(session_info, k))\n"
+"    for k in ['user_agent', 'user_language', 'server_host',\n"
+"              'origin', 'user_ip', 'backend', 'protocol', 'request']\n"
+"}, indent=4), 'json')"
+msgstr ""
+
+#: of pywebio.session.coroutinebased.TaskHandler:1
+msgid "The handler of coroutine task"
+msgstr ""
+
+#: of pywebio.session.coroutinebased.TaskHandler:3
+msgid "See also: `run_async() <pywebio.session.run_async>`"
+msgstr ""
+
+#: of pywebio.session.coroutinebased.TaskHandler.close:1
+msgid "Close the coroutine task."
+msgstr ""
+
+#: of pywebio.session.coroutinebased.TaskHandler.closed:1
+msgid "Returns a bool stating whether the coroutine task is closed."
+msgstr ""
+
+#: 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 ""
+"Since PyWebIO v1.4, in :ref:`server mode <server_mode>`, it's no need to "
+"call this function manually, PyWebIO will automatically hold the session "
+"for you when needed. The only case to use it is to prevent the "
+"application from exiting in scrip mode."
+msgstr ""
+
+#: of pywebio.session.hold:9
+msgid ""
+"In case you use the previous version of PyWebIO (we strongly recommend "
+"that you upgrade to the latest version), here is the old document for "
+"``hold()``:"
+msgstr ""
+
+#: of pywebio.session.hold:12
+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 ""
+
+#: of pywebio.session.run_async:1
+msgid ""
+"Run the coroutine object asynchronously. PyWebIO interactive functions "
+"are also available in the coroutine."
+msgstr ""
+
+#: of pywebio.session.run_async:3
+msgid ""
+"``run_async()`` can only be used in :ref:`coroutine-based session "
+"<coroutine_based_session>`."
+msgstr ""
+
+#: of pywebio.session.run_async:5
+msgid "Coroutine object"
+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 ""
+
+#: of pywebio.session.run_async:9
+msgid ""
+"See also: :ref:`Concurrency in coroutine-based sessions "
+"<coroutine_based_concurrency>`"
+msgstr ""
+
+#: 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 ""
+
+#: of pywebio.session.run_asyncio_coroutine:4
+msgid ""
+"Can only be used in :ref:`coroutine-based session "
+"<coroutine_based_session>`."
+msgstr ""
+
+#: of pywebio.session.run_asyncio_coroutine:6
+msgid "Coroutine object in `asyncio`"
+msgstr ""
+
+#: of pywebio.session.run_asyncio_coroutine:10
+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 ""
+

BIN
docs/locales/fa/LC_MESSAGES/spec.mo


+ 1118 - 0
docs/locales/fa/LC_MESSAGES/spec.po

@@ -0,0 +1,1118 @@
+# 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 12:44+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"
+
+#: ../../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 ""
+
+#: ../../spec.rst:6
+msgid ""
+"There are two communication methods between server and client: WebSocket "
+"and Http."
+msgstr ""
+
+#: ../../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 ""
+
+#: ../../spec.rst:10
+msgid "**WebSocket communication**"
+msgstr ""
+
+#: ../../spec.rst:12
+msgid ""
+"The server and the client send json-serialized message through WebSocket "
+"connection"
+msgstr ""
+
+#: ../../spec.rst:14
+msgid "**Http communication**"
+msgstr ""
+
+#: ../../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 ""
+
+#: ../../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 ""
+
+#: ../../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 ""
+
+#: ../../spec.rst:22
+msgid "The following describes the format of command and event"
+msgstr ""
+
+#: ../../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 ""
+
+#: ../../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 ""
+
+#: ../../spec.rst:39
+msgid "``task_id`` : Id of the task that send the command"
+msgstr ""
+
+#: ../../spec.rst:41
+msgid ""
+"``spec`` : the data of the command, which is different depending on the "
+"command name"
+msgstr ""
+
+#: ../../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 ""
+
+#: ../../spec.rst:46
+msgid "The following describes the ``spec`` fields of different commands:"
+msgstr ""
+
+#: ../../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.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 ../../spec.rst:170
+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 ""
+
+#: ../../spec.rst
+msgid ""
+"A ``from_cancel`` event is triggered after the user clicks the cancel "
+"button."
+msgstr ""
+
+#: ../../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 ""
+
+#: ../../spec.rst:79
+msgid "label: Label of input field, required."
+msgstr ""
+
+#: ../../spec.rst:80
+msgid "type: Input type, required."
+msgstr ""
+
+#: ../../spec.rst:81
+msgid "name: Identifier of the input field, required."
+msgstr ""
+
+#: ../../spec.rst:82
+msgid "onchange: bool, whether to push input value when input change"
+msgstr ""
+
+#: ../../spec.rst:83
+msgid "onbulr: bool, whether to push input value when input field `onblur`"
+msgstr ""
+
+#: ../../spec.rst:84
+msgid ""
+"auto_focus: Set focus automatically. At most one item of ``auto_focus`` "
+"can be true in the input item list"
+msgstr ""
+
+#: ../../spec.rst:85
+msgid "help_text: Help text for the input"
+msgstr ""
+
+#: ../../spec.rst:86
+msgid "Additional HTML attribute of the input element"
+msgstr ""
+
+#: ../../spec.rst:87
+msgid "Other attributes of different input types"
+msgstr ""
+
+#: ../../spec.rst:89
+msgid "Currently supported ``type`` are:"
+msgstr ""
+
+#: ../../spec.rst:91
+msgid "text: Plain text input"
+msgstr ""
+
+#: ../../spec.rst:92
+msgid "number: Number input"
+msgstr ""
+
+#: ../../spec.rst:93
+msgid "password: Password input"
+msgstr ""
+
+#: ../../spec.rst:94
+msgid "checkbox: Checkbox"
+msgstr ""
+
+#: ../../spec.rst:95
+msgid "radio: Radio"
+msgstr ""
+
+#: ../../spec.rst:96
+msgid "select: Drop-down selection"
+msgstr ""
+
+#: ../../spec.rst:97
+msgid "textarea: Multi-line text input"
+msgstr ""
+
+#: ../../spec.rst:98
+msgid "file: File uploading"
+msgstr ""
+
+#: ../../spec.rst:99
+msgid "actions: Actions selection."
+msgstr ""
+
+#: ../../spec.rst:101
+msgid "Correspondence between different input types and html input elements:"
+msgstr ""
+
+#: ../../spec.rst:103
+msgid "text: input[type=text]"
+msgstr ""
+
+#: ../../spec.rst:104
+msgid "number: input[type=number]"
+msgstr ""
+
+#: ../../spec.rst:105
+msgid "float: input[type=text], and transform input value to float"
+msgstr ""
+
+#: ../../spec.rst:106
+msgid "password: input[type=password]"
+msgstr ""
+
+#: ../../spec.rst:107
+msgid "checkbox: input[type=checkbox]"
+msgstr ""
+
+#: ../../spec.rst:108
+msgid "radio: input[type=radio]"
+msgstr ""
+
+#: ../../spec.rst:109
+msgid ""
+"select: select  https://developer.mozilla.org/zh-"
+"CN/docs/Web/HTML/Element/select"
+msgstr ""
+
+#: ../../spec.rst:110
+msgid ""
+"textarea: textarea  https://developer.mozilla.org/zh-"
+"CN/docs/Web/HTML/Element/textarea"
+msgstr ""
+
+#: ../../spec.rst:111
+msgid "file: input[type=file]"
+msgstr ""
+
+#: ../../spec.rst:112
+msgid ""
+"actions: button[type=submit] https://developer.mozilla.org/zh-"
+"CN/docs/Web/HTML/Element/button"
+msgstr ""
+
+#: ../../spec.rst:114
+msgid "Unique attributes of different input types:"
+msgstr ""
+
+#: ../../spec.rst:116
+msgid "text,number,password:"
+msgstr ""
+
+#: ../../spec.rst:118
+msgid ""
+"action: Display a button on the right of the input field. The format of "
+"``action`` is ``{label: button label, callback_id: button click callback "
+"id}``"
+msgstr ""
+
+#: ../../spec.rst:121
+msgid "textarea:"
+msgstr ""
+
+#: ../../spec.rst:123
+msgid ""
+"code: Codemirror options or boolean, same as ``code`` parameter of "
+":func:`pywebio.input.textarea`"
+msgstr ""
+
+#: ../../spec.rst:125
+msgid "select:"
+msgstr ""
+
+#: ../../spec.rst:127 ../../spec.rst:131 ../../spec.rst:136
+msgid "options: ``{label:, value: , [selected:,] [disabled:]}``"
+msgstr ""
+
+#: ../../spec.rst:129
+msgid "checkbox:"
+msgstr ""
+
+#: ../../spec.rst:132 ../../spec.rst:137
+msgid "inline"
+msgstr ""
+
+#: ../../spec.rst:134
+msgid "radio:"
+msgstr ""
+
+#: ../../spec.rst:139
+msgid "actions"
+msgstr ""
+
+#: ../../spec.rst:141
+msgid ""
+"buttons: ``{label:, value:, [type: 'submit'/'reset'/'cancel'], "
+"[disabled:], [color:]}`` ."
+msgstr ""
+
+#: ../../spec.rst:144
+msgid "file:"
+msgstr ""
+
+#: ../../spec.rst:146
+msgid "multiple: Whether to allow upload multiple files."
+msgstr ""
+
+#: ../../spec.rst:147
+msgid "max_size: The maximum size of a single file, in bytes."
+msgstr ""
+
+#: ../../spec.rst:148
+msgid "max_total_size: The maximum size of all files, in bytes."
+msgstr ""
+
+#: ../../spec.rst:150
+msgid "slider"
+msgstr ""
+
+#: ../../spec.rst:152
+msgid "min_value: The minimum permitted value."
+msgstr ""
+
+#: ../../spec.rst:153
+msgid "max_value: The maximum permitted value."
+msgstr ""
+
+#: ../../spec.rst:154
+msgid "step: The stepping interval."
+msgstr ""
+
+#: ../../spec.rst:155
+msgid "float: If need return a float value"
+msgstr ""
+
+#: ../../spec.rst:158
+msgid "update_input"
+msgstr ""
+
+#: ../../spec.rst:160
+msgid ""
+"Update the input item, you can update the ``spec`` of the input item of "
+"the currently displayed form"
+msgstr ""
+
+#: ../../spec.rst:162
+msgid "The ``spec`` fields of ``update_input`` commands:"
+msgstr ""
+
+#: ../../spec.rst:164
+msgid "target_name: str The name of the target input item."
+msgstr ""
+
+#: ../../spec.rst:165
+msgid "target_value: str, optional. Used to filter item in checkbox, radio"
+msgstr ""
+
+#: ../../spec.rst:166 ../../spec.rst:287
+msgid "attributes: dist, fields need to be updated"
+msgstr ""
+
+#: ../../spec.rst:168
+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:169
+msgid "value: Set the value of the item"
+msgstr ""
+
+#: ../../spec.rst:171
+msgid "placeholder"
+msgstr ""
+
+#: ../../spec.rst:172
+msgid "invalid_feedback"
+msgstr ""
+
+#: ../../spec.rst:173
+msgid "valid_feedback"
+msgstr ""
+
+#: ../../spec.rst:174
+msgid "help_text"
+msgstr ""
+
+#: ../../spec.rst:175
+msgid "options: only available in checkbox, radio and select type"
+msgstr ""
+
+#: ../../spec.rst:176
+msgid "other fields of item's ``spec`` // not support the ``inline`` field"
+msgstr ""
+
+#: ../../spec.rst:180
+msgid "close_session"
+msgstr ""
+
+#: ../../spec.rst:181
+msgid ""
+"Indicates that the server has closed the connection. ``spec`` of the "
+"command is empty."
+msgstr ""
+
+#: ../../spec.rst:184
+msgid "set_session_id"
+msgstr ""
+
+#: ../../spec.rst:185
+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 ""
+
+#: ../../spec.rst:189
+msgid "destroy_form"
+msgstr ""
+
+#: ../../spec.rst:190
+msgid "Destroy the current form. ``spec`` of the command is empty."
+msgstr ""
+
+#: ../../spec.rst:192
+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:195
+msgid "output"
+msgstr ""
+
+#: ../../spec.rst:196
+msgid "Output content"
+msgstr ""
+
+#: ../../spec.rst:198
+msgid "The ``spec`` fields of ``output`` commands:"
+msgstr ""
+
+#: ../../spec.rst:200
+msgid "type: content type"
+msgstr ""
+
+#: ../../spec.rst:201
+msgid "style: str, Additional css style"
+msgstr ""
+
+#: ../../spec.rst:202
+msgid ""
+"container_selector: The css selector of output widget's content slot. If "
+"empty(default), use widget self as container"
+msgstr ""
+
+#: ../../spec.rst:203
+msgid ""
+"container_dom_id: The dom id need to be set to output widget's content "
+"slot."
+msgstr ""
+
+#: ../../spec.rst:204
+msgid ""
+"scope: str, CSS selector of the output container. If multiple containers "
+"are matched, the content will be output to every matched container"
+msgstr ""
+
+#: ../../spec.rst:205
+msgid "position: int, see :ref:`scope - User manual <scope_param>`"
+msgstr ""
+
+#: ../../spec.rst:206
+msgid "click_callback_id:"
+msgstr ""
+
+#: ../../spec.rst:207
+msgid "Other attributes of different types"
+msgstr ""
+
+#: ../../spec.rst:209
+msgid ""
+"``container_selector`` and ``container_dom_id`` is used to implement "
+"output context manager."
+msgstr ""
+
+#: ../../spec.rst:211
+msgid "Unique attributes of different types:"
+msgstr ""
+
+#: ../../spec.rst:213
+msgid "type: markdown"
+msgstr ""
+
+#: ../../spec.rst:215 ../../spec.rst:221 ../../spec.rst:226
+msgid "content: str"
+msgstr ""
+
+#: ../../spec.rst:216
+msgid ""
+"options: dict, `marked.js <https://github.com/markedjs/marked>`_ options"
+msgstr ""
+
+#: ../../spec.rst:217 ../../spec.rst:222
+msgid "sanitize: bool, Whether to enable a XSS sanitizer for HTML"
+msgstr ""
+
+#: ../../spec.rst:219
+msgid "type: html"
+msgstr ""
+
+#: ../../spec.rst:224
+msgid "type: text"
+msgstr ""
+
+#: ../../spec.rst:227
+msgid ""
+"inline: bool, Use text as an inline element (no line break at the end of "
+"the text)"
+msgstr ""
+
+#: ../../spec.rst:229
+msgid "type: buttons"
+msgstr ""
+
+#: ../../spec.rst:231
+msgid "callback_id:"
+msgstr ""
+
+#: ../../spec.rst:232
+msgid "buttons:[ {value:, label:, [color:], [disabled:]},...]"
+msgstr ""
+
+#: ../../spec.rst:233
+msgid "small: bool, Whether to enable small button"
+msgstr ""
+
+#: ../../spec.rst:234
+msgid "group: bool, Whether to group the buttons together"
+msgstr ""
+
+#: ../../spec.rst:235
+msgid "link: bool, Whether to make button seem as link."
+msgstr ""
+
+#: ../../spec.rst:236
+msgid "outline: bool, Whether enable outline style."
+msgstr ""
+
+#: ../../spec.rst:238
+msgid "type: file"
+msgstr ""
+
+#: ../../spec.rst:240
+msgid "name: File name when downloading"
+msgstr ""
+
+#: ../../spec.rst:241
+msgid "content: File content with base64 encoded"
+msgstr ""
+
+#: ../../spec.rst:243
+msgid "type: table"
+msgstr ""
+
+#: ../../spec.rst:245
+msgid ""
+"data: Table data, which is a two-dimensional list, the first row is table"
+" header."
+msgstr ""
+
+#: ../../spec.rst:246
+msgid ""
+"span: cell span info. Format: {\"[row id],[col id]\": {\"row\":row span, "
+"\"col\":col span }}"
+msgstr ""
+
+#: ../../spec.rst:248
+msgid "type: pin"
+msgstr ""
+
+#: ../../spec.rst:250
+msgid "input: input spec, same as the item of ``input_group.inputs``"
+msgstr ""
+
+#: ../../spec.rst:252
+msgid "type: scope"
+msgstr ""
+
+#: ../../spec.rst:254
+msgid "dom_id: the DOM id need to be set to this widget"
+msgstr ""
+
+#: ../../spec.rst:255
+msgid "contents list: list of output spec"
+msgstr ""
+
+#: ../../spec.rst:257
+msgid "type: scrollable"
+msgstr ""
+
+#: ../../spec.rst:259
+msgid "contents:"
+msgstr ""
+
+#: ../../spec.rst:260
+msgid "min_height:"
+msgstr ""
+
+#: ../../spec.rst:261
+msgid "max_height:"
+msgstr ""
+
+#: ../../spec.rst:262
+msgid "keep_bottom:"
+msgstr ""
+
+#: ../../spec.rst:263
+msgid "border:"
+msgstr ""
+
+#: ../../spec.rst:265
+msgid "type: tabs"
+msgstr ""
+
+#: ../../spec.rst:267
+msgid "tabs:"
+msgstr ""
+
+#: ../../spec.rst:269
+msgid "type: custom_widget"
+msgstr ""
+
+#: ../../spec.rst:271
+msgid "template:"
+msgstr ""
+
+#: ../../spec.rst:272
+msgid "data:"
+msgstr ""
+
+#: ../../spec.rst:275
+msgid "pin_value"
+msgstr ""
+
+#: ../../spec.rst:277
+msgid "The ``spec`` fields of ``pin_value`` commands:"
+msgstr ""
+
+#: ../../spec.rst:279 ../../spec.rst:286
+msgid "name"
+msgstr ""
+
+#: ../../spec.rst:282
+msgid "pin_update"
+msgstr ""
+
+#: ../../spec.rst:284
+msgid "The ``spec`` fields of ``pin_update`` commands:"
+msgstr ""
+
+#: ../../spec.rst:290
+msgid "pin_wait"
+msgstr ""
+
+#: ../../spec.rst:292
+msgid "The ``spec`` fields of ``pin_wait`` commands:"
+msgstr ""
+
+#: ../../spec.rst:294
+msgid "names: list,"
+msgstr ""
+
+#: ../../spec.rst:295
+msgid "timeout: int,"
+msgstr ""
+
+#: ../../spec.rst:299
+msgid "popup"
+msgstr ""
+
+#: ../../spec.rst:300
+msgid "Show popup"
+msgstr ""
+
+#: ../../spec.rst:302 ../../spec.rst:315
+msgid "The ``spec`` fields of ``popup`` commands:"
+msgstr ""
+
+#: ../../spec.rst:304
+msgid "title"
+msgstr ""
+
+#: ../../spec.rst:305 ../../spec.rst:317
+msgid "content"
+msgstr ""
+
+#: ../../spec.rst:306
+msgid "size: ``large``, ``normal``, ``small``"
+msgstr ""
+
+#: ../../spec.rst:307
+msgid "implicit_close"
+msgstr ""
+
+#: ../../spec.rst:308
+msgid "closable"
+msgstr ""
+
+#: ../../spec.rst:309
+msgid "dom_id: DOM id of popup container element"
+msgstr ""
+
+#: ../../spec.rst:312
+msgid "toast"
+msgstr ""
+
+#: ../../spec.rst:313
+msgid "Show a notification message"
+msgstr ""
+
+#: ../../spec.rst:318
+msgid "duration"
+msgstr ""
+
+#: ../../spec.rst:319
+msgid "position: `'left'` / `'center'` / `'right'`"
+msgstr ""
+
+#: ../../spec.rst:320
+msgid "color: hexadecimal color value starting with '#'"
+msgstr ""
+
+#: ../../spec.rst:321
+msgid "callback_id"
+msgstr ""
+
+#: ../../spec.rst:325
+msgid "close_popup"
+msgstr ""
+
+#: ../../spec.rst:326
+msgid "Close the current popup window."
+msgstr ""
+
+#: ../../spec.rst:328
+msgid "``spec`` of the command is empty."
+msgstr ""
+
+#: ../../spec.rst:331
+msgid "set_env"
+msgstr ""
+
+#: ../../spec.rst:332
+msgid "Config the environment of current session."
+msgstr ""
+
+#: ../../spec.rst:334
+msgid "The ``spec`` fields of ``set_env`` commands:"
+msgstr ""
+
+#: ../../spec.rst:336
+msgid "title (str)"
+msgstr ""
+
+#: ../../spec.rst:337
+msgid "output_animation (bool)"
+msgstr ""
+
+#: ../../spec.rst:338
+msgid "auto_scroll_bottom (bool)"
+msgstr ""
+
+#: ../../spec.rst:339
+msgid "http_pull_interval (int)"
+msgstr ""
+
+#: ../../spec.rst:340
+msgid "input_panel_fixed (bool)"
+msgstr ""
+
+#: ../../spec.rst:341
+msgid "input_panel_min_height (int)"
+msgstr ""
+
+#: ../../spec.rst:342
+msgid "input_panel_init_height (int)"
+msgstr ""
+
+#: ../../spec.rst:343
+msgid "input_auto_focus (bool)"
+msgstr ""
+
+#: ../../spec.rst:346
+msgid "output_ctl"
+msgstr ""
+
+#: ../../spec.rst:347
+msgid "Output control"
+msgstr ""
+
+#: ../../spec.rst:349
+msgid "The ``spec`` fields of ``output_ctl`` commands:"
+msgstr ""
+
+#: ../../spec.rst:351
+msgid "set_scope: scope name"
+msgstr ""
+
+#: ../../spec.rst:353
+msgid "container: Specify css selector to the parent scope of target scope."
+msgstr ""
+
+#: ../../spec.rst:354
+msgid ""
+"position: int, The index where this scope is created in the parent scope."
+msgstr ""
+
+#: ../../spec.rst:355
+msgid "if_exist: What to do when the specified scope already exists:"
+msgstr ""
+
+#: ../../spec.rst:357
+msgid "null: Do nothing"
+msgstr ""
+
+#: ../../spec.rst:358
+msgid "`'remove'`: Remove the old scope first and then create a new one"
+msgstr ""
+
+#: ../../spec.rst:359
+msgid ""
+"`'clear'`: Just clear the contents of the old scope, but don’t create a "
+"new scope"
+msgstr ""
+
+#: ../../spec.rst:361
+msgid "clear: css selector of the scope need to clear"
+msgstr ""
+
+#: ../../spec.rst:362
+msgid "clear_before"
+msgstr ""
+
+#: ../../spec.rst:363
+msgid "clear_after"
+msgstr ""
+
+#: ../../spec.rst:364
+msgid "clear_range:[,]"
+msgstr ""
+
+#: ../../spec.rst:365
+msgid "scroll_to"
+msgstr ""
+
+#: ../../spec.rst:366
+msgid ""
+"position: top/middle/bottom, Where to place the scope in the visible area"
+" of the page"
+msgstr ""
+
+#: ../../spec.rst:367
+msgid "remove: Remove the specified scope"
+msgstr ""
+
+#: ../../spec.rst:370
+msgid "run_script"
+msgstr ""
+
+#: ../../spec.rst:371
+msgid "run javascript code in user's browser"
+msgstr ""
+
+#: ../../spec.rst:373
+msgid "The ``spec`` fields of ``run_script`` commands:"
+msgstr ""
+
+#: ../../spec.rst:375
+msgid "code: str, code"
+msgstr ""
+
+#: ../../spec.rst:376
+msgid "args: dict, Local variables passed to js code"
+msgstr ""
+
+#: ../../spec.rst:377
+msgid "eval: bool, whether to submit the return value of javascript code"
+msgstr ""
+
+#: ../../spec.rst:380
+msgid "download"
+msgstr ""
+
+#: ../../spec.rst:381
+msgid "Send file to user"
+msgstr ""
+
+#: ../../spec.rst:383
+msgid "The ``spec`` fields of ``download`` commands:"
+msgstr ""
+
+#: ../../spec.rst:385
+msgid "name: str, File name when downloading"
+msgstr ""
+
+#: ../../spec.rst:386
+msgid "content: str, File content in base64 encoding."
+msgstr ""
+
+#: ../../spec.rst:389
+msgid "Event"
+msgstr ""
+
+#: ../../spec.rst:391
+msgid ""
+"Event is sent by the client to the server. The basic format of event is::"
+msgstr ""
+
+#: ../../spec.rst:393
+msgid ""
+"{\n"
+"    event: event name\n"
+"    task_id: \"\"\n"
+"    data: object/str\n"
+"}"
+msgstr ""
+
+#: ../../spec.rst:399
+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 ""
+
+#: ../../spec.rst:403
+msgid "input_event"
+msgstr ""
+
+#: ../../spec.rst:404
+msgid "Triggered when the form changes"
+msgstr ""
+
+#: ../../spec.rst:406
+msgid ""
+"event_name: Current available value is ``'blur'``, which indicates that "
+"the input item loses focus"
+msgstr ""
+
+#: ../../spec.rst:407
+msgid "name: name of input item"
+msgstr ""
+
+#: ../../spec.rst:408
+msgid "value: value of input item"
+msgstr ""
+
+#: ../../spec.rst:410
+msgid "note: checkbox and radio do not generate blur events"
+msgstr ""
+
+#: ../../spec.rst:415
+msgid "callback"
+msgstr ""
+
+#: ../../spec.rst:416
+msgid "Triggered when the user clicks the button in the page"
+msgstr ""
+
+#: ../../spec.rst:418
+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 ""
+
+#: ../../spec.rst:422
+msgid "from_submit"
+msgstr ""
+
+#: ../../spec.rst:423
+msgid "Triggered when the user submits the form"
+msgstr ""
+
+#: ../../spec.rst:425
+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 ""
+
+#: ../../spec.rst:428
+msgid "from_cancel"
+msgstr ""
+
+#: ../../spec.rst:429
+msgid "Cancel input form"
+msgstr ""
+
+#: ../../spec.rst:431
+msgid "The ``data`` of the event is ``None``"
+msgstr ""
+
+#: ../../spec.rst:434
+msgid "js_yield"
+msgstr ""
+
+#: ../../spec.rst:435
+msgid "submit data from js. It's a common event to submit data to backend."
+msgstr ""
+
+#: ../../spec.rst:437
+msgid "The ``data`` of the event is the data need to submit"
+msgstr ""
+