|
@@ -7,7 +7,7 @@ msgid ""
|
|
msgstr ""
|
|
msgstr ""
|
|
"Project-Id-Version: PyWebIO 1.1.0\n"
|
|
"Project-Id-Version: PyWebIO 1.1.0\n"
|
|
"Report-Msgid-Bugs-To: \n"
|
|
"Report-Msgid-Bugs-To: \n"
|
|
-"POT-Creation-Date: 2021-03-14 21:34+0800\n"
|
|
|
|
|
|
+"POT-Creation-Date: 2021-03-19 22:41+0800\n"
|
|
"PO-Revision-Date: 2021-02-24 09:37+0800\n"
|
|
"PO-Revision-Date: 2021-02-24 09:37+0800\n"
|
|
"Last-Translator: WangWeimin <wang0.618@qq.com>\n"
|
|
"Last-Translator: WangWeimin <wang0.618@qq.com>\n"
|
|
"Language: zh_CN\n"
|
|
"Language: zh_CN\n"
|
|
@@ -24,8 +24,8 @@ msgstr "``pywebio.session`` — 会话相关"
|
|
|
|
|
|
#: of pywebio.session.run_async:1
|
|
#: of pywebio.session.run_async:1
|
|
msgid ""
|
|
msgid ""
|
|
-"Run the coroutine object asynchronously. PyWebIO interactive functions "
|
|
|
|
-"are also available in the coroutine."
|
|
|
|
|
|
+"Run the coroutine object asynchronously. PyWebIO interactive functions are "
|
|
|
|
+"also available in the coroutine."
|
|
msgstr "异步运行协程对象。协程中依然可以调用 PyWebIO 交互函数。 "
|
|
msgstr "异步运行协程对象。协程中依然可以调用 PyWebIO 交互函数。 "
|
|
|
|
|
|
#: of pywebio.session.run_async:3
|
|
#: of pywebio.session.run_async:3
|
|
@@ -50,12 +50,12 @@ msgstr ""
|
|
|
|
|
|
#: of pywebio.session.run_async:6
|
|
#: of pywebio.session.run_async:6
|
|
msgid ""
|
|
msgid ""
|
|
-"`TaskHandle <pywebio.session.coroutinebased.TaskHandle>` instance, which "
|
|
|
|
-"can be used to query the running status of the coroutine or close the "
|
|
|
|
|
|
+"`TaskHandle <pywebio.session.coroutinebased.TaskHandle>` instance, which can"
|
|
|
|
+" be used to query the running status of the coroutine or close the "
|
|
"coroutine."
|
|
"coroutine."
|
|
msgstr ""
|
|
msgstr ""
|
|
-"`TaskHandle <pywebio.session.coroutinebased.TaskHandle>` 实例。 通过 "
|
|
|
|
-"TaskHandle 可以查询协程运行状态和关闭协程。"
|
|
|
|
|
|
+"`TaskHandle <pywebio.session.coroutinebased.TaskHandle>` 实例。 通过 TaskHandle "
|
|
|
|
+"可以查询协程运行状态和关闭协程。"
|
|
|
|
|
|
#: of pywebio.session.run_async:8
|
|
#: of pywebio.session.run_async:8
|
|
msgid ""
|
|
msgid ""
|
|
@@ -65,17 +65,13 @@ msgstr "参见::ref:`协程会话的并发 <coroutine_based_concurrency>`"
|
|
|
|
|
|
#: of pywebio.session.run_asyncio_coroutine:1
|
|
#: of pywebio.session.run_asyncio_coroutine:1
|
|
msgid ""
|
|
msgid ""
|
|
-"If the thread running sessions are not the same as the thread running the"
|
|
|
|
-" asyncio event loop, you need to wrap ``run_asyncio_coroutine()`` to run "
|
|
|
|
-"the coroutine in asyncio."
|
|
|
|
-msgstr ""
|
|
|
|
-"若会话线程和运行asyncio事件循环的线程不是同一个线程,需要用 `run_asyncio_coroutine()` "
|
|
|
|
-"来运行asyncio中的协程。"
|
|
|
|
|
|
+"If the thread running sessions are not the same as the thread running the "
|
|
|
|
+"asyncio event loop, you need to wrap ``run_asyncio_coroutine()`` to run the "
|
|
|
|
+"coroutine in asyncio."
|
|
|
|
+msgstr "若会话线程和运行asyncio事件循环的线程不是同一个线程,需要用 `run_asyncio_coroutine()` 来运行asyncio中的协程。"
|
|
|
|
|
|
#: of pywebio.session.run_asyncio_coroutine:3
|
|
#: of pywebio.session.run_asyncio_coroutine:3
|
|
-msgid ""
|
|
|
|
-"Can only be used in :ref:`coroutine-based session "
|
|
|
|
-"<coroutine_based_session>`."
|
|
|
|
|
|
+msgid "Can only be used in :ref:`coroutine-based session <coroutine_based_session>`."
|
|
msgstr "仅能在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中调用。"
|
|
msgstr "仅能在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中调用。"
|
|
|
|
|
|
#: of pywebio.session.run_asyncio_coroutine:5
|
|
#: of pywebio.session.run_asyncio_coroutine:5
|
|
@@ -98,9 +94,7 @@ msgid ""
|
|
msgstr ""
|
|
msgstr ""
|
|
|
|
|
|
#: of pywebio.session.download:1
|
|
#: of pywebio.session.download:1
|
|
-msgid ""
|
|
|
|
-"Send file to user, and the user browser will download the file to the "
|
|
|
|
-"local"
|
|
|
|
|
|
+msgid "Send file to user, and the user browser will download the file to the local"
|
|
msgstr "向用户推送文件,用户浏览器会将文件下载到本地"
|
|
msgstr "向用户推送文件,用户浏览器会将文件下载到本地"
|
|
|
|
|
|
#: of pywebio.session.download:3
|
|
#: of pywebio.session.download:3
|
|
@@ -111,7 +105,7 @@ msgstr "下载保存为的文件名"
|
|
msgid "File content. It is a bytes-like object"
|
|
msgid "File content. It is a bytes-like object"
|
|
msgstr "文件内容. 类型为 bytes-like object"
|
|
msgstr "文件内容. 类型为 bytes-like object"
|
|
|
|
|
|
-#: of pywebio.session:131 pywebio.session.download:6 pywebio.session.eval_js:9
|
|
|
|
|
|
+#: of pywebio.session:130 pywebio.session.download:6 pywebio.session.eval_js:9
|
|
msgid "Example:"
|
|
msgid "Example:"
|
|
msgstr ""
|
|
msgstr ""
|
|
|
|
|
|
@@ -143,8 +137,8 @@ msgstr ""
|
|
|
|
|
|
#: of pywebio.session.eval_js:1
|
|
#: of pywebio.session.eval_js:1
|
|
msgid ""
|
|
msgid ""
|
|
-"Execute JavaScript expression in the user's browser and get the value of "
|
|
|
|
-"the expression"
|
|
|
|
|
|
+"Execute JavaScript expression in the user's browser and get the value of the"
|
|
|
|
+" expression"
|
|
msgstr "在用户浏览器中执行JavaScript表达式,并获取表达式的值"
|
|
msgstr "在用户浏览器中执行JavaScript表达式,并获取表达式的值"
|
|
|
|
|
|
#: of pywebio.session.eval_js:3
|
|
#: of pywebio.session.eval_js:3
|
|
@@ -159,9 +153,9 @@ msgstr "js表达式的值"
|
|
|
|
|
|
#: of pywebio.session.eval_js:7
|
|
#: of pywebio.session.eval_js:7
|
|
msgid ""
|
|
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."
|
|
|
|
|
|
+"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 ""
|
|
msgstr ""
|
|
"注意⚠️:在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中,需要使用 ``await "
|
|
"注意⚠️:在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中,需要使用 ``await "
|
|
"eval_js(expression)`` 语法来进行调用。"
|
|
"eval_js(expression)`` 语法来进行调用。"
|
|
@@ -182,8 +176,8 @@ msgstr ""
|
|
|
|
|
|
#: of pywebio.session.register_thread:1
|
|
#: of pywebio.session.register_thread:1
|
|
msgid ""
|
|
msgid ""
|
|
-"Register the thread so that PyWebIO interactive functions are available "
|
|
|
|
-"in the thread."
|
|
|
|
|
|
+"Register the thread so that PyWebIO interactive functions are available in "
|
|
|
|
+"the thread."
|
|
msgstr "注册线程,以便在线程内调用 PyWebIO 交互函数。"
|
|
msgstr "注册线程,以便在线程内调用 PyWebIO 交互函数。"
|
|
|
|
|
|
#: of pywebio.session.register_thread:3
|
|
#: of pywebio.session.register_thread:3
|
|
@@ -204,15 +198,15 @@ msgstr "设置会话结束时调用的函数。"
|
|
|
|
|
|
#: of pywebio.session.defer_call:3
|
|
#: of pywebio.session.defer_call:3
|
|
msgid ""
|
|
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."
|
|
|
|
|
|
+"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 "无论是用户主动关闭会话还是任务结束会话关闭,设置的函数都会被运行。"
|
|
msgstr "无论是用户主动关闭会话还是任务结束会话关闭,设置的函数都会被运行。"
|
|
|
|
|
|
#: of pywebio.session.defer_call:5
|
|
#: of pywebio.session.defer_call:5
|
|
msgid ""
|
|
msgid ""
|
|
-"You can call ``defer_call(func)`` multiple times in the session, and the "
|
|
|
|
-"set functions will be executed sequentially after the session closes."
|
|
|
|
|
|
+"You can call ``defer_call(func)`` multiple times in the session, and the set"
|
|
|
|
+" functions will be executed sequentially after the session closes."
|
|
msgstr "在会话中可以多次调用 `defer_call()` ,会话结束后将会顺序执行设置的函数。"
|
|
msgstr "在会话中可以多次调用 `defer_call()` ,会话结束后将会顺序执行设置的函数。"
|
|
|
|
|
|
#: of pywebio.session.defer_call:7
|
|
#: of pywebio.session.defer_call:7
|
|
@@ -227,9 +221,7 @@ msgid ""
|
|
msgstr ""
|
|
msgstr ""
|
|
|
|
|
|
#: of pywebio.session.defer_call:13
|
|
#: of pywebio.session.defer_call:13
|
|
-msgid ""
|
|
|
|
-"PyWebIO interactive functions cannot be called inside the function "
|
|
|
|
-"``func``."
|
|
|
|
|
|
+msgid "PyWebIO interactive functions cannot be called inside the function ``func``."
|
|
msgstr "通过 `defer_call()` 设置的函数被调用时会话已经关闭,所以在函数体内不可以调用 PyWebIO 的交互函数"
|
|
msgstr "通过 `defer_call()` 设置的函数被调用时会话已经关闭,所以在函数体内不可以调用 PyWebIO 的交互函数"
|
|
|
|
|
|
#: of pywebio.session.hold:1
|
|
#: of pywebio.session.hold:1
|
|
@@ -238,12 +230,12 @@ msgstr "保持会话,直到用户关闭浏览器。"
|
|
|
|
|
|
#: of pywebio.session.hold:5
|
|
#: of pywebio.session.hold:5
|
|
msgid ""
|
|
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."
|
|
|
|
|
|
+"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 ""
|
|
msgstr ""
|
|
"在PyWebIO会话结束后,页面和服务端的连接便会断开,\n"
|
|
"在PyWebIO会话结束后,页面和服务端的连接便会断开,\n"
|
|
"页面上需要和服务端通信才可实现的功能(比如:下载通过 `put_file() <pywebio.output.put_file>` 输出的文件,\n"
|
|
"页面上需要和服务端通信才可实现的功能(比如:下载通过 `put_file() <pywebio.output.put_file>` 输出的文件,\n"
|
|
@@ -252,12 +244,11 @@ msgstr ""
|
|
|
|
|
|
#: of pywebio.session.hold:7
|
|
#: of pywebio.session.hold:7
|
|
msgid ""
|
|
msgid ""
|
|
-"Note: When using :ref:`coroutine-based session "
|
|
|
|
-"<coroutine_based_session>`, you need to use the ``await hold()`` syntax "
|
|
|
|
-"to call the function."
|
|
|
|
|
|
+"Note: When using :ref:`coroutine-based session <coroutine_based_session>`, "
|
|
|
|
+"you need to use the ``await hold()`` syntax to call the function."
|
|
msgstr ""
|
|
msgstr ""
|
|
-"注意⚠️:在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中,需要使用 ``await "
|
|
|
|
-"hold()`` 语法来进行调用。"
|
|
|
|
|
|
+"注意⚠️:在 :ref:`基于协程 <coroutine_based_session>` 的会话上下文中,需要使用 ``await hold()`` "
|
|
|
|
+"语法来进行调用。"
|
|
|
|
|
|
#: of pywebio.session:12
|
|
#: of pywebio.session:12
|
|
msgid "The session-local object for current session."
|
|
msgid "The session-local object for current session."
|
|
@@ -267,10 +258,10 @@ msgstr "当前会话的数据对象(session-local object)。"
|
|
msgid ""
|
|
msgid ""
|
|
"``local`` is a dictionary that can be accessed through attributes. When "
|
|
"``local`` is a dictionary that can be accessed through attributes. When "
|
|
"accessing a property that does not exist in the data object, it returns "
|
|
"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."
|
|
|
|
|
|
+"``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 ""
|
|
msgstr ""
|
|
"``local`` 是一个可以通过属性访问的字典,访问不存在的属性时会返回 ``None`` 而不是抛出异常。``local`` "
|
|
"``local`` 是一个可以通过属性访问的字典,访问不存在的属性时会返回 ``None`` 而不是抛出异常。``local`` "
|
|
"不支持字典的方法,支持使用 ``in`` 操作符来判断键是否存在,可以使用 ``local._dict`` 获取底层的字典表示。"
|
|
"不支持字典的方法,支持使用 ``in`` 操作符来判断键是否存在,可以使用 ``local._dict`` 获取底层的字典表示。"
|
|
@@ -282,8 +273,8 @@ msgstr "使用场景"
|
|
#: of pywebio.session:20
|
|
#: of pywebio.session:20
|
|
msgid ""
|
|
msgid ""
|
|
"When you need to share some session-independent data with multiple "
|
|
"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."
|
|
|
|
|
|
+"functions, it is more convenient to use session-local objects to save state "
|
|
|
|
+"than to use function parameters."
|
|
msgstr "当需要在多个函数中保存一些会话独立的数据时,使用session-local对象保存状态会比通过函数参数传递更方便。"
|
|
msgstr "当需要在多个函数中保存一些会话独立的数据时,使用session-local对象保存状态会比通过函数参数传递更方便。"
|
|
|
|
|
|
#: of pywebio.session:22
|
|
#: of pywebio.session:22
|
|
@@ -364,14 +355,6 @@ msgid ""
|
|
"print(local._dict)"
|
|
"print(local._dict)"
|
|
msgstr ""
|
|
msgstr ""
|
|
|
|
|
|
-#: of pywebio.session.data:1
|
|
|
|
-msgid "Get the session-local object of current session."
|
|
|
|
-msgstr "获取当前会话的数据对象(session-local object)。"
|
|
|
|
-
|
|
|
|
-#: of pywebio.session.data:4
|
|
|
|
-msgid "Use `local <pywebio.session.local>` instead."
|
|
|
|
-msgstr ""
|
|
|
|
-
|
|
|
|
#: of pywebio.session.set_env:1
|
|
#: of pywebio.session.set_env:1
|
|
msgid "Config the environment of current session."
|
|
msgid "Config the environment of current session."
|
|
msgstr "当前会话的环境设置"
|
|
msgstr "当前会话的环境设置"
|
|
@@ -386,16 +369,15 @@ msgstr "``title`` (str): 当前页面的标题"
|
|
|
|
|
|
#: of pywebio.session.set_env:6
|
|
#: of pywebio.session.set_env:6
|
|
msgid ""
|
|
msgid ""
|
|
-"``output_animation`` (bool): Whether to enable output animation, enabled "
|
|
|
|
-"by default"
|
|
|
|
|
|
+"``output_animation`` (bool): Whether to enable output animation, enabled by "
|
|
|
|
+"default"
|
|
msgstr "``output_animation`` (bool): 是否启用输出动画(在输出内容时,使用过渡动画),默认启用"
|
|
msgstr "``output_animation`` (bool): 是否启用输出动画(在输出内容时,使用过渡动画),默认启用"
|
|
|
|
|
|
#: of pywebio.session.set_env:7
|
|
#: of pywebio.session.set_env:7
|
|
msgid ""
|
|
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."
|
|
|
|
|
|
+"``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 ""
|
|
msgstr ""
|
|
"``auto_scroll_bottom`` (bool): 是否在内容输出时将页面自动滚动到底部,默认关闭。注意,开启后,只有输出到ROOT "
|
|
"``auto_scroll_bottom`` (bool): 是否在内容输出时将页面自动滚动到底部,默认关闭。注意,开启后,只有输出到ROOT "
|
|
"Scope才可以触发自动滚动。"
|
|
"Scope才可以触发自动滚动。"
|
|
@@ -431,126 +413,126 @@ msgstr "是否在新窗口打开,默认为 `True`"
|
|
msgid "See also: :ref:`Server mode <server_and_script_mode>`"
|
|
msgid "See also: :ref:`Server mode <server_and_script_mode>`"
|
|
msgstr "参见: :ref:`Server 模式 <server_and_script_mode>`"
|
|
msgstr "参见: :ref:`Server 模式 <server_and_script_mode>`"
|
|
|
|
|
|
-#: of pywebio.session:89
|
|
|
|
|
|
+#: of pywebio.session:88
|
|
msgid "The session information data object, whose attributes are:"
|
|
msgid "The session information data object, whose attributes are:"
|
|
msgstr "表示会话信息的对象,属性有:"
|
|
msgstr "表示会话信息的对象,属性有:"
|
|
|
|
|
|
-#: of pywebio.session:91
|
|
|
|
|
|
+#: of pywebio.session:90
|
|
msgid ""
|
|
msgid ""
|
|
"``user_agent`` : The Object of the user browser information, whose "
|
|
"``user_agent`` : The Object of the user browser information, whose "
|
|
"attributes are"
|
|
"attributes are"
|
|
msgstr "``user_agent`` : 表示用户浏览器信息的对象,属性有"
|
|
msgstr "``user_agent`` : 表示用户浏览器信息的对象,属性有"
|
|
|
|
|
|
-#: of pywebio.session:93
|
|
|
|
|
|
+#: of pywebio.session:92
|
|
msgid ""
|
|
msgid ""
|
|
"``is_mobile`` (bool): whether user agent is identified as a mobile phone "
|
|
"``is_mobile`` (bool): whether user agent is identified as a mobile phone "
|
|
"(iPhone, Android phones, Blackberry, Windows Phone devices etc)"
|
|
"(iPhone, Android phones, Blackberry, Windows Phone devices etc)"
|
|
msgstr ""
|
|
msgstr ""
|
|
-"``is_mobile`` (bool): 用户使用的设备是否为手机 (比如 iPhone, Android phones, "
|
|
|
|
-"Blackberry, Windows Phone 等设备)"
|
|
|
|
|
|
+"``is_mobile`` (bool): 用户使用的设备是否为手机 (比如 iPhone, Android phones, Blackberry, "
|
|
|
|
+"Windows Phone 等设备)"
|
|
|
|
|
|
-#: of pywebio.session:94
|
|
|
|
|
|
+#: of pywebio.session:93
|
|
msgid ""
|
|
msgid ""
|
|
-"``is_tablet`` (bool): whether user agent is identified as a tablet device"
|
|
|
|
-" (iPad, Kindle Fire, Nexus 7 etc)"
|
|
|
|
|
|
+"``is_tablet`` (bool): whether user agent is identified as a tablet device "
|
|
|
|
+"(iPad, Kindle Fire, Nexus 7 etc)"
|
|
msgstr "``is_tablet`` (bool): 用户使用的设备是否为平板 (比如 iPad, Kindle Fire, Nexus 7 等设备)"
|
|
msgstr "``is_tablet`` (bool): 用户使用的设备是否为平板 (比如 iPad, Kindle Fire, Nexus 7 等设备)"
|
|
|
|
|
|
-#: of pywebio.session:95
|
|
|
|
|
|
+#: of pywebio.session:94
|
|
msgid ""
|
|
msgid ""
|
|
"``is_pc`` (bool): whether user agent is identified to be running a "
|
|
"``is_pc`` (bool): whether user agent is identified to be running a "
|
|
"traditional \"desktop\" OS (Windows, OS X, Linux)"
|
|
"traditional \"desktop\" OS (Windows, OS X, Linux)"
|
|
msgstr "``is_pc`` (bool): 用户使用的设备是否为桌面电脑 (比如运行 Windows, OS X, Linux 的设备)"
|
|
msgstr "``is_pc`` (bool): 用户使用的设备是否为桌面电脑 (比如运行 Windows, OS X, Linux 的设备)"
|
|
|
|
|
|
-#: of pywebio.session:96
|
|
|
|
|
|
+#: of pywebio.session:95
|
|
msgid "``is_touch_capable`` (bool): whether user agent has touch capabilities"
|
|
msgid "``is_touch_capable`` (bool): whether user agent has touch capabilities"
|
|
msgstr "``is_touch_capable`` (bool): 用户使用的设备是否支持触控"
|
|
msgstr "``is_touch_capable`` (bool): 用户使用的设备是否支持触控"
|
|
|
|
|
|
-#: of pywebio.session:98
|
|
|
|
|
|
+#: of pywebio.session:97
|
|
msgid "``browser.family`` (str): Browser family. such as 'Mobile Safari'"
|
|
msgid "``browser.family`` (str): Browser family. such as 'Mobile Safari'"
|
|
msgstr "``browser.family`` (str): 浏览器家族. 比如 'Mobile Safari'"
|
|
msgstr "``browser.family`` (str): 浏览器家族. 比如 'Mobile Safari'"
|
|
|
|
|
|
-#: of pywebio.session:99
|
|
|
|
|
|
+#: of pywebio.session:98
|
|
msgid "``browser.version`` (tuple): Browser version. such as (5, 1)"
|
|
msgid "``browser.version`` (tuple): Browser version. such as (5, 1)"
|
|
msgstr "``browser.version`` (tuple): 浏览器版本元组. 比如 (5, 1)"
|
|
msgstr "``browser.version`` (tuple): 浏览器版本元组. 比如 (5, 1)"
|
|
|
|
|
|
-#: of pywebio.session:100
|
|
|
|
|
|
+#: of pywebio.session:99
|
|
msgid "``browser.version_string`` (str): Browser version string. such as '5.1'"
|
|
msgid "``browser.version_string`` (str): Browser version string. such as '5.1'"
|
|
msgstr "``browser.version_string`` (str): 浏览器版本字符串. 比如 '5.1'"
|
|
msgstr "``browser.version_string`` (str): 浏览器版本字符串. 比如 '5.1'"
|
|
|
|
|
|
-#: of pywebio.session:102
|
|
|
|
|
|
+#: of pywebio.session:101
|
|
msgid "``os.family`` (str): User OS family. such as 'iOS'"
|
|
msgid "``os.family`` (str): User OS family. such as 'iOS'"
|
|
msgstr "``os.family`` (str): 操作系统家族. 比如 'iOS'"
|
|
msgstr "``os.family`` (str): 操作系统家族. 比如 'iOS'"
|
|
|
|
|
|
-#: of pywebio.session:103
|
|
|
|
|
|
+#: of pywebio.session:102
|
|
msgid "``os.version`` (tuple): User OS version. such as (5, 1)"
|
|
msgid "``os.version`` (tuple): User OS version. such as (5, 1)"
|
|
msgstr "``os.version`` (tuple): 操作系统版本元组. 比如 (5, 1)"
|
|
msgstr "``os.version`` (tuple): 操作系统版本元组. 比如 (5, 1)"
|
|
|
|
|
|
-#: of pywebio.session:104
|
|
|
|
|
|
+#: of pywebio.session:103
|
|
msgid "``os.version_string`` (str): User OS version string. such as '5.1'"
|
|
msgid "``os.version_string`` (str): User OS version string. such as '5.1'"
|
|
msgstr "``os.version_string`` (str): 操作系统版本字符串. 比如 '5.1'"
|
|
msgstr "``os.version_string`` (str): 操作系统版本字符串. 比如 '5.1'"
|
|
|
|
|
|
-#: of pywebio.session:106
|
|
|
|
|
|
+#: of pywebio.session:105
|
|
msgid "``device.family`` (str): User agent's device family. such as 'iPhone'"
|
|
msgid "``device.family`` (str): User agent's device family. such as 'iPhone'"
|
|
msgstr "``device.family`` (str): 设备家族. 比如 'iPhone'"
|
|
msgstr "``device.family`` (str): 设备家族. 比如 'iPhone'"
|
|
|
|
|
|
-#: of pywebio.session:107
|
|
|
|
|
|
+#: of pywebio.session:106
|
|
msgid "``device.brand`` (str): Device brand. such as 'Apple'"
|
|
msgid "``device.brand`` (str): Device brand. such as 'Apple'"
|
|
msgstr "``device.brand`` (str): 设备品牌. 比如 'Apple'"
|
|
msgstr "``device.brand`` (str): 设备品牌. 比如 'Apple'"
|
|
|
|
|
|
-#: of pywebio.session:108
|
|
|
|
|
|
+#: of pywebio.session:107
|
|
msgid "``device.model`` (str): Device model. such as 'iPhone'"
|
|
msgid "``device.model`` (str): Device model. such as 'iPhone'"
|
|
msgstr "``device.model`` (str): 设备型号. 比如 'iPhone'"
|
|
msgstr "``device.model`` (str): 设备型号. 比如 'iPhone'"
|
|
|
|
|
|
-#: of pywebio.session:110
|
|
|
|
|
|
+#: of pywebio.session:109
|
|
msgid ""
|
|
msgid ""
|
|
"``user_language`` (str): Language used by the user's operating system. "
|
|
"``user_language`` (str): Language used by the user's operating system. "
|
|
"(e.g., ``'zh-CN'``)"
|
|
"(e.g., ``'zh-CN'``)"
|
|
msgstr "``user_language`` (str): 用户操作系统使用的语言. 比如 ``'zh-CN'``"
|
|
msgstr "``user_language`` (str): 用户操作系统使用的语言. 比如 ``'zh-CN'``"
|
|
|
|
|
|
-#: of pywebio.session:111
|
|
|
|
|
|
+#: of pywebio.session:110
|
|
msgid ""
|
|
msgid ""
|
|
-"``server_host`` (str): PyWebIO server host, including domain and port, "
|
|
|
|
-"the port can be omitted when 80."
|
|
|
|
|
|
+"``server_host`` (str): PyWebIO server host, including domain and port, the "
|
|
|
|
+"port can be omitted when 80."
|
|
msgstr "``server_host`` (str): 当前会话的服务器host,包含域名和端口,端口为80时可以被省略"
|
|
msgstr "``server_host`` (str): 当前会话的服务器host,包含域名和端口,端口为80时可以被省略"
|
|
|
|
|
|
-#: of pywebio.session:112
|
|
|
|
|
|
+#: of pywebio.session:111
|
|
msgid ""
|
|
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``)."
|
|
|
|
|
|
+"``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 ""
|
|
msgstr ""
|
|
-"``origin`` (str): 当前用户的页面地址. 包含 协议、主机、端口 部分. 比如 "
|
|
|
|
-"``'http://localhost:8080'`` .\n"
|
|
|
|
|
|
+"``origin`` (str): 当前用户的页面地址. 包含 协议、主机、端口 部分. 比如 ``'http://localhost:8080'`` "
|
|
|
|
+".\n"
|
|
"可能为空,但保证当用户的页面地址不在当前服务器下(即 主机、端口部分和 ``server_host`` 不一致)时有值."
|
|
"可能为空,但保证当用户的页面地址不在当前服务器下(即 主机、端口部分和 ``server_host`` 不一致)时有值."
|
|
|
|
|
|
-#: of pywebio.session:114
|
|
|
|
|
|
+#: of pywebio.session:113
|
|
msgid "``user_ip`` (str): User's ip address."
|
|
msgid "``user_ip`` (str): User's ip address."
|
|
msgstr "用户的ip地址."
|
|
msgstr "用户的ip地址."
|
|
|
|
|
|
-#: of pywebio.session:115
|
|
|
|
|
|
+#: of pywebio.session:114
|
|
msgid ""
|
|
msgid ""
|
|
-"``backend`` (str): The current PyWebIO backend server implementation. The"
|
|
|
|
-" possible values are ``'tornado'``, ``'flask'``, ``'django'`` , "
|
|
|
|
|
|
+"``backend`` (str): The current PyWebIO backend server implementation. The "
|
|
|
|
+"possible values are ``'tornado'``, ``'flask'``, ``'django'`` , "
|
|
"``'aiohttp'``."
|
|
"``'aiohttp'``."
|
|
msgstr ""
|
|
msgstr ""
|
|
-"当前PyWebIO使用的后端Server实现. 可能出现的值有 ``'tornado'`` , ``'flask'`` , "
|
|
|
|
-"``'django'`` , ``'aiohttp'``."
|
|
|
|
|
|
+"当前PyWebIO使用的后端Server实现. 可能出现的值有 ``'tornado'`` , ``'flask'`` , ``'django'`` ,"
|
|
|
|
+" ``'aiohttp'``."
|
|
|
|
|
|
-#: of pywebio.session:116
|
|
|
|
|
|
+#: of pywebio.session:115
|
|
msgid ""
|
|
msgid ""
|
|
-"``protocol`` (str): The communication protocol between PyWebIO server and"
|
|
|
|
-" browser. The possible values are ``'websocket'``, ``'http'``"
|
|
|
|
|
|
+"``protocol`` (str): The communication protocol between PyWebIO server and "
|
|
|
|
+"browser. The possible values are ``'websocket'``, ``'http'``"
|
|
msgstr ""
|
|
msgstr ""
|
|
|
|
|
|
-#: of pywebio.session:117
|
|
|
|
|
|
+#: of pywebio.session:116
|
|
msgid ""
|
|
msgid ""
|
|
-"``request`` (object): The request object when creating the current "
|
|
|
|
-"session. Depending on the backend server, the type of ``request`` can be:"
|
|
|
|
|
|
+"``request`` (object): The request object when creating the current session. "
|
|
|
|
+"Depending on the backend server, the type of ``request`` can be:"
|
|
msgstr "创建当前会话时的Web请求对象. 根据PyWebIO使用的后端Server不同,``request`` 的类型也不同:"
|
|
msgstr "创建当前会话时的Web请求对象. 根据PyWebIO使用的后端Server不同,``request`` 的类型也不同:"
|
|
|
|
|
|
-#: of pywebio.session:119
|
|
|
|
|
|
+#: of pywebio.session:118
|
|
msgid ""
|
|
msgid ""
|
|
"When using Tornado, ``request`` is instance of "
|
|
"When using Tornado, ``request`` is instance of "
|
|
"`tornado.httputil.HTTPServerRequest "
|
|
"`tornado.httputil.HTTPServerRequest "
|
|
@@ -560,16 +542,15 @@ msgstr ""
|
|
"<https://www.tornadoweb.org/en/stable/httputil.html#tornado.httputil.HTTPServerRequest>`_"
|
|
"<https://www.tornadoweb.org/en/stable/httputil.html#tornado.httputil.HTTPServerRequest>`_"
|
|
" 实例"
|
|
" 实例"
|
|
|
|
|
|
-#: of pywebio.session:121
|
|
|
|
|
|
+#: of pywebio.session:120
|
|
msgid ""
|
|
msgid ""
|
|
"When using Flask, ``request`` is instance of `flask.Request "
|
|
"When using Flask, ``request`` is instance of `flask.Request "
|
|
"<https://flask.palletsprojects.com/en/1.1.x/api/#incoming-request-data>`_"
|
|
"<https://flask.palletsprojects.com/en/1.1.x/api/#incoming-request-data>`_"
|
|
msgstr ""
|
|
msgstr ""
|
|
"使用Flask后端时, ``request`` 为 `flask.Request "
|
|
"使用Flask后端时, ``request`` 为 `flask.Request "
|
|
-"<https://flask.palletsprojects.com/en/1.1.x/api/#incoming-request-data>`_"
|
|
|
|
-" 实例"
|
|
|
|
|
|
+"<https://flask.palletsprojects.com/en/1.1.x/api/#incoming-request-data>`_ 实例"
|
|
|
|
|
|
-#: of pywebio.session:122
|
|
|
|
|
|
+#: of pywebio.session:121
|
|
msgid ""
|
|
msgid ""
|
|
"When using Django, ``request`` is instance of `django.http.HttpRequest "
|
|
"When using Django, ``request`` is instance of `django.http.HttpRequest "
|
|
"<https://docs.djangoproject.com/en/3.0/ref/request-"
|
|
"<https://docs.djangoproject.com/en/3.0/ref/request-"
|
|
@@ -579,7 +560,7 @@ msgstr ""
|
|
"<https://docs.djangoproject.com/en/3.0/ref/request-"
|
|
"<https://docs.djangoproject.com/en/3.0/ref/request-"
|
|
"response/#django.http.HttpRequest>`_ 实例"
|
|
"response/#django.http.HttpRequest>`_ 实例"
|
|
|
|
|
|
-#: of pywebio.session:123
|
|
|
|
|
|
+#: of pywebio.session:122
|
|
msgid ""
|
|
msgid ""
|
|
"When using aiohttp, ``request`` is instance of `aiohttp.web.BaseRequest "
|
|
"When using aiohttp, ``request`` is instance of `aiohttp.web.BaseRequest "
|
|
"<https://docs.aiohttp.org/en/stable/web_reference.html#aiohttp.web.BaseRequest>`_"
|
|
"<https://docs.aiohttp.org/en/stable/web_reference.html#aiohttp.web.BaseRequest>`_"
|
|
@@ -588,20 +569,20 @@ msgstr ""
|
|
"<https://docs.aiohttp.org/en/stable/web_reference.html#aiohttp.web.BaseRequest>`_"
|
|
"<https://docs.aiohttp.org/en/stable/web_reference.html#aiohttp.web.BaseRequest>`_"
|
|
" 实例"
|
|
" 实例"
|
|
|
|
|
|
-#: of pywebio.session:125
|
|
|
|
|
|
+#: of pywebio.session:124
|
|
msgid ""
|
|
msgid ""
|
|
-"The ``user_agent`` attribute of the session information object is parsed "
|
|
|
|
-"by the user-agents library. See https://github.com/selwin/python-user-"
|
|
|
|
|
|
+"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"
|
|
"agents#usage"
|
|
msgstr ""
|
|
msgstr ""
|
|
"会话信息对象的 ``user_agent`` 属性是通过 user-agents 库进行解析生成的。参见 "
|
|
"会话信息对象的 ``user_agent`` 属性是通过 user-agents 库进行解析生成的。参见 "
|
|
"https://github.com/selwin/python-user-agents#usage"
|
|
"https://github.com/selwin/python-user-agents#usage"
|
|
|
|
|
|
-#: of pywebio.session:129
|
|
|
|
|
|
+#: of pywebio.session:128
|
|
msgid "Added the ``protocol`` attribute."
|
|
msgid "Added the ``protocol`` attribute."
|
|
msgstr ""
|
|
msgstr ""
|
|
|
|
|
|
-#: of pywebio.session:133
|
|
|
|
|
|
+#: of pywebio.session:132
|
|
msgid ""
|
|
msgid ""
|
|
"import json\n"
|
|
"import json\n"
|
|
"from pywebio.session import info as session_info\n"
|
|
"from pywebio.session import info as session_info\n"
|
|
@@ -613,14 +594,6 @@ msgid ""
|
|
"}, indent=4), 'json')"
|
|
"}, indent=4), 'json')"
|
|
msgstr ""
|
|
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.coroutinebased.TaskHandler:1
|
|
#: of pywebio.session.coroutinebased.TaskHandler:1
|
|
msgid "The handler of coroutine task"
|
|
msgid "The handler of coroutine task"
|
|
msgstr "协程任务句柄"
|
|
msgstr "协程任务句柄"
|
|
@@ -648,3 +621,15 @@ msgstr "任务是否关闭"
|
|
#~ "}, indent=4), 'json')"
|
|
#~ "}, indent=4), 'json')"
|
|
#~ msgstr ""
|
|
#~ msgstr ""
|
|
|
|
|
|
|
|
+#~ msgid "Get the session-local object of current session."
|
|
|
|
+#~ msgstr "获取当前会话的数据对象(session-local object)。"
|
|
|
|
+
|
|
|
|
+#~ msgid "Use `local <pywebio.session.local>` instead."
|
|
|
|
+#~ msgstr ""
|
|
|
|
+
|
|
|
|
+#~ msgid "Get information about the current session"
|
|
|
|
+#~ msgstr "获取当前会话的相关信息"
|
|
|
|
+
|
|
|
|
+#~ msgid "Use `info <pywebio.session.info>` instead."
|
|
|
|
+#~ msgstr ""
|
|
|
|
+
|