From 1a364353229f649bf095cef0d10ef2a7a545e685 Mon Sep 17 00:00:00 2001 From: Frost Ming Date: Mon, 7 Jun 2021 14:37:54 +0800 Subject: [PATCH 1/5] add pofmt hook to format PO files --- .github/workflows/sync.yaml | 9 +++++++-- .pre-commit-config.yaml | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync.yaml b/.github/workflows/sync.yaml index fe72407dc..a4fd8120a 100644 --- a/.github/workflows/sync.yaml +++ b/.github/workflows/sync.yaml @@ -38,14 +38,19 @@ jobs: cd docs make gettext sphinx-intl update -p _build/gettext - cd .. - git add docs/ + + - name: Check and Commit + run: | + pip install pre-commit + pre-commit run --all-files pofmt + git add . git commit -m "Update po files by GitHub Actions" - name: Push changes uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} + branch: main - name: Create issue shell: python diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d75f3c310..b07f43353 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,3 +30,8 @@ repos: - id: fix-byte-order-marker - id: trailing-whitespace - id: end-of-file-fixer + - repo: https://github.com/frostming/pofmt + rev: "0.1.0" + hooks: + - id: pofmt + additional_dependencies: ["pangu"] From 3b3bc3d5582defd4ebbed45cc8cb68f38f318355 Mon Sep 17 00:00:00 2001 From: Frost Ming Date: Mon, 7 Jun 2021 14:43:03 +0800 Subject: [PATCH 2/5] Make the change range more precise --- .github/workflows/sync.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync.yaml b/.github/workflows/sync.yaml index a4fd8120a..1d091fa0e 100644 --- a/.github/workflows/sync.yaml +++ b/.github/workflows/sync.yaml @@ -43,7 +43,7 @@ jobs: run: | pip install pre-commit pre-commit run --all-files pofmt - git add . + git add docs/ src/ git commit -m "Update po files by GitHub Actions" - name: Push changes From 89469d85626c9a620e5ebef346afda31c076a0d5 Mon Sep 17 00:00:00 2001 From: Frost Ming Date: Wed, 9 Jun 2021 12:11:12 +0800 Subject: [PATCH 3/5] Update to pofmt 0.3.0 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b07f43353..1ed724188 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: - id: trailing-whitespace - id: end-of-file-fixer - repo: https://github.com/frostming/pofmt - rev: "0.1.0" + rev: "0.3.0" hooks: - id: pofmt additional_dependencies: ["pangu"] From ea33ef609b49a61e2cb81066d3ea18c4dfefed80 Mon Sep 17 00:00:00 2001 From: Frost Ming Date: Wed, 9 Jun 2021 14:28:01 +0800 Subject: [PATCH 4/5] Only run changed part for pre-commit hook. [skip pre-commit.ci] --- .github/workflows/sync.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync.yaml b/.github/workflows/sync.yaml index 1d091fa0e..286cc99c5 100644 --- a/.github/workflows/sync.yaml +++ b/.github/workflows/sync.yaml @@ -42,7 +42,8 @@ jobs: - name: Check and Commit run: | pip install pre-commit - pre-commit run --all-files pofmt + git add docs/ + pre-commit run pofmt git add docs/ src/ git commit -m "Update po files by GitHub Actions" From 36da34735e3b02395dfb4ad7a7b652e44add7f68 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 9 Jun 2021 06:47:11 +0000 Subject: [PATCH 5/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../zh_CN/LC_MESSAGES/advanced_foreword.po | 17 +- docs/locales/zh_CN/LC_MESSAGES/api.po | 1689 +++++++++-------- docs/locales/zh_CN/LC_MESSAGES/appcontext.po | 50 +- docs/locales/zh_CN/LC_MESSAGES/async-await.po | 47 +- docs/locales/zh_CN/LC_MESSAGES/becomingbig.po | 88 +- docs/locales/zh_CN/LC_MESSAGES/blueprints.po | 155 +- docs/locales/zh_CN/LC_MESSAGES/changes.po | 545 +++--- docs/locales/zh_CN/LC_MESSAGES/cli.po | 162 +- docs/locales/zh_CN/LC_MESSAGES/config.po | 246 +-- .../locales/zh_CN/LC_MESSAGES/contributing.po | 51 +- docs/locales/zh_CN/LC_MESSAGES/debugging.po | 39 +- .../zh_CN/LC_MESSAGES/deploying/asgi.po | 12 +- .../zh_CN/LC_MESSAGES/deploying/cgi.po | 22 +- .../zh_CN/LC_MESSAGES/deploying/fastcgi.po | 55 +- .../zh_CN/LC_MESSAGES/deploying/index.po | 5 +- .../zh_CN/LC_MESSAGES/deploying/mod_wsgi.po | 75 +- .../zh_CN/LC_MESSAGES/deploying/uwsgi.po | 34 +- .../LC_MESSAGES/deploying/wsgi-standalone.po | 37 +- docs/locales/zh_CN/LC_MESSAGES/design.po | 148 +- .../zh_CN/LC_MESSAGES/errorhandling.po | 158 +- .../locales/zh_CN/LC_MESSAGES/extensiondev.po | 154 +- docs/locales/zh_CN/LC_MESSAGES/extensions.po | 26 +- docs/locales/zh_CN/LC_MESSAGES/foreword.po | 42 +- docs/locales/zh_CN/LC_MESSAGES/htmlfaq.po | 86 +- docs/locales/zh_CN/LC_MESSAGES/index.po | 16 +- .../locales/zh_CN/LC_MESSAGES/installation.po | 61 +- docs/locales/zh_CN/LC_MESSAGES/license.po | 33 +- docs/locales/zh_CN/LC_MESSAGES/logging.po | 47 +- .../zh_CN/LC_MESSAGES/patterns/appdispatch.po | 33 +- .../LC_MESSAGES/patterns/appfactories.po | 23 +- .../zh_CN/LC_MESSAGES/patterns/caching.po | 11 +- .../zh_CN/LC_MESSAGES/patterns/celery.po | 41 +- .../LC_MESSAGES/patterns/deferredcallbacks.po | 25 +- .../zh_CN/LC_MESSAGES/patterns/distribute.po | 105 +- .../zh_CN/LC_MESSAGES/patterns/fabric.po | 76 +- .../zh_CN/LC_MESSAGES/patterns/favicon.po | 20 +- .../zh_CN/LC_MESSAGES/patterns/fileuploads.po | 91 +- .../zh_CN/LC_MESSAGES/patterns/flashing.po | 15 +- .../zh_CN/LC_MESSAGES/patterns/index.po | 7 +- .../zh_CN/LC_MESSAGES/patterns/jquery.po | 82 +- .../zh_CN/LC_MESSAGES/patterns/lazyloading.po | 39 +- .../LC_MESSAGES/patterns/methodoverrides.po | 1 - .../zh_CN/LC_MESSAGES/patterns/mongoengine.po | 25 +- .../zh_CN/LC_MESSAGES/patterns/packages.po | 53 +- .../LC_MESSAGES/patterns/requestchecksum.po | 13 +- .../patterns/singlepageapplications.po | 8 +- .../zh_CN/LC_MESSAGES/patterns/sqlalchemy.po | 48 +- .../zh_CN/LC_MESSAGES/patterns/sqlite3.po | 67 +- .../zh_CN/LC_MESSAGES/patterns/streaming.po | 37 +- .../zh_CN/LC_MESSAGES/patterns/subclassing.po | 1 - .../patterns/templateinheritance.po | 22 +- .../LC_MESSAGES/patterns/urlprocessors.po | 53 +- .../LC_MESSAGES/patterns/viewdecorators.po | 55 +- .../zh_CN/LC_MESSAGES/patterns/wtforms.po | 46 +- docs/locales/zh_CN/LC_MESSAGES/quickstart.po | 288 ++- docs/locales/zh_CN/LC_MESSAGES/reqcontext.po | 115 +- docs/locales/zh_CN/LC_MESSAGES/security.po | 128 +- docs/locales/zh_CN/LC_MESSAGES/server.po | 39 +- docs/locales/zh_CN/LC_MESSAGES/shell.po | 58 +- docs/locales/zh_CN/LC_MESSAGES/signals.po | 68 +- docs/locales/zh_CN/LC_MESSAGES/templating.po | 68 +- docs/locales/zh_CN/LC_MESSAGES/testing.po | 142 +- .../zh_CN/LC_MESSAGES/tutorial/blog.po | 84 +- .../zh_CN/LC_MESSAGES/tutorial/database.po | 70 +- .../zh_CN/LC_MESSAGES/tutorial/deploy.po | 17 +- .../zh_CN/LC_MESSAGES/tutorial/factory.po | 56 +- .../zh_CN/LC_MESSAGES/tutorial/index.po | 51 +- .../zh_CN/LC_MESSAGES/tutorial/install.po | 35 +- .../zh_CN/LC_MESSAGES/tutorial/layout.po | 20 +- .../zh_CN/LC_MESSAGES/tutorial/next.po | 27 +- .../zh_CN/LC_MESSAGES/tutorial/static.po | 19 +- .../zh_CN/LC_MESSAGES/tutorial/templates.po | 75 +- .../zh_CN/LC_MESSAGES/tutorial/tests.po | 129 +- .../zh_CN/LC_MESSAGES/tutorial/views.po | 129 +- docs/locales/zh_CN/LC_MESSAGES/views.po | 60 +- 75 files changed, 3359 insertions(+), 3416 deletions(-) diff --git a/docs/locales/zh_CN/LC_MESSAGES/advanced_foreword.po b/docs/locales/zh_CN/LC_MESSAGES/advanced_foreword.po index 45c789d54..0baffbb5f 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/advanced_foreword.po +++ b/docs/locales/zh_CN/LC_MESSAGES/advanced_foreword.po @@ -30,14 +30,14 @@ msgid "" "One of the design decisions in Flask was that simple tasks should be " "simple; they should not take a lot of code and yet they should not limit " "you. Because of that, Flask has a few design choices that some people " -"might find surprising or unorthodox. For example, Flask uses thread-local" -" objects internally so that you don’t have to pass objects around from " +"might find surprising or unorthodox. For example, Flask uses thread-local " +"objects internally so that you don’t have to pass objects around from " "function to function within a request in order to stay threadsafe. This " "approach is convenient, but requires a valid request context for " "dependency injection or when attempting to reuse code which uses a value " "pegged to the request. The Flask project is honest about thread-locals, " -"does not hide them, and calls out in the code and documentation where " -"they are used." +"does not hide them, and calls out in the code and documentation where they" +" are used." msgstr "" #: ../../advanced_foreword.rst:20 @@ -52,8 +52,8 @@ msgstr "" msgid "" "If you write a web application, you are probably allowing users to " "register and leave their data on your server. The users are entrusting " -"you with data. And even if you are the only user that might leave data in" -" your application, you still want that data to be stored securely." +"you with data. And even if you are the only user that might leave data in " +"your application, you still want that data to be stored securely." msgstr "" #: ../../advanced_foreword.rst:29 @@ -70,8 +70,8 @@ msgstr "" msgid "" "The documentation will warn you about aspects of web development that " "require attention to security. Some of these security concerns are far " -"more complex than one might think, and we all sometimes underestimate the" -" likelihood that a vulnerability will be exploited - until a clever " +"more complex than one might think, and we all sometimes underestimate the " +"likelihood that a vulnerability will be exploited - until a clever " "attacker figures out a way to exploit our applications. And don't think " "that your application is not important enough to attract an attacker. " "Depending on the kind of attack, chances are that automated bots are " @@ -85,4 +85,3 @@ msgid "" "must build with caution, watching for exploits when building to your " "requirements." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/api.po b/docs/locales/zh_CN/LC_MESSAGES/api.po index eef671478..a03efde20 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/api.po +++ b/docs/locales/zh_CN/LC_MESSAGES/api.po @@ -36,8 +36,8 @@ msgstr "" msgid "" "The flask object implements a WSGI application and acts as the central " "object. It is passed the name of the module or package of the " -"application. Once it is created it will act as a central registry for " -"the view functions, the URL rules, template configuration and much more." +"application. Once it is created it will act as a central registry for the" +" view functions, the URL rules, template configuration and much more." msgstr "" #: flask.app.Flask:6 of @@ -50,13 +50,14 @@ msgid "" msgstr "" #: flask.app.Flask:11 of -msgid "For more information about resource loading, see :func:`open_resource`." +msgid "" +"For more information about resource loading, see :func:`open_resource`." msgstr "" #: flask.app.Flask:13 of msgid "" -"Usually you create a :class:`Flask` instance in your main module or in " -"the :file:`__init__.py` file of your package like this::" +"Usually you create a :class:`Flask` instance in your main module or in the" +" :file:`__init__.py` file of your package like this::" msgstr "" #: flask.app.Flask:19 of @@ -67,16 +68,16 @@ msgstr "" msgid "" "The idea of the first parameter is to give Flask an idea of what belongs " "to your application. This name is used to find resources on the " -"filesystem, can be used by extensions to improve debugging information " -"and a lot more." +"filesystem, can be used by extensions to improve debugging information and" +" a lot more." msgstr "" #: flask.app.Flask:26 of msgid "" "So it's important what you provide there. If you are using a single " -"module, `__name__` is always the correct value. If you however are using" -" a package, it's usually recommended to hardcode the name of your package" -" there." +"module, `__name__` is always the correct value. If you however are using " +"a package, it's usually recommended to hardcode the name of your package " +"there." msgstr "" #: flask.app.Flask:31 of @@ -89,12 +90,12 @@ msgstr "" #: flask.app.Flask:37 of msgid "" "Why is that? The application will work even with `__name__`, thanks to " -"how resources are looked up. However it will make debugging more " -"painful. Certain extensions can make assumptions based on the import " -"name of your application. For example the Flask-SQLAlchemy extension " -"will look for the code in your application that triggered an SQL query in" -" debug mode. If the import name is not properly set up, that debugging " -"information is lost. (For example it would only pick up SQL queries in " +"how resources are looked up. However it will make debugging more painful." +" Certain extensions can make assumptions based on the import name of your" +" application. For example the Flask-SQLAlchemy extension will look for " +"the code in your application that triggered an SQL query in debug mode. " +"If the import name is not properly set up, that debugging information is " +"lost. (For example it would only pick up SQL queries in " "`yourapplication.app` and not `yourapplication.views.frontend`)" msgstr "" @@ -114,7 +115,8 @@ msgid "The `root_path` parameter was added." msgstr "" #: flask.app.Flask:51 of -msgid "The `instance_path` and `instance_relative_config` parameters were added." +msgid "" +"The `instance_path` and `instance_relative_config` parameters were added." msgstr "" #: flask.app.Flask:47 of @@ -251,15 +253,15 @@ msgstr "" #: flask.app.Flask:67 of msgid "" -"can be used to specify a different path for the static files on the web." -" Defaults to the name of the `static_folder` folder." +"can be used to specify a different path for the static files on the web. " +"Defaults to the name of the `static_folder` folder." msgstr "" #: flask.app.Flask:70 of msgid "" "The folder with static files that is served at ``static_url_path``. " -"Relative to the application ``root_path`` or an absolute path. Defaults " -"to ``'static'``." +"Relative to the application ``root_path`` or an absolute path. Defaults to" +" ``'static'``." msgstr "" #: flask.app.Flask:73 of @@ -288,8 +290,8 @@ msgstr "" #: flask.app.Flask:84 of msgid "" "An alternative instance path for the application. By default the folder " -"``'instance'`` next to the package or module is assumed to be the " -"instance path." +"``'instance'`` next to the package or module is assumed to be the instance" +" path." msgstr "" #: flask.app.Flask:88 of @@ -314,7 +316,8 @@ msgstr "" #: flask.app.Flask.add_template_filter:4 flask.app.Flask.template_filter:9 #: flask.blueprints.Blueprint.add_app_template_filter:5 #: flask.blueprints.Blueprint.app_template_filter:4 of -msgid "the optional name of the filter, otherwise the function name will be used." +msgid "" +"the optional name of the filter, otherwise the function name will be used." msgstr "" #: ../../api.rst ../../docstring flask.Request.if_match @@ -464,8 +467,8 @@ msgstr "" #: flask.app.Flask.add_template_global:6 flask.app.Flask.template_global:11 of msgid "" -"the optional name of the global function, otherwise the function name " -"will be used." +"the optional name of the global function, otherwise the function name will" +" be used." msgstr "" #: flask.app.Flask.add_template_test:1 of @@ -477,14 +480,15 @@ msgstr "" #: flask.app.Flask.add_template_test:6 flask.app.Flask.template_test:16 #: flask.blueprints.Blueprint.add_app_template_test:7 #: flask.blueprints.Blueprint.app_template_test:6 of -msgid "the optional name of the test, otherwise the function name will be used." +msgid "" +"the optional name of the test, otherwise the function name will be used." msgstr "" #: flask.app.Flask.add_url_rule:1 of msgid "" "Register a rule for routing incoming requests and building URLs. The " -":meth:`route` decorator is a shortcut to call this with the ``view_func``" -" argument. These are equivalent:" +":meth:`route` decorator is a shortcut to call this with the ``view_func`` " +"argument. These are equivalent:" msgstr "" #: flask.app.Flask.add_url_rule:18 flask.scaffold.Scaffold.route:11 of @@ -493,9 +497,9 @@ msgstr "" #: flask.app.Flask.add_url_rule:20 of msgid "" -"The endpoint name for the route defaults to the name of the view function" -" if the ``endpoint`` parameter isn't passed. An error will be raised if a" -" function has already been registered for the endpoint." +"The endpoint name for the route defaults to the name of the view function " +"if the ``endpoint`` parameter isn't passed. An error will be raised if a " +"function has already been registered for the endpoint." msgstr "" #: flask.app.Flask.add_url_rule:25 of @@ -515,8 +519,8 @@ msgstr "" msgid "" "If ``view_func`` has a ``required_methods`` attribute, those methods are " "added to the passed and automatic methods. If it has a " -"``provide_automatic_methods`` attribute, it is used as the default if the" -" parameter is not passed." +"``provide_automatic_methods`` attribute, it is used as the default if the " +"parameter is not passed." msgstr "" #: flask.app.Flask.add_url_rule:47 flask.scaffold.Scaffold.route:19 of @@ -525,8 +529,8 @@ msgstr "" #: flask.app.Flask.add_url_rule:48 of msgid "" -"The endpoint name to associate with the rule and view function. Used when" -" routing and building URLs. Defaults to ``view_func.__name__``." +"The endpoint name to associate with the rule and view function. Used when " +"routing and building URLs. Defaults to ``view_func.__name__``." msgstr "" #: flask.app.Flask.add_url_rule:51 of @@ -593,8 +597,8 @@ msgstr "" #: flask.app.Flask.app_context:1 of msgid "" -"Create an :class:`~flask.ctx.AppContext`. Use as a ``with`` block to push" -" the context, which will make :data:`current_app` point at this " +"Create an :class:`~flask.ctx.AppContext`. Use as a ``with`` block to push " +"the context, which will make :data:`current_app` point at this " "application." msgstr "" @@ -624,8 +628,7 @@ msgstr "" msgid "" "Tries to locate the instance path if it was not provided to the " "constructor of the application class. It will basically calculate the " -"path to a folder named ``instance`` next to your main file or the " -"package." +"path to a folder named ``instance`` next to your main file or the package." msgstr "" #: flask.app.Flask.before_first_request:1 of @@ -636,8 +639,8 @@ msgstr "" #: flask.app.Flask.before_first_request:4 of msgid "" -"The function will be called without any arguments and its return value is" -" ignored." +"The function will be called without any arguments and its return value is " +"ignored." msgstr "" #: ../../docstring flask.Flask.before_first_request_funcs:1 of @@ -667,9 +670,9 @@ msgstr "" #: ../../docstring flask.Blueprint.before_request_funcs:1 #: flask.Flask.before_request_funcs:1 of msgid "" -"A data structure of functions to call at the beginning of each request, " -"in the format ``{scope: [functions]}``. The ``scope`` key is the name of " -"a blueprint the functions are active for, or ``None`` for all requests." +"A data structure of functions to call at the beginning of each request, in" +" the format ``{scope: [functions]}``. The ``scope`` key is the name of a " +"blueprint the functions are active for, or ``None`` for all requests." msgstr "" #: ../../docstring flask.Blueprint.before_request_funcs:6 @@ -679,23 +682,23 @@ msgstr "" #: ../../docstring flask.Flask.blueprints:1 of msgid "" -"Maps registered blueprint names to blueprint objects. The dict retains " -"the order the blueprints were registered in. Blueprints can be registered" -" multiple times, this dict does not track how often they were attached." +"Maps registered blueprint names to blueprint objects. The dict retains the" +" order the blueprints were registered in. Blueprints can be registered " +"multiple times, this dict does not track how often they were attached." msgstr "" #: ../../docstring flask.Blueprint.cli:1 flask.Flask.cli:1 of msgid "" -"The Click command group for registering CLI commands for this object. The" -" commands are available from the ``flask`` command once the application " -"has been discovered and blueprints have been registered." +"The Click command group for registering CLI commands for this object. The " +"commands are available from the ``flask`` command once the application has" +" been discovered and blueprints have been registered." msgstr "" #: ../../docstring flask.Flask.config:1 of msgid "" "The configuration dictionary as :class:`Config`. This behaves exactly " -"like a regular dictionary but supports additional methods to load a " -"config from files." +"like a regular dictionary but supports additional methods to load a config" +" from files." msgstr "" #: flask.scaffold.Scaffold.context_processor:1 of @@ -732,8 +735,8 @@ msgstr "" #: flask.app.Flask.create_url_adapter:1 of msgid "" -"Creates a URL adapter for the given request. The URL adapter is created " -"at a point where the request context is not yet set up so the request is " +"Creates a URL adapter for the given request. The URL adapter is created at" +" a point where the request context is not yet set up so the request is " "passed explicitly." msgstr "" @@ -745,8 +748,8 @@ msgstr "" #: flask.app.Flask.create_url_adapter:7 of msgid "" -"This can now also be called without a request object when the URL adapter" -" is created for the application context." +"This can now also be called without a request object when the URL adapter " +"is created for the application context." msgstr "" #: flask.Flask.debug:1 of @@ -781,14 +784,14 @@ msgstr "" msgid "" "Does the request dispatching. Matches the URL and returns the return " "value of the view or error handler. This does not have to be a response " -"object. In order to convert the return value to a proper response " -"object, call :func:`make_response`." +"object. In order to convert the return value to a proper response object," +" call :func:`make_response`." msgstr "" #: flask.app.Flask.dispatch_request:6 of msgid "" -"This no longer does the exception handling, this code was moved to the " -"new :meth:`full_dispatch_request`." +"This no longer does the exception handling, this code was moved to the new" +" :meth:`full_dispatch_request`." msgstr "" #: flask.app.Flask.do_teardown_appcontext:1 of @@ -803,18 +806,19 @@ msgstr "" #: flask.app.Flask.do_teardown_appcontext:6 of msgid "" -"This calls all functions decorated with :meth:`teardown_appcontext`. Then" -" the :data:`appcontext_tearing_down` signal is sent." +"This calls all functions decorated with :meth:`teardown_appcontext`. Then " +"the :data:`appcontext_tearing_down` signal is sent." msgstr "" #: flask.app.Flask.do_teardown_appcontext:10 of -msgid "This is called by :meth:`AppContext.pop() `." +msgid "" +"This is called by :meth:`AppContext.pop() `." msgstr "" #: flask.app.Flask.do_teardown_request:1 of msgid "" -"Called after the request is dispatched and the response is returned, " -"right before the request context is popped." +"Called after the request is dispatched and the response is returned, right" +" before the request context is popped." msgstr "" #: flask.app.Flask.do_teardown_request:4 of @@ -833,9 +837,9 @@ msgstr "" #: flask.app.Flask.do_teardown_request:14 of msgid "" -"An unhandled exception raised while dispatching the request. Detected " -"from the current exception information if not passed. Passed to each " -"teardown function." +"An unhandled exception raised while dispatching the request. Detected from" +" the current exception information if not passed. Passed to each teardown " +"function." msgstr "" #: flask.app.Flask.do_teardown_request:18 of @@ -844,8 +848,8 @@ msgstr "" #: flask.scaffold.Scaffold.endpoint:1 of msgid "" -"Decorate a view function to register it for the given endpoint. Used if a" -" rule is added without a ``view_func`` with :meth:`add_url_rule`." +"Decorate a view function to register it for the given endpoint. Used if a " +"rule is added without a ``view_func`` with :meth:`add_url_rule`." msgstr "" #: flask.scaffold.Scaffold.endpoint:13 of @@ -866,10 +870,9 @@ msgstr "" #: ../../docstring flask.Flask.env:1 of msgid "" "What environment the app is running in. Flask and extensions may enable " -"behaviors based on the environment, such as enabling debug mode. This " -"maps to the :data:`ENV` config key. This is set by the " -":envvar:`FLASK_ENV` environment variable and may not behave as expected " -"if set in code." +"behaviors based on the environment, such as enabling debug mode. This maps" +" to the :data:`ENV` config key. This is set by the :envvar:`FLASK_ENV` " +"environment variable and may not behave as expected if set in code." msgstr "" #: ../../docstring flask.Flask.env:7 of @@ -884,16 +887,17 @@ msgstr "" #: flask.Flask.error_handler_spec:1 of msgid "" "A data structure of registered error handlers, in the format ``{scope: " -"{code: {class: handler}}}```. The ``scope`` key is the name of a " -"blueprint the handlers are active for, or ``None`` for all requests. The " -"``code`` key is the HTTP status code for ``HTTPException``, or ``None`` " -"for other exceptions. The innermost dictionary maps exception classes to " -"handler functions." +"{code: {class: handler}}}```. The ``scope`` key is the name of a blueprint" +" the handlers are active for, or ``None`` for all requests. The ``code`` " +"key is the HTTP status code for ``HTTPException``, or ``None`` for other " +"exceptions. The innermost dictionary maps exception classes to handler " +"functions." msgstr "" #: ../../docstring flask.Blueprint.error_handler_spec:9 #: flask.Flask.error_handler_spec:9 of -msgid "To register an error handler, use the :meth:`errorhandler` decorator." +msgid "" +"To register an error handler, use the :meth:`errorhandler` decorator." msgstr "" #: flask.scaffold.Scaffold.errorhandler:1 of @@ -918,8 +922,8 @@ msgstr "" #: flask.scaffold.Scaffold.errorhandler:21 of msgid "" -"One can now additionally also register custom exception types that do not" -" necessarily have to be a subclass of the " +"One can now additionally also register custom exception types that do not " +"necessarily have to be a subclass of the " ":class:`~werkzeug.exceptions.HTTPException` class." msgstr "" @@ -942,9 +946,9 @@ msgstr "" #: flask.app.Flask.finalize_request:1 of msgid "" -"Given the return value from a view function this finalizes the request by" -" converting it into a response and invoking the postprocessing functions." -" This is invoked for both normal request dispatching as well as error " +"Given the return value from a view function this finalizes the request by " +"converting it into a response and invoking the postprocessing functions. " +"This is invoked for both normal request dispatching as well as error " "handlers." msgstr "" @@ -991,14 +995,14 @@ msgstr "" #: flask.Flask.got_first_request:1 of msgid "" -"This attribute is set to ``True`` if the application started handling the" -" first request." +"This attribute is set to ``True`` if the application started handling the " +"first request." msgstr "" #: flask.app.Flask.handle_exception:1 of msgid "" -"Handle an exception that did not have an error handler associated with " -"it, or that was raised from an error handler. This always causes a 500 " +"Handle an exception that did not have an error handler associated with it," +" or that was raised from an error handler. This always causes a 500 " "``InternalServerError``." msgstr "" @@ -1016,16 +1020,16 @@ msgstr "" #: flask.app.Flask.handle_exception:12 of msgid "" -"If an error handler is registered for ``InternalServerError`` or ``500``," -" it will be used. For consistency, the handler will always receive the " -"``InternalServerError``. The original unhandled exception is available as" -" ``e.original_exception``." +"If an error handler is registered for ``InternalServerError`` or ``500``, " +"it will be used. For consistency, the handler will always receive the " +"``InternalServerError``. The original unhandled exception is available as " +"``e.original_exception``." msgstr "" #: flask.app.Flask.handle_exception:17 of msgid "" -"Always passes the ``InternalServerError`` instance to the handler, " -"setting ``original_exception`` to the unhandled error." +"Always passes the ``InternalServerError`` instance to the handler, setting" +" ``original_exception`` to the unhandled error." msgstr "" #: flask.app.Flask.handle_exception:22 of @@ -1042,8 +1046,8 @@ msgstr "" #: flask.app.Flask.handle_http_exception:5 of msgid "" -"``RoutingException``, used internally for actions such as slash " -"redirects during routing, is not passed to error handlers." +"``RoutingException``, used internally for actions such as slash redirects" +" during routing, is not passed to error handlers." msgstr "" #: flask.app.Flask.handle_http_exception:10 of @@ -1059,11 +1063,11 @@ msgstr "" #: flask.app.Flask.handle_user_exception:1 of msgid "" -"This method is called whenever an exception occurs that should be " -"handled. A special case is :class:`~werkzeug .exceptions.HTTPException` " -"which is forwarded to the :meth:`handle_http_exception` method. This " -"function will either return a response value or reraise the exception " -"with the same traceback." +"This method is called whenever an exception occurs that should be handled." +" A special case is :class:`~werkzeug .exceptions.HTTPException` which is " +"forwarded to the :meth:`handle_http_exception` method. This function will " +"either return a response value or reraise the exception with the same " +"traceback." msgstr "" #: flask.app.Flask.handle_user_exception:8 of @@ -1110,8 +1114,8 @@ msgstr "" #: flask.Blueprint.jinja_loader:1 flask.Flask.jinja_loader:1 of msgid "" "The Jinja loader for this object's templates. By default this is a class " -":class:`jinja2.loaders.FileSystemLoader` to :attr:`template_folder` if it" -" is set." +":class:`jinja2.loaders.FileSystemLoader` to :attr:`template_folder` if it " +"is set." msgstr "" #: ../../docstring flask.Flask.jinja_options:1 of @@ -1130,14 +1134,14 @@ msgstr "" #: flask.app.Flask.log_exception:1 of msgid "" "Logs an exception. This is called by :meth:`handle_exception` if " -"debugging is disabled and right before the handler is called. The default" -" implementation logs the exception as error on the :attr:`logger`." +"debugging is disabled and right before the handler is called. The default " +"implementation logs the exception as error on the :attr:`logger`." msgstr "" #: flask.Flask.logger:1 of msgid "" -"A standard Python :class:`~logging.Logger` for the app, with the same " -"name as :attr:`name`." +"A standard Python :class:`~logging.Logger` for the app, with the same name" +" as :attr:`name`." msgstr "" #: flask.Flask.logger:4 of @@ -1148,8 +1152,8 @@ msgstr "" #: flask.Flask.logger:7 of msgid "" -"If there are no handlers configured, a default handler will be added. See" -" :doc:`/logging` for more information." +"If there are no handlers configured, a default handler will be added. See " +":doc:`/logging` for more information." msgstr "" #: flask.Flask.logger:10 of @@ -1160,11 +1164,11 @@ msgstr "" #: flask.Flask.logger:14 of msgid "" -"Behavior was simplified. The logger is always named ``\"flask.app\"``. " -"The level is only set during configuration, it doesn't check " -"``app.debug`` each time. Only one format is used, not different ones " -"depending on ``app.debug``. No handlers are removed, and a handler is " -"only added if no handlers are already configured." +"Behavior was simplified. The logger is always named ``\"flask.app\"``. The" +" level is only set during configuration, it doesn't check ``app.debug`` " +"each time. Only one format is used, not different ones depending on " +"``app.debug``. No handlers are removed, and a handler is only added if no " +"handlers are already configured." msgstr "" #: flask.app.Flask.make_config:1 of @@ -1178,8 +1182,8 @@ msgstr "" #: flask.app.Flask.make_default_options_response:1 of msgid "" -"This method is called to create the default ``OPTIONS`` response. This " -"can be changed through subclassing to change the default behavior of " +"This method is called to create the default ``OPTIONS`` response. This can" +" be changed through subclassing to change the default behavior of " "``OPTIONS`` responses." msgstr "" @@ -1192,28 +1196,28 @@ msgstr "" #: flask.app.Flask.make_response:4 of msgid "" "the return value from the view function. The view function must return a " -"response. Returning ``None``, or the view ending without returning, is " -"not allowed. The following types are allowed for ``view_rv``: ``str``" -" A response object is created with the string encoded to UTF-8 as" -" the body. ``bytes`` A response object is created with the bytes as " -"the body. ``dict`` A dictionary that will be jsonify'd before being " +"response. Returning ``None``, or the view ending without returning, is not" +" allowed. The following types are allowed for ``view_rv``: ``str`` A " +"response object is created with the string encoded to UTF-8 as the " +"body. ``bytes`` A response object is created with the bytes as the " +"body. ``dict`` A dictionary that will be jsonify'd before being " "returned. ``tuple`` Either ``(body, status, headers)``, ``(body, " -"status)``, or ``(body, headers)``, where ``body`` is any of the other" -" types allowed here, ``status`` is a string or an integer, and " +"status)``, or ``(body, headers)``, where ``body`` is any of the other " +"types allowed here, ``status`` is a string or an integer, and " "``headers`` is a dictionary or a list of ``(key, value)`` tuples. If " "``body`` is a :attr:`response_class` instance, ``status`` overwrites " "the exiting value and ``headers`` are extended. " ":attr:`response_class` The object is returned unchanged. other " ":class:`~werkzeug.wrappers.Response` class The object is coerced to " -":attr:`response_class`. :func:`callable` The function is called as a" -" WSGI application. The result is used to create a response object." +":attr:`response_class`. :func:`callable` The function is called as a " +"WSGI application. The result is used to create a response object." msgstr "" #: flask.app.Flask.make_response:4 of msgid "" "the return value from the view function. The view function must return a " -"response. Returning ``None``, or the view ending without returning, is " -"not allowed. The following types are allowed for ``view_rv``:" +"response. Returning ``None``, or the view ending without returning, is not" +" allowed. The following types are allowed for ``view_rv``:" msgstr "" #: flask.app.Flask.make_response:11 of @@ -1221,7 +1225,8 @@ msgid "``str``" msgstr "" #: flask.app.Flask.make_response:10 of -msgid "A response object is created with the string encoded to UTF-8 as the body." +msgid "" +"A response object is created with the string encoded to UTF-8 as the body." msgstr "" #: flask.app.Flask.make_response:14 of @@ -1248,10 +1253,10 @@ msgstr "" msgid "" "Either ``(body, status, headers)``, ``(body, status)``, or ``(body, " "headers)``, where ``body`` is any of the other types allowed here, " -"``status`` is a string or an integer, and ``headers`` is a dictionary or " -"a list of ``(key, value)`` tuples. If ``body`` is a " -":attr:`response_class` instance, ``status`` overwrites the exiting value " -"and ``headers`` are extended." +"``status`` is a string or an integer, and ``headers`` is a dictionary or a" +" list of ``(key, value)`` tuples. If ``body`` is a :attr:`response_class` " +"instance, ``status`` overwrites the exiting value and ``headers`` are " +"extended." msgstr "" #: flask.app.Flask.make_response:29 of @@ -1276,8 +1281,8 @@ msgstr "" #: flask.app.Flask.make_response:35 of msgid "" -"The function is called as a WSGI application. The result is used to " -"create a response object." +"The function is called as a WSGI application. The result is used to create" +" a response object." msgstr "" #: flask.app.Flask.make_response:38 of @@ -1288,16 +1293,16 @@ msgstr "" #: flask.app.Flask.make_shell_context:1 of msgid "" -"Returns the shell context for an interactive shell for this application." -" This runs all the registered shell context processors." +"Returns the shell context for an interactive shell for this application. " +"This runs all the registered shell context processors." msgstr "" #: flask.Flask.name:1 of msgid "" "The name of the application. This is usually the import name with the " -"difference that it's guessed from the run file if the import name is " -"main. This name is used as a display name when Flask needs the name of " -"the application. It can be set and overridden to change the value." +"difference that it's guessed from the run file if the import name is main." +" This name is used as a display name when Flask needs the name of the " +"application. It can be set and overridden to change the value." msgstr "" #: flask.app.Flask.open_instance_resource:1 of @@ -1343,8 +1348,8 @@ msgstr "" #: ../../docstring flask.Flask.permanent_session_lifetime:1 of msgid "" -"A :class:`~datetime.timedelta` which is used to set the expiration date " -"of a permanent session. The default is 31 days which makes a permanent " +"A :class:`~datetime.timedelta` which is used to set the expiration date of" +" a permanent session. The default is 31 days which makes a permanent " "session survive for roughly one month." msgstr "" @@ -1369,8 +1374,8 @@ msgstr "" #: flask.app.Flask.preprocess_request:6 of msgid "" -"If any :meth:`before_request` handler returns a non-None value, the value" -" is handled as if it was the return value from the view, and further " +"If any :meth:`before_request` handler returns a non-None value, the value " +"is handled as if it was the return value from the view, and further " "request handling is stopped." msgstr "" @@ -1382,8 +1387,8 @@ msgstr "" #: flask.app.Flask.process_response:1 of msgid "" -"Can be overridden in order to modify the response object before it's sent" -" to the WSGI server. By default this will call all the " +"Can be overridden in order to modify the response object before it's sent " +"to the WSGI server. By default this will call all the " ":meth:`after_request` decorated functions." msgstr "" @@ -1436,9 +1441,8 @@ msgstr "" #: flask.app.Flask.register_blueprint:1 of msgid "" -"Register a :class:`~flask.Blueprint` on the application. Keyword " -"arguments passed to this method will override the defaults set on the " -"blueprint." +"Register a :class:`~flask.Blueprint` on the application. Keyword arguments" +" passed to this method will override the defaults set on the blueprint." msgstr "" #: flask.app.Flask.register_blueprint:5 of @@ -1509,8 +1513,8 @@ msgstr "" #: ../../docstring flask.Blueprint.root_path:1 flask.Flask.root_path:1 of msgid "" -"Absolute path to the package on the filesystem. Used to look up resources" -" contained in the package." +"Absolute path to the package on the filesystem. Used to look up resources " +"contained in the package." msgstr "" #: flask.scaffold.Scaffold.route:1 of @@ -1522,8 +1526,8 @@ msgstr "" #: flask.scaffold.Scaffold.route:13 of msgid "" -"The endpoint name for the route defaults to the name of the view function" -" if the ``endpoint`` parameter isn't passed." +"The endpoint name for the route defaults to the name of the view function " +"if the ``endpoint`` parameter isn't passed." msgstr "" #: flask.scaffold.Scaffold.route:16 of @@ -1545,22 +1549,22 @@ msgstr "" #: flask.app.Flask.run:7 of msgid "" -"If the :attr:`debug` flag is set the server will automatically reload for" -" code changes and show a debugger in case an exception happened." +"If the :attr:`debug` flag is set the server will automatically reload for " +"code changes and show a debugger in case an exception happened." msgstr "" #: flask.app.Flask.run:10 of msgid "" "If you want to run the application in debug mode, but disable the code " "execution on the interactive debugger, you can pass ``use_evalex=False`` " -"as parameter. This will keep the debugger's traceback screen active, but" -" disable code execution." +"as parameter. This will keep the debugger's traceback screen active, but " +"disable code execution." msgstr "" #: flask.app.Flask.run:15 of msgid "" -"It is not recommended to use this function for development with automatic" -" reloading as this is badly supported. Instead you should be using the " +"It is not recommended to use this function for development with automatic " +"reloading as this is badly supported. Instead you should be using the " ":command:`flask` command line script's ``run`` support." msgstr "" @@ -1571,11 +1575,11 @@ msgstr "" #: flask.app.Flask.run:21 of msgid "" "Flask will suppress any server error with a generic error page unless it " -"is in debug mode. As such to enable just the interactive debugger " -"without the code reloading, you have to invoke :meth:`run` with " -"``debug=True`` and ``use_reloader=False``. Setting ``use_debugger`` to " -"``True`` without being in debug mode won't catch any exceptions because " -"there won't be any to catch." +"is in debug mode. As such to enable just the interactive debugger without" +" the code reloading, you have to invoke :meth:`run` with ``debug=True`` " +"and ``use_reloader=False``. Setting ``use_debugger`` to ``True`` without " +"being in debug mode won't catch any exceptions because there won't be any " +"to catch." msgstr "" #: flask.app.Flask.run:29 of @@ -1587,8 +1591,8 @@ msgstr "" #: flask.app.Flask.run:33 of msgid "" -"the port of the webserver. Defaults to ``5000`` or the port defined in " -"the ``SERVER_NAME`` config variable if present." +"the port of the webserver. Defaults to ``5000`` or the port defined in the" +" ``SERVER_NAME`` config variable if present." msgstr "" #: flask.app.Flask.run:35 of @@ -1631,8 +1635,8 @@ msgstr "" #: ../../docstring flask.Flask.secret_key:1 of msgid "" "If a secret key is set, cryptographic components can use this to sign " -"cookies and other things. Set this to a complex random value when you " -"want to use the secure cookie for instance." +"cookies and other things. Set this to a complex random value when you want" +" to use the secure cookie for instance." msgstr "" #: ../../docstring flask.Flask.secret_key:5 of @@ -1650,12 +1654,13 @@ msgstr "" #: ../../docstring flask.Flask.send_file_max_age_default:1 of msgid "" "A :class:`~datetime.timedelta` or number of seconds which is used as the " -"default ``max_age`` for :func:`send_file`. The default is ``None``, which" -" tells the browser to use conditional requests instead of a timed cache." +"default ``max_age`` for :func:`send_file`. The default is ``None``, which " +"tells the browser to use conditional requests instead of a timed cache." msgstr "" #: ../../docstring flask.Flask.send_file_max_age_default:6 of -msgid "Configured with the :data:`SEND_FILE_MAX_AGE_DEFAULT` configuration key." +msgid "" +"Configured with the :data:`SEND_FILE_MAX_AGE_DEFAULT` configuration key." msgstr "" #: ../../docstring flask.Flask.send_file_max_age_default:9 of @@ -1664,8 +1669,8 @@ msgstr "" #: flask.scaffold.Scaffold.send_static_file:1 of msgid "" -"The view function used to serve files from :attr:`static_folder`. A route" -" is automatically registered for this view at :attr:`static_url_path` if " +"The view function used to serve files from :attr:`static_folder`. A route " +"is automatically registered for this view at :attr:`static_url_path` if " ":attr:`static_folder` is set." msgstr "" @@ -1748,8 +1753,8 @@ msgstr "" #: flask.app.Flask.teardown_appcontext:20 of msgid "" "When a teardown function was called because of an unhandled exception it " -"will be passed an error object. If an :meth:`errorhandler` is registered," -" it will handle the exception and the teardown will not receive it." +"will be passed an error object. If an :meth:`errorhandler` is registered, " +"it will handle the exception and the teardown will not receive it." msgstr "" #: flask.app.Flask.teardown_appcontext:25 @@ -1760,24 +1765,23 @@ msgstr "" #: ../../docstring flask.Flask.teardown_appcontext_funcs:1 of msgid "" "A list of functions that are called when the application context is " -"destroyed. Since the application context is also torn down if the " -"request ends this is the place to store code that disconnects from " -"databases." +"destroyed. Since the application context is also torn down if the request" +" ends this is the place to store code that disconnects from databases." msgstr "" #: flask.scaffold.Scaffold.teardown_request:1 of msgid "" "Register a function to be run at the end of each request, regardless of " -"whether there was an exception or not. These functions are executed when" -" the request context is popped, even if not an actual request was " +"whether there was an exception or not. These functions are executed when " +"the request context is popped, even if not an actual request was " "performed." msgstr "" #: flask.scaffold.Scaffold.teardown_request:13 of msgid "" "When ``ctx.pop()`` is executed in the above example, the teardown " -"functions are called just before the request context moves from the stack" -" of active contexts. This becomes relevant if you are using such " +"functions are called just before the request context moves from the stack " +"of active contexts. This becomes relevant if you are using such " "constructs in tests." msgstr "" @@ -1811,8 +1815,8 @@ msgstr "" msgid "" "A data structure of functions to call at the end of each request even if " "an exception is raised, in the format ``{scope: [functions]}``. The " -"``scope`` key is the name of a blueprint the functions are active for, or" -" ``None`` for all requests." +"``scope`` key is the name of a blueprint the functions are active for, or " +"``None`` for all requests." msgstr "" #: ../../docstring flask.Blueprint.teardown_request_funcs:7 @@ -1824,9 +1828,9 @@ msgstr "" #: flask.Flask.template_context_processors:1 of msgid "" "A data structure of functions to call to pass extra context values when " -"rendering templates, in the format ``{scope: [functions]}``. The " -"``scope`` key is the name of a blueprint the functions are active for, or" -" ``None`` for all requests." +"rendering templates, in the format ``{scope: [functions]}``. The ``scope``" +" key is the name of a blueprint the functions are active for, or ``None`` " +"for all requests." msgstr "" #: ../../docstring flask.Blueprint.template_context_processors:7 @@ -1844,8 +1848,8 @@ msgstr "" #: ../../docstring flask.Blueprint.template_folder:1 #: flask.Flask.template_folder:1 of msgid "" -"The path to the templates folder, relative to :attr:`root_path`, to add " -"to the template loader. ``None`` if templates should not be added." +"The path to the templates folder, relative to :attr:`root_path`, to add to" +" the template loader. ``None`` if templates should not be added." msgstr "" #: flask.app.Flask.template_global:1 of @@ -1857,9 +1861,8 @@ msgstr "" #: flask.app.Flask.template_test:1 of msgid "" -"A decorator that is used to register custom template test. You can " -"specify a name for the test, otherwise the function name will be used. " -"Example::" +"A decorator that is used to register custom template test. You can specify" +" a name for the test, otherwise the function name will be used. Example::" msgstr "" #: flask.Flask.templates_auto_reload:1 of @@ -1881,14 +1884,15 @@ msgid "" msgstr "" #: flask.app.Flask.test_cli_runner:1 of -msgid "Create a CLI runner for testing CLI commands. See :ref:`testing-cli`." +msgid "" +"Create a CLI runner for testing CLI commands. See :ref:`testing-cli`." msgstr "" #: flask.app.Flask.test_cli_runner:4 of msgid "" "Returns an instance of :attr:`test_cli_runner_class`, by default " -":class:`~flask.testing.FlaskCliRunner`. The Flask app object is passed as" -" the first argument." +":class:`~flask.testing.FlaskCliRunner`. The Flask app object is passed as " +"the first argument." msgstr "" #: ../../docstring flask.Flask.test_cli_runner_class:1 of @@ -1909,18 +1913,18 @@ msgstr "" msgid "" "Note that if you are testing for assertions or exceptions in your " "application code, you must set ``app.testing = True`` in order for the " -"exceptions to propagate to the test client. Otherwise, the exception " -"will be handled by the application (not visible to the test client) and " -"the only indication of an AssertionError or other exception will be a 500" -" status code response to the test client. See the :attr:`testing` " +"exceptions to propagate to the test client. Otherwise, the exception will" +" be handled by the application (not visible to the test client) and the " +"only indication of an AssertionError or other exception will be a 500 " +"status code response to the test client. See the :attr:`testing` " "attribute. For example::" msgstr "" #: flask.app.Flask.test_client:15 of msgid "" -"The test client can be used in a ``with`` block to defer the closing down" -" of the context until the end of the ``with`` block. This is useful if " -"you want to access the context locals for testing::" +"The test client can be used in a ``with`` block to defer the closing down " +"of the context until the end of the ``with`` block. This is useful if you" +" want to access the context locals for testing::" msgstr "" #: flask.app.Flask.test_client:23 of @@ -1956,16 +1960,16 @@ msgstr "" #: flask.app.Flask.test_request_context:1 of msgid "" -"Create a :class:`~flask.ctx.RequestContext` for a WSGI environment " -"created from the given values. This is mostly useful during testing, " -"where you may want to run a function that uses request data without " -"dispatching a full request." +"Create a :class:`~flask.ctx.RequestContext` for a WSGI environment created" +" from the given values. This is mostly useful during testing, where you " +"may want to run a function that uses request data without dispatching a " +"full request." msgstr "" #: flask.app.Flask.test_request_context:8 of msgid "" -"Use a ``with`` block to push the context, which will make :data:`request`" -" point at the request for the created environment. ::" +"Use a ``with`` block to push the context, which will make :data:`request` " +"point at the request for the created environment. ::" msgstr "" #: flask.app.Flask.test_request_context:15 of @@ -1988,8 +1992,8 @@ msgstr "" #: flask.app.Flask.test_request_context:29 of msgid "" -"Base URL where the app is being served, which ``path`` is relative to. If" -" not given, built from :data:`PREFERRED_URL_SCHEME`, ``subdomain``, " +"Base URL where the app is being served, which ``path`` is relative to. If " +"not given, built from :data:`PREFERRED_URL_SCHEME`, ``subdomain``, " ":data:`SERVER_NAME`, and :data:`APPLICATION_ROOT`." msgstr "" @@ -2002,13 +2006,14 @@ msgid "Scheme to use instead of :data:`PREFERRED_URL_SCHEME`." msgstr "" #: flask.app.Flask.test_request_context:37 of -msgid "The request body, either as a string or a dict of form keys and values." +msgid "" +"The request body, either as a string or a dict of form keys and values." msgstr "" #: flask.app.Flask.test_request_context:39 of msgid "" -"If given, this is serialized as JSON and passed as ``data``. Also " -"defaults ``content_type`` to ``application/json``." +"If given, this is serialized as JSON and passed as ``data``. Also defaults" +" ``content_type`` to ``application/json``." msgstr "" #: flask.app.Flask.test_request_context:42 of @@ -2018,7 +2023,8 @@ msgid "" msgstr "" #: flask.app.Flask.test_request_context:44 of -msgid "other keyword arguments passed to :class:`~werkzeug.test.EnvironBuilder`." +msgid "" +"other keyword arguments passed to :class:`~werkzeug.test.EnvironBuilder`." msgstr "" #: ../../docstring flask.Flask.testing:1 of @@ -2037,24 +2043,24 @@ msgstr "" #: ../../docstring flask.Flask.testing:9 of msgid "" -"This attribute can also be configured from the config with the " -"``TESTING`` configuration key. Defaults to ``False``." +"This attribute can also be configured from the config with the ``TESTING``" +" configuration key. Defaults to ``False``." msgstr "" #: flask.app.Flask.trap_http_exception:1 of msgid "" "Checks if an HTTP exception should be trapped or not. By default this " "will return ``False`` for all exceptions except for a bad request key " -"error if ``TRAP_BAD_REQUEST_ERRORS`` is set to ``True``. It also returns" -" ``True`` if ``TRAP_HTTP_EXCEPTIONS`` is set to ``True``." +"error if ``TRAP_BAD_REQUEST_ERRORS`` is set to ``True``. It also returns " +"``True`` if ``TRAP_HTTP_EXCEPTIONS`` is set to ``True``." msgstr "" #: flask.app.Flask.trap_http_exception:6 of msgid "" "This is called for all HTTP exceptions raised by a view function. If it " -"returns ``True`` for any exception the error handler for this exception " -"is not called and it shows up as regular exception in the traceback. " -"This is helpful for debugging implicitly raised HTTP exceptions." +"returns ``True`` for any exception the error handler for this exception is" +" not called and it shows up as regular exception in the traceback. This " +"is helpful for debugging implicitly raised HTTP exceptions." msgstr "" #: flask.app.Flask.trap_http_exception:12 of @@ -2073,9 +2079,8 @@ msgid "" "Update the template context with some commonly used variables. This " "injects request, session, config and g into the template context as well " "as everything template context processors want to inject. Note that the " -"as of Flask 0.6, the original values in the context will not be " -"overridden if a context processor decides to return a value with the same" -" key." +"as of Flask 0.6, the original values in the context will not be overridden" +" if a context processor decides to return a value with the same key." msgstr "" #: flask.app.Flask.update_template_context:8 of @@ -2095,10 +2100,10 @@ msgstr "" #: ../../docstring flask.Blueprint.url_default_functions:1 #: flask.Flask.url_default_functions:1 of msgid "" -"A data structure of functions to call to modify the keyword arguments " -"when generating URLs, in the format ``{scope: [functions]}``. The " -"``scope`` key is the name of a blueprint the functions are active for, or" -" ``None`` for all requests." +"A data structure of functions to call to modify the keyword arguments when" +" generating URLs, in the format ``{scope: [functions]}``. The ``scope`` " +"key is the name of a blueprint the functions are active for, or ``None`` " +"for all requests." msgstr "" #: ../../docstring flask.Blueprint.url_default_functions:7 @@ -2115,9 +2120,9 @@ msgstr "" #: ../../docstring flask.Flask.url_map:1 of msgid "" -"The :class:`~werkzeug.routing.Map` for this instance. You can use this " -"to change the routing converters after the class was created but before " -"any routes are connected. Example::" +"The :class:`~werkzeug.routing.Map` for this instance. You can use this to" +" change the routing converters after the class was created but before any " +"routes are connected. Example::" msgstr "" #: flask.scaffold.Scaffold.url_value_preprocessor:1 of @@ -2130,15 +2135,15 @@ msgstr "" #: flask.scaffold.Scaffold.url_value_preprocessor:5 of msgid "" "The function can modify the values captured from the matched url before " -"they are passed to the view. For example, this can be used to pop a " -"common language code value and place it in ``g`` rather than pass it to " -"every view." +"they are passed to the view. For example, this can be used to pop a common" +" language code value and place it in ``g`` rather than pass it to every " +"view." msgstr "" #: flask.scaffold.Scaffold.url_value_preprocessor:10 of msgid "" -"The function is passed the endpoint name and values dict. The return " -"value is ignored." +"The function is passed the endpoint name and values dict. The return value" +" is ignored." msgstr "" #: ../../docstring flask.Blueprint.url_value_preprocessors:1 @@ -2146,19 +2151,20 @@ msgstr "" msgid "" "A data structure of functions to call to modify the keyword arguments " "passed to the view function, in the format ``{scope: [functions]}``. The " -"``scope`` key is the name of a blueprint the functions are active for, or" -" ``None`` for all requests." +"``scope`` key is the name of a blueprint the functions are active for, or " +"``None`` for all requests." msgstr "" #: ../../docstring flask.Blueprint.url_value_preprocessors:7 #: flask.Flask.url_value_preprocessors:7 of -msgid "To register a function, use the :meth:`url_value_preprocessor` decorator." +msgid "" +"To register a function, use the :meth:`url_value_preprocessor` decorator." msgstr "" #: ../../docstring flask.Flask.use_x_sendfile:1 of msgid "" -"Enable this if you want to use the X-Sendfile feature. Keep in mind that" -" the server has to support this. This only affects files sent with the " +"Enable this if you want to use the X-Sendfile feature. Keep in mind that " +"the server has to support this. This only affects files sent with the " ":func:`send_file` method." msgstr "" @@ -2232,8 +2238,8 @@ msgstr "" #: flask.blueprints.Blueprint:10 of msgid "" -"Decorating a function with a blueprint creates a deferred function that " -"is called with :class:`~flask.blueprints.BlueprintSetupState` when the " +"Decorating a function with a blueprint creates a deferred function that is" +" called with :class:`~flask.blueprints.BlueprintSetupState` when the " "blueprint is registered on an application." msgstr "" @@ -2247,28 +2253,28 @@ msgstr "" #: flask.blueprints.Blueprint:18 of msgid "" -"The name of the blueprint package, usually ``__name__``. This helps " -"locate the ``root_path`` for the blueprint." +"The name of the blueprint package, usually ``__name__``. This helps locate" +" the ``root_path`` for the blueprint." msgstr "" #: flask.blueprints.Blueprint:21 of msgid "" -"A folder with static files that should be served by the blueprint's " -"static route. The path is relative to the blueprint's root path. " -"Blueprint static files are disabled by default." +"A folder with static files that should be served by the blueprint's static" +" route. The path is relative to the blueprint's root path. Blueprint " +"static files are disabled by default." msgstr "" #: flask.blueprints.Blueprint:25 of msgid "" -"The url to serve static files from. Defaults to ``static_folder``. If the" -" blueprint does not have a ``url_prefix``, the app's static route will " -"take precedence, and the blueprint's static files won't be accessible." +"The url to serve static files from. Defaults to ``static_folder``. If the " +"blueprint does not have a ``url_prefix``, the app's static route will take" +" precedence, and the blueprint's static files won't be accessible." msgstr "" #: flask.blueprints.Blueprint:29 of msgid "" -"A folder with templates that should be added to the app's template search" -" path. The path is relative to the blueprint's root path. Blueprint " +"A folder with templates that should be added to the app's template search " +"path. The path is relative to the blueprint's root path. Blueprint " "templates are disabled by default. Blueprint templates have a lower " "precedence than those in the app's templates folder." msgstr "" @@ -2284,40 +2290,42 @@ msgid "A subdomain that blueprint routes will match on by default." msgstr "" #: flask.blueprints.Blueprint:38 of -msgid "A dict of default values that blueprint routes will receive by default." +msgid "" +"A dict of default values that blueprint routes will receive by default." msgstr "" #: flask.blueprints.Blueprint:40 of msgid "" "By default, the blueprint will automatically set this based on " -"``import_name``. In certain situations this automatic detection can fail," -" so the path can be specified manually instead." +"``import_name``. In certain situations this automatic detection can fail, " +"so the path can be specified manually instead." msgstr "" #: flask.blueprints.Blueprint:45 of msgid "" "Blueprints have a ``cli`` group to register nested CLI commands. The " -"``cli_group`` parameter controls the name of the group under the " -"``flask`` command." +"``cli_group`` parameter controls the name of the group under the ``flask``" +" command." msgstr "" #: flask.blueprints.Blueprint.add_app_template_filter:1 of msgid "" "Register a custom template filter, available application wide. Like " -":meth:`Flask.add_template_filter` but for a blueprint. Works exactly " -"like the :meth:`app_template_filter` decorator." +":meth:`Flask.add_template_filter` but for a blueprint. Works exactly like" +" the :meth:`app_template_filter` decorator." msgstr "" #: flask.blueprints.Blueprint.add_app_template_global:1 of msgid "" "Register a custom template global, available application wide. Like " -":meth:`Flask.add_template_global` but for a blueprint. Works exactly " -"like the :meth:`app_template_global` decorator." +":meth:`Flask.add_template_global` but for a blueprint. Works exactly like" +" the :meth:`app_template_global` decorator." msgstr "" #: flask.blueprints.Blueprint.add_app_template_global:7 #: flask.blueprints.Blueprint.app_template_global:6 of -msgid "the optional name of the global, otherwise the function name will be used." +msgid "" +"the optional name of the global, otherwise the function name will be used." msgstr "" #: flask.blueprints.Blueprint.add_app_template_test:1 of @@ -2329,26 +2337,26 @@ msgstr "" #: flask.blueprints.Blueprint.add_url_rule:1 of msgid "" -"Like :meth:`Flask.add_url_rule` but for a blueprint. The endpoint for " -"the :func:`url_for` function is prefixed with the name of the blueprint." +"Like :meth:`Flask.add_url_rule` but for a blueprint. The endpoint for the" +" :func:`url_for` function is prefixed with the name of the blueprint." msgstr "" #: flask.blueprints.Blueprint.after_app_request:1 of msgid "" -"Like :meth:`Flask.after_request` but for a blueprint. Such a function is" -" executed after each request, even if outside of the blueprint." +"Like :meth:`Flask.after_request` but for a blueprint. Such a function is " +"executed after each request, even if outside of the blueprint." msgstr "" #: flask.blueprints.Blueprint.app_context_processor:1 of msgid "" -"Like :meth:`Flask.context_processor` but for a blueprint. Such a " -"function is executed each request, even if outside of the blueprint." +"Like :meth:`Flask.context_processor` but for a blueprint. Such a function" +" is executed each request, even if outside of the blueprint." msgstr "" #: flask.blueprints.Blueprint.app_errorhandler:1 of msgid "" -"Like :meth:`Flask.errorhandler` but for a blueprint. This handler is " -"used for all requests, even if outside of the blueprint." +"Like :meth:`Flask.errorhandler` but for a blueprint. This handler is used" +" for all requests, even if outside of the blueprint." msgstr "" #: flask.blueprints.Blueprint.app_template_filter:1 of @@ -2404,8 +2412,8 @@ msgstr "" #: flask.blueprints.Blueprint.make_setup_state:1 of msgid "" "Creates an instance of :meth:`~flask.blueprints.BlueprintSetupState` " -"object that is later passed to the register callback functions. " -"Subclasses can override this to return a subclass of the setup state." +"object that is later passed to the register callback functions. Subclasses" +" can override this to return a subclass of the setup state." msgstr "" #: flask.blueprints.Blueprint.record:1 of @@ -2417,8 +2425,8 @@ msgstr "" #: flask.blueprints.Blueprint.record_once:1 of msgid "" -"Works like :meth:`record` but wraps the function in another function that" -" will ensure the function is only called once. If the blueprint is " +"Works like :meth:`record` but wraps the function in another function that " +"will ensure the function is only called once. If the blueprint is " "registered a second time on the application, the function passed is not " "called." msgstr "" @@ -2427,8 +2435,8 @@ msgstr "" msgid "" "Called by :meth:`Flask.register_blueprint` to register all views and " "callbacks registered on the blueprint with the application. Creates a " -":class:`.BlueprintSetupState` and calls each :meth:`record` callback with" -" it." +":class:`.BlueprintSetupState` and calls each :meth:`record` callback with " +"it." msgstr "" #: flask.blueprints.Blueprint.register:6 of @@ -2454,14 +2462,14 @@ msgstr "" #: flask.blueprints.Blueprint.register_blueprint:1 of msgid "" -"Register a :class:`~flask.Blueprint` on this blueprint. Keyword arguments" -" passed to this method will override the defaults set on the blueprint." +"Register a :class:`~flask.Blueprint` on this blueprint. Keyword arguments " +"passed to this method will override the defaults set on the blueprint." msgstr "" #: flask.blueprints.Blueprint.teardown_app_request:1 of msgid "" -"Like :meth:`Flask.teardown_request` but for a blueprint. Such a function" -" is executed when tearing down each request, even if outside of the " +"Like :meth:`Flask.teardown_request` but for a blueprint. Such a function " +"is executed when tearing down each request, even if outside of the " "blueprint." msgstr "" @@ -2477,16 +2485,16 @@ msgstr "" #: flask.wrappers.Request:4 of msgid "" -"It is what ends up as :class:`~flask.request`. If you want to replace " -"the request object used you can subclass this and set " +"It is what ends up as :class:`~flask.request`. If you want to replace the" +" request object used you can subclass this and set " ":attr:`~flask.Flask.request_class` to your subclass." msgstr "" #: flask.wrappers.Request:8 of msgid "" "The request object is a :class:`~werkzeug.wrappers.Request` subclass and " -"provides all of the attributes Werkzeug defines plus a few Flask specific" -" ones." +"provides all of the attributes Werkzeug defines plus a few Flask specific " +"ones." msgstr "" #: flask.Request.accept_charsets:1 of @@ -2516,18 +2524,18 @@ msgstr "" #: ../../docstring flask.Request.access_control_request_headers:1 of msgid "" -"Sent with a preflight request to indicate which headers will be sent with" -" the cross origin request. Set " -":attr:`~CORSResponseMixin.access_control_allow_headers` on the response " -"to indicate which headers are allowed." +"Sent with a preflight request to indicate which headers will be sent with " +"the cross origin request. Set " +":attr:`~CORSResponseMixin.access_control_allow_headers` on the response to" +" indicate which headers are allowed." msgstr "" #: ../../docstring flask.Request.access_control_request_method:1 of msgid "" "Sent with a preflight request to indicate which method will be used for " "the cross origin request. Set " -":attr:`~CORSResponseMixin.access_control_allow_methods` on the response " -"to indicate which methods are allowed." +":attr:`~CORSResponseMixin.access_control_allow_methods` on the response to" +" indicate which methods are allowed." msgstr "" #: flask.Request.access_route:1 of @@ -2540,14 +2548,14 @@ msgstr "" msgid "" "Decorate a function as responder that accepts the request as the last " "argument. This works like the :func:`responder` decorator but the " -"function is passed the request object as the last argument and the " -"request object will be closed automatically::" +"function is passed the request object as the last argument and the request" +" object will be closed automatically::" msgstr "" #: of werkzeug.wrappers.request.Request.application:11 msgid "" -"As of Werkzeug 0.14 HTTP exceptions are automatically caught and " -"converted to responses instead of failing." +"As of Werkzeug 0.14 HTTP exceptions are automatically caught and converted" +" to responses instead of failing." msgstr "" #: of werkzeug.wrappers.request.Request.application:14 @@ -2559,7 +2567,8 @@ msgid "a new WSGI callable" msgstr "" #: flask.Request.args:1 of -msgid "The parsed URL parameters (the part in the URL after the question mark)." +msgid "" +"The parsed URL parameters (the part in the URL after the question mark)." msgstr "" #: flask.Request.args:4 of @@ -2614,8 +2623,8 @@ msgstr "" #: of werkzeug.wrappers.request.Request.close:1 msgid "" -"Closes associated resources of this request object. This closes all file" -" handles explicitly. You can also use the request object in a with " +"Closes associated resources of this request object. This closes all file " +"handles explicitly. You can also use the request object in a with " "statement which will automatically close it." msgstr "" @@ -2625,8 +2634,8 @@ msgid "" "The Content-Encoding entity-header field is used as a modifier to the " "media-type. When present, its value indicates what additional content " "codings have been applied to the entity-body, and thus what decoding " -"mechanisms must be applied in order to obtain the media-type referenced " -"by the Content-Type header field." +"mechanisms must be applied in order to obtain the media-type referenced by" +" the Content-Type header field." msgstr "" #: flask.Request.content_length:1 of @@ -2640,17 +2649,17 @@ msgstr "" msgid "" "The Content-MD5 entity-header field, as defined in RFC 1864, is an MD5 " "digest of the entity-body for the purpose of providing an end-to-end " -"message integrity check (MIC) of the entity-body. (Note: a MIC is good " -"for detecting accidental modification of the entity-body in transit, but " -"is not proof against malicious attacks.)" +"message integrity check (MIC) of the entity-body. (Note: a MIC is good for" +" detecting accidental modification of the entity-body in transit, but is " +"not proof against malicious attacks.)" msgstr "" #: ../../docstring flask.Request.content_type:1 flask.Response.content_type:1 #: of msgid "" "The Content-Type entity-header field indicates the media type of the " -"entity-body sent to the recipient or, in the case of the HEAD method, the" -" media type that would have been sent had the request been a GET." +"entity-body sent to the recipient or, in the case of the HEAD method, the " +"media type that would have been sent had the request been a GET." msgstr "" #: flask.Request.cookies:1 of @@ -2668,8 +2677,7 @@ msgstr "" #: ../../docstring flask.Request.date:1 flask.Response.date:1 of msgid "" "The Date general-header field represents the date and time at which the " -"message was originated, having the same semantics as orig-date in RFC " -"822." +"message was originated, having the same semantics as orig-date in RFC 822." msgstr "" #: ../../docstring flask.Request.date:5 flask.Request.if_modified_since:3 @@ -2684,25 +2692,26 @@ msgid "The endpoint that matched the request URL." msgstr "" #: flask.Request.endpoint:3 of -msgid "This will be ``None`` if matching failed or has not been performed yet." +msgid "" +"This will be ``None`` if matching failed or has not been performed yet." msgstr "" #: flask.Request.endpoint:6 of msgid "" -"This in combination with :attr:`view_args` can be used to reconstruct the" -" same URL or a modified URL." +"This in combination with :attr:`view_args` can be used to reconstruct the " +"same URL or a modified URL." msgstr "" #: ../../docstring flask.Request.environ:1 of msgid "" -"The WSGI environment containing HTTP headers and information from the " -"WSGI server." +"The WSGI environment containing HTTP headers and information from the WSGI" +" server." msgstr "" #: flask.Request.files:1 of msgid "" -":class:`~werkzeug.datastructures.MultiDict` object containing all " -"uploaded files. Each key in :attr:`files` is the name from the ````. Each value in :attr:`files` is a Werkzeug " ":class:`~werkzeug.datastructures.FileStorage` object." msgstr "" @@ -2711,8 +2720,8 @@ msgstr "" msgid "" "It basically behaves like a standard file object you know from Python, " "with the difference that it also has a " -":meth:`~werkzeug.datastructures.FileStorage.save` function that can store" -" the file on the filesystem." +":meth:`~werkzeug.datastructures.FileStorage.save` function that can store " +"the file on the filesystem." msgstr "" #: flask.Request.files:11 of @@ -2732,16 +2741,16 @@ msgstr "" #: flask.Request.form:1 of msgid "" "The form parameters. By default an " -":class:`~werkzeug.datastructures.ImmutableMultiDict` is returned from " -"this function. This can be changed by setting " -":attr:`parameter_storage_class` to a different type. This might be " -"necessary if the order of the form data is important." +":class:`~werkzeug.datastructures.ImmutableMultiDict` is returned from this" +" function. This can be changed by setting :attr:`parameter_storage_class`" +" to a different type. This might be necessary if the order of the form " +"data is important." msgstr "" #: flask.Request.form:7 of msgid "" -"Please keep in mind that file uploads will not end up here, but instead " -"in the :attr:`files` attribute." +"Please keep in mind that file uploads will not end up here, but instead in" +" the :attr:`files` attribute." msgstr "" #: flask.Request.form:12 of @@ -2754,8 +2763,8 @@ msgstr "" msgid "" "Create a new request object based on the values provided. If environ is " "given missing values are filled from there. This method is useful for " -"small scripts when you need to simulate a request from an URL. Do not use" -" this method for unittesting, there is a full featured client object " +"small scripts when you need to simulate a request from an URL. Do not use " +"this method for unittesting, there is a full featured client object " "(:class:`Client`) that allows to create multipart requests, support for " "cookies etc." msgstr "" @@ -2797,20 +2806,21 @@ msgstr "" #: of werkzeug.wrappers.request.Request.get_data:9 msgid "" -"Note that if the form data was already parsed this method will not return" -" anything as form data parsing does not cache the data like this method " +"Note that if the form data was already parsed this method will not return " +"anything as form data parsing does not cache the data like this method " "does. To implicitly invoke form data parsing function set " "`parse_form_data` to `True`. When this is done the return value of this " -"method will be an empty string if the form parser handles the data. This" -" generally is not necessary as if the whole data is cached (which is the " -"default) the form parser will used the cached data to parse the form " -"data. Please be generally aware of checking the content length first in " -"any case before calling this method to avoid exhausting server memory." +"method will be an empty string if the form parser handles the data. This " +"generally is not necessary as if the whole data is cached (which is the " +"default) the form parser will used the cached data to parse the form data." +" Please be generally aware of checking the content length first in any " +"case before calling this method to avoid exhausting server memory." msgstr "" #: of werkzeug.wrappers.request.Request.get_data:20 #: werkzeug.wrappers.response.Response.get_data:8 -msgid "If `as_text` is set to `True` the return value will be a decoded string." +msgid "" +"If `as_text` is set to `True` the return value will be a decoded string." msgstr "" #: of werkzeug.wrappers.request.Request.get_json:1 @@ -2820,14 +2830,14 @@ msgstr "" #: of werkzeug.wrappers.request.Request.get_json:3 #: werkzeug.wrappers.response.Response.get_json:3 msgid "" -"If the mimetype does not indicate JSON (:mimetype:`application/json`, see" -" :meth:`is_json`), this returns ``None``." +"If the mimetype does not indicate JSON (:mimetype:`application/json`, see " +":meth:`is_json`), this returns ``None``." msgstr "" #: of werkzeug.wrappers.request.Request.get_json:7 msgid "" -"If parsing fails, :meth:`on_json_loading_failed` is called and its return" -" value is used as the return value." +"If parsing fails, :meth:`on_json_loading_failed` is called and its return " +"value is used as the return value." msgstr "" #: of werkzeug.wrappers.request.Request.get_json:10 @@ -2904,8 +2914,8 @@ msgstr "" #: ../../docstring flask.Request.is_multiprocess:1 of msgid "" -"boolean that is `True` if the application is served by a WSGI server that" -" spawns multiple processes." +"boolean that is `True` if the application is served by a WSGI server that " +"spawns multiple processes." msgstr "" #: ../../docstring flask.Request.is_multithread:1 of @@ -2916,13 +2926,14 @@ msgstr "" #: ../../docstring flask.Request.is_run_once:1 of msgid "" -"boolean that is `True` if the application will be executed only once in a" -" process lifetime. This is the case for CGI for example, but it's not " +"boolean that is `True` if the application will be executed only once in a " +"process lifetime. This is the case for CGI for example, but it's not " "guaranteed that the execution only happens one time." msgstr "" #: flask.Request.is_secure:1 of -msgid "``True`` if the request was made with a secure protocol (HTTPS or WSS)." +msgid "" +"``True`` if the request was made with a secure protocol (HTTPS or WSS)." msgstr "" #: flask.Request.json:1 flask.Response.json:1 of @@ -2947,8 +2958,8 @@ msgstr "" #: ../../docstring flask.Request.max_forwards:1 of msgid "" -"The Max-Forwards request-header field provides a mechanism with the TRACE" -" and OPTIONS methods to limit the number of proxies or gateways that can " +"The Max-Forwards request-header field provides a mechanism with the TRACE " +"and OPTIONS methods to limit the number of proxies or gateways that can " "forward the request to the next inbound server." msgstr "" @@ -2966,8 +2977,7 @@ msgstr "" #: flask.Request.mimetype_params:1 of msgid "" "The mimetype parameters as dict. For example if the content type is " -"``text/html; charset=utf-8`` the params would be ``{'charset': " -"'utf-8'}``." +"``text/html; charset=utf-8`` the params would be ``{'charset': 'utf-8'}``." msgstr "" #: flask.wrappers.Request.on_json_loading_failed:1 of @@ -2981,8 +2991,8 @@ msgstr "" #: ../../docstring flask.Request.origin:1 of msgid "" "The host that the request originated from. Set " -":attr:`~CORSResponseMixin.access_control_allow_origin` on the response to" -" indicate which origins are allowed." +":attr:`~CORSResponseMixin.access_control_allow_origin` on the response to " +"indicate which origins are allowed." msgstr "" #: ../../docstring flask.Request.path:1 of @@ -2993,11 +3003,11 @@ msgstr "" #: flask.Request.pragma:1 of msgid "" -"The Pragma general-header field is used to include implementation-" -"specific directives that might apply to any recipient along the " -"request/response chain. All pragma directives specify optional behavior " -"from the viewpoint of the protocol; however, some systems MAY require " -"that behavior be consistent with the directives." +"The Pragma general-header field is used to include implementation-specific" +" directives that might apply to any recipient along the request/response " +"chain. All pragma directives specify optional behavior from the viewpoint" +" of the protocol; however, some systems MAY require that behavior be " +"consistent with the directives." msgstr "" #: ../../docstring flask.Request.query_string:1 of @@ -3079,17 +3089,17 @@ msgstr "" #: flask.Request.stream:1 of msgid "" "If the incoming form data was not encoded with a known mimetype the data " -"is stored unmodified in this stream for consumption. Most of the time it" -" is a better idea to use :attr:`data` which will give you that data as a " +"is stored unmodified in this stream for consumption. Most of the time it " +"is a better idea to use :attr:`data` which will give you that data as a " "string. The stream only returns the data once." msgstr "" #: flask.Request.stream:6 of msgid "" -"Unlike :attr:`input_stream` this stream is properly guarded that you " -"can't accidentally read past the length of the input. Werkzeug will " -"internally always refer to this stream to read data which makes it " -"possible to wrap this object with a stream that does filtering." +"Unlike :attr:`input_stream` this stream is properly guarded that you can't" +" accidentally read past the length of the input. Werkzeug will internally" +" always refer to this stream to read data which makes it possible to wrap " +"this object with a stream that does filtering." msgstr "" #: flask.Request.stream:11 of @@ -3113,18 +3123,18 @@ msgstr "" #: flask.Request.url_root:1 of msgid "" -"Alias for :attr:`root_url`. The URL with scheme, host, and root path. For" -" example, ``https://example.com/app/``." +"Alias for :attr:`root_url`. The URL with scheme, host, and root path. For " +"example, ``https://example.com/app/``." msgstr "" #: ../../docstring flask.Request.url_rule:1 of msgid "" "The internal URL rule that matched the request. This can be useful to " -"inspect which methods are allowed for the URL from a before/after handler" -" (``request.url_rule.methods``) etc. Though if the request's method was " +"inspect which methods are allowed for the URL from a before/after handler " +"(``request.url_rule.methods``) etc. Though if the request's method was " "invalid for the URL rule, the valid list is available in " -"``routing_exception.valid_methods`` instead (an attribute of the Werkzeug" -" exception :exc:`~werkzeug.exceptions.MethodNotAllowed`) because the " +"``routing_exception.valid_methods`` instead (an attribute of the Werkzeug " +"exception :exc:`~werkzeug.exceptions.MethodNotAllowed`) because the " "request was never internally bound." msgstr "" @@ -3160,8 +3170,8 @@ msgstr "" #: flask.Request.want_form_data_parsed:1 of msgid "" -"``True`` if the request method carries content. By default this is true " -"if a ``Content-Type`` is sent." +"``True`` if the request method carries content. By default this is true if" +" a ``Content-Type`` is sent." msgstr "" #: ../../api.rst:36 @@ -3190,14 +3200,13 @@ msgid "" "The response object that is used by default in Flask. Works like the " "response object from Werkzeug but is set to have an HTML mimetype by " "default. Quite often you don't have to create this object yourself " -"because :meth:`~flask.Flask.make_response` will take care of that for " -"you." +"because :meth:`~flask.Flask.make_response` will take care of that for you." msgstr "" #: flask.wrappers.Response:6 of msgid "" -"If you want to replace the response object used you can subclass this and" -" set :attr:`~flask.Flask.response_class` to your subclass." +"If you want to replace the response object used you can subclass this and " +"set :attr:`~flask.Flask.response_class` to your subclass." msgstr "" #: flask.wrappers.Response:9 of @@ -3223,8 +3232,8 @@ msgstr "" #: flask.Response.access_control_allow_credentials:1 of msgid "" "Whether credentials can be shared by the browser to JavaScript code. As " -"part of the preflight request it indicates whether credentials can be " -"used on the cross origin request." +"part of the preflight request it indicates whether credentials can be used" +" on the cross origin request." msgstr "" #: ../../docstring flask.Response.access_control_allow_headers:1 of @@ -3236,7 +3245,8 @@ msgid "Which methods can be used for the cross origin request." msgstr "" #: ../../docstring flask.Response.access_control_allow_origin:1 of -msgid "The origin or '*' for any origin that may make cross origin requests." +msgid "" +"The origin or '*' for any origin that may make cross origin requests." msgstr "" #: ../../docstring flask.Response.access_control_expose_headers:1 of @@ -3244,7 +3254,8 @@ msgid "Which headers can be shared by the browser to JavaScript code." msgstr "" #: ../../docstring flask.Response.access_control_max_age:1 of -msgid "The maximum age in seconds the access control settings can be cached for." +msgid "" +"The maximum age in seconds the access control settings can be cached for." msgstr "" #: of werkzeug.wrappers.response.Response.add_etag:1 @@ -3259,8 +3270,8 @@ msgstr "" #: ../../docstring flask.Response.age:1 of msgid "" -"The Age response-header field conveys the sender's estimate of the amount" -" of time since the response (or its revalidation) was generated at the " +"The Age response-header field conveys the sender's estimate of the amount " +"of time since the response (or its revalidation) was generated at the " "origin server." msgstr "" @@ -3281,9 +3292,8 @@ msgstr "" #: flask.Response.cache_control:1 of msgid "" -"The Cache-Control general-header field is used to specify directives that" -" MUST be obeyed by all caching mechanisms along the request/response " -"chain." +"The Cache-Control general-header field is used to specify directives that " +"MUST be obeyed by all caching mechanisms along the request/response chain." msgstr "" #: of werkzeug.wrappers.response.Response.calculate_content_length:1 @@ -3292,16 +3302,15 @@ msgstr "" #: of werkzeug.wrappers.response.Response.call_on_close:1 msgid "" -"Adds a function to the internal list of functions that should be called " -"as part of closing down the response. Since 0.7 this function also " -"returns the function that was passed so that this can be used as a " -"decorator." +"Adds a function to the internal list of functions that should be called as" +" part of closing down the response. Since 0.7 this function also returns " +"the function that was passed so that this can be used as a decorator." msgstr "" #: of werkzeug.wrappers.response.Response.close:1 msgid "" -"Close the wrapped response if possible. You can also use the object in a" -" with statement which will automatically close it." +"Close the wrapped response if possible. You can also use the object in a " +"with statement which will automatically close it." msgstr "" #: of werkzeug.wrappers.response.Response.close:4 @@ -3310,26 +3319,24 @@ msgstr "" #: flask.Response.content_language:1 of msgid "" -"The Content-Language entity-header field describes the natural " -"language(s) of the intended audience for the enclosed entity. Note that " -"this might not be equivalent to all the languages used within the entity-" -"body." +"The Content-Language entity-header field describes the natural language(s)" +" of the intended audience for the enclosed entity. Note that this might " +"not be equivalent to all the languages used within the entity-body." msgstr "" #: ../../docstring flask.Response.content_length:1 of msgid "" "The Content-Length entity-header field indicates the size of the entity-" "body, in decimal number of OCTETs, sent to the recipient or, in the case " -"of the HEAD method, the size of the entity-body that would have been sent" -" had the request been a GET." +"of the HEAD method, the size of the entity-body that would have been sent " +"had the request been a GET." msgstr "" #: ../../docstring flask.Response.content_location:1 of msgid "" "The Content-Location entity-header field MAY be used to supply the " -"resource location for the entity enclosed in the message when that entity" -" is accessible from a location separate from the requested resource's " -"URI." +"resource location for the entity enclosed in the message when that entity " +"is accessible from a location separate from the requested resource's URI." msgstr "" #: flask.Response.content_range:1 of @@ -3341,8 +3348,8 @@ msgstr "" #: ../../docstring flask.Response.content_security_policy:1 of msgid "" -"The Content-Security-Policy header adds an additional layer of security " -"to help detect and mitigate certain types of attacks." +"The Content-Security-Policy header adds an additional layer of security to" +" help detect and mitigate certain types of attacks." msgstr "" #: ../../docstring flask.Response.content_security_policy_report_only:1 of @@ -3386,8 +3393,8 @@ msgstr "" #: of werkzeug.sansio.response.Response.delete_cookie:6 msgid "" -"if the cookie that should be deleted was limited to a domain, that domain" -" has to be defined here." +"if the cookie that should be deleted was limited to a domain, that domain " +"has to be defined here." msgstr "" #: of werkzeug.sansio.response.Response.delete_cookie:8 @@ -3409,10 +3416,10 @@ msgstr "" #: ../../docstring flask.Response.direct_passthrough:1 of msgid "" -"Pass the response body directly through as the WSGI iterable. This can be" -" used when the body is a binary file or other iterator of bytes, to skip " -"some unnecessary checks. Use :func:`~werkzeug.utils.send_file` instead of" -" setting this manually." +"Pass the response body directly through as the WSGI iterable. This can be " +"used when the body is a binary file or other iterator of bytes, to skip " +"some unnecessary checks. Use :func:`~werkzeug.utils.send_file` instead of " +"setting this manually." msgstr "" #: ../../docstring flask.Response.expires:1 of @@ -3424,18 +3431,17 @@ msgstr "" #: of werkzeug.wrappers.response.Response.force_type:1 msgid "" -"Enforce that the WSGI response is a response object of the current type." -" Werkzeug will use the :class:`Response` internally in many situations " -"like the exceptions. If you call :meth:`get_response` on an exception " -"you will get back a regular :class:`Response` object, even if you are " -"using a custom subclass." +"Enforce that the WSGI response is a response object of the current type. " +"Werkzeug will use the :class:`Response` internally in many situations like" +" the exceptions. If you call :meth:`get_response` on an exception you " +"will get back a regular :class:`Response` object, even if you are using a " +"custom subclass." msgstr "" #: of werkzeug.wrappers.response.Response.force_type:7 msgid "" "This method can enforce a given response type, and it will also convert " -"arbitrary WSGI callables into response objects if an environ is " -"provided::" +"arbitrary WSGI callables into response objects if an environ is provided::" msgstr "" #: of werkzeug.wrappers.response.Response.force_type:18 @@ -3445,7 +3451,8 @@ msgid "" msgstr "" #: of werkzeug.wrappers.response.Response.force_type:21 -msgid "Keep in mind that this will modify response objects in place if possible!" +msgid "" +"Keep in mind that this will modify response objects in place if possible!" msgstr "" #: of werkzeug.wrappers.response.Response.force_type:24 @@ -3491,8 +3498,8 @@ msgstr "" #: of werkzeug.wrappers.response.Response.from_app:1 msgid "" -"Create a new response object from an application output. This works best" -" if you pass it an application that returns a generator all the time. " +"Create a new response object from an application output. This works best " +"if you pass it an application that returns a generator all the time. " "Sometimes applications may use the `write()` callable returned by the " "`start_response` function. This tries to resolve such edge cases " "automatically. But if you don't get the expected output you should set " @@ -3513,15 +3520,15 @@ msgstr "" #: of werkzeug.wrappers.response.Response.get_app_iter:1 msgid "" -"Returns the application iterator for the given environ. Depending on the" -" request method and the current status code the return value might be an " +"Returns the application iterator for the given environ. Depending on the " +"request method and the current status code the return value might be an " "empty response rather than the one from the response." msgstr "" #: of werkzeug.wrappers.response.Response.get_app_iter:5 msgid "" -"If the request method is `HEAD` or the status code is in a range where " -"the HTTP specification requires an empty response, an empty iterable is " +"If the request method is `HEAD` or the status code is in a range where the" +" HTTP specification requires an empty response, an empty iterable is " "returned." msgstr "" @@ -3538,8 +3545,8 @@ msgstr "" #: of werkzeug.wrappers.response.Response.get_data:1 msgid "" "The string representation of the response body. Whenever you call this " -"property the response iterable is encoded and flattened. This can lead " -"to unwanted behavior if you stream big data." +"property the response iterable is encoded and flattened. This can lead to" +" unwanted behavior if you stream big data." msgstr "" #: of werkzeug.wrappers.response.Response.get_data:5 @@ -3565,16 +3572,16 @@ msgstr "" #: of werkzeug.wrappers.response.Response.get_wsgi_headers:1 msgid "" "This is automatically called right before the response is started and " -"returns headers modified for the given environment. It returns a copy of" -" the headers from the response with some modifications applied if " +"returns headers modified for the given environment. It returns a copy of " +"the headers from the response with some modifications applied if " "necessary." msgstr "" #: of werkzeug.wrappers.response.Response.get_wsgi_headers:6 msgid "" "For example the location header (if present) is joined with the root URL " -"of the environment. Also the content length is automatically set to zero" -" here for certain status codes." +"of the environment. Also the content length is automatically set to zero " +"here for certain status codes." msgstr "" #: of werkzeug.wrappers.response.Response.get_wsgi_headers:10 @@ -3586,8 +3593,8 @@ msgstr "" #: of werkzeug.wrappers.response.Response.get_wsgi_headers:15 msgid "" -"Also starting with 0.6, Werkzeug will attempt to set the content length " -"if it is able to figure it out on its own. This is the case if all the " +"Also starting with 0.6, Werkzeug will attempt to set the content length if" +" it is able to figure it out on its own. This is the case if all the " "strings in the response iterable are already encoded and the iterable is " "buffered." msgstr "" @@ -3598,11 +3605,11 @@ msgstr "" #: of werkzeug.wrappers.response.Response.get_wsgi_response:1 msgid "" -"Returns the final WSGI response as tuple. The first item in the tuple is" -" the application iterator, the second the status and the third the list " -"of headers. The response returned is created specially for the given " -"environment. For example if the request method in the WSGI environment " -"is ``'HEAD'`` the response will be empty and only the headers and status " +"Returns the final WSGI response as tuple. The first item in the tuple is " +"the application iterator, the second the status and the third the list of " +"headers. The response returned is created specially for the given " +"environment. For example if the request method in the WSGI environment is" +" ``'HEAD'`` the response will be empty and only the headers and status " "code will be present." msgstr "" @@ -3613,16 +3620,16 @@ msgstr "" #: flask.Response.is_sequence:1 of msgid "" "If the iterator is buffered, this property will be `True`. A response " -"object will consider an iterator to be buffered if the response attribute" -" is a list or tuple." +"object will consider an iterator to be buffered if the response attribute " +"is a list or tuple." msgstr "" #: flask.Response.is_streamed:1 of msgid "" -"If the response is streamed (the response is not an iterable with a " -"length information) this property is `True`. In this case streamed means" -" that there is no information about the number of iterations. This is " -"usually `True` if a generator is passed to the response object." +"If the response is streamed (the response is not an iterable with a length" +" information) this property is `True`. In this case streamed means that " +"there is no information about the number of iterations. This is usually " +"`True` if a generator is passed to the response object." msgstr "" #: flask.Response.is_streamed:6 of @@ -3641,14 +3648,14 @@ msgstr "" #: ../../docstring flask.Response.last_modified:1 of msgid "" -"The Last-Modified entity-header field indicates the date and time at " -"which the origin server believes the variant was last modified." +"The Last-Modified entity-header field indicates the date and time at which" +" the origin server believes the variant was last modified." msgstr "" #: ../../docstring flask.Response.location:1 of msgid "" -"The Location response-header field is used to redirect the recipient to a" -" location other than the Request-URI for completion of the request or " +"The Location response-header field is used to redirect the recipient to a " +"location other than the Request-URI for completion of the request or " "identification of a new resource." msgstr "" @@ -3681,8 +3688,8 @@ msgstr "" #: of werkzeug.wrappers.response.Response.make_conditional:17 msgid "" -"Returns self so that you can do ``return resp.make_conditional(req)`` but" -" modifies the object in-place." +"Returns self so that you can do ``return resp.make_conditional(req)`` but " +"modifies the object in-place." msgstr "" #: of werkzeug.wrappers.response.Response.make_conditional:20 @@ -3693,8 +3700,8 @@ msgstr "" #: of werkzeug.wrappers.response.Response.make_conditional:23 msgid "" -"This parameter dictates the value of `Accept-Ranges` header. If ``False``" -" (default), the header is not set. If ``True``, it will be set to " +"This parameter dictates the value of `Accept-Ranges` header. If ``False`` " +"(default), the header is not set. If ``True``, it will be set to " "``\"bytes\"``. If ``None``, it will be set to ``\"none\"``. If it's a " "string, it will use this value." msgstr "" @@ -3718,16 +3725,16 @@ msgstr "" #: of werkzeug.wrappers.response.Response.make_conditional:37 msgid "" -"Range processing is skipped if length is 0 instead of raising a 416 Range" -" Not Satisfiable error." +"Range processing is skipped if length is 0 instead of raising a 416 Range " +"Not Satisfiable error." msgstr "" #: of werkzeug.wrappers.response.Response.make_sequence:1 msgid "" "Converts the response iterator in a list. By default this happens " -"automatically if required. If `implicit_sequence_conversion` is " -"disabled, this method is not automatically called and some properties " -"might raise exceptions. This also encodes all the items." +"automatically if required. If `implicit_sequence_conversion` is disabled," +" this method is not automatically called and some properties might raise " +"exceptions. This also encodes all the items." msgstr "" #: flask.Response.max_cookie_size:1 of @@ -3747,8 +3754,7 @@ msgstr "" #: flask.Response.mimetype_params:1 of msgid "" "The mimetype parameters as dict. For example if the content type is " -"``text/html; charset=utf-8`` the params would be ``{'charset': " -"'utf-8'}``." +"``text/html; charset=utf-8`` the params would be ``{'charset': 'utf-8'}``." msgstr "" #: flask.Response.retry_after:1 of @@ -3800,14 +3806,14 @@ msgstr "" msgid "" "if you want to set a cross-domain cookie. For example, " "``domain=\".example.com\"`` will set a cookie that is readable by the " -"domain ``www.example.com``, ``foo.example.com`` etc. Otherwise, a cookie" -" will only be readable by the domain that set it." +"domain ``www.example.com``, ``foo.example.com`` etc. Otherwise, a cookie " +"will only be readable by the domain that set it." msgstr "" #: of werkzeug.wrappers.response.Response.set_data:1 msgid "" -"Sets a new string as response. The value must be a string or bytes. If a" -" string is set it's encoded to the charset of the response (utf-8 by " +"Sets a new string as response. The value must be a string or bytes. If a " +"string is set it's encoded to the charset of the response (utf-8 by " "default)." msgstr "" @@ -3829,10 +3835,9 @@ msgstr "" #: flask.Response.vary:1 of msgid "" -"The Vary field value indicates the set of request-header fields that " -"fully determines, while the response is fresh, whether a cache is " -"permitted to use the response to reply to a subsequent request without " -"revalidation." +"The Vary field value indicates the set of request-header fields that fully" +" determines, while the response is fresh, whether a cache is permitted to " +"use the response to reply to a subsequent request without revalidation." msgstr "" #: flask.Response.www_authenticate:1 of @@ -3846,15 +3851,16 @@ msgstr "" #: ../../api.rst:58 msgid "" "If you have set :attr:`Flask.secret_key` (or configured it from " -":data:`SECRET_KEY`) you can use sessions in Flask applications. A session" -" makes it possible to remember information from one request to another. " -"The way Flask does this is by using a signed cookie. The user can look at" -" the session contents, but can't modify it unless they know the secret " -"key, so make sure to set that to something complex and unguessable." +":data:`SECRET_KEY`) you can use sessions in Flask applications. A session " +"makes it possible to remember information from one request to another. The" +" way Flask does this is by using a signed cookie. The user can look at the" +" session contents, but can't modify it unless they know the secret key, so" +" make sure to set that to something complex and unguessable." msgstr "" #: ../../api.rst:65 -msgid "To access the current session you can use the :class:`session` object:" +msgid "" +"To access the current session you can use the :class:`session` object:" msgstr "" #: ../../api.rst:69 @@ -3899,11 +3905,11 @@ msgstr "" #: flask.sessions.SessionInterface:1 of msgid "" -"The basic interface you have to implement in order to replace the default" -" session interface which uses werkzeug's securecookie implementation. " -"The only methods you have to implement are :meth:`open_session` and " -":meth:`save_session`, the others have useful defaults which you don't " -"need to change." +"The basic interface you have to implement in order to replace the default " +"session interface which uses werkzeug's securecookie implementation. The " +"only methods you have to implement are :meth:`open_session` and " +":meth:`save_session`, the others have useful defaults which you don't need" +" to change." msgstr "" #: flask.sessions.SessionInterface:7 of @@ -3917,10 +3923,10 @@ msgstr "" #: flask.sessions.SessionInterface:15 of msgid "" "If :meth:`open_session` returns ``None`` Flask will call into " -":meth:`make_null_session` to create a session that acts as replacement if" -" the session support cannot work because some requirement is not " -"fulfilled. The default :class:`NullSession` class that is created will " -"complain that the secret key was not set." +":meth:`make_null_session` to create a session that acts as replacement if " +"the session support cannot work because some requirement is not fulfilled." +" The default :class:`NullSession` class that is created will complain " +"that the secret key was not set." msgstr "" #: flask.sessions.SessionInterface:21 of @@ -3941,8 +3947,8 @@ msgstr "" #: flask.sessions.SessionInterface.get_cookie_domain:6 of msgid "" -"Once detected (or if not set at all), ``SESSION_COOKIE_DOMAIN`` is " -"updated to avoid re-running the logic." +"Once detected (or if not set at all), ``SESSION_COOKIE_DOMAIN`` is updated" +" to avoid re-running the logic." msgstr "" #: flask.sessions.SessionInterface.get_cookie_httponly:1 of @@ -3956,36 +3962,37 @@ msgid "Returns the name of the session cookie." msgstr "" #: flask.sessions.SessionInterface.get_cookie_name:3 of -msgid "Uses ``app.session_cookie_name`` which is set to ``SESSION_COOKIE_NAME``" +msgid "" +"Uses ``app.session_cookie_name`` which is set to ``SESSION_COOKIE_NAME``" msgstr "" #: flask.sessions.SessionInterface.get_cookie_path:1 of msgid "" "Returns the path for which the cookie should be valid. The default " -"implementation uses the value from the ``SESSION_COOKIE_PATH`` config var" -" if it's set, and falls back to ``APPLICATION_ROOT`` or uses ``/`` if " -"it's ``None``." +"implementation uses the value from the ``SESSION_COOKIE_PATH`` config var " +"if it's set, and falls back to ``APPLICATION_ROOT`` or uses ``/`` if it's " +"``None``." msgstr "" #: flask.sessions.SessionInterface.get_cookie_samesite:1 of msgid "" -"Return ``'Strict'`` or ``'Lax'`` if the cookie should use the " -"``SameSite`` attribute. This currently just returns the value of the " +"Return ``'Strict'`` or ``'Lax'`` if the cookie should use the ``SameSite``" +" attribute. This currently just returns the value of the " ":data:`SESSION_COOKIE_SAMESITE` setting." msgstr "" #: flask.sessions.SessionInterface.get_cookie_secure:1 of msgid "" -"Returns True if the cookie should be secure. This currently just returns" -" the value of the ``SESSION_COOKIE_SECURE`` setting." +"Returns True if the cookie should be secure. This currently just returns " +"the value of the ``SESSION_COOKIE_SECURE`` setting." msgstr "" #: flask.sessions.SessionInterface.get_expiration_time:1 of msgid "" "A helper method that returns an expiration date for the session or " "``None`` if the session is linked to the browser session. The default " -"implementation returns now + the permanent session lifetime configured on" -" the application." +"implementation returns now + the permanent session lifetime configured on " +"the application." msgstr "" #: flask.sessions.SessionInterface.is_null_session:1 of @@ -3996,16 +4003,16 @@ msgstr "" #: flask.sessions.SessionInterface.is_null_session:4 of msgid "" -"This checks if the object is an instance of :attr:`null_session_class` by" -" default." +"This checks if the object is an instance of :attr:`null_session_class` by " +"default." msgstr "" #: flask.sessions.SessionInterface.make_null_session:1 of msgid "" "Creates a null session which acts as a replacement object if the real " "session support could not be loaded due to a configuration error. This " -"mainly aids the user experience because the job of the null session is to" -" still support lookup without complaining but modifications are answered " +"mainly aids the user experience because the job of the null session is to " +"still support lookup without complaining but modifications are answered " "with a helpful error message of what failed." msgstr "" @@ -4017,17 +4024,16 @@ msgstr "" msgid "" ":meth:`make_null_session` will look here for the class that should be " "created when a null session is requested. Likewise the " -":meth:`is_null_session` method will perform a typecheck against this " -"type." +":meth:`is_null_session` method will perform a typecheck against this type." msgstr "" #: flask.sessions.SecureCookieSessionInterface.open_session:1 #: flask.sessions.SessionInterface.open_session:1 of msgid "" -"This method has to be implemented and must either return ``None`` in case" -" the loading failed because of a configuration error or an instance of a " -"session object which implements a dictionary like interface + the methods" -" and attributes on :class:`SessionMixin`." +"This method has to be implemented and must either return ``None`` in case " +"the loading failed because of a configuration error or an instance of a " +"session object which implements a dictionary like interface + the methods " +"and attributes on :class:`SessionMixin`." msgstr "" #: ../../docstring flask.sessions.SessionInterface.pickle_based:1 of @@ -4040,18 +4046,17 @@ msgstr "" #: flask.sessions.SecureCookieSessionInterface.save_session:1 #: flask.sessions.SessionInterface.save_session:1 of msgid "" -"This is called for actual sessions returned by :meth:`open_session` at " -"the end of the request. This is still called during a request context so" -" if you absolutely need access to the request you can do that." +"This is called for actual sessions returned by :meth:`open_session` at the" +" end of the request. This is still called during a request context so if " +"you absolutely need access to the request you can do that." msgstr "" #: flask.sessions.SessionInterface.should_set_cookie:1 of msgid "" -"Used by session backends to determine if a ``Set-Cookie`` header should " -"be set for this session cookie for this response. If the session has been" -" modified, the cookie is set. If the session is permanent and the " -"``SESSION_REFRESH_EACH_REQUEST`` config is true, the cookie is always " -"set." +"Used by session backends to determine if a ``Set-Cookie`` header should be" +" set for this session cookie for this response. If the session has been " +"modified, the cookie is set. If the session is permanent and the " +"``SESSION_REFRESH_EACH_REQUEST`` config is true, the cookie is always set." msgstr "" #: flask.sessions.SessionInterface.should_set_cookie:7 of @@ -4095,8 +4100,8 @@ msgstr "" #: flask.sessions.SecureCookieSession:3 of msgid "" "This session backend will set the :attr:`modified` and :attr:`accessed` " -"attributes. It cannot reliably track whether a session is new (vs. " -"empty), so :attr:`new` remains hard coded to ``False``." +"attributes. It cannot reliably track whether a session is new (vs. empty)," +" so :attr:`new` remains hard coded to ``False``." msgstr "" #: ../../docstring flask.sessions.SecureCookieSession.accessed:1 of @@ -4112,11 +4117,11 @@ msgstr "" #: ../../docstring flask.sessions.SecureCookieSession.modified:1 of msgid "" -"When data is changed, this is set to ``True``. Only the session " -"dictionary itself is tracked; if the session contains mutable data (for " -"example a nested dict) then this must be set to ``True`` manually when " -"modifying that data. The session cookie will only be written to the " -"response if this is ``True``." +"When data is changed, this is set to ``True``. Only the session dictionary" +" itself is tracked; if the session contains mutable data (for example a " +"nested dict) then this must be set to ``True`` manually when modifying " +"that data. The session cookie will only be written to the response if this" +" is ``True``." msgstr "" #: flask.sessions.SecureCookieSession.setdefault:1 of @@ -4125,9 +4130,9 @@ msgstr "" #: flask.sessions.NullSession:1 of msgid "" -"Class used to generate nicer error messages if sessions are not " -"available. Will still allow read-only access to the empty session but " -"fail on setting." +"Class used to generate nicer error messages if sessions are not available." +" Will still allow read-only access to the empty session but fail on " +"setting." msgstr "" #: flask.sessions.SessionMixin:1 of @@ -4158,8 +4163,8 @@ msgstr "" msgid "" "The ``PERMANENT_SESSION_LIFETIME`` config key can also be an integer " "starting with Flask 0.8. Either catch this down yourself or use the " -":attr:`~flask.Flask.permanent_session_lifetime` attribute on the app " -"which converts the result to an integer automatically." +":attr:`~flask.Flask.permanent_session_lifetime` attribute on the app which" +" converts the result to an integer automatically." msgstr "" #: ../../api.rst:135 @@ -4168,17 +4173,17 @@ msgstr "" #: flask.testing.FlaskClient:1 of msgid "" -"Works like a regular Werkzeug test client but has some knowledge about " -"how Flask works to defer the cleanup of the request context stack to the " -"end of a ``with`` body when used in a ``with`` statement. For general " +"Works like a regular Werkzeug test client but has some knowledge about how" +" Flask works to defer the cleanup of the request context stack to the end " +"of a ``with`` body when used in a ``with`` statement. For general " "information about how to use this class refer to " ":class:`werkzeug.test.Client`." msgstr "" #: flask.testing.FlaskClient:7 of msgid "" -"`app.test_client()` includes preset default environment, which can be set" -" after instantiation of the `app.test_client()` object in " +"`app.test_client()` includes preset default environment, which can be set " +"after instantiation of the `app.test_client()` object in " "`client.environ_base`." msgstr "" @@ -4201,8 +4206,8 @@ msgstr "" #: flask.testing.FlaskClient.open:7 of msgid "" -"Convert the iterator returned by the app into a list. If the iterator has" -" a ``close()`` method, it is called automatically." +"Convert the iterator returned by the app into a list. If the iterator has " +"a ``close()`` method, it is called automatically." msgstr "" #: flask.testing.FlaskClient.open:10 of @@ -4238,15 +4243,15 @@ msgstr "" #: flask.testing.FlaskClient.session_transaction:1 of msgid "" "When used in combination with a ``with`` statement this opens a session " -"transaction. This can be used to modify the session that the test client" -" uses. Once the ``with`` block is left the session is stored back." +"transaction. This can be used to modify the session that the test client " +"uses. Once the ``with`` block is left the session is stored back." msgstr "" #: flask.testing.FlaskClient.session_transaction:11 of msgid "" "Internally this is implemented by going through a temporary test request " -"context and since session handling could depend on request variables this" -" function accepts the same arguments as " +"context and since session handling could depend on request variables this " +"function accepts the same arguments as " ":meth:`~flask.Flask.test_request_context` which are directly passed " "through." msgstr "" @@ -4265,15 +4270,15 @@ msgstr "" #: flask.testing.FlaskCliRunner.invoke:1 of msgid "" "Invokes a CLI command in an isolated environment. See " -":meth:`CliRunner.invoke ` for full method" -" documentation. See :ref:`testing-cli` for examples." +":meth:`CliRunner.invoke ` for full method " +"documentation. See :ref:`testing-cli` for examples." msgstr "" #: flask.testing.FlaskCliRunner.invoke:5 of msgid "" "If the ``obj`` argument is not given, passes an instance of " -":class:`~flask.cli.ScriptInfo` that knows how to load the Flask app being" -" tested." +":class:`~flask.cli.ScriptInfo` that knows how to load the Flask app being " +"tested." msgstr "" #: flask.testing.FlaskCliRunner.invoke:9 of @@ -4306,16 +4311,16 @@ msgstr "" #: ../../api.rst:166 msgid "" -"A namespace object that can store data during an :doc:`application " -"context `. This is an instance of " +"A namespace object that can store data during an :doc:`application context" +" `. This is an instance of " ":attr:`Flask.app_ctx_globals_class`, which defaults to " ":class:`ctx._AppCtxGlobals`." msgstr "" #: ../../api.rst:171 msgid "" -"This is a good place to store resources during a request. During testing," -" you can use the :ref:`faking-resources` pattern to pre-configure such " +"This is a good place to store resources during a request. During testing, " +"you can use the :ref:`faking-resources` pattern to pre-configure such " "resources." msgstr "" @@ -4329,8 +4334,8 @@ msgstr "" #: flask.ctx._AppCtxGlobals:1 of msgid "" -"A plain object. Used as a namespace for storing data during an " -"application context." +"A plain object. Used as a namespace for storing data during an application" +" context." msgstr "" #: flask.ctx._AppCtxGlobals:4 of @@ -4375,8 +4380,8 @@ msgstr "" #: flask.ctx._AppCtxGlobals.setdefault:1 of msgid "" -"Get the value of an attribute if it is present, otherwise set and return " -"a default value. Like :meth:`dict.setdefault`." +"Get the value of an attribute if it is present, otherwise set and return a" +" default value. Like :meth:`dict.setdefault`." msgstr "" #: flask.ctx._AppCtxGlobals.setdefault:5 of @@ -4389,17 +4394,17 @@ msgstr "" #: ../../api.rst:189 msgid "" -"A proxy to the application handling the current request. This is useful " -"to access the application without needing to import it, or if it can't be" -" imported, such as when using the application factory pattern or in " +"A proxy to the application handling the current request. This is useful to" +" access the application without needing to import it, or if it can't be " +"imported, such as when using the application factory pattern or in " "blueprints and extensions." msgstr "" #: ../../api.rst:194 msgid "" -"This is only available when an :doc:`application context ` " -"is pushed. This happens automatically during requests and CLI commands. " -"It can be controlled manually with :meth:`~flask.Flask.app_context`." +"This is only available when an :doc:`application context ` is" +" pushed. This happens automatically during requests and CLI commands. It " +"can be controlled manually with :meth:`~flask.Flask.app_context`." msgstr "" #: flask.ctx.has_request_context:1 of @@ -4418,11 +4423,11 @@ msgstr "" #: flask.ctx.copy_current_request_context:1 of msgid "" -"A helper function that decorates a function to retain the current request" -" context. This is useful when working with greenlets. The moment the " +"A helper function that decorates a function to retain the current request " +"context. This is useful when working with greenlets. The moment the " "function is decorated a copy of the request context is created and then " -"pushed when the function is called. The current session is also included" -" in the copied request context." +"pushed when the function is called. The current session is also included " +"in the copied request context." msgstr "" #: flask.ctx.has_app_context:1 of @@ -4438,15 +4443,16 @@ msgstr "" #: flask.helpers.url_for:3 of msgid "" -"Variable arguments that are unknown to the target endpoint are appended " -"to the generated URL as query arguments. If the value of a query " -"argument is ``None``, the whole pair is skipped. In case blueprints are " -"active you can shortcut references to the same blueprint by prefixing the" -" local endpoint with a dot (``.``)." +"Variable arguments that are unknown to the target endpoint are appended to" +" the generated URL as query arguments. If the value of a query argument " +"is ``None``, the whole pair is skipped. In case blueprints are active you" +" can shortcut references to the same blueprint by prefixing the local " +"endpoint with a dot (``.``)." msgstr "" #: flask.helpers.url_for:9 of -msgid "This will reference the index function local to the current blueprint::" +msgid "" +"This will reference the index function local to the current blueprint::" msgstr "" #: flask.helpers.url_for:13 of @@ -4467,15 +4473,15 @@ msgid "" "the current app does not have a URL for the given endpoint and values. " "When it does, the :data:`~flask.current_app` calls its " ":attr:`~Flask.url_build_error_handlers` if it is not ``None``, which can " -"return a string to use as the result of `url_for` (instead of `url_for`'s" -" default to raise the :exc:`~werkzeug.routing.BuildError` exception) or " -"re-raise the exception. An example::" +"return a string to use as the result of `url_for` (instead of `url_for`'s " +"default to raise the :exc:`~werkzeug.routing.BuildError` exception) or re-" +"raise the exception. An example::" msgstr "" #: flask.helpers.url_for:47 of msgid "" -"Here, `error` is the instance of :exc:`~werkzeug.routing.BuildError`, and" -" `endpoint` and `values` are the arguments passed into `url_for`. Note " +"Here, `error` is the instance of :exc:`~werkzeug.routing.BuildError`, and " +"`endpoint` and `values` are the arguments passed into `url_for`. Note " "that this is for building URLs outside the current application, and not " "for handling 404 NotFound errors." msgstr "" @@ -4505,17 +4511,17 @@ msgstr "" #: flask.helpers.url_for:64 of msgid "" "if set to ``True``, an absolute URL is generated. Server address can be " -"changed via ``SERVER_NAME`` configuration variable which falls back to " -"the `Host` header, then to the IP and port of the request." +"changed via ``SERVER_NAME`` configuration variable which falls back to the" +" `Host` header, then to the IP and port of the request." msgstr "" #: flask.helpers.url_for:67 of msgid "" -"a string specifying the desired URL scheme. The `_external` parameter " -"must be set to ``True`` or a :exc:`ValueError` is raised. The default " -"behavior uses the same scheme as the current request, or " -":data:`PREFERRED_URL_SCHEME` if no request context is available. This " -"also can be set to an empty string to build protocol-relative URLs." +"a string specifying the desired URL scheme. The `_external` parameter must" +" be set to ``True`` or a :exc:`ValueError` is raised. The default behavior" +" uses the same scheme as the current request, or " +":data:`PREFERRED_URL_SCHEME` if no request context is available. This also" +" can be set to an empty string to build protocol-relative URLs." msgstr "" #: flask.helpers.url_for:73 of @@ -4534,18 +4540,18 @@ msgstr "" #: of werkzeug.exceptions.abort:4 msgid "" -"If a status code is given, it will be looked up in the list of exceptions" -" and will raise that exception. If passed a WSGI application, it will " -"wrap it in a proxy WSGI exception and raise that::" +"If a status code is given, it will be looked up in the list of exceptions " +"and will raise that exception. If passed a WSGI application, it will wrap" +" it in a proxy WSGI exception and raise that::" msgstr "" #: of werkzeug.utils.redirect:1 msgid "" -"Returns a response object (a WSGI application) that, if called, redirects" -" the client to the target location. Supported codes are 301, 302, 303, " -"305, 307, and 308. 300 is not supported because it's not a real redirect " -"and 304 because it's the answer for a request with a request with defined" -" If-Modified-Since headers." +"Returns a response object (a WSGI application) that, if called, redirects " +"the client to the target location. Supported codes are 301, 302, 303, 305," +" 307, and 308. 300 is not supported because it's not a real redirect and " +"304 because it's the answer for a request with a request with defined If-" +"Modified-Since headers." msgstr "" #: of werkzeug.utils.redirect:11 @@ -4576,10 +4582,9 @@ msgstr "" msgid "" "Sometimes it is necessary to set additional headers in a view. Because " "views do not have to return response objects but can return a value that " -"is converted into a response object by Flask itself, it becomes tricky to" -" add headers to it. This function can be called instead of using a " -"return and you will get a response object which you can use to attach " -"headers." +"is converted into a response object by Flask itself, it becomes tricky to " +"add headers to it. This function can be called instead of using a return " +"and you will get a response object which you can use to attach headers." msgstr "" #: flask.helpers.make_response:7 of @@ -4598,8 +4603,8 @@ msgstr "" #: flask.helpers.make_response:25 of msgid "" -"The other use case of this function is to force the return value of a " -"view function into a response which is helpful with view decorators::" +"The other use case of this function is to force the return value of a view" +" function into a response which is helpful with view decorators::" msgstr "" #: flask.helpers.make_response:32 of @@ -4624,9 +4629,9 @@ msgstr "" #: flask.ctx.after_this_request:1 of msgid "" -"Executes a function after this request. This is useful to modify " -"response objects. The function is passed the response object and has to " -"return the same or a new one." +"Executes a function after this request. This is useful to modify response" +" objects. The function is passed the response object and has to return " +"the same or a new one." msgstr "" #: flask.ctx.after_this_request:15 of @@ -4643,41 +4648,41 @@ msgstr "" #: flask.helpers.send_file:3 of msgid "" "The first argument can be a file path or a file-like object. Paths are " -"preferred in most cases because Werkzeug can manage the file and get " -"extra information from the path. Passing a file-like object requires that" -" the file is opened in binary mode, and is mostly useful when building a " -"file in memory with :class:`io.BytesIO`." +"preferred in most cases because Werkzeug can manage the file and get extra" +" information from the path. Passing a file-like object requires that the " +"file is opened in binary mode, and is mostly useful when building a file " +"in memory with :class:`io.BytesIO`." msgstr "" #: flask.helpers.send_file:9 of msgid "" "Never pass file paths provided by a user. The path is assumed to be " -"trusted, so a user could craft a path to access a file you didn't intend." -" Use :func:`send_from_directory` to safely serve user-requested paths " -"from within a directory." +"trusted, so a user could craft a path to access a file you didn't intend. " +"Use :func:`send_from_directory` to safely serve user-requested paths from " +"within a directory." msgstr "" #: flask.helpers.send_file:14 of msgid "" "If the WSGI server sets a ``file_wrapper`` in ``environ``, it is used, " -"otherwise Werkzeug's built-in wrapper is used. Alternatively, if the HTTP" -" server supports ``X-Sendfile``, configuring Flask with ``USE_X_SENDFILE " -"= True`` will tell the server to send the given path, which is much more " +"otherwise Werkzeug's built-in wrapper is used. Alternatively, if the HTTP " +"server supports ``X-Sendfile``, configuring Flask with ``USE_X_SENDFILE = " +"True`` will tell the server to send the given path, which is much more " "efficient than reading it in Python." msgstr "" #: flask.helpers.send_file:20 of msgid "" -"The path to the file to send, relative to the current working directory " -"if a relative path is given. Alternatively, a file-like object opened in " +"The path to the file to send, relative to the current working directory if" +" a relative path is given. Alternatively, a file-like object opened in " "binary mode. Make sure the file pointer is seeked to the start of the " "data." msgstr "" #: flask.helpers.send_file:24 of msgid "" -"The MIME type to send for the file. If not provided, it will try to " -"detect it from the file name." +"The MIME type to send for the file. If not provided, it will try to detect" +" it from the file name." msgstr "" #: flask.helpers.send_file:26 of @@ -4694,8 +4699,8 @@ msgstr "" #: flask.helpers.send_file:30 of msgid "" -"Enable conditional and range responses based on request headers. Requires" -" passing a file path and ``environ``." +"Enable conditional and range responses based on request headers. Requires " +"passing a file path and ``environ``." msgstr "" #: flask.helpers.send_file:32 of @@ -4706,22 +4711,22 @@ msgstr "" #: flask.helpers.send_file:34 of msgid "" -"The last modified time to send for the file, in seconds. If not provided," -" it will try to detect it from the file path." +"The last modified time to send for the file, in seconds. If not provided, " +"it will try to detect it from the file path." msgstr "" #: flask.helpers.send_file:37 of msgid "" "How long the client should cache the file, in seconds. If set, ``Cache-" -"Control`` will be ``public``, otherwise it will be ``no-cache`` to prefer" -" conditional caching." +"Control`` will be ``public``, otherwise it will be ``no-cache`` to prefer " +"conditional caching." msgstr "" #: flask.helpers.send_file:41 of msgid "" "``download_name`` replaces the ``attachment_filename`` parameter. If " -"``as_attachment=False``, it is passed with ``Content-Disposition: " -"inline`` instead." +"``as_attachment=False``, it is passed with ``Content-Disposition: inline``" +" instead." msgstr "" #: flask.helpers.send_file:46 of @@ -4738,8 +4743,8 @@ msgstr "" #: flask.helpers.send_file:55 of msgid "" -"Passing a file-like object that inherits from :class:`~io.TextIOBase` " -"will raise a :exc:`ValueError` rather than sending an empty file." +"Passing a file-like object that inherits from :class:`~io.TextIOBase` will" +" raise a :exc:`ValueError` rather than sending an empty file." msgstr "" #: flask.helpers.send_file:60 flask.helpers.send_from_directory:27 of @@ -4768,13 +4773,14 @@ msgstr "" #: flask.helpers.send_file:77 of msgid "" -"The filename is no longer automatically inferred from file objects. If " -"you want to use automatic MIME and etag support, pass a filename via " +"The filename is no longer automatically inferred from file objects. If you" +" want to use automatic MIME and etag support, pass a filename via " "``filename_or_fp`` or ``attachment_filename``." msgstr "" #: flask.helpers.send_file:83 of -msgid "``attachment_filename`` is preferred over ``filename`` for MIME detection." +msgid "" +"``attachment_filename`` is preferred over ``filename`` for MIME detection." msgstr "" #: flask.helpers.send_file:87 of @@ -4800,16 +4806,16 @@ msgstr "" #: flask.helpers.send_from_directory:11 of msgid "" -"This is a secure way to serve files from a folder, such as static files " -"or uploads. Uses :func:`~werkzeug.security.safe_join` to ensure the path " +"This is a secure way to serve files from a folder, such as static files or" +" uploads. Uses :func:`~werkzeug.security.safe_join` to ensure the path " "coming from the client is not maliciously crafted to point outside the " "specified directory." msgstr "" #: flask.helpers.send_from_directory:16 of msgid "" -"If the final path does not point to an existing regular file, raises a " -"404 :exc:`~werkzeug.exceptions.NotFound` error." +"If the final path does not point to an existing regular file, raises a 404" +" :exc:`~werkzeug.exceptions.NotFound` error." msgstr "" #: flask.helpers.send_from_directory:19 of @@ -4830,8 +4836,8 @@ msgstr "" #: flask.helpers.safe_join:1 of msgid "" -"Safely join zero or more untrusted path components to a base directory to" -" avoid escaping the base directory." +"Safely join zero or more untrusted path components to a base directory to " +"avoid escaping the base directory." msgstr "" #: flask.helpers.safe_join:4 of @@ -4849,8 +4855,8 @@ msgstr "" #: ../../docstring markupsafe._speedups.escape:1 of msgid "" "Replace the characters ``&``, ``<``, ``>``, ``'``, and ``\"`` in the " -"string with HTML-safe sequences. Use this if you need to display text " -"that might contain such characters in HTML." +"string with HTML-safe sequences. Use this if you need to display text that" +" might contain such characters in HTML." msgstr "" #: ../../docstring markupsafe._speedups.escape:3 of @@ -4869,15 +4875,15 @@ msgstr "" #: markupsafe.Markup:1 of msgid "" -"A string that is ready to be safely inserted into an HTML or XML " -"document, either because it was escaped or because it was marked safe." +"A string that is ready to be safely inserted into an HTML or XML document," +" either because it was escaped or because it was marked safe." msgstr "" #: markupsafe.Markup:5 of msgid "" "Passing an object to the constructor converts it to text and wraps it to " -"mark it safe without escaping. To escape the text, use the :meth:`escape`" -" class method instead." +"mark it safe without escaping. To escape the text, use the :meth:`escape` " +"class method instead." msgstr "" #: markupsafe.Markup:16 of @@ -4895,8 +4901,8 @@ msgstr "" #: markupsafe.Markup.escape:1 of msgid "" -"Escape a string. Calls :func:`escape` and ensures that for subclasses the" -" correct type is returned." +"Escape a string. Calls :func:`escape` and ensures that for subclasses the " +"correct type is returned." msgstr "" #: markupsafe.Markup.striptags:1 of @@ -4933,18 +4939,18 @@ msgstr "" #: flask.helpers.flash:9 of msgid "" "the category for the message. The following values are recommended: " -"``'message'`` for any kind of message, ``'error'`` for errors, ``'info'``" -" for information messages and ``'warning'`` for warnings. However any " -"kind of string can be used as category." +"``'message'`` for any kind of message, ``'error'`` for errors, ``'info'`` " +"for information messages and ``'warning'`` for warnings. However any kind" +" of string can be used as category." msgstr "" #: flask.helpers.get_flashed_messages:1 of msgid "" "Pulls all flashed messages from the session and returns them. Further " -"calls in the same request to the function will return the same messages." -" By default just the messages are returned, but when `with_categories` " -"is set to ``True``, the return value will be a list of tuples in the form" -" ``(category, message)`` instead." +"calls in the same request to the function will return the same messages. " +"By default just the messages are returned, but when `with_categories` is " +"set to ``True``, the return value will be a list of tuples in the form " +"``(category, message)`` instead." msgstr "" #: flask.helpers.get_flashed_messages:7 of @@ -4986,8 +4992,8 @@ msgstr "" #: flask.helpers.get_flashed_messages:26 of msgid "" -"filter of categories to limit return values. Only categories in the list" -" will be returned." +"filter of categories to limit return values. Only categories in the list " +"will be returned." msgstr "" #: ../../api.rst:237 @@ -4996,8 +5002,8 @@ msgstr "" #: ../../api.rst:241 msgid "" -"Flask uses the built-in :mod:`json` module for handling JSON. It will use" -" the current blueprint's or application's JSON encoder and decoder for " +"Flask uses the built-in :mod:`json` module for handling JSON. It will use " +"the current blueprint's or application's JSON encoder and decoder for " "easier customization. By default it handles some extra data types:" msgstr "" @@ -5012,7 +5018,8 @@ msgid ":class:`uuid.UUID` is serialized to a string." msgstr "" #: ../../api.rst:248 flask.json.JSONEncoder:8 of -msgid ":class:`dataclasses.dataclass` is passed to :func:`dataclasses.asdict`." +msgid "" +":class:`dataclasses.dataclass` is passed to :func:`dataclasses.asdict`." msgstr "" #: ../../api.rst:250 flask.json.JSONEncoder:10 of @@ -5030,14 +5037,14 @@ msgstr "" #: flask.json.jsonify:1 of msgid "" -"Serialize data to JSON and wrap it in a :class:`~flask.Response` with the" -" :mimetype:`application/json` mimetype." +"Serialize data to JSON and wrap it in a :class:`~flask.Response` with the " +":mimetype:`application/json` mimetype." msgstr "" #: flask.json.jsonify:4 of msgid "" -"Uses :func:`dumps` to serialize the data, but ``args`` and ``kwargs`` are" -" treated as data rather than arguments to :func:`json.dumps`." +"Uses :func:`dumps` to serialize the data, but ``args`` and ``kwargs`` are " +"treated as data rather than arguments to :func:`json.dumps`." msgstr "" #: flask.json.jsonify:8 of @@ -5076,8 +5083,8 @@ msgstr "" #: flask.json.jsonify:43 of msgid "" -"Added support for serializing top-level arrays. This introduces a " -"security risk in ancient browsers. See :ref:`security-json`." +"Added support for serializing top-level arrays. This introduces a security" +" risk in ancient browsers. See :ref:`security-json`." msgstr "" #: flask.json.dumps:1 of @@ -5132,8 +5139,8 @@ msgstr "" #: flask.json.dump:12 of msgid "" -"Writing to a binary file, and the ``encoding`` argument, is deprecated " -"and will be removed in Flask 2.1." +"Writing to a binary file, and the ``encoding`` argument, is deprecated and" +" will be removed in Flask 2.1." msgstr "" #: flask.json.loads:1 of @@ -5156,8 +5163,8 @@ msgstr "" #: flask.json.loads:11 of msgid "" -"``encoding`` is deprecated and will be removed in Flask 2.1. The data " -"must be a string or UTF-8 bytes." +"``encoding`` is deprecated and will be removed in Flask 2.1. The data must" +" be a string or UTF-8 bytes." msgstr "" #: flask.json.load:1 of @@ -5180,8 +5187,8 @@ msgstr "" #: flask.json.load:11 of msgid "" -"``encoding`` is deprecated and will be removed in Flask 2.1. The file " -"must be text mode, or binary mode with UTF-8 bytes." +"``encoding`` is deprecated and will be removed in Flask 2.1. The file must" +" be text mode, or binary mode with UTF-8 bytes." msgstr "" #: flask.json.JSONEncoder:1 of @@ -5227,15 +5234,15 @@ msgstr "" #: flask.json.tag:4 of msgid "" "A compact representation for lossless serialization of non-standard JSON " -"types. :class:`~flask.sessions.SecureCookieSessionInterface` uses this to" -" serialize the session data, but it may be useful in other places. It can" -" be extended to support other types." +"types. :class:`~flask.sessions.SecureCookieSessionInterface` uses this to " +"serialize the session data, but it may be useful in other places. It can " +"be extended to support other types." msgstr "" #: flask.json.tag.TaggedJSONSerializer:1 of msgid "" -"Serializer that uses a tag system to compactly represent objects that are" -" not JSON types. Passed as the intermediate serializer to " +"Serializer that uses a tag system to compactly represent objects that are " +"not JSON types. Passed as the intermediate serializer to " ":class:`itsdangerous.Serializer`." msgstr "" @@ -5269,8 +5276,8 @@ msgstr "" #: ../../docstring flask.json.tag.TaggedJSONSerializer.default_tags:1 of msgid "" -"Tag classes to bind when creating the serializer. Other tags can be added" -" later using :meth:`~register`." +"Tag classes to bind when creating the serializer. Other tags can be added " +"later using :meth:`~register`." msgstr "" #: flask.json.tag.TaggedJSONSerializer.dumps:1 of @@ -5286,7 +5293,8 @@ msgid "Register a new tag with this serializer." msgstr "" #: flask.json.tag.TaggedJSONSerializer.register:3 of -msgid "tag class to register. Will be instantiated with this serializer instance." +msgid "" +"tag class to register. Will be instantiated with this serializer instance." msgstr "" #: flask.json.tag.TaggedJSONSerializer.register:5 of @@ -5297,8 +5305,8 @@ msgstr "" #: flask.json.tag.TaggedJSONSerializer.register:7 of msgid "" -"index to insert the new tag in the tag order. Useful when the new tag is " -"a special case of an existing tag. If ``None`` (default), the tag is " +"index to insert the new tag in the tag order. Useful when the new tag is a" +" special case of an existing tag. If ``None`` (default), the tag is " "appended to the end of the order." msgstr "" @@ -5328,8 +5336,8 @@ msgstr "" #: ../../docstring flask.json.tag.JSONTag.key:1 of msgid "" -"The tag to mark the serialized object with. If ``None``, this tag is only" -" used as an intermediate step during tagging." +"The tag to mark the serialized object with. If ``None``, this tag is only " +"used as an intermediate step during tagging." msgstr "" #: flask.json.tag.JSONTag.tag:1 of @@ -5340,8 +5348,8 @@ msgstr "" #: flask.json.tag.JSONTag.to_json:1 of msgid "" -"Convert the Python object to an object that is a valid JSON type. The tag" -" will be added later." +"Convert the Python object to an object that is a valid JSON type. The tag " +"will be added later." msgstr "" #: flask.json.tag.JSONTag.to_python:1 of @@ -5354,11 +5362,11 @@ msgstr "" msgid "" "Let's see an example that adds support for " ":class:`~collections.OrderedDict`. Dicts don't have an order in JSON, so " -"to handle this we will dump the items as a list of ``[key, value]`` " -"pairs. Subclass :class:`JSONTag` and give it the new key ``' od'`` to " -"identify the type. The session serializer processes dicts first, so " -"insert the new tag at the front of the order since ``OrderedDict`` must " -"be processed before ``dict``." +"to handle this we will dump the items as a list of ``[key, value]`` pairs." +" Subclass :class:`JSONTag` and give it the new key ``' od'`` to identify " +"the type. The session serializer processes dicts first, so insert the new " +"tag at the front of the order since ``OrderedDict`` must be processed " +"before ``dict``." msgstr "" #: ../../api.rst:284 @@ -5377,7 +5385,8 @@ msgstr "" #: flask.templating.render_template:7 flask.templating.render_template_string:6 #: of -msgid "the variables that should be available in the context of the template." +msgid "" +"the variables that should be available in the context of the template." msgstr "" #: flask.templating.render_template_string:1 of @@ -5427,17 +5436,17 @@ msgstr "" #: flask.config.Config:9 of msgid "" "Or alternatively you can define the configuration options in the module " -"that calls :meth:`from_object` or provide an import path to a module that" -" should be loaded. It is also possible to tell it to use the same module" -" and with that provide the configuration values just before the call::" +"that calls :meth:`from_object` or provide an import path to a module that " +"should be loaded. It is also possible to tell it to use the same module " +"and with that provide the configuration values just before the call::" msgstr "" #: flask.config.Config:19 of msgid "" -"In both cases (loading from any Python file or loading from modules), " -"only uppercase keys are added to the config. This makes it possible to " -"use lowercase values in the config file for temporary values that are not" -" added to the config or to define the config keys in the same file that " +"In both cases (loading from any Python file or loading from modules), only" +" uppercase keys are added to the config. This makes it possible to use " +"lowercase values in the config file for temporary values that are not " +"added to the config or to define the config keys in the same file that " "implements the application." msgstr "" @@ -5491,14 +5500,14 @@ msgstr "" #: flask.config.Config.from_file:1 of msgid "" "Update the values in the config from a file that is loaded using the " -"``load`` parameter. The loaded data is passed to the :meth:`from_mapping`" -" method." +"``load`` parameter. The loaded data is passed to the :meth:`from_mapping` " +"method." msgstr "" #: flask.config.Config.from_file:10 of msgid "" -"The path to the data file. This can be an absolute path or relative to " -"the config root path." +"The path to the data file. This can be an absolute path or relative to the" +" config root path." msgstr "" #: flask.config.Config.from_file:12 of @@ -5519,8 +5528,8 @@ msgstr "" #: flask.config.Config.from_json:4 of msgid "" -"The path to the JSON file. This can be an absolute path or relative to " -"the config root path." +"The path to the JSON file. This can be an absolute path or relative to the" +" config root path." msgstr "" #: flask.config.Config.from_json:8 of @@ -5530,13 +5539,14 @@ msgid "" msgstr "" #: flask.config.Config.from_mapping:1 of -msgid "Updates the config like :meth:`update` ignoring items with non-upper keys." +msgid "" +"Updates the config like :meth:`update` ignoring items with non-upper keys." msgstr "" #: flask.config.Config.from_object:1 of msgid "" -"Updates the values from the given object. An object can be of one of the" -" following two types:" +"Updates the values from the given object. An object can be of one of the " +"following two types:" msgstr "" #: flask.config.Config.from_object:4 of @@ -5550,9 +5560,9 @@ msgstr "" #: flask.config.Config.from_object:7 of msgid "" "Objects are usually either modules or classes. :meth:`from_object` loads " -"only the uppercase attributes of the module/class. A ``dict`` object will" -" not work with :meth:`from_object` because the keys of a ``dict`` are not" -" attributes of the ``dict`` class." +"only the uppercase attributes of the module/class. A ``dict`` object will " +"not work with :meth:`from_object` because the keys of a ``dict`` are not " +"attributes of the ``dict`` class." msgstr "" #: flask.config.Config.from_object:12 of @@ -5561,9 +5571,9 @@ msgstr "" #: flask.config.Config.from_object:18 of msgid "" -"Nothing is done to the object before loading. If the object is a class " -"and has ``@property`` attributes, it needs to be instantiated before " -"being passed to this method." +"Nothing is done to the object before loading. If the object is a class and" +" has ``@property`` attributes, it needs to be instantiated before being " +"passed to this method." msgstr "" #: flask.config.Config.from_object:22 of @@ -5587,14 +5597,14 @@ msgstr "" #: flask.config.Config.from_pyfile:1 of msgid "" "Updates the values in the config from a Python file. This function " -"behaves as if the file was imported as module with the " -":meth:`from_object` function." +"behaves as if the file was imported as module with the :meth:`from_object`" +" function." msgstr "" #: flask.config.Config.from_pyfile:5 of msgid "" -"the filename of the config. This can either be an absolute filename or a" -" filename relative to the root path." +"the filename of the config. This can either be an absolute filename or a " +"filename relative to the root path." msgstr "" #: flask.config.Config.from_pyfile:11 of @@ -5641,13 +5651,14 @@ msgstr "" msgid "" "Request contexts disappear when the response is started on the server. " "This is done for efficiency reasons and to make it less likely to " -"encounter memory leaks with badly written WSGI middlewares. The downside" -" is that if you are using streamed responses, the generator cannot access" -" request bound information any more." +"encounter memory leaks with badly written WSGI middlewares. The downside " +"is that if you are using streamed responses, the generator cannot access " +"request bound information any more." msgstr "" #: flask.helpers.stream_with_context:7 of -msgid "This function however can help you keep the context around for longer::" +msgid "" +"This function however can help you keep the context around for longer::" msgstr "" #: flask.helpers.stream_with_context:20 of @@ -5662,8 +5673,8 @@ msgstr "" msgid "" "The request context contains all request relevant information. It is " "created at the beginning of the request and pushed to the " -"`_request_ctx_stack` and removed at the end of it. It will create the " -"URL adapter and request object for the WSGI environment provided." +"`_request_ctx_stack` and removed at the end of it. It will create the URL" +" adapter and request object for the WSGI environment provided." msgstr "" #: flask.ctx.RequestContext:6 of @@ -5682,42 +5693,42 @@ msgstr "" #: flask.ctx.RequestContext:14 of msgid "" -"The request context is automatically popped at the end of the request for" -" you. In debug mode the request context is kept around if exceptions " -"happen so that interactive debuggers have a chance to introspect the " -"data. With 0.4 this can also be forced for requests that did not fail " -"and outside of ``DEBUG`` mode. By setting ``'flask._preserve_context'`` " -"to ``True`` on the WSGI environment the context will not pop itself at " -"the end of the request. This is used by the " -":meth:`~flask.Flask.test_client` for example to implement the deferred " -"cleanup functionality." +"The request context is automatically popped at the end of the request for " +"you. In debug mode the request context is kept around if exceptions " +"happen so that interactive debuggers have a chance to introspect the data." +" With 0.4 this can also be forced for requests that did not fail and " +"outside of ``DEBUG`` mode. By setting ``'flask._preserve_context'`` to " +"``True`` on the WSGI environment the context will not pop itself at the " +"end of the request. This is used by the :meth:`~flask.Flask.test_client` " +"for example to implement the deferred cleanup functionality." msgstr "" #: flask.ctx.RequestContext:24 of msgid "" "You might find this helpful for unittests where you need the information " -"from the context local around for a little longer. Make sure to properly" -" :meth:`~werkzeug.LocalStack.pop` the stack yourself in that situation, " +"from the context local around for a little longer. Make sure to properly " +":meth:`~werkzeug.LocalStack.pop` the stack yourself in that situation, " "otherwise your unittests will leak memory." msgstr "" #: flask.ctx.RequestContext.copy:1 of msgid "" -"Creates a copy of this request context with the same request object. This" -" can be used to move a request context to a different greenlet. Because " -"the actual request object is the same this cannot be used to move a " -"request context to a different thread unless access to the request object" -" is locked." +"Creates a copy of this request context with the same request object. This " +"can be used to move a request context to a different greenlet. Because the" +" actual request object is the same this cannot be used to move a request " +"context to a different thread unless access to the request object is " +"locked." msgstr "" #: flask.ctx.RequestContext.copy:9 of msgid "" -"The current session object is used instead of reloading the original " -"data. This prevents `flask.session` pointing to an out-of-date object." +"The current session object is used instead of reloading the original data." +" This prevents `flask.session` pointing to an out-of-date object." msgstr "" #: flask.ctx.RequestContext.match_request:1 of -msgid "Can be overridden by a subclass to hook into the matching of the request." +msgid "" +"Can be overridden by a subclass to hook into the matching of the request." msgstr "" #: flask.ctx.RequestContext.pop:1 of @@ -5739,12 +5750,13 @@ msgstr "" msgid "" "The internal :class:`~werkzeug.local.LocalStack` that holds " ":class:`~flask.ctx.RequestContext` instances. Typically, the " -":data:`request` and :data:`session` proxies should be accessed instead of" -" the stack. It may be useful to access the stack in extension code." +":data:`request` and :data:`session` proxies should be accessed instead of " +"the stack. It may be useful to access the stack in extension code." msgstr "" #: ../../api.rst:320 -msgid "The following attributes are always present on each layer of the stack:" +msgid "" +"The following attributes are always present on each layer of the stack:" msgstr "" #: ../../api.rst:324 @@ -5804,8 +5816,8 @@ msgid "" "The application context binds an application object implicitly to the " "current thread or greenlet, similar to how the :class:`RequestContext` " "binds request information. The application context is also implicitly " -"created if a request context is created but the application is not on top" -" of the individual application context." +"created if a request context is created but the application is not on top " +"of the individual application context." msgstr "" #: flask.ctx.AppContext.pop:1 of @@ -5821,8 +5833,8 @@ msgid "" "The internal :class:`~werkzeug.local.LocalStack` that holds " ":class:`~flask.ctx.AppContext` instances. Typically, the " ":data:`current_app` and :data:`g` proxies should be accessed instead of " -"the stack. Extensions can access the contexts on the stack as a namespace" -" to store data." +"the stack. Extensions can access the contexts on the stack as a namespace " +"to store data." msgstr "" #: flask.blueprints.BlueprintSetupState:1 of @@ -5835,9 +5847,9 @@ msgstr "" #: flask.blueprints.BlueprintSetupState.add_url_rule:1 of msgid "" -"A helper method to register a rule (and optionally a view function) to " -"the application. The endpoint is automatically prefixed with the " -"blueprint's name." +"A helper method to register a rule (and optionally a view function) to the" +" application. The endpoint is automatically prefixed with the blueprint's" +" name." msgstr "" #: ../../docstring flask.blueprints.BlueprintSetupState.app:1 of @@ -5851,9 +5863,9 @@ msgstr "" #: ../../docstring flask.blueprints.BlueprintSetupState.first_registration:1 of msgid "" "as blueprints can be registered multiple times with the application and " -"not everything wants to be registered multiple times on it, this " -"attribute can be used to figure out if the blueprint was registered in " -"the past already." +"not everything wants to be registered multiple times on it, this attribute" +" can be used to figure out if the blueprint was registered in the past " +"already." msgstr "" #: ../../docstring flask.blueprints.BlueprintSetupState.options:1 of @@ -5863,7 +5875,8 @@ msgid "" msgstr "" #: ../../docstring flask.blueprints.BlueprintSetupState.subdomain:1 of -msgid "The subdomain that the blueprint should be active for, ``None`` otherwise." +msgid "" +"The subdomain that the blueprint should be active for, ``None`` otherwise." msgstr "" #: ../../docstring flask.blueprints.BlueprintSetupState.url_defaults:1 of @@ -5873,7 +5886,8 @@ msgid "" msgstr "" #: ../../docstring flask.blueprints.BlueprintSetupState.url_prefix:1 of -msgid "The prefix that should be used for all URLs defined on the blueprint." +msgid "" +"The prefix that should be used for all URLs defined on the blueprint." msgstr "" #: ../../api.rst:369 @@ -5892,9 +5906,9 @@ msgstr "" #: ../../api.rst:382 msgid "" -"This signal is sent when a template was successfully rendered. The " -"signal is invoked with the instance of the template as `template` and the" -" context as dictionary (named `context`)." +"This signal is sent when a template was successfully rendered. The signal" +" is invoked with the instance of the template as `template` and the " +"context as dictionary (named `context`)." msgstr "" #: ../../api.rst:386 ../../api.rst:403 ../../api.rst:420 ../../api.rst:433 @@ -5905,22 +5919,22 @@ msgstr "" #: ../../api.rst:399 msgid "" "This signal is sent before template rendering process. The signal is " -"invoked with the instance of the template as `template` and the context " -"as dictionary (named `context`)." +"invoked with the instance of the template as `template` and the context as" +" dictionary (named `context`)." msgstr "" #: ../../api.rst:415 msgid "" -"This signal is sent when the request context is set up, before any " -"request processing happens. Because the request context is already " -"bound, the subscriber can access the request with the standard global " -"proxies such as :class:`~flask.request`." +"This signal is sent when the request context is set up, before any request" +" processing happens. Because the request context is already bound, the " +"subscriber can access the request with the standard global proxies such as" +" :class:`~flask.request`." msgstr "" #: ../../api.rst:430 msgid "" -"This signal is sent right before the response is sent to the client. It " -"is passed the response to be sent named `response`." +"This signal is sent right before the response is sent to the client. It is" +" passed the response to be sent named `response`." msgstr "" #: ../../api.rst:444 @@ -5932,9 +5946,9 @@ msgstr "" #: ../../api.rst:448 msgid "" -"This signal is not sent for :exc:`~werkzeug.exceptions.HTTPException`, or" -" other exceptions that have error handlers registered, unless the " -"exception was raised from an error handler." +"This signal is not sent for :exc:`~werkzeug.exceptions.HTTPException`, or " +"other exceptions that have error handlers registered, unless the exception" +" was raised from an error handler." msgstr "" #: ../../api.rst:453 @@ -5946,8 +5960,8 @@ msgstr "" #: ../../api.rst:473 msgid "" "This signal is sent when the request is tearing down. This is always " -"called, even if an exception is caused. Currently functions listening to" -" this signal are called after the regular teardown handlers, but this is " +"called, even if an exception is caused. Currently functions listening to " +"this signal are called after the regular teardown handlers, but this is " "not something you can rely on." msgstr "" @@ -5960,22 +5974,22 @@ msgstr "" #: ../../api.rst:492 msgid "" -"This signal is sent when the app context is tearing down. This is always" -" called, even if an exception is caused. Currently functions listening " -"to this signal are called after the regular teardown handlers, but this " -"is not something you can rely on." +"This signal is sent when the app context is tearing down. This is always " +"called, even if an exception is caused. Currently functions listening to " +"this signal are called after the regular teardown handlers, but this is " +"not something you can rely on." msgstr "" #: ../../api.rst:505 msgid "" -"This will also be passed an `exc` keyword argument that has a reference " -"to the exception that caused the teardown if there was one." +"This will also be passed an `exc` keyword argument that has a reference to" +" the exception that caused the teardown if there was one." msgstr "" #: ../../api.rst:510 msgid "" -"This signal is sent when an application context is pushed. The sender is" -" the application. This is usually useful for unittests in order to " +"This signal is sent when an application context is pushed. The sender is " +"the application. This is usually useful for unittests in order to " "temporarily hook in information. For instance it can be used to set a " "resource early onto the `g` object." msgstr "" @@ -5986,8 +6000,8 @@ msgstr "" #: ../../api.rst:539 msgid "" -"This signal is sent when an application context is popped. The sender is" -" the application. This usually falls in line with the " +"This signal is sent when an application context is popped. The sender is " +"the application. This usually falls in line with the " ":data:`appcontext_tearing_down` signal." msgstr "" @@ -6008,10 +6022,10 @@ msgstr "" #: ../../api.rst:572 msgid "" -"Creates a new signal for this namespace if blinker is available, " -"otherwise returns a fake signal that has a send method that will do " -"nothing but will fail with a :exc:`RuntimeError` for all other " -"operations, including connecting." +"Creates a new signal for this namespace if blinker is available, otherwise" +" returns a fake signal that has a send method that will do nothing but " +"will fail with a :exc:`RuntimeError` for all other operations, including " +"connecting." msgstr "" #: ../../api.rst:582 @@ -6021,31 +6035,31 @@ msgstr "" #: flask.views.View:1 of msgid "" "Alternative way to use view functions. A subclass has to implement " -":meth:`dispatch_request` which is called with the view arguments from the" -" URL routing system. If :attr:`methods` is provided the methods do not " +":meth:`dispatch_request` which is called with the view arguments from the " +"URL routing system. If :attr:`methods` is provided the methods do not " "have to be passed to the :meth:`~flask.Flask.add_url_rule` method " "explicitly::" msgstr "" #: flask.views.View:15 of msgid "" -"When you want to decorate a pluggable view you will have to either do " -"that when the view function is created (by wrapping the return value of " +"When you want to decorate a pluggable view you will have to either do that" +" when the view function is created (by wrapping the return value of " ":meth:`as_view`) or you can use the :attr:`decorators` attribute::" msgstr "" #: flask.views.View:26 of msgid "" -"The decorators stored in the decorators list are applied one after " -"another when the view function is created. Note that you can *not* use " -"the class based decorators since those would decorate the view class and " -"not the generated view function!" +"The decorators stored in the decorators list are applied one after another" +" when the view function is created. Note that you can *not* use the class" +" based decorators since those would decorate the view class and not the " +"generated view function!" msgstr "" #: flask.views.View.as_view:1 of msgid "" -"Converts the class into an actual view function that can be used with the" -" routing system. Internally this generates a function on the fly which " +"Converts the class into an actual view function that can be used with the " +"routing system. Internally this generates a function on the fly which " "will instantiate the :class:`View` on each request and call the " ":meth:`dispatch_request` method on it." msgstr "" @@ -6058,10 +6072,9 @@ msgstr "" #: ../../docstring flask.views.View.decorators:1 of msgid "" -"The canonical way to decorate class-based views is to decorate the return" -" value of as_view(). However since this moves parts of the logic from " -"the class declaration to the place where it's hooked into the routing " -"system." +"The canonical way to decorate class-based views is to decorate the return " +"value of as_view(). However since this moves parts of the logic from the " +"class declaration to the place where it's hooked into the routing system." msgstr "" #: ../../docstring flask.views.View.decorators:6 of @@ -6074,8 +6087,8 @@ msgstr "" #: flask.views.View.dispatch_request:1 of msgid "" "Subclasses have to override this method to implement the actual view " -"function code. This method is called with all the arguments from the URL" -" rule." +"function code. This method is called with all the arguments from the URL " +"rule." msgstr "" #: ../../docstring flask.views.View.methods:1 of @@ -6083,14 +6096,15 @@ msgid "A list of methods this view can handle." msgstr "" #: ../../docstring flask.views.View.provide_automatic_options:1 of -msgid "Setting this disables or force-enables the automatic options handling." +msgid "" +"Setting this disables or force-enables the automatic options handling." msgstr "" #: flask.views.MethodView:1 of msgid "" "A class-based view that dispatches request methods to the corresponding " -"class methods. For example, if you implement a ``get`` method, it will be" -" used to handle ``GET`` requests. ::" +"class methods. For example, if you implement a ``get`` method, it will be " +"used to handle ``GET`` requests. ::" msgstr "" #: ../../api.rst:597 @@ -6098,7 +6112,8 @@ msgid "URL Route Registrations" msgstr "" #: ../../api.rst:599 -msgid "Generally there are three ways to define rules for the routing system:" +msgid "" +"Generally there are three ways to define rules for the routing system:" msgstr "" #: ../../api.rst:601 @@ -6118,9 +6133,9 @@ msgstr "" #: ../../api.rst:606 msgid "" "Variable parts in the route can be specified with angular brackets " -"(``/user/``). By default a variable part in the URL accepts " -"any string without a slash however a different converter can be specified" -" as well by using ````." +"(``/user/``). By default a variable part in the URL accepts any" +" string without a slash however a different converter can be specified as " +"well by using ````." msgstr "" #: ../../api.rst:611 @@ -6196,8 +6211,8 @@ msgstr "" #: ../../api.rst:644 msgid "" -"If a rule ends with a slash and is requested without a slash by the user," -" the user is automatically redirected to the same page with a trailing " +"If a rule ends with a slash and is requested without a slash by the user, " +"the user is automatically redirected to the same page with a trailing " "slash attached." msgstr "" @@ -6209,15 +6224,15 @@ msgstr "" #: ../../api.rst:650 msgid "" -"This is consistent with how web servers deal with static files. This " -"also makes it possible to use relative link targets safely." +"This is consistent with how web servers deal with static files. This also" +" makes it possible to use relative link targets safely." msgstr "" #: ../../api.rst:653 msgid "" -"You can also define multiple rules for the same function. They have to " -"be unique however. Defaults can also be specified. Here for example is " -"a definition for a URL that accepts an optional page::" +"You can also define multiple rules for the same function. They have to be" +" unique however. Defaults can also be specified. Here for example is a " +"definition for a URL that accepts an optional page::" msgstr "" #: ../../api.rst:662 @@ -6229,8 +6244,8 @@ msgstr "" #: ../../api.rst:665 msgid "" "If a URL contains a default value, it will be redirected to its simpler " -"form with a 301 redirect. In the above example, ``/users/page/1`` will be" -" redirected to ``/users/``. If your route handles ``GET`` and ``POST`` " +"form with a 301 redirect. In the above example, ``/users/page/1`` will be " +"redirected to ``/users/``. If your route handles ``GET`` and ``POST`` " "requests, make sure the default route only handles ``GET``, as redirects " "can't preserve form data. ::" msgstr "" @@ -6268,9 +6283,9 @@ msgstr "" #: ../../api.rst:686 msgid "" -"the function to call when serving a request to the provided endpoint. If" -" this is not provided one can specify the function later by storing it in" -" the :attr:`~flask.Flask.view_functions` dictionary with the endpoint as " +"the function to call when serving a request to the provided endpoint. If " +"this is not provided one can specify the function later by storing it in " +"the :attr:`~flask.Flask.view_functions` dictionary with the endpoint as " "key." msgstr "" @@ -6290,8 +6305,8 @@ msgstr "" #: ../../api.rst:693 msgid "" -"specifies the rule for the subdomain in case subdomain matching is in " -"use. If not specified the default subdomain is assumed." +"specifies the rule for the subdomain in case subdomain matching is in use." +" If not specified the default subdomain is assumed." msgstr "" #: ../../api.rst:696 @@ -6301,8 +6316,8 @@ msgstr "" #: ../../api.rst:696 msgid "" "the options to be forwarded to the underlying " -":class:`~werkzeug.routing.Rule` object. A change to Werkzeug is handling" -" of method options. methods is a list of methods this rule should be " +":class:`~werkzeug.routing.Rule` object. A change to Werkzeug is handling " +"of method options. methods is a list of methods this rule should be " "limited to (``GET``, ``POST`` etc.). By default a rule just listens for " "``GET`` (and implicitly ``HEAD``). Starting with Flask 0.6, ``OPTIONS`` " "is implicitly added and handled by the standard request handling. They " @@ -6315,8 +6330,8 @@ msgstr "" #: ../../api.rst:710 msgid "" -"For internal usage the view functions can have some attributes attached " -"to customize behavior the view function would normally not have control " +"For internal usage the view functions can have some attributes attached to" +" customize behavior the view function would normally not have control " "over. The following attributes can be provided optionally to either " "override some defaults to :meth:`~flask.Flask.add_url_rule` or general " "behavior:" @@ -6326,8 +6341,8 @@ msgstr "" msgid "" "`__name__`: The name of a function is by default used as endpoint. If " "endpoint is provided explicitly this value is used. Additionally this " -"will be prefixed with the name of the blueprint by default which cannot " -"be customized from the function itself." +"will be prefixed with the name of the blueprint by default which cannot be" +" customized from the function itself." msgstr "" #: ../../api.rst:720 @@ -6348,8 +6363,8 @@ msgstr "" #: ../../api.rst:731 msgid "" -"`required_methods`: if this attribute is set, Flask will always add these" -" methods when registering a URL rule even if the methods were explicitly " +"`required_methods`: if this attribute is set, Flask will always add these " +"methods when registering a URL rule even if the methods were explicitly " "overridden in the ``route()`` call." msgstr "" @@ -6367,15 +6382,16 @@ msgstr "" #: flask.cli.FlaskGroup:1 of msgid "" -"Special subclass of the :class:`AppGroup` group that supports loading " -"more commands from the configured Flask app. Normally a developer does " -"not have to interface with this class but there are some very advanced " -"use cases for which it makes sense to create an instance of this. see " +"Special subclass of the :class:`AppGroup` group that supports loading more" +" commands from the configured Flask app. Normally a developer does not " +"have to interface with this class but there are some very advanced use " +"cases for which it makes sense to create an instance of this. see " ":ref:`custom-scripts`." msgstr "" #: flask.cli.FlaskGroup:7 of -msgid "if this is True then the default run and shell commands will be added." +msgid "" +"if this is True then the default run and shell commands will be added." msgstr "" #: flask.cli.FlaskGroup:9 of @@ -6384,8 +6400,8 @@ msgstr "" #: flask.cli.FlaskGroup:10 of msgid "" -"an optional callback that is passed the script info and returns the " -"loaded app." +"an optional callback that is passed the script info and returns the loaded" +" app." msgstr "" #: flask.cli.FlaskGroup:15 of @@ -6394,8 +6410,8 @@ msgstr "" #: flask.cli.FlaskGroup.get_command:1 of msgid "" -"Given a context and a command name, this returns a :class:`Command` " -"object if it exists or returns `None`." +"Given a context and a command name, this returns a :class:`Command` object" +" if it exists or returns `None`." msgstr "" #: flask.cli.FlaskGroup.list_commands:1 of @@ -6437,9 +6453,9 @@ msgstr "" msgid "" "the default behavior is to invoke the script in standalone mode. Click " "will then handle exceptions and convert them into error messages and the " -"function will never return but shut down the interpreter. If this is set" -" to `False` they will be propagated to the caller and the return value of" -" this function is the return value of :meth:`invoke`." +"function will never return but shut down the interpreter. If this is set " +"to `False` they will be propagated to the caller and the return value of " +"this function is the return value of :meth:`invoke`." msgstr "" #: flask.cli.FlaskGroup.main:27 of @@ -6472,9 +6488,9 @@ msgstr "" #: flask.cli.AppGroup:1 of msgid "" -"This works similar to a regular click :class:`~click.Group` but it " -"changes the behavior of the :meth:`command` decorator so that it " -"automatically wraps the functions in :func:`with_appcontext`." +"This works similar to a regular click :class:`~click.Group` but it changes" +" the behavior of the :meth:`command` decorator so that it automatically " +"wraps the functions in :func:`with_appcontext`." msgstr "" #: flask.cli.AppGroup:5 of @@ -6491,15 +6507,14 @@ msgstr "" #: flask.cli.AppGroup.group:1 of msgid "" "This works exactly like the method of the same name on a regular " -":class:`click.Group` but it defaults the group class to " -":class:`AppGroup`." +":class:`click.Group` but it defaults the group class to :class:`AppGroup`." msgstr "" #: flask.cli.ScriptInfo:1 of msgid "" "Helper object to deal with Flask applications. This is usually not " -"necessary to interface with as it's used internally in the dispatching to" -" click. In future versions of Flask this object will most likely play a " +"necessary to interface with as it's used internally in the dispatching to " +"click. In future versions of Flask this object will most likely play a " "bigger role. Typically it's created automatically by the " ":class:`FlaskGroup` but you can also manually create it and pass it " "onwards as click object." @@ -6528,7 +6543,8 @@ msgid "" msgstr "" #: flask.cli.load_dotenv:1 of -msgid "Load \"dotenv\" files in order of precedence to set environment variables." +msgid "" +"Load \"dotenv\" files in order of precedence to set environment variables." msgstr "" #: flask.cli.load_dotenv:3 of @@ -6561,8 +6577,8 @@ msgstr "" #: flask.cli.with_appcontext:1 of msgid "" -"Wraps a callback so that it's guaranteed to be executed with the script's" -" application context. If callbacks are registered directly to the " +"Wraps a callback so that it's guaranteed to be executed with the script's " +"application context. If callbacks are registered directly to the " "``app.cli`` object then they are wrapped with this function by default " "unless it's disabled." msgstr "" @@ -6585,15 +6601,15 @@ msgstr "" #: ../../docstring flask.cli.run_command:6 of msgid "" -"The reloader and debugger are enabled by default if FLASK_ENV=development" -" or FLASK_DEBUG=1." +"The reloader and debugger are enabled by default if FLASK_ENV=development " +"or FLASK_DEBUG=1." msgstr "" #: ../../docstring flask.cli.shell_command:1 of msgid "" "Run an interactive Python shell in the context of a given Flask " -"application. The application will populate the default namespace of this" -" shell according to its configuration." +"application. The application will populate the default namespace of this " +"shell according to its configuration." msgstr "" #: ../../docstring flask.cli.shell_command:5 of @@ -6613,4 +6629,3 @@ msgstr "" #~ msgid "Raises" #~ msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/appcontext.po b/docs/locales/zh_CN/LC_MESSAGES/appcontext.po index f262b83b4..7cb61a2c6 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/appcontext.po +++ b/docs/locales/zh_CN/LC_MESSAGES/appcontext.po @@ -23,17 +23,17 @@ msgstr "" #: ../../appcontext.rst:6 msgid "" -"The application context keeps track of the application-level data during " -"a request, CLI command, or other activity. Rather than passing the " -"application around to each function, the :data:`current_app` and " -":data:`g` proxies are accessed instead." +"The application context keeps track of the application-level data during a" +" request, CLI command, or other activity. Rather than passing the " +"application around to each function, the :data:`current_app` and :data:`g`" +" proxies are accessed instead." msgstr "" #: ../../appcontext.rst:11 msgid "" "This is similar to the :doc:`/reqcontext`, which keeps track of request-" -"level data during a request. A corresponding application context is " -"pushed when a request context is pushed." +"level data during a request. A corresponding application context is pushed" +" when a request context is pushed." msgstr "" #: ../../appcontext.rst:16 @@ -44,10 +44,10 @@ msgstr "" msgid "" "The :class:`Flask` application object has attributes, such as " ":attr:`~Flask.config`, that are useful to access within views and " -":doc:`CLI commands `. However, importing the ``app`` instance " -"within the modules in your project is prone to circular import issues. " -"When using the :doc:`app factory pattern ` or " -"writing reusable :doc:`blueprints ` or :doc:`extensions " +":doc:`CLI commands `. However, importing the ``app`` instance within" +" the modules in your project is prone to circular import issues. When " +"using the :doc:`app factory pattern ` or writing " +"reusable :doc:`blueprints ` or :doc:`extensions " "` there won't be an ``app`` instance to import at all." msgstr "" @@ -79,8 +79,8 @@ msgstr "" msgid "" "The application context is created and destroyed as necessary. When a " "Flask application begins handling a request, it pushes an application " -"context and a :doc:`request context `. When the request ends" -" it pops the request context then the application context. Typically, an " +"context and a :doc:`request context `. When the request ends " +"it pops the request context then the application context. Typically, an " "application context will have the same lifetime as a request." msgstr "" @@ -103,17 +103,17 @@ msgstr "" #: ../../appcontext.rst:67 msgid "" "If you see that error while configuring your application, such as when " -"initializing an extension, you can push a context manually since you have" -" direct access to the ``app``. Use :meth:`~Flask.app_context` in a " -"``with`` block, and everything that runs in the block will have access to" -" :data:`current_app`. ::" +"initializing an extension, you can push a context manually since you have " +"direct access to the ``app``. Use :meth:`~Flask.app_context` in a ``with``" +" block, and everything that runs in the block will have access to " +":data:`current_app`. ::" msgstr "" #: ../../appcontext.rst:81 msgid "" "If you see that error somewhere else in your code not related to " -"configuring the application, it most likely indicates that you should " -"move that code into a view function or CLI command." +"configuring the application, it most likely indicates that you should move" +" that code into a view function or CLI command." msgstr "" #: ../../appcontext.rst:87 @@ -124,8 +124,8 @@ msgstr "" msgid "" "The application context is a good place to store common data during a " "request or CLI command. Flask provides the :data:`g object ` for this " -"purpose. It is a simple namespace object that has the same lifetime as an" -" application context." +"purpose. It is a simple namespace object that has the same lifetime as an " +"application context." msgstr "" #: ../../appcontext.rst:95 @@ -154,14 +154,14 @@ msgid "" msgstr "" #: ../../appcontext.rst:109 -msgid "For example, you can manage a database connection using this pattern::" +msgid "" +"For example, you can manage a database connection using this pattern::" msgstr "" #: ../../appcontext.rst:126 msgid "" "During a request, every call to ``get_db()`` will return the same " -"connection, and it will be closed automatically at the end of the " -"request." +"connection, and it will be closed automatically at the end of the request." msgstr "" #: ../../appcontext.rst:130 @@ -192,8 +192,7 @@ msgstr "" #: ../../appcontext.rst:151 msgid "" "The application will call functions registered with " -":meth:`~Flask.teardown_appcontext` when the application context is " -"popped." +":meth:`~Flask.teardown_appcontext` when the application context is popped." msgstr "" #: ../../appcontext.rst:155 @@ -202,4 +201,3 @@ msgid "" "sent: :data:`appcontext_pushed`, :data:`appcontext_tearing_down`, and " ":data:`appcontext_popped`." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/async-await.po b/docs/locales/zh_CN/LC_MESSAGES/async-await.po index f22c84ebb..a6c17a05f 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/async-await.po +++ b/docs/locales/zh_CN/LC_MESSAGES/async-await.po @@ -48,18 +48,18 @@ msgstr "" #: ../../async-await.rst:31 msgid "" "Async functions require an event loop to run. Flask, as a WSGI " -"application, uses one worker to handle one request/response cycle. When a" -" request comes in to an async view, Flask will start an event loop in a " +"application, uses one worker to handle one request/response cycle. When a " +"request comes in to an async view, Flask will start an event loop in a " "thread, run the view function there, then return the result." msgstr "" #: ../../async-await.rst:36 msgid "" -"Each request still ties up one worker, even for async views. The upside " -"is that you can run async code within a view, for example to make " -"multiple concurrent database queries, HTTP requests to an external API, " -"etc. However, the number of requests your application can handle at one " -"time will remain the same." +"Each request still ties up one worker, even for async views. The upside is" +" that you can run async code within a view, for example to make multiple " +"concurrent database queries, HTTP requests to an external API, etc. " +"However, the number of requests your application can handle at one time " +"will remain the same." msgstr "" #: ../../async-await.rst:42 @@ -87,8 +87,8 @@ msgstr "" #: ../../async-await.rst:58 msgid "" "If you wish to use background tasks it is best to use a task queue to " -"trigger background work, rather than spawn tasks in a view function. With" -" that in mind you can spawn asyncio tasks by serving Flask with an ASGI " +"trigger background work, rather than spawn tasks in a view function. With " +"that in mind you can spawn asyncio tasks by serving Flask with an ASGI " "server and utilising the asgiref WsgiToAsgi adapter as described in " ":ref:`asgi`. This works as the adapter creates an event loop that runs " "continually." @@ -101,21 +101,21 @@ msgstr "" #: ../../async-await.rst:69 msgid "" "Flask's async support is less performant than async-first frameworks due " -"to the way it is implemented. If you have a mainly async codebase it " -"would make sense to consider `Quart`_. Quart is a reimplementation of " -"Flask based on the `ASGI`_ standard instead of WSGI. This allows it to " -"handle many concurrent requests, long running requests, and websockets " -"without requiring multiple worker processes or threads." +"to the way it is implemented. If you have a mainly async codebase it would" +" make sense to consider `Quart`_. Quart is a reimplementation of Flask " +"based on the `ASGI`_ standard instead of WSGI. This allows it to handle " +"many concurrent requests, long running requests, and websockets without " +"requiring multiple worker processes or threads." msgstr "" #: ../../async-await.rst:76 msgid "" -"It has also already been possible to run Flask with Gevent or Eventlet to" -" get many of the benefits of async request handling. These libraries " -"patch low-level Python functions to accomplish this, whereas ``async``/ " +"It has also already been possible to run Flask with Gevent or Eventlet to " +"get many of the benefits of async request handling. These libraries patch " +"low-level Python functions to accomplish this, whereas ``async``/ " "``await`` and ASGI use standard, modern Python capabilities. Deciding " -"whether you should use Flask, Quart, or something else is ultimately up " -"to understanding the specific needs of your project." +"whether you should use Flask, Quart, or something else is ultimately up to" +" understanding the specific needs of your project." msgstr "" #: ../../async-await.rst:88 @@ -136,8 +136,8 @@ msgstr "" msgid "" "Extension authors can support async functions by utilising the " ":meth:`flask.Flask.ensure_sync` method. For example, if the extension " -"provides a view function decorator add ``ensure_sync`` before calling the" -" decorated function," +"provides a view function decorator add ``ensure_sync`` before calling the " +"decorated function," msgstr "" #: ../../async-await.rst:111 @@ -153,8 +153,8 @@ msgstr "" #: ../../async-await.rst:118 msgid "" "At the moment Flask only supports :mod:`asyncio`. It's possible to " -"override :meth:`flask.Flask.ensure_sync` to change how async functions " -"are wrapped to use a different library." +"override :meth:`flask.Flask.ensure_sync` to change how async functions are" +" wrapped to use a different library." msgstr "" #~ msgid "" @@ -166,4 +166,3 @@ msgstr "" #~ " allows views to be defined with " #~ "``async def`` and use ``await``." #~ msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/becomingbig.po b/docs/locales/zh_CN/LC_MESSAGES/becomingbig.po index 9f32296d0..f54e6ef72 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/becomingbig.po +++ b/docs/locales/zh_CN/LC_MESSAGES/becomingbig.po @@ -37,8 +37,8 @@ msgid "" "top of existing well-used tools Werkzeug (WSGI) and Jinja (templating), " "and as it developed, it became useful to a wide audience. As you grow " "your codebase, don't just use Flask -- understand it. Read the source. " -"Flask's code is written to be read; its documentation is published so you" -" can use its internal APIs. Flask sticks to documented APIs in upstream " +"Flask's code is written to be read; its documentation is published so you " +"can use its internal APIs. Flask sticks to documented APIs in upstream " "libraries, and documents its internal utilities so that you can find the " "hook points needed for your project." msgstr "" @@ -51,12 +51,12 @@ msgstr "" msgid "" "The :doc:`/api` docs are full of available overrides, hook points, and " ":doc:`/signals`. You can provide custom classes for things like the " -"request and response objects. Dig deeper on the APIs you use, and look " -"for the customizations which are available out of the box in a Flask " -"release. Look for ways in which your project can be refactored into a " -"collection of utilities and Flask extensions. Explore the many " -":doc:`/extensions` in the community, and look for patterns to build your " -"own extensions if you do not find the tools you need." +"request and response objects. Dig deeper on the APIs you use, and look for" +" the customizations which are available out of the box in a Flask release." +" Look for ways in which your project can be refactored into a collection " +"of utilities and Flask extensions. Explore the many :doc:`/extensions` in " +"the community, and look for patterns to build your own extensions if you " +"do not find the tools you need." msgstr "" #: ../../becomingbig.rst:31 @@ -65,12 +65,12 @@ msgstr "" #: ../../becomingbig.rst:33 msgid "" -"The :class:`~flask.Flask` class has many methods designed for " -"subclassing. You can quickly add or customize behavior by subclassing " -":class:`~flask.Flask` (see the linked method docs) and using that " -"subclass wherever you instantiate an application class. This works well " -"with :doc:`/patterns/appfactories`. See :doc:`/patterns/subclassing` for " -"an example." +"The :class:`~flask.Flask` class has many methods designed for subclassing." +" You can quickly add or customize behavior by subclassing " +":class:`~flask.Flask` (see the linked method docs) and using that subclass" +" wherever you instantiate an application class. This works well with " +":doc:`/patterns/appfactories`. See :doc:`/patterns/subclassing` for an " +"example." msgstr "" #: ../../becomingbig.rst:40 @@ -80,10 +80,10 @@ msgstr "" #: ../../becomingbig.rst:42 msgid "" "The :doc:`/patterns/appdispatch` pattern shows in detail how to apply " -"middleware. You can introduce WSGI middleware to wrap your Flask " -"instances and introduce fixes and changes at the layer between your Flask" -" application and your HTTP server. Werkzeug includes several `middlewares" -" `_." +"middleware. You can introduce WSGI middleware to wrap your Flask instances" +" and introduce fixes and changes at the layer between your Flask " +"application and your HTTP server. Werkzeug includes several `middlewares " +"`_." msgstr "" #: ../../becomingbig.rst:49 @@ -95,11 +95,11 @@ msgid "" "If none of the above options work, fork Flask. The majority of code of " "Flask is within Werkzeug and Jinja2. These libraries do the majority of " "the work. Flask is just the paste that glues those together. For every " -"project there is the point where the underlying framework gets in the way" -" (due to assumptions the original developers had). This is natural " -"because if this would not be the case, the framework would be a very " -"complex system to begin with which causes a steep learning curve and a " -"lot of user frustration." +"project there is the point where the underlying framework gets in the way " +"(due to assumptions the original developers had). This is natural because" +" if this would not be the case, the framework would be a very complex " +"system to begin with which causes a steep learning curve and a lot of user" +" frustration." msgstr "" #: ../../becomingbig.rst:59 @@ -125,31 +125,31 @@ msgstr "" #: ../../becomingbig.rst:73 msgid "" -"For many web applications the complexity of the code is less an issue " -"than the scaling for the number of users or data entries expected. Flask" -" by itself is only limited in terms of scaling by your application code, " -"the data store you want to use and the Python implementation and " -"webserver you are running on." +"For many web applications the complexity of the code is less an issue than" +" the scaling for the number of users or data entries expected. Flask by " +"itself is only limited in terms of scaling by your application code, the " +"data store you want to use and the Python implementation and webserver you" +" are running on." msgstr "" #: ../../becomingbig.rst:79 msgid "" "Scaling well means for example that if you double the amount of servers " -"you get about twice the performance. Scaling bad means that if you add a" -" new server the application won't perform any better or would not even " +"you get about twice the performance. Scaling bad means that if you add a " +"new server the application won't perform any better or would not even " "support a second server." msgstr "" #: ../../becomingbig.rst:84 msgid "" -"There is only one limiting factor regarding scaling in Flask which are " -"the context local proxies. They depend on context which in Flask is " -"defined as being either a thread, process or greenlet. If your server " -"uses some kind of concurrency that is not based on threads or greenlets, " -"Flask will no longer be able to support these global proxies. However " -"the majority of servers are using either threads, greenlets or separate " -"processes to achieve concurrency which are all methods well supported by " -"the underlying Werkzeug library." +"There is only one limiting factor regarding scaling in Flask which are the" +" context local proxies. They depend on context which in Flask is defined " +"as being either a thread, process or greenlet. If your server uses some " +"kind of concurrency that is not based on threads or greenlets, Flask will " +"no longer be able to support these global proxies. However the majority " +"of servers are using either threads, greenlets or separate processes to " +"achieve concurrency which are all methods well supported by the underlying" +" Werkzeug library." msgstr "" #: ../../becomingbig.rst:94 @@ -158,11 +158,9 @@ msgstr "" #: ../../becomingbig.rst:96 msgid "" -"The Flask developers keep the framework accessible to users with " -"codebases big and small. If you find an obstacle in your way, caused by " -"Flask, don't hesitate to contact the developers on the mailing list or " -"Discord server. The best way for the Flask and Flask extension " -"developers to improve the tools for larger applications is getting " -"feedback from users." +"The Flask developers keep the framework accessible to users with codebases" +" big and small. If you find an obstacle in your way, caused by Flask, " +"don't hesitate to contact the developers on the mailing list or Discord " +"server. The best way for the Flask and Flask extension developers to " +"improve the tools for larger applications is getting feedback from users." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/blueprints.po b/docs/locales/zh_CN/LC_MESSAGES/blueprints.po index 5a1fe93e9..9a7728440 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/blueprints.po +++ b/docs/locales/zh_CN/LC_MESSAGES/blueprints.po @@ -23,14 +23,13 @@ msgstr "" #: ../../blueprints.rst:8 msgid "" -"Flask uses a concept of *blueprints* for making application components " -"and supporting common patterns within an application or across " -"applications. Blueprints can greatly simplify how large applications work" -" and provide a central means for Flask extensions to register operations " -"on applications. A :class:`Blueprint` object works similarly to a " -":class:`Flask` application object, but it is not actually an application." -" Rather it is a *blueprint* of how to construct or extend an " -"application." +"Flask uses a concept of *blueprints* for making application components and" +" supporting common patterns within an application or across applications. " +"Blueprints can greatly simplify how large applications work and provide a " +"central means for Flask extensions to register operations on applications." +" A :class:`Blueprint` object works similarly to a :class:`Flask` " +"application object, but it is not actually an application. Rather it is a" +" *blueprint* of how to construct or extend an application." msgstr "" #: ../../blueprints.rst:17 @@ -43,16 +42,16 @@ msgstr "" #: ../../blueprints.rst:21 msgid "" -"Factor an application into a set of blueprints. This is ideal for larger" -" applications; a project could instantiate an application object, " +"Factor an application into a set of blueprints. This is ideal for larger " +"applications; a project could instantiate an application object, " "initialize several extensions, and register a collection of blueprints." msgstr "" #: ../../blueprints.rst:24 msgid "" "Register a blueprint on an application at a URL prefix and/or subdomain. " -"Parameters in the URL prefix/subdomain become common view arguments (with" -" defaults) across all view functions in the blueprint." +"Parameters in the URL prefix/subdomain become common view arguments (with " +"defaults) across all view functions in the blueprint." msgstr "" #: ../../blueprints.rst:27 @@ -76,8 +75,8 @@ msgstr "" #: ../../blueprints.rst:35 msgid "" -"A blueprint in Flask is not a pluggable app because it is not actually an" -" application -- it's a set of operations which can be registered on an " +"A blueprint in Flask is not a pluggable app because it is not actually an " +"application -- it's a set of operations which can be registered on an " "application, even multiple times. Why not have multiple application " "objects? You can do that (see :doc:`/patterns/appdispatch`), but your " "applications will have separate configs and will be managed at the WSGI " @@ -87,10 +86,10 @@ msgstr "" #: ../../blueprints.rst:42 msgid "" "Blueprints instead provide separation at the Flask level, share " -"application config, and can change an application object as necessary " -"with being registered. The downside is that you cannot unregister a " -"blueprint once an application was created without having to destroy the " -"whole application object." +"application config, and can change an application object as necessary with" +" being registered. The downside is that you cannot unregister a blueprint " +"once an application was created without having to destroy the whole " +"application object." msgstr "" #: ../../blueprints.rst:49 @@ -99,10 +98,10 @@ msgstr "" #: ../../blueprints.rst:51 msgid "" -"The basic concept of blueprints is that they record operations to execute" -" when registered on an application. Flask associates view functions with" -" blueprints when dispatching requests and generating URLs from one " -"endpoint to another." +"The basic concept of blueprints is that they record operations to execute " +"when registered on an application. Flask associates view functions with " +"blueprints when dispatching requests and generating URLs from one endpoint" +" to another." msgstr "" #: ../../blueprints.rst:57 @@ -120,10 +119,10 @@ msgid "" "When you bind a function with the help of the ``@simple_page.route`` " "decorator, the blueprint will record the intention of registering the " "function ``show`` on the application when it's later registered. " -"Additionally it will prefix the endpoint of the function with the name of" -" the blueprint which was given to the :class:`Blueprint` constructor (in " -"this case also ``simple_page``). The blueprint's name does not modify the" -" URL, only the endpoint." +"Additionally it will prefix the endpoint of the function with the name of " +"the blueprint which was given to the :class:`Blueprint` constructor (in " +"this case also ``simple_page``). The blueprint's name does not modify the " +"URL, only the endpoint." msgstr "" #: ../../blueprints.rst:85 @@ -158,9 +157,9 @@ msgstr "" #: ../../blueprints.rst:119 msgid "" -"On top of that you can register blueprints multiple times though not " -"every blueprint might respond properly to that. In fact it depends on " -"how the blueprint is implemented if it can be mounted more than once." +"On top of that you can register blueprints multiple times though not every" +" blueprint might respond properly to that. In fact it depends on how the " +"blueprint is implemented if it can be mounted more than once." msgstr "" #: ../../blueprints.rst:124 @@ -208,11 +207,11 @@ msgstr "" #: ../../blueprints.rst:161 msgid "" "The folder is inferred from the second argument to :class:`Blueprint` " -"which is usually `__name__`. This argument specifies what logical Python" -" module or package corresponds to the blueprint. If it points to an " -"actual Python package that package (which is a folder on the filesystem) " -"is the resource folder. If it's a module, the package the module is " -"contained in will be the resource folder. You can access the " +"which is usually `__name__`. This argument specifies what logical Python " +"module or package corresponds to the blueprint. If it points to an actual" +" Python package that package (which is a folder on the filesystem) is the " +"resource folder. If it's a module, the package the module is contained in" +" will be the resource folder. You can access the " ":attr:`Blueprint.root_path` property to see what the resource folder is::" msgstr "" @@ -228,9 +227,9 @@ msgstr "" #: ../../blueprints.rst:181 msgid "" -"A blueprint can expose a folder with static files by providing the path " -"to the folder on the filesystem with the ``static_folder`` argument. It " -"is either an absolute path or relative to the blueprint's location::" +"A blueprint can expose a folder with static files by providing the path to" +" the folder on the filesystem with the ``static_folder`` argument. It is " +"either an absolute path or relative to the blueprint's location::" msgstr "" #: ../../blueprints.rst:187 @@ -244,19 +243,18 @@ msgstr "" #: ../../blueprints.rst:193 msgid "" -"The endpoint is named ``blueprint_name.static``. You can generate URLs to" -" it with :func:`url_for` like you would with the static folder of the " +"The endpoint is named ``blueprint_name.static``. You can generate URLs to " +"it with :func:`url_for` like you would with the static folder of the " "application::" msgstr "" #: ../../blueprints.rst:199 msgid "" "However, if the blueprint does not have a ``url_prefix``, it is not " -"possible to access the blueprint's static folder. This is because the URL" -" would be ``/static`` in this case, and the application's ``/static`` " -"route takes precedence. Unlike template folders, blueprint static folders" -" are not searched if the file does not exist in the application static " -"folder." +"possible to access the blueprint's static folder. This is because the URL " +"would be ``/static`` in this case, and the application's ``/static`` route" +" takes precedence. Unlike template folders, blueprint static folders are " +"not searched if the file does not exist in the application static folder." msgstr "" #: ../../blueprints.rst:207 @@ -265,9 +263,8 @@ msgstr "" #: ../../blueprints.rst:209 msgid "" -"If you want the blueprint to expose templates you can do that by " -"providing the `template_folder` parameter to the :class:`Blueprint` " -"constructor::" +"If you want the blueprint to expose templates you can do that by providing" +" the `template_folder` parameter to the :class:`Blueprint` constructor::" msgstr "" #: ../../blueprints.rst:214 @@ -279,32 +276,31 @@ msgstr "" #: ../../blueprints.rst:217 msgid "" "The template folder is added to the search path of templates but with a " -"lower priority than the actual application's template folder. That way " -"you can easily override templates that a blueprint provides in the actual" -" application. This also means that if you don't want a blueprint template" -" to be accidentally overridden, make sure that no other blueprint or " -"actual application template has the same relative path. When multiple " -"blueprints provide the same relative template path the first blueprint " -"registered takes precedence over the others." +"lower priority than the actual application's template folder. That way you" +" can easily override templates that a blueprint provides in the actual " +"application. This also means that if you don't want a blueprint template " +"to be accidentally overridden, make sure that no other blueprint or actual" +" application template has the same relative path. When multiple blueprints" +" provide the same relative template path the first blueprint registered " +"takes precedence over the others." msgstr "" #: ../../blueprints.rst:226 msgid "" -"So if you have a blueprint in the folder ``yourapplication/admin`` and " -"you want to render the template ``'admin/index.html'`` and you have " -"provided ``templates`` as a `template_folder` you will have to create a " -"file like this: :file:`yourapplication/admin/templates/admin/index.html`." -" The reason for the extra ``admin`` folder is to avoid getting our " -"template overridden by a template named ``index.html`` in the actual " -"application template folder." +"So if you have a blueprint in the folder ``yourapplication/admin`` and you" +" want to render the template ``'admin/index.html'`` and you have provided " +"``templates`` as a `template_folder` you will have to create a file like " +"this: :file:`yourapplication/admin/templates/admin/index.html`. The reason" +" for the extra ``admin`` folder is to avoid getting our template " +"overridden by a template named ``index.html`` in the actual application " +"template folder." msgstr "" #: ../../blueprints.rst:234 msgid "" -"To further reiterate this: if you have a blueprint named ``admin`` and " -"you want to render a template called :file:`index.html` which is specific" -" to this blueprint, the best idea is to lay out your templates like " -"this::" +"To further reiterate this: if you have a blueprint named ``admin`` and you" +" want to render a template called :file:`index.html` which is specific to " +"this blueprint, the best idea is to lay out your templates like this::" msgstr "" #: ../../blueprints.rst:246 @@ -312,8 +308,8 @@ msgid "" "And then when you want to render the template, use " ":file:`admin/index.html` as the name to look up the template by. If you " "encounter problems loading the correct templates enable the " -"``EXPLAIN_TEMPLATE_LOADING`` config variable which will instruct Flask to" -" print out the steps it goes through to locate templates on every " +"``EXPLAIN_TEMPLATE_LOADING`` config variable which will instruct Flask to " +"print out the steps it goes through to locate templates on every " "``render_template`` call." msgstr "" @@ -325,22 +321,20 @@ msgstr "" msgid "" "If you want to link from one page to another you can use the " ":func:`url_for` function just like you normally would do just that you " -"prefix the URL endpoint with the name of the blueprint and a dot " -"(``.``)::" +"prefix the URL endpoint with the name of the blueprint and a dot (``.``)::" msgstr "" #: ../../blueprints.rst:261 msgid "" "Additionally if you are in a view function of a blueprint or a rendered " "template and you want to link to another endpoint of the same blueprint, " -"you can use relative redirects by prefixing the endpoint with a dot " -"only::" +"you can use relative redirects by prefixing the endpoint with a dot only::" msgstr "" #: ../../blueprints.rst:267 msgid "" -"This will link to ``admin.index`` for instance in case the current " -"request was dispatched to any other admin blueprint endpoint." +"This will link to ``admin.index`` for instance in case the current request" +" was dispatched to any other admin blueprint endpoint." msgstr "" #: ../../blueprints.rst:272 @@ -362,17 +356,16 @@ msgstr "" msgid "" "Most errorhandlers will simply work as expected; however, there is a " "caveat concerning handlers for 404 and 405 exceptions. These " -"errorhandlers are only invoked from an appropriate ``raise`` statement or" -" a call to ``abort`` in another of the blueprint's view functions; they " -"are not invoked by, e.g., an invalid URL access. This is because the " +"errorhandlers are only invoked from an appropriate ``raise`` statement or " +"a call to ``abort`` in another of the blueprint's view functions; they are" +" not invoked by, e.g., an invalid URL access. This is because the " "blueprint does not \"own\" a certain URL space, so the application " -"instance has no way of knowing which blueprint error handler it should " -"run if given an invalid URL. If you would like to execute different " -"handling strategies for these errors based on URL prefixes, they may be " -"defined at the application level using the ``request`` proxy object::" +"instance has no way of knowing which blueprint error handler it should run" +" if given an invalid URL. If you would like to execute different handling" +" strategies for these errors based on URL prefixes, they may be defined at" +" the application level using the ``request`` proxy object::" msgstr "" #: ../../blueprints.rst:302 msgid "See :doc:`/errorhandling`." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/changes.po b/docs/locales/zh_CN/LC_MESSAGES/changes.po index 06135a0ca..ce5def899 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/changes.po +++ b/docs/locales/zh_CN/LC_MESSAGES/changes.po @@ -49,8 +49,8 @@ msgstr "" #: ../../../CHANGES.rst:19 msgid "" -"Fixed the issue where typing requires template global decorators to " -"accept functions with no arguments. :issue:`4098`" +"Fixed the issue where typing requires template global decorators to accept" +" functions with no arguments. :issue:`4098`" msgstr "" #: ../../../CHANGES.rst:24 @@ -92,9 +92,9 @@ msgstr "" #: ../../../CHANGES.rst:38 msgid "" -"Show an error when a blueprint name contains a dot. The ``.`` has special" -" meaning, it is used to separate (nested) blueprint names and the " -"endpoint name. :issue:`4041`" +"Show an error when a blueprint name contains a dot. The ``.`` has special " +"meaning, it is used to separate (nested) blueprint names and the endpoint " +"name. :issue:`4041`" msgstr "" #: ../../../CHANGES.rst:41 @@ -106,8 +106,8 @@ msgstr "" #: ../../../CHANGES.rst:43 msgid "" "Roll back a change to the order that URL matching was done. The URL is " -"again matched after the session is loaded, so the session is available in" -" custom URL converters. :issue:`4053`" +"again matched after the session is loaded, so the session is available in " +"custom URL converters. :issue:`4053`" msgstr "" #: ../../../CHANGES.rst:46 @@ -131,9 +131,9 @@ msgstr "" #: ../../../CHANGES.rst:53 msgid "" -"``register_blueprint`` takes a ``name`` option to change the (pre-dotted)" -" name the blueprint is registered with. This allows the same blueprint to" -" be registered multiple times with unique names for ``url_for``. " +"``register_blueprint`` takes a ``name`` option to change the (pre-dotted) " +"name the blueprint is registered with. This allows the same blueprint to " +"be registered multiple times with unique names for ``url_for``. " "Registering the same blueprint with the same name multiple times is " "deprecated. :issue:`1091`" msgstr "" @@ -156,8 +156,8 @@ msgstr "" #: ../../../CHANGES.rst:67 msgid "" -"Bump minimum versions of other Pallets projects: Werkzeug >= 2, Jinja2 >=" -" 3, MarkupSafe >= 2, ItsDangerous >= 2, Click >= 8. Be sure to check the " +"Bump minimum versions of other Pallets projects: Werkzeug >= 2, Jinja2 >= " +"3, MarkupSafe >= 2, ItsDangerous >= 2, Click >= 8. Be sure to check the " "change logs for each project. For better compatibility with other " "applications (e.g. Celery) that still require Click 7, there is no hard " "dependency on Click 8 yet, but using Click 7 will trigger a " @@ -189,35 +189,35 @@ msgstr "" #: ../../../CHANGES.rst:81 msgid "" -"Add :meth:`sessions.SessionInterface.get_cookie_name` to allow setting " -"the session cookie name dynamically. :pr:`3369`" +"Add :meth:`sessions.SessionInterface.get_cookie_name` to allow setting the" +" session cookie name dynamically. :pr:`3369`" msgstr "" #: ../../../CHANGES.rst:83 msgid "" -"Add :meth:`Config.from_file` to load config using arbitrary file loaders," -" such as ``toml.load`` or ``json.load``. :meth:`Config.from_json` is " +"Add :meth:`Config.from_file` to load config using arbitrary file loaders, " +"such as ``toml.load`` or ``json.load``. :meth:`Config.from_json` is " "deprecated in favor of this. :pr:`3398`" msgstr "" #: ../../../CHANGES.rst:86 msgid "" -"The ``flask run`` command will only defer errors on reload. Errors " -"present during the initial call will cause the server to exit with the " -"traceback immediately. :issue:`3431`" +"The ``flask run`` command will only defer errors on reload. Errors present" +" during the initial call will cause the server to exit with the traceback " +"immediately. :issue:`3431`" msgstr "" #: ../../../CHANGES.rst:89 msgid "" ":func:`send_file` raises a :exc:`ValueError` when passed an :mod:`io` " -"object in text mode. Previously, it would respond with 200 OK and an " -"empty file. :issue:`3358`" +"object in text mode. Previously, it would respond with 200 OK and an empty" +" file. :issue:`3358`" msgstr "" #: ../../../CHANGES.rst:92 msgid "" -"When using ad-hoc certificates, check for the cryptography library " -"instead of PyOpenSSL. :pr:`3492`" +"When using ad-hoc certificates, check for the cryptography library instead" +" of PyOpenSSL. :pr:`3492`" msgstr "" #: ../../../CHANGES.rst:94 @@ -235,8 +235,8 @@ msgstr "" #: ../../../CHANGES.rst:99 msgid "" "When returning a ``(response, headers)`` tuple from a view, the headers " -"replace rather than extend existing headers on the response. For example," -" this allows setting the ``Content-Type`` for ``jsonify()``. Use " +"replace rather than extend existing headers on the response. For example, " +"this allows setting the ``Content-Type`` for ``jsonify()``. Use " "``response.headers.extend()`` if extending is desired. :issue:`3628`" msgstr "" @@ -244,8 +244,8 @@ msgstr "" msgid "" "The ``Scaffold`` class provides a common API for the ``Flask`` and " "``Blueprint`` classes. ``Blueprint`` information is stored in attributes " -"just like ``Flask``, rather than opaque lambda functions. This is " -"intended to improve consistency and maintainability. :issue:`3215`" +"just like ``Flask``, rather than opaque lambda functions. This is intended" +" to improve consistency and maintainability. :issue:`3215`" msgstr "" #: ../../../CHANGES.rst:109 @@ -274,16 +274,16 @@ msgstr "" #: ../../../CHANGES.rst:118 msgid "" -"``send_file`` passes ``download_name`` even if ``as_attachment=False`` by" -" using ``Content-Disposition: inline``. :pr:`3828`" +"``send_file`` passes ``download_name`` even if ``as_attachment=False`` by " +"using ``Content-Disposition: inline``. :pr:`3828`" msgstr "" #: ../../../CHANGES.rst:121 msgid "" "``send_file`` sets ``conditional=True`` and ``max_age=None`` by default. " "``Cache-Control`` is set to ``no-cache`` if ``max_age`` is not set, " -"otherwise ``public``. This tells browsers to validate conditional " -"requests instead of using a timed cache. :pr:`3828`" +"otherwise ``public``. This tells browsers to validate conditional requests" +" instead of using a timed cache. :pr:`3828`" msgstr "" #: ../../../CHANGES.rst:125 @@ -426,24 +426,23 @@ msgstr "" #: ../../../CHANGES.rst:194 msgid "" "Error handlers for ``InternalServerError`` or ``500`` will always be " -"passed an instance of ``InternalServerError``. If they are invoked due to" -" an unhandled exception, that original exception is now available as " -"``e.original_exception`` rather than being passed directly to the " -"handler. The same is true if the handler is for the base " -"``HTTPException``. This makes error handler behavior more consistent. " -":pr:`3266`" +"passed an instance of ``InternalServerError``. If they are invoked due to " +"an unhandled exception, that original exception is now available as " +"``e.original_exception`` rather than being passed directly to the handler." +" The same is true if the handler is for the base ``HTTPException``. This " +"makes error handler behavior more consistent. :pr:`3266`" msgstr "" #: ../../../CHANGES.rst:202 msgid "" -":meth:`Flask.finalize_request` is called for all unhandled exceptions " -"even if there is no ``500`` error handler." +":meth:`Flask.finalize_request` is called for all unhandled exceptions even" +" if there is no ``500`` error handler." msgstr "" #: ../../../CHANGES.rst:205 msgid "" -":attr:`Flask.logger` takes the same name as :attr:`Flask.name` (the value" -" passed as ``Flask(import_name)``. This reverts 1.0's behavior of always " +":attr:`Flask.logger` takes the same name as :attr:`Flask.name` (the value " +"passed as ``Flask(import_name)``. This reverts 1.0's behavior of always " "logging to ``\"flask.app\"``, in order to support multiple apps in the " "same process. A warning will be shown if old configuration is detected " "that needs to be moved. :issue:`2866`" @@ -452,15 +451,15 @@ msgstr "" #: ../../../CHANGES.rst:211 msgid "" ":meth:`flask.RequestContext.copy` includes the current session object in " -"the request context copy. This prevents ``session`` pointing to an out-" -"of-date object. :issue:`2935`" +"the request context copy. This prevents ``session`` pointing to an out-of-" +"date object. :issue:`2935`" msgstr "" #: ../../../CHANGES.rst:214 msgid "" "Using built-in RequestContext, unprintable Unicode characters in Host " -"header will result in a HTTP 400 response and not HTTP 500 as previously." -" :pr:`2994`" +"header will result in a HTTP 400 response and not HTTP 500 as previously. " +":pr:`2994`" msgstr "" #: ../../../CHANGES.rst:217 @@ -489,16 +488,16 @@ msgstr "" #: ../../../CHANGES.rst:226 msgid "" -":attr:`Flask.jinja_options` is a ``dict`` instead of an ``ImmutableDict``" -" to allow easier configuration. Changes must still be made before " -"creating the environment. :pr:`3190`" +":attr:`Flask.jinja_options` is a ``dict`` instead of an ``ImmutableDict`` " +"to allow easier configuration. Changes must still be made before creating " +"the environment. :pr:`3190`" msgstr "" #: ../../../CHANGES.rst:229 msgid "" -"Flask's ``JSONMixin`` for the request and response wrappers was moved " -"into Werkzeug. Use Werkzeug's version with Flask-specific support. This " -"bumps the Werkzeug dependency to >= 0.15. :issue:`3125`" +"Flask's ``JSONMixin`` for the request and response wrappers was moved into" +" Werkzeug. Use Werkzeug's version with Flask-specific support. This bumps " +"the Werkzeug dependency to >= 0.15. :issue:`3125`" msgstr "" #: ../../../CHANGES.rst:233 @@ -509,7 +508,8 @@ msgid "" msgstr "" #: ../../../CHANGES.rst:236 -msgid "Support ``static_url_path`` that ends with a forward slash. :issue:`3134`" +msgid "" +"Support ``static_url_path`` that ends with a forward slash. :issue:`3134`" msgstr "" #: ../../../CHANGES.rst:238 @@ -532,15 +532,15 @@ msgstr "" #: ../../../CHANGES.rst:244 msgid "" -"The development server port can be set to 0, which tells the OS to pick " -"an available port. :issue:`2926`" +"The development server port can be set to 0, which tells the OS to pick an" +" available port. :issue:`2926`" msgstr "" #: ../../../CHANGES.rst:246 msgid "" -"The return value from :meth:`cli.load_dotenv` is more consistent with the" -" documentation. It will return ``False`` if python-dotenv is not " -"installed, or if the given path isn't a file. :issue:`2937`" +"The return value from :meth:`cli.load_dotenv` is more consistent with the " +"documentation. It will return ``False`` if python-dotenv is not installed," +" or if the given path isn't a file. :issue:`2937`" msgstr "" #: ../../../CHANGES.rst:249 @@ -559,8 +559,8 @@ msgstr "" #: ../../../CHANGES.rst:254 msgid "" "Allow returning a dictionary from a view function. Similar to how " -"returning a string will produce a ``text/html`` response, returning a " -"dict will call ``jsonify`` to produce a ``application/json`` response. " +"returning a string will produce a ``text/html`` response, returning a dict" +" will call ``jsonify`` to produce a ``application/json`` response. " ":pr:`3111`" msgstr "" @@ -592,17 +592,16 @@ msgstr "" #: ../../../CHANGES.rst:268 msgid "" -"The ``flask run`` command no longer fails if Python is not built with SSL" -" support. Using the ``--cert`` option will show an appropriate error " +"The ``flask run`` command no longer fails if Python is not built with SSL " +"support. Using the ``--cert`` option will show an appropriate error " "message. :issue:`3211`" msgstr "" #: ../../../CHANGES.rst:271 msgid "" "URL matching now occurs after the request context is pushed, rather than " -"when it's created. This allows custom URL converters to access the app " -"and request contexts, such as to query a database for an id. " -":issue:`3088`" +"when it's created. This allows custom URL converters to access the app and" +" request contexts, such as to query a database for an id. :issue:`3088`" msgstr "" #: ../../../CHANGES.rst:278 @@ -665,16 +664,15 @@ msgstr "" #: ../../../CHANGES.rst:306 msgid "" -"A catch-all error handler registered for ``HTTPException`` will not " -"handle ``RoutingException``, which is used internally during routing. " -"This fixes the unexpected behavior that had been introduced in 1.0. " -":pr:`2986`" +"A catch-all error handler registered for ``HTTPException`` will not handle" +" ``RoutingException``, which is used internally during routing. This fixes" +" the unexpected behavior that had been introduced in 1.0. :pr:`2986`" msgstr "" #: ../../../CHANGES.rst:310 msgid "" -"Passing the ``json`` argument to ``app.test_client`` does not push/pop an" -" extra app context. :issue:`2900`" +"Passing the ``json`` argument to ``app.test_client`` does not push/pop an " +"extra app context. :issue:`2900`" msgstr "" #: ../../../CHANGES.rst:315 @@ -720,8 +718,8 @@ msgstr "" #: ../../../CHANGES.rst:334 msgid "" "Extra slashes between a blueprint's ``url_prefix`` and a route URL are " -"merged. This fixes some backwards compatibility issues with the change in" -" 1.0. :issue:`2731`, :issue:`2742`" +"merged. This fixes some backwards compatibility issues with the change in " +"1.0. :issue:`2731`, :issue:`2742`" msgstr "" #: ../../../CHANGES.rst:337 @@ -733,8 +731,8 @@ msgstr "" #: ../../../CHANGES.rst:340 msgid "" -"The ``FLASK_SKIP_DOTENV`` environment variable can be set to ``1`` to " -"skip automatically loading dotenv files. :issue:`2722`" +"The ``FLASK_SKIP_DOTENV`` environment variable can be set to ``1`` to skip" +" automatically loading dotenv files. :issue:`2722`" msgstr "" #: ../../../CHANGES.rst:345 @@ -757,21 +755,21 @@ msgstr "" #: ../../../CHANGES.rst:353 msgid "" -"Skip :meth:`app.run ` when a Flask application is run from the" -" command line. This avoids some behavior that was confusing to debug." +"Skip :meth:`app.run ` when a Flask application is run from the " +"command line. This avoids some behavior that was confusing to debug." msgstr "" #: ../../../CHANGES.rst:356 msgid "" "Change the default for :data:`JSONIFY_PRETTYPRINT_REGULAR` to ``False``. " -":func:`~json.jsonify` returns a compact format by default, and an " -"indented format in debug mode. :pr:`2193`" +":func:`~json.jsonify` returns a compact format by default, and an indented" +" format in debug mode. :pr:`2193`" msgstr "" #: ../../../CHANGES.rst:359 msgid "" -":meth:`Flask.__init__ ` accepts the ``host_matching`` argument and" -" sets it on :attr:`~Flask.url_map`. :issue:`1559`" +":meth:`Flask.__init__ ` accepts the ``host_matching`` argument and " +"sets it on :attr:`~Flask.url_map`. :issue:`1559`" msgstr "" #: ../../../CHANGES.rst:361 @@ -782,7 +780,8 @@ msgid "" msgstr "" #: ../../../CHANGES.rst:364 -msgid ":func:`send_file` supports Unicode in ``attachment_filename``. :pr:`2223`" +msgid "" +":func:`send_file` supports Unicode in ``attachment_filename``. :pr:`2223`" msgstr "" #: ../../../CHANGES.rst:366 @@ -818,15 +817,15 @@ msgstr "" #: ../../../CHANGES.rst:378 msgid "" -":meth:`Flask.make_response` raises ``TypeError`` instead of " -"``ValueError`` for bad response types. The error messages have been " -"improved to describe why the type is invalid. :pr:`2256`" +":meth:`Flask.make_response` raises ``TypeError`` instead of ``ValueError``" +" for bad response types. The error messages have been improved to describe" +" why the type is invalid. :pr:`2256`" msgstr "" #: ../../../CHANGES.rst:381 msgid "" -"Add ``routes`` CLI command to output routes registered on the " -"application. :pr:`2259`" +"Add ``routes`` CLI command to output routes registered on the application." +" :pr:`2259`" msgstr "" #: ../../../CHANGES.rst:383 @@ -854,16 +853,16 @@ msgstr "" #: ../../../CHANGES.rst:391 msgid "" -"Factory functions are not required to take a ``script_info`` parameter to" -" work with the ``flask`` command. If they take a single parameter or a " -"parameter named ``script_info``, the :class:`~cli.ScriptInfo` object will" -" be passed. :pr:`2319`" +"Factory functions are not required to take a ``script_info`` parameter to " +"work with the ``flask`` command. If they take a single parameter or a " +"parameter named ``script_info``, the :class:`~cli.ScriptInfo` object will " +"be passed. :pr:`2319`" msgstr "" #: ../../../CHANGES.rst:395 msgid "" -"``FLASK_APP`` can be set to an app factory, with arguments if needed, for" -" example ``FLASK_APP=myproject.app:create_app('dev')``. :pr:`2326`" +"``FLASK_APP`` can be set to an app factory, with arguments if needed, for " +"example ``FLASK_APP=myproject.app:create_app('dev')``. :pr:`2326`" msgstr "" #: ../../../CHANGES.rst:398 @@ -913,15 +912,15 @@ msgstr "" #: ../../../CHANGES.rst:418 msgid "" -"Allow registering new tags with :class:`~json.tag.TaggedJSONSerializer` " -"to support storing other types in the session cookie. :pr:`2352`" +"Allow registering new tags with :class:`~json.tag.TaggedJSONSerializer` to" +" support storing other types in the session cookie. :pr:`2352`" msgstr "" #: ../../../CHANGES.rst:421 msgid "" -"Only open the session if the request has not been pushed onto the context" -" stack yet. This allows :func:`~stream_with_context` generators to access" -" the same session that the containing view uses. :pr:`2354`" +"Only open the session if the request has not been pushed onto the context " +"stack yet. This allows :func:`~stream_with_context` generators to access " +"the same session that the containing view uses. :pr:`2354`" msgstr "" #: ../../../CHANGES.rst:425 @@ -933,8 +932,8 @@ msgstr "" #: ../../../CHANGES.rst:428 msgid "" -"Extract JSON handling to a mixin applied to both the :class:`Request` and" -" :class:`Response` classes. This adds the :meth:`~Response.is_json` and " +"Extract JSON handling to a mixin applied to both the :class:`Request` and " +":class:`Response` classes. This adds the :meth:`~Response.is_json` and " ":meth:`~Response.get_json` methods to the response to make testing JSON " "response much easier. :pr:`2358`" msgstr "" @@ -981,8 +980,8 @@ msgstr "" #: ../../../CHANGES.rst:450 msgid "" -"``Flask.request_globals_class`` - use :attr:`Flask.app_ctx_globals_class`" -" instead." +"``Flask.request_globals_class`` - use :attr:`Flask.app_ctx_globals_class` " +"instead." msgstr "" #: ../../../CHANGES.rst:452 @@ -994,7 +993,8 @@ msgid "``Request.module`` - use :attr:`Request.blueprint` instead." msgstr "" #: ../../../CHANGES.rst:456 -msgid "The :attr:`Request.json` property is no longer deprecated. :issue:`1421`" +msgid "" +"The :attr:`Request.json` property is no longer deprecated. :issue:`1421`" msgstr "" #: ../../../CHANGES.rst:458 @@ -1012,8 +1012,8 @@ msgstr "" #: ../../../CHANGES.rst:463 msgid "" -"When passing a full URL to the test client, the scheme in the URL is used" -" instead of :data:`PREFERRED_URL_SCHEME`. :pr:`2430`" +"When passing a full URL to the test client, the scheme in the URL is used " +"instead of :data:`PREFERRED_URL_SCHEME`. :pr:`2430`" msgstr "" #: ../../../CHANGES.rst:465 @@ -1021,9 +1021,9 @@ msgid "" ":attr:`Flask.logger` has been simplified. ``LOGGER_NAME`` and " "``LOGGER_HANDLER_POLICY`` config was removed. The logger is always named " "``flask.app``. The level is only set on first access, it doesn't check " -":attr:`Flask.debug` each time. Only one format is used, not different " -"ones depending on :attr:`Flask.debug`. No handlers are removed, and a " -"handler is only added if no handlers are already configured. :pr:`2436`" +":attr:`Flask.debug` each time. Only one format is used, not different ones" +" depending on :attr:`Flask.debug`. No handlers are removed, and a handler " +"is only added if no handlers are already configured. :pr:`2436`" msgstr "" #: ../../../CHANGES.rst:472 @@ -1066,15 +1066,15 @@ msgstr "" #: ../../../CHANGES.rst:484 msgid "" -"Subdomain matching is disabled by default and setting :data:`SERVER_NAME`" -" does not implicitly enable it. It can be enabled by passing " +"Subdomain matching is disabled by default and setting :data:`SERVER_NAME` " +"does not implicitly enable it. It can be enabled by passing " "``subdomain_matching=True`` to the ``Flask`` constructor. :pr:`2635`" msgstr "" #: ../../../CHANGES.rst:488 msgid "" -"A single trailing slash is stripped from the blueprint ``url_prefix`` " -"when it is registered with the app. :pr:`2629`" +"A single trailing slash is stripped from the blueprint ``url_prefix`` when" +" it is registered with the app. :pr:`2629`" msgstr "" #: ../../../CHANGES.rst:490 @@ -1093,8 +1093,8 @@ msgstr "" #: ../../../CHANGES.rst:495 msgid "" "Added :data:`MAX_COOKIE_SIZE` and :attr:`Response.max_cookie_size` to " -"control when Werkzeug warns about large cookies that browsers may ignore." -" :pr:`2693`" +"control when Werkzeug warns about large cookies that browsers may ignore. " +":pr:`2693`" msgstr "" #: ../../../CHANGES.rst:498 @@ -1147,7 +1147,8 @@ msgid "" msgstr "" #: ../../../CHANGES.rst:531 -msgid "Fix a ``ValueError`` caused by invalid ``Range`` requests in some cases." +msgid "" +"Fix a ``ValueError`` caused by invalid ``Range`` requests in some cases." msgstr "" #: ../../../CHANGES.rst:536 @@ -1191,8 +1192,8 @@ msgstr "" #: ../../../CHANGES.rst:554 msgid "" "Call ``ctx.auto_pop`` with the exception object instead of ``None``, in " -"the event that a ``BaseException`` such as ``KeyboardInterrupt`` is " -"raised in a request handler." +"the event that a ``BaseException`` such as ``KeyboardInterrupt`` is raised" +" in a request handler." msgstr "" #: ../../../CHANGES.rst:560 @@ -1215,14 +1216,14 @@ msgstr "" #: ../../../CHANGES.rst:567 msgid "" -"Mimetype guessing in ``send_file`` now fails loudly and doesn't fall back" -" to ``application/octet-stream``. :pr:`1988`" +"Mimetype guessing in ``send_file`` now fails loudly and doesn't fall back " +"to ``application/octet-stream``. :pr:`1988`" msgstr "" #: ../../../CHANGES.rst:569 msgid "" -"Make ``flask.safe_join`` able to join multiple paths like " -"``os.path.join`` :pr:`1730`" +"Make ``flask.safe_join`` able to join multiple paths like ``os.path.join``" +" :pr:`1730`" msgstr "" #: ../../../CHANGES.rst:571 @@ -1233,8 +1234,8 @@ msgstr "" #: ../../../CHANGES.rst:573 msgid "" -"Correctly invoke response handlers for both regular request dispatching " -"as well as error handlers." +"Correctly invoke response handlers for both regular request dispatching as" +" well as error handlers." msgstr "" #: ../../../CHANGES.rst:575 @@ -1247,8 +1248,8 @@ msgstr "" #: ../../../CHANGES.rst:577 msgid "" -"``app.test_client`` includes preset default environment, which can now be" -" directly set, instead of per ``client.get``." +"``app.test_client`` includes preset default environment, which can now be " +"directly set, instead of per ``client.get``." msgstr "" #: ../../../CHANGES.rst:579 @@ -1265,8 +1266,8 @@ msgstr "" #: ../../../CHANGES.rst:587 msgid "" -"Fixed a bug that prevented ``FLASK_APP=foobar/__init__.py`` from working." -" :pr:`1872`" +"Fixed a bug that prevented ``FLASK_APP=foobar/__init__.py`` from working. " +":pr:`1872`" msgstr "" #: ../../../CHANGES.rst:592 @@ -1297,11 +1298,11 @@ msgstr "" #: ../../../CHANGES.rst:603 msgid "" "Added ``SESSION_REFRESH_EACH_REQUEST`` config key that controls the set-" -"cookie behavior. If set to ``True`` a permanent session will be refreshed" -" each request and get their lifetime extended, if set to ``False`` it " -"will only be modified if the session actually modifies. Non permanent " -"sessions are not affected by this and will always expire if the browser " -"window closes." +"cookie behavior. If set to ``True`` a permanent session will be refreshed " +"each request and get their lifetime extended, if set to ``False`` it will " +"only be modified if the session actually modifies. Non permanent sessions " +"are not affected by this and will always expire if the browser window " +"closes." msgstr "" #: ../../../CHANGES.rst:609 @@ -1328,12 +1329,13 @@ msgstr "" #: ../../../CHANGES.rst:615 msgid "" -"Templates are no longer automatically reloaded outside of debug mode. " -"This can be configured with the new ``TEMPLATES_AUTO_RELOAD`` config key." +"Templates are no longer automatically reloaded outside of debug mode. This" +" can be configured with the new ``TEMPLATES_AUTO_RELOAD`` config key." msgstr "" #: ../../../CHANGES.rst:618 -msgid "Added a workaround for a limitation in Python 3.3's namespace loader." +msgid "" +"Added a workaround for a limitation in Python 3.3's namespace loader." msgstr "" #: ../../../CHANGES.rst:620 @@ -1352,8 +1354,8 @@ msgstr "" #: ../../../CHANGES.rst:627 msgid "" -"Error handlers that match specific classes are now checked first, thereby" -" allowing catching exceptions that are subclasses of HTTP exceptions (in " +"Error handlers that match specific classes are now checked first, thereby " +"allowing catching exceptions that are subclasses of HTTP exceptions (in " "``werkzeug.exceptions``). This makes it possible for an extension author " "to create exceptions that will by default result in the HTTP error of " "their choosing, but may be caught with a custom error handler if desired." @@ -1365,9 +1367,9 @@ msgstr "" #: ../../../CHANGES.rst:634 msgid "" -"Flask will now log by default even if debug is disabled. The log format " -"is now hardcoded but the default log handling can be disabled through the" -" ``LOGGER_HANDLER_POLICY`` configuration key." +"Flask will now log by default even if debug is disabled. The log format is" +" now hardcoded but the default log handling can be disabled through the " +"``LOGGER_HANDLER_POLICY`` configuration key." msgstr "" #: ../../../CHANGES.rst:637 @@ -1376,15 +1378,15 @@ msgstr "" #: ../../../CHANGES.rst:638 msgid "" -"Added the ``EXPLAIN_TEMPLATE_LOADING`` config flag which when enabled " -"will instruct Flask to explain how it locates templates. This should help" -" users debug when the wrong templates are loaded." +"Added the ``EXPLAIN_TEMPLATE_LOADING`` config flag which when enabled will" +" instruct Flask to explain how it locates templates. This should help " +"users debug when the wrong templates are loaded." msgstr "" #: ../../../CHANGES.rst:641 msgid "" -"Enforce blueprint handling in the order they were registered for template" -" loading." +"Enforce blueprint handling in the order they were registered for template " +"loading." msgstr "" #: ../../../CHANGES.rst:643 @@ -1399,33 +1401,34 @@ msgstr "" msgid "" "Add \"pretty\" and \"compressed\" separators definitions in jsonify() " "method. Reduces JSON response size when " -"``JSONIFY_PRETTYPRINT_REGULAR=False`` by removing unnecessary white space" -" included by default after separators." +"``JSONIFY_PRETTYPRINT_REGULAR=False`` by removing unnecessary white space " +"included by default after separators." msgstr "" #: ../../../CHANGES.rst:649 msgid "" -"JSON responses are now terminated with a newline character, because it is" -" a convention that UNIX text files end with a newline and some clients " -"don't deal well when this newline is missing. This came up originally as " -"a part of https://github.com/postmanlabs/httpbin/issues/168. :pr:`1262`" +"JSON responses are now terminated with a newline character, because it is " +"a convention that UNIX text files end with a newline and some clients " +"don't deal well when this newline is missing. This came up originally as a" +" part of https://github.com/postmanlabs/httpbin/issues/168. :pr:`1262`" msgstr "" #: ../../../CHANGES.rst:654 msgid "" -"The automatically provided ``OPTIONS`` method is now correctly disabled " -"if the user registered an overriding rule with the lowercase-version " +"The automatically provided ``OPTIONS`` method is now correctly disabled if" +" the user registered an overriding rule with the lowercase-version " "``options``. :issue:`1288`" msgstr "" #: ../../../CHANGES.rst:657 -msgid "``flask.json.jsonify`` now supports the ``datetime.date`` type. :pr:`1326`" +msgid "" +"``flask.json.jsonify`` now supports the ``datetime.date`` type. :pr:`1326`" msgstr "" #: ../../../CHANGES.rst:659 msgid "" -"Don't leak exception info of already caught exceptions to context " -"teardown handlers. :pr:`1393`" +"Don't leak exception info of already caught exceptions to context teardown" +" handlers. :pr:`1393`" msgstr "" #: ../../../CHANGES.rst:661 @@ -1472,21 +1475,21 @@ msgstr "" #: ../../../CHANGES.rst:673 msgid "" -"Raise an :exc:`AttributeError` in :func:`flask.helpers.find_package` with" -" a useful message explaining why it is raised when a PEP 302 import hook " -"is used without an ``is_package()`` method." +"Raise an :exc:`AttributeError` in :func:`flask.helpers.find_package` with " +"a useful message explaining why it is raised when a PEP 302 import hook is" +" used without an ``is_package()`` method." msgstr "" #: ../../../CHANGES.rst:676 msgid "" -"Fixed an issue causing exceptions raised before entering a request or app" -" context to be passed to teardown handlers." +"Fixed an issue causing exceptions raised before entering a request or app " +"context to be passed to teardown handlers." msgstr "" #: ../../../CHANGES.rst:678 msgid "" -"Fixed an issue with query parameters getting removed from requests in the" -" test client when absolute URLs were requested." +"Fixed an issue with query parameters getting removed from requests in the " +"test client when absolute URLs were requested." msgstr "" #: ../../../CHANGES.rst:680 @@ -1526,17 +1529,17 @@ msgstr "" #: ../../../CHANGES.rst:696 msgid "" -"Fixed an issue where ``|tojson`` was not quoting single quotes which made" -" the filter not work properly in HTML attributes. Now it's possible to " -"use that filter in single quoted attributes. This should make using that " +"Fixed an issue where ``|tojson`` was not quoting single quotes which made " +"the filter not work properly in HTML attributes. Now it's possible to use " +"that filter in single quoted attributes. This should make using that " "filter with angular.js easier." msgstr "" #: ../../../CHANGES.rst:700 msgid "" "Added support for byte strings back to the session system. This broke " -"compatibility with the common case of people putting binary data for " -"token verification into the session." +"compatibility with the common case of people putting binary data for token" +" verification into the session." msgstr "" #: ../../../CHANGES.rst:703 @@ -1576,25 +1579,26 @@ msgid "Set the content-length header for x-sendfile." msgstr "" #: ../../../CHANGES.rst:719 -msgid "``tojson`` filter now does not escape script blocks in HTML5 parsers." +msgid "" +"``tojson`` filter now does not escape script blocks in HTML5 parsers." msgstr "" #: ../../../CHANGES.rst:721 msgid "" -"``tojson`` used in templates is now safe by default due. This was allowed" -" due to the different escaping behavior." +"``tojson`` used in templates is now safe by default due. This was allowed " +"due to the different escaping behavior." msgstr "" #: ../../../CHANGES.rst:723 msgid "" -"Flask will now raise an error if you attempt to register a new function " -"on an already used endpoint." +"Flask will now raise an error if you attempt to register a new function on" +" an already used endpoint." msgstr "" #: ../../../CHANGES.rst:725 msgid "" -"Added wrapper module around simplejson and added default serialization of" -" datetime objects. This allows much easier customization of how JSON is " +"Added wrapper module around simplejson and added default serialization of " +"datetime objects. This allows much easier customization of how JSON is " "handled by Flask or any Flask extension." msgstr "" @@ -1608,22 +1612,22 @@ msgstr "" #: ../../../CHANGES.rst:732 msgid "" "Templates can now be rendered without request context. The behavior is " -"slightly different as the ``request``, ``session`` and ``g`` objects will" -" not be available and blueprint's context processors are not called." +"slightly different as the ``request``, ``session`` and ``g`` objects will " +"not be available and blueprint's context processors are not called." msgstr "" #: ../../../CHANGES.rst:736 msgid "" "The config object is now available to the template as a real global and " -"not through a context processor which makes it available even in imported" -" templates by default." +"not through a context processor which makes it available even in imported " +"templates by default." msgstr "" #: ../../../CHANGES.rst:739 msgid "" -"Added an option to generate non-ascii encoded JSON which should result in" -" less bytes being transmitted over the network. It's disabled by default " -"to not cause confusion with existing libraries that might expect " +"Added an option to generate non-ascii encoded JSON which should result in " +"less bytes being transmitted over the network. It's disabled by default to" +" not cause confusion with existing libraries that might expect " "``flask.json.dumps`` to return bytes by default." msgstr "" @@ -1641,8 +1645,8 @@ msgstr "" #: ../../../CHANGES.rst:747 msgid "" -"``flask.g`` now can be used with the ``in`` operator to see what's " -"defined and it now is iterable and will yield all attributes stored." +"``flask.g`` now can be used with the ``in`` operator to see what's defined" +" and it now is iterable and will yield all attributes stored." msgstr "" #: ../../../CHANGES.rst:749 @@ -1655,15 +1659,15 @@ msgstr "" #: ../../../CHANGES.rst:752 msgid "" "``request``, ``session`` and ``g`` are now also added as proxies to the " -"template context which makes them available in imported templates. One " -"has to be very careful with those though because usage outside of macros " +"template context which makes them available in imported templates. One has" +" to be very careful with those though because usage outside of macros " "might cause caching." msgstr "" #: ../../../CHANGES.rst:756 msgid "" -"Flask will no longer invoke the wrong error handlers if a proxy exception" -" is passed through." +"Flask will no longer invoke the wrong error handlers if a proxy exception " +"is passed through." msgstr "" #: ../../../CHANGES.rst:758 @@ -1674,8 +1678,8 @@ msgstr "" #: ../../../CHANGES.rst:760 msgid "" -"Changed logic for picking defaults for cookie values from sessions to " -"work better with Google Chrome." +"Changed logic for picking defaults for cookie values from sessions to work" +" better with Google Chrome." msgstr "" #: ../../../CHANGES.rst:762 @@ -1690,9 +1694,9 @@ msgstr "" #: ../../../CHANGES.rst:765 msgid "" -"Removed custom JSON HTTP exception subclasses. If you were relying on " -"them you can reintroduce them again yourself trivially. Using them " -"however is strongly discouraged as the interface was flawed." +"Removed custom JSON HTTP exception subclasses. If you were relying on them" +" you can reintroduce them again yourself trivially. Using them however is " +"strongly discouraged as the interface was flawed." msgstr "" #: ../../../CHANGES.rst:768 @@ -1703,9 +1707,9 @@ msgstr "" #: ../../../CHANGES.rst:770 msgid "" -"Changed how the teardown system is informed about exceptions. This is now" -" more reliable in case something handles an exception halfway through the" -" error handling process." +"Changed how the teardown system is informed about exceptions. This is now " +"more reliable in case something handles an exception halfway through the " +"error handling process." msgstr "" #: ../../../CHANGES.rst:773 @@ -1794,22 +1798,22 @@ msgstr "" msgid "" "The :class:`flask.Flask` class will avoid importing the provided import " "name if it can (the required first parameter), to benefit tools which " -"build Flask instances programmatically. The Flask class will fall back to" -" using import on systems with custom module hooks, e.g. Google App " -"Engine, or when the import name is inside a zip archive (usually a .egg) " -"prior to Python 2.7." +"build Flask instances programmatically. The Flask class will fall back to " +"using import on systems with custom module hooks, e.g. Google App Engine, " +"or when the import name is inside a zip archive (usually a .egg) prior to " +"Python 2.7." msgstr "" #: ../../../CHANGES.rst:814 msgid "" -"Blueprints now have a decorator to add custom template filters " -"application wide, :meth:`flask.Blueprint.app_template_filter`." +"Blueprints now have a decorator to add custom template filters application" +" wide, :meth:`flask.Blueprint.app_template_filter`." msgstr "" #: ../../../CHANGES.rst:816 msgid "" -"The Flask and Blueprint classes now have a non-decorator method for " -"adding custom template filters application wide, " +"The Flask and Blueprint classes now have a non-decorator method for adding" +" custom template filters application wide, " ":meth:`flask.Flask.add_template_filter` and " ":meth:`flask.Blueprint.add_app_template_filter`." msgstr "" @@ -1832,17 +1836,17 @@ msgstr "" #: ../../../CHANGES.rst:828 msgid "" -"The :meth:`flask.render_template` method now accepts a either an iterable" -" of template names or a single template name. Previously, it only " -"accepted a single template name. On an iterable, the first template found" -" is rendered." +"The :meth:`flask.render_template` method now accepts a either an iterable " +"of template names or a single template name. Previously, it only accepted " +"a single template name. On an iterable, the first template found is " +"rendered." msgstr "" #: ../../../CHANGES.rst:832 msgid "" "Added :meth:`flask.Flask.app_context` which works very similar to the " -"request context but only provides access to the current application. This" -" also adds support for URL generation without an active request context." +"request context but only provides access to the current application. This " +"also adds support for URL generation without an active request context." msgstr "" #: ../../../CHANGES.rst:836 @@ -1855,8 +1859,8 @@ msgstr "" #: ../../../CHANGES.rst:839 msgid "" ":class:`~flask.Flask` and :class:`~flask.Blueprint` now provide a " -":meth:`~flask.Flask.get_send_file_max_age` hook for subclasses to " -"override behavior of serving static files from Flask when using " +":meth:`~flask.Flask.get_send_file_max_age` hook for subclasses to override" +" behavior of serving static files from Flask when using " ":meth:`flask.Flask.send_static_file` (used for the default static file " "handler) and :func:`~flask.helpers.send_file`. This hook is provided a " "filename, which for example allows changing cache controls by file " @@ -1880,8 +1884,8 @@ msgstr "" #: ../../../CHANGES.rst:855 msgid "" -"Added :attr:`flask.Flask.request_globals_class` to allow a specific class" -" to be used on creation of the :data:`~flask.g` instance of each request." +"Added :attr:`flask.Flask.request_globals_class` to allow a specific class " +"to be used on creation of the :data:`~flask.g` instance of each request." msgstr "" #: ../../../CHANGES.rst:858 @@ -1910,9 +1914,9 @@ msgstr "" #: ../../../CHANGES.rst:870 msgid "" -"Fixed an issue with the undocumented ``flask.session`` module to not work" -" properly on Python 2.5. It should not be used but did cause some " -"problems for package managers." +"Fixed an issue with the undocumented ``flask.session`` module to not work " +"properly on Python 2.5. It should not be used but did cause some problems " +"for package managers." msgstr "" #: ../../../CHANGES.rst:876 @@ -1967,18 +1971,18 @@ msgstr "" #: ../../../CHANGES.rst:897 msgid "" -"Malformed JSON data will now trigger a bad request HTTP exception instead" -" of a value error which usually would result in a 500 internal server " -"error if not handled. This is a backwards incompatible change." +"Malformed JSON data will now trigger a bad request HTTP exception instead " +"of a value error which usually would result in a 500 internal server error" +" if not handled. This is a backwards incompatible change." msgstr "" #: ../../../CHANGES.rst:901 msgid "" -"Applications now not only have a root path where the resources and " -"modules are located but also an instance path which is the designated " -"place to drop files that are modified at runtime (uploads etc.). Also " -"this is conceptually only instance depending and outside version control " -"so it's the perfect place to put configuration files etc." +"Applications now not only have a root path where the resources and modules" +" are located but also an instance path which is the designated place to " +"drop files that are modified at runtime (uploads etc.). Also this is " +"conceptually only instance depending and outside version control so it's " +"the perfect place to put configuration files etc." msgstr "" #: ../../../CHANGES.rst:907 @@ -1993,15 +1997,15 @@ msgstr "" #: ../../../CHANGES.rst:910 msgid "" -"Refactored test client internally. The ``APPLICATION_ROOT`` configuration" -" variable as well as ``SERVER_NAME`` are now properly used by the test " +"Refactored test client internally. The ``APPLICATION_ROOT`` configuration " +"variable as well as ``SERVER_NAME`` are now properly used by the test " "client as defaults." msgstr "" #: ../../../CHANGES.rst:913 msgid "" -"Added :attr:`flask.views.View.decorators` to support simpler decorating " -"of pluggable (class-based) views." +"Added :attr:`flask.views.View.decorators` to support simpler decorating of" +" pluggable (class-based) views." msgstr "" #: ../../../CHANGES.rst:915 @@ -2036,8 +2040,8 @@ msgstr "" #: ../../../CHANGES.rst:926 msgid "" -"Fixed the Jinja2 environment's ``list_templates`` method not returning " -"the correct names when blueprints or modules were involved." +"Fixed the Jinja2 environment's ``list_templates`` method not returning the" +" correct names when blueprints or modules were involved." msgstr "" #: ../../../CHANGES.rst:932 @@ -2049,7 +2053,8 @@ msgid "Released 2011-07-06" msgstr "" #: ../../../CHANGES.rst:936 -msgid "Fixed an issue with URL processors not properly working on blueprints." +msgid "" +"Fixed an issue with URL processors not properly working on blueprints." msgstr "" #: ../../../CHANGES.rst:941 @@ -2078,9 +2083,8 @@ msgstr "" #: ../../../CHANGES.rst:954 msgid "" -"Added :meth:`~flask.Flask.make_default_options_response` which can be " -"used by subclasses to alter the default behavior for ``OPTIONS`` " -"responses." +"Added :meth:`~flask.Flask.make_default_options_response` which can be used" +" by subclasses to alter the default behavior for ``OPTIONS`` responses." msgstr "" #: ../../../CHANGES.rst:957 @@ -2091,10 +2095,9 @@ msgstr "" #: ../../../CHANGES.rst:959 msgid "" -"Mimetype guessing and etag support based on file objects is now " -"deprecated for :func:`flask.send_file` because it was unreliable. Pass " -"filenames instead or attach your own etags and provide a proper mimetype " -"by hand." +"Mimetype guessing and etag support based on file objects is now deprecated" +" for :func:`flask.send_file` because it was unreliable. Pass filenames " +"instead or attach your own etags and provide a proper mimetype by hand." msgstr "" #: ../../../CHANGES.rst:963 @@ -2125,8 +2128,8 @@ msgstr "" #: ../../../CHANGES.rst:975 msgid "" -"Added an ``endpoint`` method to the flask application object which allows" -" one to register a callback to an arbitrary endpoint with a decorator." +"Added an ``endpoint`` method to the flask application object which allows " +"one to register a callback to an arbitrary endpoint with a decorator." msgstr "" #: ../../../CHANGES.rst:978 @@ -2136,7 +2139,8 @@ msgid "" msgstr "" #: ../../../CHANGES.rst:980 -msgid "Added ``create_jinja_loader`` to override the loader creation process." +msgid "" +"Added ``create_jinja_loader`` to override the loader creation process." msgstr "" #: ../../../CHANGES.rst:982 @@ -2145,10 +2149,10 @@ msgstr "" #: ../../../CHANGES.rst:983 msgid "" -"Added ``teardown_request`` decorator, for functions that should run at " -"the end of a request regardless of whether an exception occurred. Also " -"the behavior for ``after_request`` was changed. It's now no longer " -"executed when an exception is raised." +"Added ``teardown_request`` decorator, for functions that should run at the" +" end of a request regardless of whether an exception occurred. Also the " +"behavior for ``after_request`` was changed. It's now no longer executed " +"when an exception is raised." msgstr "" #: ../../../CHANGES.rst:987 @@ -2179,7 +2183,8 @@ msgid "" msgstr "" #: ../../../CHANGES.rst:996 -msgid "``before_request`` handlers are now able to abort requests with errors." +msgid "" +"``before_request`` handlers are now able to abort requests with errors." msgstr "" #: ../../../CHANGES.rst:998 @@ -2208,8 +2213,8 @@ msgstr "" #: ../../../CHANGES.rst:1011 msgid "" -"Fixed an issue where the default ``OPTIONS`` response was not exposing " -"all valid methods in the ``Allow`` header." +"Fixed an issue where the default ``OPTIONS`` response was not exposing all" +" valid methods in the ``Allow`` header." msgstr "" #: ../../../CHANGES.rst:1013 @@ -2220,14 +2225,14 @@ msgstr "" #: ../../../CHANGES.rst:1016 msgid "" -"Fixed an issue where the subdomain setting for modules was ignored for " -"the static folder." +"Fixed an issue where the subdomain setting for modules was ignored for the" +" static folder." msgstr "" #: ../../../CHANGES.rst:1018 msgid "" -"Fixed a security problem that allowed clients to download arbitrary files" -" if the host server was a windows based operating system and the client " +"Fixed a security problem that allowed clients to download arbitrary files " +"if the host server was a windows based operating system and the client " "uses backslashes to escape the directory the files where exposed from." msgstr "" @@ -2240,7 +2245,8 @@ msgid "Released 2010-07-27, codename Whisky" msgstr "" #: ../../../CHANGES.rst:1029 -msgid "After request functions are now called in reverse order of registration." +msgid "" +"After request functions are now called in reverse order of registration." msgstr "" #: ../../../CHANGES.rst:1031 @@ -2304,8 +2310,7 @@ msgstr "" #: ../../../CHANGES.rst:1054 msgid "" "Modules can now register for a subdomain instead of just an URL prefix. " -"This makes it possible to bind a whole module to a configurable " -"subdomain." +"This makes it possible to bind a whole module to a configurable subdomain." msgstr "" #: ../../../CHANGES.rst:1062 @@ -2355,12 +2360,13 @@ msgstr "" #: ../../../CHANGES.rst:1088 msgid "" "Autoescaping is no longer active for all templates. Instead it is only " -"active for ``.html``, ``.htm``, ``.xml`` and ``.xhtml``. Inside templates" -" this behavior can be changed with the ``autoescape`` tag." +"active for ``.html``, ``.htm``, ``.xml`` and ``.xhtml``. Inside templates " +"this behavior can be changed with the ``autoescape`` tag." msgstr "" #: ../../../CHANGES.rst:1091 -msgid "Refactored Flask internally. It now consists of more than a single file." +msgid "" +"Refactored Flask internally. It now consists of more than a single file." msgstr "" #: ../../../CHANGES.rst:1093 @@ -2381,8 +2387,8 @@ msgstr "" #: ../../../CHANGES.rst:1098 msgid "" -"Removed support for ``create_jinja_loader`` which is no longer used in " -"0.5 due to the improved module support." +"Removed support for ``create_jinja_loader`` which is no longer used in 0.5" +" due to the improved module support." msgstr "" #: ../../../CHANGES.rst:1100 @@ -2418,8 +2424,8 @@ msgstr "" #: ../../../CHANGES.rst:1116 msgid "" -"Because the Python standard library caches loggers, the name of the " -"logger is configurable now to better support unittests." +"Because the Python standard library caches loggers, the name of the logger" +" is configurable now to better support unittests." msgstr "" #: ../../../CHANGES.rst:1118 @@ -2448,8 +2454,8 @@ msgstr "" #: ../../../CHANGES.rst:1129 msgid "" -"Release does no longer include development leftover files (.git folder " -"for themes, built documentation in zip and pdf file and some .pyc files)" +"Release does no longer include development leftover files (.git folder for" +" themes, built documentation in zip and pdf file and some .pyc files)" msgstr "" #: ../../../CHANGES.rst:1135 @@ -2508,7 +2514,8 @@ msgid "Added :func:`~flask.get_template_attribute` helper function." msgstr "" #: ../../../CHANGES.rst:1159 -msgid ":meth:`~flask.Flask.add_url_rule` can now also register a view function." +msgid "" +":meth:`~flask.Flask.add_url_rule` can now also register a view function." msgstr "" #: ../../../CHANGES.rst:1161 @@ -2516,7 +2523,8 @@ msgid "Refactored internal request dispatching." msgstr "" #: ../../../CHANGES.rst:1162 -msgid "Server listens on 127.0.0.1 by default now to fix issues with chrome." +msgid "" +"Server listens on 127.0.0.1 by default now to fix issues with chrome." msgstr "" #: ../../../CHANGES.rst:1164 @@ -2529,8 +2537,8 @@ msgstr "" #: ../../../CHANGES.rst:1166 msgid "" -"Module support and internal request handling refactoring to better " -"support pluggable applications." +"Module support and internal request handling refactoring to better support" +" pluggable applications." msgstr "" #: ../../../CHANGES.rst:1168 @@ -2556,4 +2564,3 @@ msgstr "" #: ../../../CHANGES.rst:1178 msgid "First public preview release." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/cli.po b/docs/locales/zh_CN/LC_MESSAGES/cli.po index 9416daa58..ebf8d27ab 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/cli.po +++ b/docs/locales/zh_CN/LC_MESSAGES/cli.po @@ -25,8 +25,8 @@ msgstr "" msgid "" "Installing Flask installs the ``flask`` script, a `Click`_ command line " "interface, in your virtualenv. Executed from the terminal, this script " -"gives access to built-in, extension, and application-defined commands. " -"The ``--help`` option will give more information about any commands and " +"gives access to built-in, extension, and application-defined commands. The" +" ``--help`` option will give more information about any commands and " "options." msgstr "" @@ -36,8 +36,8 @@ msgstr "" #: ../../cli.rst:17 msgid "" -"The ``flask`` command is installed by Flask, not your application; it " -"must be told where to find your application in order to use it. The " +"The ``flask`` command is installed by Flask, not your application; it must" +" be told where to find your application in order to use it. The " "``FLASK_APP`` environment variable is used to specify how to load the " "application." msgstr "" @@ -60,8 +60,7 @@ msgstr "" #: ../../cli.rst:44 msgid "" "While ``FLASK_APP`` supports a variety of options for specifying your " -"application, most use cases should be simple. Here are the typical " -"values:" +"application, most use cases should be simple. Here are the typical values:" msgstr "" #: ../../cli.rst:50 @@ -70,8 +69,8 @@ msgstr "" #: ../../cli.rst:48 msgid "" -"The name \"app\" or \"wsgi\" is imported (as a \".py\" file, or package)," -" automatically detecting an app (``app`` or ``application``) or factory " +"The name \"app\" or \"wsgi\" is imported (as a \".py\" file, or package), " +"automatically detecting an app (``app`` or ``application``) or factory " "(``create_app`` or ``make_app``)." msgstr "" @@ -89,9 +88,9 @@ msgstr "" msgid "" "``FLASK_APP`` has three parts: an optional path that sets the current " "working directory, a Python file or dotted import path, and an optional " -"variable name of the instance or factory. If the name is a factory, it " -"can optionally be followed by arguments in parentheses. The following " -"values demonstrate these parts:" +"variable name of the instance or factory. If the name is a factory, it can" +" optionally be followed by arguments in parentheses. The following values " +"demonstrate these parts:" msgstr "" #: ../../cli.rst:65 @@ -99,7 +98,8 @@ msgid "``FLASK_APP=src/hello``" msgstr "" #: ../../cli.rst:65 -msgid "Sets the current working directory to ``src`` then imports ``hello``." +msgid "" +"Sets the current working directory to ``src`` then imports ``hello``." msgstr "" #: ../../cli.rst:68 @@ -131,8 +131,8 @@ msgstr "" #: ../../cli.rst:77 msgid "" "If ``FLASK_APP`` is not set, the command will try to import \"app\" or " -"\"wsgi\" (as a \".py\" file, or package) and try to detect an application" -" instance or factory." +"\"wsgi\" (as a \".py\" file, or package) and try to detect an application " +"instance or factory." msgstr "" #: ../../cli.rst:81 @@ -177,12 +177,13 @@ msgstr "" msgid "" "To explore the data in your application, you can start an interactive " "Python shell with the :func:`shell ` command. An " -"application context will be active, and the app instance will be " -"imported. ::" +"application context will be active, and the app instance will be imported." +" ::" msgstr "" #: ../../cli.rst:121 -msgid "Use :meth:`~Flask.shell_context_processor` to add other automatic imports." +msgid "" +"Use :meth:`~Flask.shell_context_processor` to add other automatic imports." msgstr "" #: ../../cli.rst:125 @@ -193,9 +194,8 @@ msgstr "" msgid "" "The environment in which the Flask app runs is set by the " ":envvar:`FLASK_ENV` environment variable. If not set it defaults to " -"``production``. The other recognized environment is ``development``. " -"Flask and extensions may choose to enable behaviors based on the " -"environment." +"``production``. The other recognized environment is ``development``. Flask" +" and extensions may choose to enable behaviors based on the environment." msgstr "" #: ../../cli.rst:135 @@ -212,10 +212,10 @@ msgstr "" #: ../../cli.rst:187 msgid "" "When using development mode, the reloader will trigger whenever your " -"Python code or imported modules change. The reloader can watch additional" -" files with the ``--extra-files`` option, or the " -"``FLASK_RUN_EXTRA_FILES`` environment variable. Multiple paths are " -"separated with ``:``, or ``;`` on Windows." +"Python code or imported modules change. The reloader can watch additional " +"files with the ``--extra-files`` option, or the ``FLASK_RUN_EXTRA_FILES`` " +"environment variable. Multiple paths are separated with ``:``, or ``;`` on" +" Windows." msgstr "" #: ../../cli.rst:230 @@ -224,8 +224,8 @@ msgstr "" #: ../../cli.rst:232 msgid "" -"Debug mode will be enabled when :envvar:`FLASK_ENV` is ``development``, " -"as described above. If you want to control debug mode separately, use " +"Debug mode will be enabled when :envvar:`FLASK_ENV` is ``development``, as" +" described above. If you want to control debug mode separately, use " ":envvar:`FLASK_DEBUG`. The value ``1`` enables it, ``0`` disables it." msgstr "" @@ -236,8 +236,7 @@ msgstr "" #: ../../cli.rst:242 msgid "" "Rather than setting ``FLASK_APP`` each time you open a new terminal, you " -"can use Flask's dotenv support to set environment variables " -"automatically." +"can use Flask's dotenv support to set environment variables automatically." msgstr "" #: ../../cli.rst:245 @@ -251,26 +250,26 @@ msgstr "" #: ../../cli.rst:251 msgid "" -"Variables set on the command line are used over those set in " -":file:`.env`, which are used over those set in :file:`.flaskenv`. " -":file:`.flaskenv` should be used for public variables, such as " -"``FLASK_APP``, while :file:`.env` should not be committed to your " -"repository so that it can set private variables." +"Variables set on the command line are used over those set in :file:`.env`," +" which are used over those set in :file:`.flaskenv`. :file:`.flaskenv` " +"should be used for public variables, such as ``FLASK_APP``, while " +":file:`.env` should not be committed to your repository so that it can set" +" private variables." msgstr "" #: ../../cli.rst:256 msgid "" -"Directories are scanned upwards from the directory you call ``flask`` " -"from to locate the files. The current working directory will be set to " -"the location of the file, with the assumption that that is the top level " +"Directories are scanned upwards from the directory you call ``flask`` from" +" to locate the files. The current working directory will be set to the " +"location of the file, with the assumption that that is the top level " "project directory." msgstr "" #: ../../cli.rst:261 msgid "" "The files are only loaded by the ``flask`` command or calling " -":meth:`~Flask.run`. If you would like to load these files when running in" -" production, you should call :func:`~cli.load_dotenv` manually." +":meth:`~Flask.run`. If you would like to load these files when running in " +"production, you should call :func:`~cli.load_dotenv` manually." msgstr "" #: ../../cli.rst:269 @@ -304,10 +303,10 @@ msgstr "" #: ../../cli.rst:317 msgid "" "You can tell Flask not to load dotenv files even when python-dotenv is " -"installed by setting the ``FLASK_SKIP_DOTENV`` environment variable. This" -" can be useful if you want to load them manually, or if you're using a " -"project runner that loads them already. Keep in mind that the environment" -" variables must be set before the app loads or it won't configure as " +"installed by setting the ``FLASK_SKIP_DOTENV`` environment variable. This " +"can be useful if you want to load them manually, or if you're using a " +"project runner that loads them already. Keep in mind that the environment " +"variables must be set before the app loads or it won't configure as " "expected." msgstr "" @@ -319,8 +318,7 @@ msgstr "" msgid "" "If you do not want to install dotenv support, you can still set " "environment variables by adding them to the end of the virtualenv's " -":file:`activate` script. Activating the virtualenv will set the " -"variables." +":file:`activate` script. Activating the virtualenv will set the variables." msgstr "" #: ../../cli.rst:359 @@ -338,8 +336,8 @@ msgstr "" #: ../../cli.rst:375 msgid "" "It is preferred to use dotenv support over this, since :file:`.flaskenv` " -"can be committed to the repository so that it works automatically " -"wherever the project is checked out." +"can be committed to the repository so that it works automatically wherever" +" the project is checked out." msgstr "" #: ../../cli.rst:381 @@ -360,9 +358,9 @@ msgstr "" #: ../../cli.rst:403 msgid "" -"This example adds the same command, but as ``user create``, a command in " -"a group. This is useful if you want to organize multiple related " -"commands. ::" +"This example adds the same command, but as ``user create``, a command in a" +" group. This is useful if you want to organize multiple related commands. " +"::" msgstr "" #: ../../cli.rst:424 @@ -380,8 +378,8 @@ msgid "" "If your application uses blueprints, you can optionally register CLI " "commands directly onto them. When your blueprint is registered onto your " "application, the associated commands will be available to the ``flask`` " -"command. By default, those commands will be nested in a group matching " -"the name of the blueprint." +"command. By default, those commands will be nested in a group matching the" +" name of the blueprint." msgstr "" #: ../../cli.rst:454 @@ -406,14 +404,15 @@ msgstr "" msgid "" "Commands added using the Flask app's :attr:`~Flask.cli` " ":meth:`~cli.AppGroup.command` decorator will be executed with an " -"application context pushed, so your command and extensions have access to" -" the app and its configuration. If you create a command using the Click " +"application context pushed, so your command and extensions have access to " +"the app and its configuration. If you create a command using the Click " ":func:`~click.command` decorator instead of the Flask decorator, you can " "use :func:`~cli.with_appcontext` to get the same behavior. ::" msgstr "" #: ../../cli.rst:503 -msgid "If you're sure a command doesn't need the context, you can disable it::" +msgid "" +"If you're sure a command doesn't need the context, you can disable it::" msgstr "" #: ../../cli.rst:511 @@ -422,16 +421,15 @@ msgstr "" #: ../../cli.rst:513 msgid "" -"Flask will automatically load commands specified in the " -"``flask.commands`` `entry point`_. This is useful for extensions that " -"want to add commands when they are installed. Entry points are specified " -"in :file:`setup.py` ::" +"Flask will automatically load commands specified in the ``flask.commands``" +" `entry point`_. This is useful for extensions that want to add commands " +"when they are installed. Entry points are specified in :file:`setup.py` ::" msgstr "" #: ../../cli.rst:532 msgid "" -"Inside :file:`flask_my_extension/commands.py` you can then export a Click" -" object::" +"Inside :file:`flask_my_extension/commands.py` you can then export a Click " +"object::" msgstr "" #: ../../cli.rst:541 @@ -453,7 +451,8 @@ msgid "" msgstr "" #: ../../cli.rst:555 -msgid "Create an instance of :class:`~cli.FlaskGroup` and pass it the factory::" +msgid "" +"Create an instance of :class:`~cli.FlaskGroup` and pass it the factory::" msgstr "" #: ../../cli.rst:570 @@ -462,8 +461,8 @@ msgstr "" #: ../../cli.rst:584 msgid "" -"Install the application in the virtualenv in editable mode and the custom" -" script is available. Note that you don't need to set ``FLASK_APP``. ::" +"Install the application in the virtualenv in editable mode and the custom " +"script is available. Note that you don't need to set ``FLASK_APP``. ::" msgstr "" #: ../../cli.rst:590 @@ -472,9 +471,9 @@ msgstr "" #: ../../cli.rst:592 msgid "" -"When using a custom script, if you introduce an error in your module-" -"level code, the reloader will fail because it can no longer load the " -"entry point." +"When using a custom script, if you introduce an error in your module-level" +" code, the reloader will fail because it can no longer load the entry " +"point." msgstr "" #: ../../cli.rst:596 @@ -491,8 +490,8 @@ msgstr "" msgid "" "PyCharm Professional provides a special Flask run configuration. For the " "Community Edition, we need to configure it to call the ``flask run`` CLI " -"command with the correct environment variables. These instructions should" -" be similar for any other IDE you might want to use." +"command with the correct environment variables. These instructions should " +"be similar for any other IDE you might want to use." msgstr "" #: ../../cli.rst:610 @@ -515,8 +514,8 @@ msgstr "" #: ../../cli.rst:624 msgid "" -"Click the + (*Add New Configuration*) button and select *Python*. Give " -"the configuration a name such as \"flask run\". For the ``flask run`` " +"Click the + (*Add New Configuration*) button and select *Python*. Give the" +" configuration a name such as \"flask run\". For the ``flask run`` " "command, check \"Single instance only\" since you can't run the server " "more than once at the same time." msgstr "" @@ -527,18 +526,18 @@ msgstr "" #: ../../cli.rst:631 msgid "" -"The *Parameters* field (**B**) is set to the CLI command to execute (with" -" any arguments). In this example we use ``run``, which will run the " +"The *Parameters* field (**B**) is set to the CLI command to execute (with " +"any arguments). In this example we use ``run``, which will run the " "development server." msgstr "" #: ../../cli.rst:635 msgid "" -"You can skip this next step if you're using :ref:`dotenv`. We need to add" -" an environment variable (**C**) to identify our application. Click on " -"the browse button and add an entry with ``FLASK_APP`` on the left and the" -" Python import or file on the right (``hello`` for example). Add an entry" -" with ``FLASK_ENV`` and set it to ``development``." +"You can skip this next step if you're using :ref:`dotenv`. We need to add " +"an environment variable (**C**) to identify our application. Click on the " +"browse button and add an entry with ``FLASK_APP`` on the left and the " +"Python import or file on the right (``hello`` for example). Add an entry " +"with ``FLASK_ENV`` and set it to ``development``." msgstr "" #: ../../cli.rst:641 @@ -557,14 +556,13 @@ msgstr "" #: ../../cli.rst:648 msgid "" "Click *Apply* to save the configuration, or *OK* to save and close the " -"window. Select the configuration in the main PyCharm window and click the" -" play button next to it to run the server." +"window. Select the configuration in the main PyCharm window and click the " +"play button next to it to run the server." msgstr "" #: ../../cli.rst:652 msgid "" "Now that we have a configuration which runs ``flask run`` from within " -"PyCharm, we can copy that configuration and alter the *Script* argument " -"to run a different CLI command, e.g. ``flask shell``." +"PyCharm, we can copy that configuration and alter the *Script* argument to" +" run a different CLI command, e.g. ``flask shell``." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/config.po b/docs/locales/zh_CN/LC_MESSAGES/config.po index 77b94d997..c8b3d1f44 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/config.po +++ b/docs/locales/zh_CN/LC_MESSAGES/config.po @@ -24,9 +24,9 @@ msgstr "" #: ../../config.rst:4 msgid "" "Applications need some kind of configuration. There are different " -"settings you might want to change depending on the application " -"environment like toggling the debug mode, setting the secret key, and " -"other such environment-specific things." +"settings you might want to change depending on the application environment" +" like toggling the debug mode, setting the secret key, and other such " +"environment-specific things." msgstr "" #: ../../config.rst:9 @@ -41,10 +41,10 @@ msgstr "" msgid "" "Independent of how you load your config, there is a config object " "available which holds the loaded configuration values: The " -":attr:`~flask.Flask.config` attribute of the :class:`~flask.Flask` " -"object. This is the place where Flask itself puts certain configuration " -"values and also where extensions can put their configuration values. But" -" this is also where you can have your own configuration." +":attr:`~flask.Flask.config` attribute of the :class:`~flask.Flask` object." +" This is the place where Flask itself puts certain configuration values " +"and also where extensions can put their configuration values. But this is" +" also where you can have your own configuration." msgstr "" #: ../../config.rst:23 @@ -53,8 +53,8 @@ msgstr "" #: ../../config.rst:25 msgid "" -"The :attr:`~flask.Flask.config` is actually a subclass of a dictionary " -"and can be modified just like any dictionary::" +"The :attr:`~flask.Flask.config` is actually a subclass of a dictionary and" +" can be modified just like any dictionary::" msgstr "" #: ../../config.rst:31 @@ -84,29 +84,29 @@ msgstr "" #: ../../config.rst:53 msgid "" "The environment is used to indicate to Flask, extensions, and other " -"programs, like Sentry, what context Flask is running in. It is controlled" -" with the :envvar:`FLASK_ENV` environment variable and defaults to " +"programs, like Sentry, what context Flask is running in. It is controlled " +"with the :envvar:`FLASK_ENV` environment variable and defaults to " "``production``." msgstr "" #: ../../config.rst:58 msgid "" "Setting :envvar:`FLASK_ENV` to ``development`` will enable debug mode. " -"``flask run`` will use the interactive debugger and reloader by default " -"in debug mode. To control this separately from the environment, use the " +"``flask run`` will use the interactive debugger and reloader by default in" +" debug mode. To control this separately from the environment, use the " ":envvar:`FLASK_DEBUG` flag." msgstr "" #: ../../config.rst:63 msgid "" -"Added :envvar:`FLASK_ENV` to control the environment separately from " -"debug mode. The development environment enables debug mode." +"Added :envvar:`FLASK_ENV` to control the environment separately from debug" +" mode. The development environment enables debug mode." msgstr "" #: ../../config.rst:67 msgid "" -"To switch Flask to the development environment and enable debug mode, set" -" :envvar:`FLASK_ENV`:" +"To switch Flask to the development environment and enable debug mode, set " +":envvar:`FLASK_ENV`:" msgstr "" #: ../../config.rst:72 ../../config.rst:440 ../../config.rst:511 @@ -142,8 +142,8 @@ msgstr "" msgid "" "What environment the app is running in. Flask and extensions may enable " "behaviors based on the environment, such as enabling debug mode. The " -":attr:`~flask.Flask.env` attribute maps to this config key. This is set " -"by the :envvar:`FLASK_ENV` environment variable and may not behave as " +":attr:`~flask.Flask.env` attribute maps to this config key. This is set by" +" the :envvar:`FLASK_ENV` environment variable and may not behave as " "expected if set in code." msgstr "" @@ -162,8 +162,8 @@ msgid "" "exceptions, and the server will be reloaded when code changes. The " ":attr:`~flask.Flask.debug` attribute maps to this config key. This is " "enabled when :data:`ENV` is ``'development'`` and is overridden by the " -"``FLASK_DEBUG`` environment variable. It may not behave as expected if " -"set in code." +"``FLASK_DEBUG`` environment variable. It may not behave as expected if set" +" in code." msgstr "" #: ../../config.rst:129 @@ -178,8 +178,8 @@ msgstr "" #: ../../config.rst:136 msgid "" -"Enable testing mode. Exceptions are propagated rather than handled by the" -" the app's error handlers. Extensions may also change their behavior to " +"Enable testing mode. Exceptions are propagated rather than handled by the " +"the app's error handlers. Extensions may also change their behavior to " "facilitate easier testing. You should enable this in your own tests." msgstr "" @@ -191,8 +191,8 @@ msgstr "" #: ../../config.rst:144 msgid "" "Exceptions are re-raised rather than being handled by the app's error " -"handlers. If not set, this is implicitly true if ``TESTING`` or ``DEBUG``" -" is enabled." +"handlers. If not set, this is implicitly true if ``TESTING`` or ``DEBUG`` " +"is enabled." msgstr "" #: ../../config.rst:148 ../../config.rst:156 ../../config.rst:174 @@ -212,25 +212,25 @@ msgstr "" #: ../../config.rst:160 msgid "" "If there is no handler for an ``HTTPException``-type exception, re-raise " -"it to be handled by the interactive debugger instead of returning it as a" -" simple error response." +"it to be handled by the interactive debugger instead of returning it as a " +"simple error response." msgstr "" #: ../../config.rst:168 msgid "" -"Trying to access a key that doesn't exist from request dicts like " -"``args`` and ``form`` will return a 400 Bad Request error page. Enable " -"this to treat the error as an unhandled exception instead so that you get" -" the interactive debugger. This is a more specific version of " +"Trying to access a key that doesn't exist from request dicts like ``args``" +" and ``form`` will return a 400 Bad Request error page. Enable this to " +"treat the error as an unhandled exception instead so that you get the " +"interactive debugger. This is a more specific version of " "``TRAP_HTTP_EXCEPTIONS``. If unset, it is enabled in debug mode." msgstr "" #: ../../config.rst:178 msgid "" -"A secret key that will be used for securely signing the session cookie " -"and can be used for any other security related needs by extensions or " -"your application. It should be a long random ``bytes`` or ``str``. For " -"example, copy the output of this to your config::" +"A secret key that will be used for securely signing the session cookie and" +" can be used for any other security related needs by extensions or your " +"application. It should be a long random ``bytes`` or ``str``. For example," +" copy the output of this to your config::" msgstr "" #: ../../config.rst:186 @@ -241,8 +241,8 @@ msgstr "" #: ../../config.rst:192 msgid "" -"The name of the session cookie. Can be changed in case you already have a" -" cookie with the same name." +"The name of the session cookie. Can be changed in case you already have a " +"cookie with the same name." msgstr "" #: ../../config.rst:195 @@ -258,9 +258,9 @@ msgstr "" #: ../../config.rst:207 msgid "" -"The path that the session cookie will be valid for. If not set, the " -"cookie will be valid underneath ``APPLICATION_ROOT`` or ``/`` if that is " -"not set." +"The path that the session cookie will be valid for. If not set, the cookie" +" will be valid underneath ``APPLICATION_ROOT`` or ``/`` if that is not " +"set." msgstr "" #: ../../config.rst:214 @@ -276,9 +276,9 @@ msgstr "" #: ../../config.rst:221 msgid "" -"Browsers will only send cookies with requests over HTTPS if the cookie is" -" marked \"secure\". The application must be served over HTTPS for this to" -" make sense." +"Browsers will only send cookies with requests over HTTPS if the cookie is " +"marked \"secure\". The application must be served over HTTPS for this to " +"make sense." msgstr "" #: ../../config.rst:229 @@ -290,8 +290,8 @@ msgstr "" #: ../../config.rst:239 msgid "" -"If ``session.permanent`` is true, the cookie's expiration will be set " -"this number of seconds in the future. Can either be a " +"If ``session.permanent`` is true, the cookie's expiration will be set this" +" number of seconds in the future. Can either be a " ":class:`datetime.timedelta` or an ``int``." msgstr "" @@ -308,8 +308,8 @@ msgstr "" #: ../../config.rst:250 msgid "" "Control whether the cookie is sent with every response when " -"``session.permanent`` is true. Sending the cookie every time (the " -"default) can more reliably keep the session from expiring, but uses more " +"``session.permanent`` is true. Sending the cookie every time (the default)" +" can more reliably keep the session from expiring, but uses more " "bandwidth. Non-permanent sessions are not affected." msgstr "" @@ -324,8 +324,8 @@ msgstr "" #: ../../config.rst:267 msgid "" "When serving files, set the cache control max age to this number of " -"seconds. Can be a :class:`datetime.timedelta` or an ``int``. Override " -"this value on a per-file basis using " +"seconds. Can be a :class:`datetime.timedelta` or an ``int``. Override this" +" value on a per-file basis using " ":meth:`~flask.Flask.get_send_file_max_age` on the application or " "blueprint." msgstr "" @@ -346,8 +346,8 @@ msgstr "" msgid "" "If set, will be used for the session cookie domain if " ":data:`SESSION_COOKIE_DOMAIN` is not set. Modern web browsers will not " -"allow setting cookies for domains without a dot. To use a domain locally," -" add any names that should route to the app to your ``hosts`` file. ::" +"allow setting cookies for domains without a dot. To use a domain locally, " +"add any names that should route to the app to your ``hosts`` file. ::" msgstr "" #: ../../config.rst:292 @@ -358,17 +358,17 @@ msgstr "" #: ../../config.rst:299 msgid "" -"Inform the application what path it is mounted under by the application /" -" web server. This is used for generating URLs outside the context of a " +"Inform the application what path it is mounted under by the application / " +"web server. This is used for generating URLs outside the context of a " "request (inside a request, the dispatcher is responsible for setting " -"``SCRIPT_NAME`` instead; see :doc:`/patterns/appdispatch` for examples of" -" dispatch configuration)." +"``SCRIPT_NAME`` instead; see :doc:`/patterns/appdispatch` for examples of " +"dispatch configuration)." msgstr "" #: ../../config.rst:305 msgid "" -"Will be used for the session cookie path if ``SESSION_COOKIE_PATH`` is " -"not set." +"Will be used for the session cookie path if ``SESSION_COOKIE_PATH`` is not" +" set." msgstr "" #: ../../config.rst:308 @@ -424,22 +424,22 @@ msgstr "" #: ../../config.rst:357 msgid "" -"Reload templates when they are changed. If not set, it will be enabled in" -" debug mode." +"Reload templates when they are changed. If not set, it will be enabled in " +"debug mode." msgstr "" #: ../../config.rst:364 msgid "" -"Log debugging information tracing how a template file was loaded. This " -"can be useful to figure out why a template was not loaded or the wrong " -"file appears to be loaded." +"Log debugging information tracing how a template file was loaded. This can" +" be useful to figure out why a template was not loaded or the wrong file " +"appears to be loaded." msgstr "" #: ../../config.rst:372 msgid "" "Warn if cookie headers are larger than this many bytes. Defaults to " -"``4093``. Larger cookies may be silently ignored by browsers. Set to " -"``0`` to disable the warning." +"``4093``. Larger cookies may be silently ignored by browsers. Set to ``0``" +" to disable the warning." msgstr "" #: ../../config.rst:404 @@ -449,7 +449,8 @@ msgid "" msgstr "" #: ../../config.rst:408 -msgid "Added :data:`ENV` to reflect the :envvar:`FLASK_ENV` environment variable." +msgid "" +"Added :data:`ENV` to reflect the :envvar:`FLASK_ENV` environment variable." msgstr "" #: ../../config.rst:411 @@ -469,7 +470,8 @@ msgid "" msgstr "" #: ../../config.rst:397 -msgid "``JSON_AS_ASCII``, ``JSON_SORT_KEYS``, ``JSONIFY_PRETTYPRINT_REGULAR``" +msgid "" +"``JSON_AS_ASCII``, ``JSON_SORT_KEYS``, ``JSONIFY_PRETTYPRINT_REGULAR``" msgstr "" #: ../../config.rst:394 @@ -479,8 +481,8 @@ msgstr "" #: ../../config.rst:388 msgid "" "``TRAP_BAD_REQUEST_ERRORS``, ``TRAP_HTTP_EXCEPTIONS``, " -"``APPLICATION_ROOT``, ``SESSION_COOKIE_DOMAIN``, ``SESSION_COOKIE_PATH``," -" ``SESSION_COOKIE_HTTPONLY``, ``SESSION_COOKIE_SECURE``" +"``APPLICATION_ROOT``, ``SESSION_COOKIE_DOMAIN``, ``SESSION_COOKIE_PATH``, " +"``SESSION_COOKIE_HTTPONLY``, ``SESSION_COOKIE_SECURE``" msgstr "" #: ../../config.rst:385 @@ -505,8 +507,8 @@ msgstr "" #: ../../config.rst:420 msgid "" -"Configuration becomes more useful if you can store it in a separate file," -" ideally located outside the actual application package. This makes " +"Configuration becomes more useful if you can store it in a separate file, " +"ideally located outside the actual application package. This makes " "packaging and distributing your application possible via various package " "handling tools (:doc:`/patterns/distribute`) and finally modifying the " "configuration file afterwards." @@ -538,11 +540,11 @@ msgstr "" #: ../../config.rst:473 msgid "" -"Make sure to load the configuration very early on, so that extensions " -"have the ability to access the configuration when starting up. There are" -" other methods on the config object as well to load from individual " -"files. For a complete reference, read the :class:`~flask.Config` " -"object's documentation." +"Make sure to load the configuration very early on, so that extensions have" +" the ability to access the configuration when starting up. There are " +"other methods on the config object as well to load from individual files." +" For a complete reference, read the :class:`~flask.Config` object's " +"documentation." msgstr "" #: ../../config.rst:481 @@ -551,9 +553,9 @@ msgstr "" #: ../../config.rst:483 msgid "" -"It is also possible to load configuration from a file in a format of your" -" choice using :meth:`~flask.Config.from_file`. For example to load from a" -" TOML file:" +"It is also possible to load configuration from a file in a format of your " +"choice using :meth:`~flask.Config.from_file`. For example to load from a " +"TOML file:" msgstr "" #: ../../config.rst:492 @@ -572,14 +574,15 @@ msgid "" msgstr "" #: ../../config.rst:507 -msgid "Environment variables can be set in the shell before starting the server:" +msgid "" +"Environment variables can be set in the shell before starting the server:" msgstr "" #: ../../config.rst:538 msgid "" -"While this approach is straightforward to use, it is important to " -"remember that environment variables are strings -- they are not " -"automatically deserialized into Python types." +"While this approach is straightforward to use, it is important to remember" +" that environment variables are strings -- they are not automatically " +"deserialized into Python types." msgstr "" #: ../../config.rst:542 @@ -597,10 +600,10 @@ msgstr "" #: ../../config.rst:559 msgid "" -"Make sure to load the configuration very early on, so that extensions " -"have the ability to access the configuration when starting up. There are" -" other methods on the config object as well to load from individual " -"files. For a complete reference, read the :class:`~flask.Config` class " +"Make sure to load the configuration very early on, so that extensions have" +" the ability to access the configuration when starting up. There are " +"other methods on the config object as well to load from individual files." +" For a complete reference, read the :class:`~flask.Config` class " "documentation." msgstr "" @@ -611,17 +614,17 @@ msgstr "" #: ../../config.rst:568 #, python-format msgid "" -"The downside with the approach mentioned earlier is that it makes testing" -" a little harder. There is no single 100% solution for this problem in " -"general, but there are a couple of things you can keep in mind to improve" -" that experience:" +"The downside with the approach mentioned earlier is that it makes testing " +"a little harder. There is no single 100% solution for this problem in " +"general, but there are a couple of things you can keep in mind to improve " +"that experience:" msgstr "" #: ../../config.rst:573 msgid "" -"Create your application in a function and register blueprints on it. That" -" way you can create multiple instances of your application with different" -" configurations attached which makes unit testing a lot easier. You can " +"Create your application in a function and register blueprints on it. That " +"way you can create multiple instances of your application with different " +"configurations attached which makes unit testing a lot easier. You can " "use this to pass in configuration as needed." msgstr "" @@ -641,27 +644,27 @@ msgid "" "Most applications need more than one configuration. There should be at " "least separate configurations for the production server and the one used " "during development. The easiest way to handle this is to use a default " -"configuration that is always loaded and part of the version control, and " -"a separate configuration that overrides the values as necessary as " +"configuration that is always loaded and part of the version control, and a" +" separate configuration that overrides the values as necessary as " "mentioned in the example above::" msgstr "" #: ../../config.rst:598 msgid "" "Then you just have to add a separate :file:`config.py` file and export " -"``YOURAPPLICATION_SETTINGS=/path/to/config.py`` and you are done. " -"However there are alternative ways as well. For example you could use " -"imports or subclassing." +"``YOURAPPLICATION_SETTINGS=/path/to/config.py`` and you are done. However" +" there are alternative ways as well. For example you could use imports or" +" subclassing." msgstr "" #: ../../config.rst:603 msgid "" -"What is very popular in the Django world is to make the import explicit " -"in the config file by adding ``from yourapplication.default_settings " -"import *`` to the top of the file and then overriding the changes by " -"hand. You could also inspect an environment variable like " -"``YOURAPPLICATION_MODE`` and set that to `production`, `development` etc " -"and import different hard-coded files based on that." +"What is very popular in the Django world is to make the import explicit in" +" the config file by adding ``from yourapplication.default_settings import " +"*`` to the top of the file and then overriding the changes by hand. You " +"could also inspect an environment variable like ``YOURAPPLICATION_MODE`` " +"and set that to `production`, `development` etc and import different hard-" +"coded files based on that." msgstr "" #: ../../config.rst:610 @@ -678,16 +681,16 @@ msgstr "" #: ../../config.rst:631 msgid "" -"Note that :meth:`~flask.Config.from_object` does not instantiate the " -"class object. If you need to instantiate the class, such as to access a " +"Note that :meth:`~flask.Config.from_object` does not instantiate the class" +" object. If you need to instantiate the class, such as to access a " "property, then you must do so before calling " ":meth:`~flask.Config.from_object`::" msgstr "" #: ../../config.rst:643 msgid "" -"Instantiating the configuration object allows you to use ``@property`` in" -" your configuration classes::" +"Instantiating the configuration object allows you to use ``@property`` in " +"your configuration classes::" msgstr "" #: ../../config.rst:666 @@ -705,10 +708,10 @@ msgstr "" #: ../../config.rst:672 msgid "" -"Use an environment variable to switch between the configurations. This " -"can be done from outside the Python interpreter and makes development and" -" deployment much easier because you can quickly and easily switch between" -" different configs without having to touch the code at all. If you are " +"Use an environment variable to switch between the configurations. This can" +" be done from outside the Python interpreter and makes development and " +"deployment much easier because you can quickly and easily switch between " +"different configs without having to touch the code at all. If you are " "working often on different projects you can even create your own script " "for sourcing that activates a virtualenv and exports the development " "configuration for you." @@ -717,8 +720,8 @@ msgstr "" #: ../../config.rst:679 msgid "" "Use a tool like `fabric`_ in production to push code and configurations " -"separately to the production server(s). For some details about how to do" -" that, head over to the :doc:`/patterns/fabric` pattern." +"separately to the production server(s). For some details about how to do " +"that, head over to the :doc:`/patterns/fabric` pattern." msgstr "" #: ../../config.rst:690 @@ -730,9 +733,9 @@ msgid "" "Flask 0.8 introduces instance folders. Flask for a long time made it " "possible to refer to paths relative to the application's folder directly " "(via :attr:`Flask.root_path`). This was also how many developers loaded " -"configurations stored next to the application. Unfortunately however " -"this only works well if applications are not packages in which case the " -"root path refers to the contents of the package." +"configurations stored next to the application. Unfortunately however this" +" only works well if applications are not packages in which case the root " +"path refers to the contents of the package." msgstr "" #: ../../config.rst:701 @@ -784,10 +787,10 @@ msgstr "" #: ../../config.rst:739 msgid "" "Since the config object provided loading of configuration files from " -"relative filenames we made it possible to change the loading via " -"filenames to be relative to the instance path if wanted. The behavior of" -" relative paths in config files can be flipped between “relative to the " -"application root” (the default) to “relative to instance folder” via the " +"relative filenames we made it possible to change the loading via filenames" +" to be relative to the instance path if wanted. The behavior of relative " +"paths in config files can be flipped between “relative to the application " +"root” (the default) to “relative to instance folder” via the " "`instance_relative_config` switch to the application constructor::" msgstr "" @@ -808,4 +811,3 @@ msgstr "" #: ../../config.rst:760 msgid "Example usage for both::" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/contributing.po b/docs/locales/zh_CN/LC_MESSAGES/contributing.po index 957ae5710..46d029de5 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/contributing.po +++ b/docs/locales/zh_CN/LC_MESSAGES/contributing.po @@ -38,7 +38,8 @@ msgid "" msgstr "" #: ../../../CONTRIBUTING.rst:15 -msgid "The ``#get-help`` channel on our Discord chat: https://discord.gg/pallets" +msgid "" +"The ``#get-help`` channel on our Discord chat: https://discord.gg/pallets" msgstr "" #: ../../../CONTRIBUTING.rst:17 @@ -67,9 +68,9 @@ msgstr "" #: ../../../CONTRIBUTING.rst:31 msgid "" -"If possible, include a `minimal reproducible example`_ to help us " -"identify the issue. This also helps check that the issue is not with your" -" own code." +"If possible, include a `minimal reproducible example`_ to help us identify" +" the issue. This also helps check that the issue is not with your own " +"code." msgstr "" #: ../../../CONTRIBUTING.rst:34 @@ -81,8 +82,7 @@ msgstr "" #: ../../../CONTRIBUTING.rst:36 msgid "" "List your Python and Flask versions. If possible, check if this issue is " -"already fixed in the latest releases or the latest code in the " -"repository." +"already fixed in the latest releases or the latest code in the repository." msgstr "" #: ../../../CONTRIBUTING.rst:44 @@ -91,11 +91,11 @@ msgstr "" #: ../../../CONTRIBUTING.rst:46 msgid "" -"If there is not an open issue for what you want to submit, prefer opening" -" one for discussion before working on a PR. You can work on any issue " -"that doesn't have an open PR linked to it or a maintainer assigned to it." -" These show up in the sidebar. No need to ask if you can work on an issue" -" that interests you." +"If there is not an open issue for what you want to submit, prefer opening " +"one for discussion before working on a PR. You can work on any issue that " +"doesn't have an open PR linked to it or a maintainer assigned to it. These" +" show up in the sidebar. No need to ask if you can work on an issue that " +"interests you." msgstr "" #: ../../../CONTRIBUTING.rst:52 @@ -110,8 +110,8 @@ msgstr "" #: ../../../CONTRIBUTING.rst:57 msgid "" -"Include tests if your patch adds or changes code. Make sure the test " -"fails without your patch." +"Include tests if your patch adds or changes code. Make sure the test fails" +" without your patch." msgstr "" #: ../../../CONTRIBUTING.rst:59 @@ -122,9 +122,8 @@ msgstr "" #: ../../../CONTRIBUTING.rst:61 msgid "" -"Add an entry in ``CHANGES.rst``. Use the same style as other entries. " -"Also include ``.. versionchanged::`` inline changelogs in relevant " -"docstrings." +"Add an entry in ``CHANGES.rst``. Use the same style as other entries. Also" +" include ``.. versionchanged::`` inline changelogs in relevant docstrings." msgstr "" #: ../../../CONTRIBUTING.rst:70 @@ -175,7 +174,8 @@ msgid "Upgrade pip and setuptools." msgstr "" #: ../../../CONTRIBUTING.rst:121 -msgid "Install the development dependencies, then install Flask in editable mode." +msgid "" +"Install the development dependencies, then install Flask in editable mode." msgstr "" #: ../../../CONTRIBUTING.rst:128 @@ -188,9 +188,9 @@ msgstr "" #: ../../../CONTRIBUTING.rst:145 msgid "" -"Create a branch to identify the issue you would like to work on. If " -"you're submitting a bug or documentation fix, branch off of the latest " -"\".x\" branch." +"Create a branch to identify the issue you would like to work on. If you're" +" submitting a bug or documentation fix, branch off of the latest \".x\" " +"branch." msgstr "" #: ../../../CONTRIBUTING.rst:154 @@ -200,7 +200,8 @@ msgid "" msgstr "" #: ../../../CONTRIBUTING.rst:162 -msgid "Using your favorite editor, make your changes, `committing as you go`_." +msgid "" +"Using your favorite editor, make your changes, `committing as you go`_." msgstr "" #: ../../../CONTRIBUTING.rst:164 @@ -212,8 +213,7 @@ msgstr "" #: ../../../CONTRIBUTING.rst:166 msgid "" "Push your commits to your fork on GitHub and `create a pull request`_. " -"Link to the issue being addressed with ``fixes #123`` in the pull " -"request." +"Link to the issue being addressed with ``fixes #123`` in the pull request." msgstr "" #: ../../../CONTRIBUTING.rst:179 @@ -227,8 +227,8 @@ msgstr "" #: ../../../CONTRIBUTING.rst:187 msgid "" "This runs the tests for the current environment, which is usually " -"sufficient. CI will run the full suite when you submit your pull request." -" You can run the full test suite with tox if you don't want to wait." +"sufficient. CI will run the full suite when you submit your pull request. " +"You can run the full test suite with tox if you don't want to wait." msgstr "" #: ../../../CONTRIBUTING.rst:198 @@ -265,4 +265,3 @@ msgstr "" #: ../../../CONTRIBUTING.rst:227 msgid "Read more about `Sphinx `__." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/debugging.po b/docs/locales/zh_CN/LC_MESSAGES/debugging.po index 919b7274c..fe70c862f 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/debugging.po +++ b/docs/locales/zh_CN/LC_MESSAGES/debugging.po @@ -27,10 +27,10 @@ msgstr "" #: ../../debugging.rst:8 msgid "" -"**Do not run the development server, or enable the built-in debugger, in " -"a production environment.** The debugger allows executing arbitrary " -"Python code from the browser. It's protected by a pin, but that should " -"not be relied on for security." +"**Do not run the development server, or enable the built-in debugger, in a" +" production environment.** The debugger allows executing arbitrary Python " +"code from the browser. It's protected by a pin, but that should not be " +"relied on for security." msgstr "" #: ../../debugging.rst:13 @@ -65,14 +65,14 @@ msgstr "" #: ../../debugging.rst:37 msgid "" "The debugger allows executing arbitrary Python code from the browser. It " -"is protected by a pin, but still represents a major security risk. Do not" -" run the development server or debugger in a production environment." +"is protected by a pin, but still represents a major security risk. Do not " +"run the development server or debugger in a production environment." msgstr "" #: ../../debugging.rst:42 msgid "" -"To enable the debugger, run the development server with the ``FLASK_ENV``" -" environment variable set to ``development``. This puts Flask in debug " +"To enable the debugger, run the development server with the ``FLASK_ENV`` " +"environment variable set to ``development``. This puts Flask in debug " "mode, which changes how it handles some errors, and enables the debugger " "and reloader." msgstr "" @@ -112,17 +112,17 @@ msgstr "" #: ../../debugging.rst:88 msgid "" "External debuggers, such as those provided by IDEs, can offer a more " -"powerful debugging experience than the built-in debugger. They can also " -"be used to step through code during a request before an error is raised, " -"or if no error is raised. Some even have a remote mode so you can debug " -"code running on another machine." +"powerful debugging experience than the built-in debugger. They can also be" +" used to step through code during a request before an error is raised, or " +"if no error is raised. Some even have a remote mode so you can debug code " +"running on another machine." msgstr "" #: ../../debugging.rst:94 msgid "" "When using an external debugger, the app should still be in debug mode, " -"but it can be useful to disable the built-in debugger and reloader, which" -" can interfere." +"but it can be useful to disable the built-in debugger and reloader, which " +"can interfere." msgstr "" #: ../../debugging.rst:98 @@ -135,10 +135,9 @@ msgstr "" #: ../../debugging.rst:129 msgid "" -"Disabling these isn't required, an external debugger will continue to " -"work with the following caveats. If the built-in debugger is not " -"disabled, it will catch unhandled exceptions before the external debugger" -" can. If the reloader is not disabled, it could cause an unexpected " -"reload if code changes during debugging." +"Disabling these isn't required, an external debugger will continue to work" +" with the following caveats. If the built-in debugger is not disabled, it " +"will catch unhandled exceptions before the external debugger can. If the " +"reloader is not disabled, it could cause an unexpected reload if code " +"changes during debugging." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/deploying/asgi.po b/docs/locales/zh_CN/LC_MESSAGES/deploying/asgi.po index 40ededd36..c16f45da7 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/deploying/asgi.po +++ b/docs/locales/zh_CN/LC_MESSAGES/deploying/asgi.po @@ -23,11 +23,12 @@ msgstr "" #: ../../deploying/asgi.rst:6 msgid "" -"If you'd like to use an ASGI server you will need to utilise WSGI to ASGI" -" middleware. The asgiref [WsgiToAsgi](https://github.com/django/asgiref" -"#wsgi-to-asgi-adapter) adapter is recommended as it integrates with the " -"event loop used for Flask's :ref:`async_await` support. You can use the " -"adapter by wrapping the Flask app," +"If you'd like to use an ASGI server you will need to utilise WSGI to ASGI " +"middleware. The asgiref " +"[WsgiToAsgi](https://github.com/django/asgiref#wsgi-to-asgi-adapter) " +"adapter is recommended as it integrates with the event loop used for " +"Flask's :ref:`async_await` support. You can use the adapter by wrapping " +"the Flask app," msgstr "" #: ../../deploying/asgi.rst:24 @@ -35,4 +36,3 @@ msgid "" "and then serving the ``asgi_app`` with the asgi server, e.g. using " "`Hypercorn `_," msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/deploying/cgi.po b/docs/locales/zh_CN/LC_MESSAGES/deploying/cgi.po index 572380b7f..cf2970d67 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/deploying/cgi.po +++ b/docs/locales/zh_CN/LC_MESSAGES/deploying/cgi.po @@ -40,17 +40,17 @@ msgstr "" #: ../../deploying/cgi.rst:13 msgid "" -"Please make sure in advance that any ``app.run()`` calls you might have " -"in your application file are inside an ``if __name__ == '__main__':`` " -"block or moved to a separate file. Just make sure it's not called " -"because this will always start a local WSGI server which we do not want " -"if we deploy that application to CGI / app engine." +"Please make sure in advance that any ``app.run()`` calls you might have in" +" your application file are inside an ``if __name__ == '__main__':`` block " +"or moved to a separate file. Just make sure it's not called because this " +"will always start a local WSGI server which we do not want if we deploy " +"that application to CGI / app engine." msgstr "" #: ../../deploying/cgi.rst:19 msgid "" -"With CGI, you will also have to make sure that your code does not contain" -" any ``print`` statements, or that ``sys.stdout`` is overridden by " +"With CGI, you will also have to make sure that your code does not contain " +"any ``print`` statements, or that ``sys.stdout`` is overridden by " "something that doesn't write into the HTTP response." msgstr "" @@ -70,13 +70,14 @@ msgstr "" #: ../../deploying/cgi.rst:38 msgid "" -"Usually there are two ways to configure the server. Either just copy the" -" ``.cgi`` into a :file:`cgi-bin` (and use `mod_rewrite` or something " +"Usually there are two ways to configure the server. Either just copy the " +"``.cgi`` into a :file:`cgi-bin` (and use `mod_rewrite` or something " "similar to rewrite the URL) or let the server point to the file directly." msgstr "" #: ../../deploying/cgi.rst:42 -msgid "In Apache for example you can put something like this into the config:" +msgid "" +"In Apache for example you can put something like this into the config:" msgstr "" #: ../../deploying/cgi.rst:48 @@ -90,4 +91,3 @@ msgstr "" #: ../../deploying/cgi.rst:59 msgid "For more information consult the documentation of your webserver." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/deploying/fastcgi.po b/docs/locales/zh_CN/LC_MESSAGES/deploying/fastcgi.po index fffaef199..347aa9a3e 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/deploying/fastcgi.po +++ b/docs/locales/zh_CN/LC_MESSAGES/deploying/fastcgi.po @@ -23,8 +23,8 @@ msgstr "" #: ../../deploying/fastcgi.rst:4 msgid "" -"FastCGI is a deployment option on servers like `nginx`_, `lighttpd`_, and" -" `cherokee`_; see :doc:`uwsgi` and :doc:`wsgi-standalone` for other " +"FastCGI is a deployment option on servers like `nginx`_, `lighttpd`_, and " +"`cherokee`_; see :doc:`uwsgi` and :doc:`wsgi-standalone` for other " "options. To use your WSGI application with any of them you will need a " "FastCGI server first. The most popular one is `flup`_ which we will use " "for this guide. Make sure to have it installed to follow along." @@ -36,11 +36,11 @@ msgstr "" #: ../../deploying/fastcgi.rst:12 msgid "" -"Please make sure in advance that any ``app.run()`` calls you might have " -"in your application file are inside an ``if __name__ == '__main__':`` " -"block or moved to a separate file. Just make sure it's not called " -"because this will always start a local WSGI server which we do not want " -"if we deploy that application to FastCGI." +"Please make sure in advance that any ``app.run()`` calls you might have in" +" your application file are inside an ``if __name__ == '__main__':`` block " +"or moved to a separate file. Just make sure it's not called because this " +"will always start a local WSGI server which we do not want if we deploy " +"that application to FastCGI." msgstr "" #: ../../deploying/fastcgi.rst:19 @@ -57,19 +57,20 @@ msgstr "" msgid "" "This is enough for Apache to work, however nginx and older versions of " "lighttpd need a socket to be explicitly passed to communicate with the " -"FastCGI server. For that to work you need to pass the path to the socket" -" to the :class:`~flup.server.fcgi.WSGIServer`::" +"FastCGI server. For that to work you need to pass the path to the socket " +"to the :class:`~flup.server.fcgi.WSGIServer`::" msgstr "" #: ../../deploying/fastcgi.rst:38 -msgid "The path has to be the exact same path you define in the server config." +msgid "" +"The path has to be the exact same path you define in the server config." msgstr "" #: ../../deploying/fastcgi.rst:41 msgid "" "Save the :file:`yourapplication.fcgi` file somewhere you will find it " -"again. It makes sense to have that in :file:`/var/www/yourapplication` or" -" something similar." +"again. It makes sense to have that in :file:`/var/www/yourapplication` or " +"something similar." msgstr "" #: ../../deploying/fastcgi.rst:45 @@ -87,8 +88,8 @@ msgid "" "The example above is good enough for a basic Apache deployment but your " "`.fcgi` file will appear in your application URL e.g. " "``example.com/yourapplication.fcgi/news/``. There are few ways to " -"configure your application so that yourapplication.fcgi does not appear " -"in the URL. A preferable way is to use the ScriptAlias and SetHandler " +"configure your application so that yourapplication.fcgi does not appear in" +" the URL. A preferable way is to use the ScriptAlias and SetHandler " "configuration directives to route requests to the FastCGI server. The " "following example uses FastCgiServer to start 5 instances of the " "application which will handle all incoming requests::" @@ -124,10 +125,10 @@ msgstr "" #: ../../deploying/fastcgi.rst:153 msgid "" "Remember to enable the FastCGI, alias and rewrite modules. This " -"configuration binds the application to ``/yourapplication``. If you want" -" the application to work in the URL root you have to work around a " -"lighttpd bug with the " -":class:`~werkzeug.contrib.fixers.LighttpdCGIRootFix` middleware." +"configuration binds the application to ``/yourapplication``. If you want " +"the application to work in the URL root you have to work around a lighttpd" +" bug with the :class:`~werkzeug.contrib.fixers.LighttpdCGIRootFix` " +"middleware." msgstr "" #: ../../deploying/fastcgi.rst:158 @@ -155,9 +156,9 @@ msgstr "" #: ../../deploying/fastcgi.rst:181 msgid "" -"This configuration binds the application to ``/yourapplication``. If you" -" want to have it in the URL root it's a bit simpler because you don't " -"have to figure out how to calculate ``PATH_INFO`` and ``SCRIPT_NAME``::" +"This configuration binds the application to ``/yourapplication``. If you " +"want to have it in the URL root it's a bit simpler because you don't have " +"to figure out how to calculate ``PATH_INFO`` and ``SCRIPT_NAME``::" msgstr "" #: ../../deploying/fastcgi.rst:194 @@ -184,10 +185,10 @@ msgstr "" #: ../../deploying/fastcgi.rst:211 msgid "" "FastCGI deployments tend to be hard to debug on most web servers. Very " -"often the only thing the server log tells you is something along the " -"lines of \"premature end of headers\". In order to debug the application" -" the only thing that can really give you ideas why it breaks is switching" -" to the correct user and executing the application by hand." +"often the only thing the server log tells you is something along the lines" +" of \"premature end of headers\". In order to debug the application the " +"only thing that can really give you ideas why it breaks is switching to " +"the correct user and executing the application by hand." msgstr "" #: ../../deploying/fastcgi.rst:217 @@ -203,7 +204,8 @@ msgid "" msgstr "" #: ../../deploying/fastcgi.rst:230 -msgid "Relative paths being used. Don't rely on the current working directory." +msgid "" +"Relative paths being used. Don't rely on the current working directory." msgstr "" #: ../../deploying/fastcgi.rst:231 @@ -215,4 +217,3 @@ msgstr "" #: ../../deploying/fastcgi.rst:233 msgid "Different python interpreters being used." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/deploying/index.po b/docs/locales/zh_CN/LC_MESSAGES/deploying/index.po index 10c136ebb..17d54bde0 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/deploying/index.po +++ b/docs/locales/zh_CN/LC_MESSAGES/deploying/index.po @@ -42,8 +42,8 @@ msgstr "" #: ../../deploying/index.rst:17 msgid "" -"`Deploying Flask on Heroku `_" +"`Deploying Flask on Heroku `_" msgstr "" #: ../../deploying/index.rst:18 @@ -80,4 +80,3 @@ msgstr "" #: ../../deploying/index.rst:25 msgid "Self-hosted options" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/deploying/mod_wsgi.po b/docs/locales/zh_CN/LC_MESSAGES/deploying/mod_wsgi.po index 1a182f6e6..d1b1c7799 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/deploying/mod_wsgi.po +++ b/docs/locales/zh_CN/LC_MESSAGES/deploying/mod_wsgi.po @@ -22,7 +22,8 @@ msgid "mod_wsgi (Apache)" msgstr "" #: ../../deploying/mod_wsgi.rst:4 -msgid "If you are using the `Apache`_ webserver, consider using `mod_wsgi`_." +msgid "" +"If you are using the `Apache`_ webserver, consider using `mod_wsgi`_." msgstr "" #: ../../deploying/mod_wsgi.rst:6 @@ -31,11 +32,11 @@ msgstr "" #: ../../deploying/mod_wsgi.rst:8 msgid "" -"Please make sure in advance that any ``app.run()`` calls you might have " -"in your application file are inside an ``if __name__ == '__main__':`` " -"block or moved to a separate file. Just make sure it's not called " -"because this will always start a local WSGI server which we do not want " -"if we deploy that application to mod_wsgi." +"Please make sure in advance that any ``app.run()`` calls you might have in" +" your application file are inside an ``if __name__ == '__main__':`` block " +"or moved to a separate file. Just make sure it's not called because this " +"will always start a local WSGI server which we do not want if we deploy " +"that application to mod_wsgi." msgstr "" #: ../../deploying/mod_wsgi.rst:17 @@ -75,8 +76,8 @@ msgstr "" #: ../../deploying/mod_wsgi.rst:47 msgid "" -"If you encounter segfaulting child processes after the first apache " -"reload you can safely ignore them. Just restart the server." +"If you encounter segfaulting child processes after the first apache reload" +" you can safely ignore them. Just restart the server." msgstr "" #: ../../deploying/mod_wsgi.rst:51 @@ -85,10 +86,10 @@ msgstr "" #: ../../deploying/mod_wsgi.rst:53 msgid "" -"To run your application you need a :file:`yourapplication.wsgi` file. " -"This file contains the code `mod_wsgi` is executing on startup to get the" -" application object. The object called `application` in that file is " -"then used as application." +"To run your application you need a :file:`yourapplication.wsgi` file. This" +" file contains the code `mod_wsgi` is executing on startup to get the " +"application object. The object called `application` in that file is then " +"used as application." msgstr "" #: ../../deploying/mod_wsgi.rst:58 @@ -110,12 +111,12 @@ msgstr "" #: ../../deploying/mod_wsgi.rst:70 msgid "" "Store that file somewhere that you will find it again (e.g.: " -":file:`/var/www/yourapplication`) and make sure that `yourapplication` " -"and all the libraries that are in use are on the python load path. If " -"you don't want to install it system wide consider using a `virtual " -"python`_ instance. Keep in mind that you will have to actually install " -"your application into the virtualenv as well. Alternatively there is the" -" option to just patch the path in the ``.wsgi`` file before the import::" +":file:`/var/www/yourapplication`) and make sure that `yourapplication` and" +" all the libraries that are in use are on the python load path. If you " +"don't want to install it system wide consider using a `virtual python`_ " +"instance. Keep in mind that you will have to actually install your " +"application into the virtualenv as well. Alternatively there is the " +"option to just patch the path in the ``.wsgi`` file before the import::" msgstr "" #: ../../deploying/mod_wsgi.rst:82 @@ -132,8 +133,8 @@ msgstr "" #: ../../deploying/mod_wsgi.rst:104 msgid "" "Note: WSGIDaemonProcess isn't implemented in Windows and Apache will " -"refuse to run with the above configuration. On a Windows system, " -"eliminate those lines:" +"refuse to run with the above configuration. On a Windows system, eliminate" +" those lines:" msgstr "" #: ../../deploying/mod_wsgi.rst:118 @@ -144,8 +145,8 @@ msgstr "" #: ../../deploying/mod_wsgi.rst:123 msgid "" -"Most notably, the syntax for directory permissions has changed from httpd" -" 2.2" +"Most notably, the syntax for directory permissions has changed from httpd " +"2.2" msgstr "" #: ../../deploying/mod_wsgi.rst:130 @@ -165,7 +166,8 @@ msgid "If your application does not run, follow this guide to troubleshoot:" msgstr "" #: ../../deploying/mod_wsgi.rst:153 -msgid "**Problem:** application does not run, errorlog shows SystemExit ignored" +msgid "" +"**Problem:** application does not run, errorlog shows SystemExit ignored" msgstr "" #: ../../deploying/mod_wsgi.rst:150 @@ -182,9 +184,9 @@ msgstr "" #: ../../deploying/mod_wsgi.rst:156 msgid "" -"Probably caused by your application running as the wrong user. Make sure" -" the folders the application needs access to have the proper privileges " -"set and the application runs as the correct user (``user`` and ``group`` " +"Probably caused by your application running as the wrong user. Make sure " +"the folders the application needs access to have the proper privileges set" +" and the application runs as the correct user (``user`` and ``group`` " "parameter to the `WSGIDaemonProcess` directive)" msgstr "" @@ -196,14 +198,13 @@ msgstr "" msgid "" "Keep in mind that mod_wsgi disallows doing anything with " ":data:`sys.stdout` and :data:`sys.stderr`. You can disable this " -"protection from the config by setting the `WSGIRestrictStdout` to " -"``off``:" +"protection from the config by setting the `WSGIRestrictStdout` to ``off``:" msgstr "" #: ../../deploying/mod_wsgi.rst:172 msgid "" -"Alternatively you can also replace the standard out in the .wsgi file " -"with a different stream::" +"Alternatively you can also replace the standard out in the .wsgi file with" +" a different stream::" msgstr "" #: ../../deploying/mod_wsgi.rst:186 @@ -231,13 +232,14 @@ msgstr "" #: ../../deploying/mod_wsgi.rst:191 msgid "" -"To help deployment tools you can activate support for automatic " -"reloading. Whenever something changes the ``.wsgi`` file, `mod_wsgi` " -"will reload all the daemon processes for us." +"To help deployment tools you can activate support for automatic reloading." +" Whenever something changes the ``.wsgi`` file, `mod_wsgi` will reload " +"all the daemon processes for us." msgstr "" #: ../../deploying/mod_wsgi.rst:195 -msgid "For that, just add the following directive to your `Directory` section:" +msgid "" +"For that, just add the following directive to your `Directory` section:" msgstr "" #: ../../deploying/mod_wsgi.rst:202 @@ -248,8 +250,8 @@ msgstr "" msgid "" "Virtual environments have the advantage that they never install the " "required dependencies system wide so you have a better control over what " -"is used where. If you want to use a virtual environment with mod_wsgi " -"you have to modify your ``.wsgi`` file slightly." +"is used where. If you want to use a virtual environment with mod_wsgi you" +" have to modify your ``.wsgi`` file slightly." msgstr "" #: ../../deploying/mod_wsgi.rst:209 @@ -261,4 +263,3 @@ msgid "" "This sets up the load paths according to the settings of the virtual " "environment. Keep in mind that the path has to be absolute." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/deploying/uwsgi.po b/docs/locales/zh_CN/LC_MESSAGES/deploying/uwsgi.po index f612ef789..223590a75 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/deploying/uwsgi.po +++ b/docs/locales/zh_CN/LC_MESSAGES/deploying/uwsgi.po @@ -25,8 +25,8 @@ msgstr "" msgid "" "uWSGI is a deployment option on servers like `nginx`_, `lighttpd`_, and " "`cherokee`_; see :doc:`fastcgi` and :doc:`wsgi-standalone` for other " -"options. To use your WSGI application with uWSGI protocol you will need a" -" uWSGI server first. uWSGI is both a protocol and an application server; " +"options. To use your WSGI application with uWSGI protocol you will need a " +"uWSGI server first. uWSGI is both a protocol and an application server; " "the application server can serve uWSGI, FastCGI, and HTTP protocols." msgstr "" @@ -42,11 +42,11 @@ msgstr "" #: ../../deploying/uwsgi.rst:15 msgid "" -"Please make sure in advance that any ``app.run()`` calls you might have " -"in your application file are inside an ``if __name__ == '__main__':`` " -"block or moved to a separate file. Just make sure it's not called " -"because this will always start a local WSGI server which we do not want " -"if we deploy that application to uWSGI." +"Please make sure in advance that any ``app.run()`` calls you might have in" +" your application file are inside an ``if __name__ == '__main__':`` block " +"or moved to a separate file. Just make sure it's not called because this " +"will always start a local WSGI server which we do not want if we deploy " +"that application to uWSGI." msgstr "" #: ../../deploying/uwsgi.rst:22 @@ -54,7 +54,8 @@ msgid "Starting your app with uwsgi" msgstr "" #: ../../deploying/uwsgi.rst:24 -msgid "`uwsgi` is designed to operate on WSGI callables found in python modules." +msgid "" +"`uwsgi` is designed to operate on WSGI callables found in python modules." msgstr "" #: ../../deploying/uwsgi.rst:26 @@ -63,10 +64,10 @@ msgstr "" #: ../../deploying/uwsgi.rst:32 msgid "" -"The ``--manage-script-name`` will move the handling of ``SCRIPT_NAME`` to" -" uwsgi, since it is smarter about that. It is used together with the " -"``--mount`` directive which will make requests to ``/yourapplication`` be" -" directed to ``myapp:app``. If your application is accessible at root " +"The ``--manage-script-name`` will move the handling of ``SCRIPT_NAME`` to " +"uwsgi, since it is smarter about that. It is used together with the " +"``--mount`` directive which will make requests to ``/yourapplication`` be " +"directed to ``myapp:app``. If your application is accessible at root " "level, you can use a single ``/`` instead of ``/yourapplication``. " "``myapp`` refers to the name of the file of your flask application " "(without extension) or the module which provides ``app``. ``app`` is the " @@ -79,8 +80,8 @@ msgid "" "If you want to deploy your flask application inside of a virtual " "environment, you need to also add ``--virtualenv " "/path/to/virtual/environment``. You might also need to add ``--plugin " -"python`` or ``--plugin python3`` depending on which python version you " -"use for your project." +"python`` or ``--plugin python3`` depending on which python version you use" +" for your project." msgstr "" #: ../../deploying/uwsgi.rst:48 @@ -93,7 +94,6 @@ msgstr "" #: ../../deploying/uwsgi.rst:59 msgid "" -"This configuration binds the application to ``/yourapplication``. If you" -" want to have it in the URL root its a bit simpler::" +"This configuration binds the application to ``/yourapplication``. If you " +"want to have it in the URL root its a bit simpler::" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/deploying/wsgi-standalone.po b/docs/locales/zh_CN/LC_MESSAGES/deploying/wsgi-standalone.po index dab2ce768..8d9af4732 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/deploying/wsgi-standalone.po +++ b/docs/locales/zh_CN/LC_MESSAGES/deploying/wsgi-standalone.po @@ -23,10 +23,10 @@ msgstr "" #: ../../deploying/wsgi-standalone.rst:4 msgid "" -"There are popular servers written in Python that contain WSGI " -"applications and serve HTTP. These servers stand alone when they run; " -"you can proxy to them from your web server. Note the section on :ref" -":`deploying-proxy-setups` if you run into issues." +"There are popular servers written in Python that contain WSGI applications" +" and serve HTTP. These servers stand alone when they run; you can proxy " +"to them from your web server. Note the section on :ref:`deploying-proxy-" +"setups` if you run into issues." msgstr "" #: ../../deploying/wsgi-standalone.rst:10 @@ -37,15 +37,15 @@ msgstr "" msgid "" "`Gunicorn`_ 'Green Unicorn' is a WSGI HTTP Server for UNIX. It's a pre-" "fork worker model ported from Ruby's Unicorn project. It supports both " -"`eventlet`_ and `greenlet`_. Running a Flask application on this server " -"is quite simple::" +"`eventlet`_ and `greenlet`_. Running a Flask application on this server is" +" quite simple::" msgstr "" #: ../../deploying/wsgi-standalone.rst:18 msgid "" -"`Gunicorn`_ provides many command-line options -- see ``gunicorn -h``. " -"For example, to run a Flask application with 4 worker processes (``-w " -"4``) binding to localhost port 4000 (``-b 127.0.0.1:4000``)::" +"`Gunicorn`_ provides many command-line options -- see ``gunicorn -h``. For" +" example, to run a Flask application with 4 worker processes (``-w 4``) " +"binding to localhost port 4000 (``-b 127.0.0.1:4000``)::" msgstr "" #: ../../deploying/wsgi-standalone.rst:24 @@ -119,18 +119,18 @@ msgstr "" #: ../../deploying/wsgi-standalone.rst:94 msgid "" "If you deploy your application using one of these servers behind an HTTP " -"proxy you will need to rewrite a few headers in order for the application" -" to work. The two problematic values in the WSGI environment usually are " +"proxy you will need to rewrite a few headers in order for the application " +"to work. The two problematic values in the WSGI environment usually are " "``REMOTE_ADDR`` and ``HTTP_HOST``. You can configure your httpd to pass " -"these headers, or you can fix them in middleware. Werkzeug ships a fixer" -" that will solve some common setups, but you might want to write your own" -" WSGI middleware for specific setups." +"these headers, or you can fix them in middleware. Werkzeug ships a fixer " +"that will solve some common setups, but you might want to write your own " +"WSGI middleware for specific setups." msgstr "" #: ../../deploying/wsgi-standalone.rst:102 msgid "" -"Here's a simple nginx configuration which proxies to an application " -"served on localhost at port 8000, setting appropriate headers:" +"Here's a simple nginx configuration which proxies to an application served" +" on localhost at port 8000, setting appropriate headers:" msgstr "" #: ../../deploying/wsgi-standalone.rst:126 @@ -153,7 +153,6 @@ msgstr "" #: ../../deploying/wsgi-standalone.rst:139 msgid "" -"If you want to rewrite the headers from another header, you might want to" -" use a fixer like this::" +"If you want to rewrite the headers from another header, you might want to " +"use a fixer like this::" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/design.po b/docs/locales/zh_CN/LC_MESSAGES/design.po index 2d88110e9..ae8c41460 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/design.po +++ b/docs/locales/zh_CN/LC_MESSAGES/design.po @@ -24,9 +24,9 @@ msgstr "" #: ../../design.rst:4 msgid "" "If you are curious why Flask does certain things the way it does and not " -"differently, this section is for you. This should give you an idea about" -" some of the design decisions that may appear arbitrary and surprising at" -" first, especially in direct comparison with other frameworks." +"differently, this section is for you. This should give you an idea about " +"some of the design decisions that may appear arbitrary and surprising at " +"first, especially in direct comparison with other frameworks." msgstr "" #: ../../design.rst:11 @@ -56,9 +56,9 @@ msgid "" "implicit application objects require that there may only be one instance " "at the time. There are ways to fake multiple applications with a single " "application object, like maintaining a stack of applications, but this " -"causes some problems I won't outline here in detail. Now the question " -"is: when does a microframework need more than one application at the same" -" time? A good example for this is unit testing. When you want to test " +"causes some problems I won't outline here in detail. Now the question is:" +" when does a microframework need more than one application at the same " +"time? A good example for this is unit testing. When you want to test " "something it can be very helpful to create a minimal application to test " "specific behavior. When the application object is deleted everything it " "allocated will be freed again." @@ -66,8 +66,8 @@ msgstr "" #: ../../design.rst:47 msgid "" -"Another thing that becomes possible when you have an explicit object " -"lying around in your code is that you can subclass the base class " +"Another thing that becomes possible when you have an explicit object lying" +" around in your code is that you can subclass the base class " "(:class:`~flask.Flask`) to alter specific behavior. This would not be " "possible without hacks if the object were created ahead of time for you " "based on a class that is not exposed to you." @@ -79,34 +79,34 @@ msgid "" "explicit instantiation of that class: the package name. Whenever you " "create a Flask instance you usually pass it `__name__` as package name. " "Flask depends on that information to properly load resources relative to " -"your module. With Python's outstanding support for reflection it can " -"then access the package to figure out where the templates and static " -"files are stored (see :meth:`~flask.Flask.open_resource`). Now obviously" -" there are frameworks around that do not need any configuration and will " -"still be able to load templates relative to your application module. But" -" they have to use the current working directory for that, which is a very" -" unreliable way to determine where the application is. The current " -"working directory is process-wide and if you are running multiple " -"applications in one process (which could happen in a webserver without " -"you knowing) the paths will be off. Worse: many webservers do not set " -"the working directory to the directory of your application but to the " -"document root which does not have to be the same folder." +"your module. With Python's outstanding support for reflection it can then" +" access the package to figure out where the templates and static files are" +" stored (see :meth:`~flask.Flask.open_resource`). Now obviously there are" +" frameworks around that do not need any configuration and will still be " +"able to load templates relative to your application module. But they have" +" to use the current working directory for that, which is a very unreliable" +" way to determine where the application is. The current working directory" +" is process-wide and if you are running multiple applications in one " +"process (which could happen in a webserver without you knowing) the paths " +"will be off. Worse: many webservers do not set the working directory to " +"the directory of your application but to the document root which does not " +"have to be the same folder." msgstr "" #: ../../design.rst:70 msgid "" -"The third reason is \"explicit is better than implicit\". That object is" -" your WSGI application, you don't have to remember anything else. If you" -" want to apply a WSGI middleware, just wrap it and you're done (though " -"there are better ways to do that so that you do not lose the reference to" -" the application object :meth:`~flask.Flask.wsgi_app`)." +"The third reason is \"explicit is better than implicit\". That object is " +"your WSGI application, you don't have to remember anything else. If you " +"want to apply a WSGI middleware, just wrap it and you're done (though " +"there are better ways to do that so that you do not lose the reference to " +"the application object :meth:`~flask.Flask.wsgi_app`)." msgstr "" #: ../../design.rst:76 msgid "" "Furthermore this design makes it possible to use a factory function to " -"create the application which is very helpful for unit testing and similar" -" things (:doc:`/patterns/appfactories`)." +"create the application which is very helpful for unit testing and similar " +"things (:doc:`/patterns/appfactories`)." msgstr "" #: ../../design.rst:81 @@ -115,20 +115,20 @@ msgstr "" #: ../../design.rst:83 msgid "" -"Flask uses the Werkzeug routing system which was designed to " -"automatically order routes by complexity. This means that you can " -"declare routes in arbitrary order and they will still work as expected. " -"This is a requirement if you want to properly implement decorator based " -"routing since decorators could be fired in undefined order when the " -"application is split into multiple modules." +"Flask uses the Werkzeug routing system which was designed to automatically" +" order routes by complexity. This means that you can declare routes in " +"arbitrary order and they will still work as expected. This is a " +"requirement if you want to properly implement decorator based routing " +"since decorators could be fired in undefined order when the application is" +" split into multiple modules." msgstr "" #: ../../design.rst:90 msgid "" -"Another design decision with the Werkzeug routing system is that routes " -"in Werkzeug try to ensure that URLs are unique. Werkzeug will go quite " -"far with that in that it will automatically redirect to a canonical URL " -"if a route is ambiguous." +"Another design decision with the Werkzeug routing system is that routes in" +" Werkzeug try to ensure that URLs are unique. Werkzeug will go quite far " +"with that in that it will automatically redirect to a canonical URL if a " +"route is ambiguous." msgstr "" #: ../../design.rst:97 @@ -140,14 +140,14 @@ msgid "" "Flask decides on one template engine: Jinja2. Why doesn't Flask have a " "pluggable template engine interface? You can obviously use a different " "template engine, but Flask will still configure Jinja2 for you. While " -"that limitation that Jinja2 is *always* configured will probably go away," -" the decision to bundle one template engine and use that will not." +"that limitation that Jinja2 is *always* configured will probably go away, " +"the decision to bundle one template engine and use that will not." msgstr "" #: ../../design.rst:105 msgid "" -"Template engines are like programming languages and each of those engines" -" has a certain understanding about how things work. On the surface they " +"Template engines are like programming languages and each of those engines " +"has a certain understanding about how things work. On the surface they " "all work the same: you tell the engine to evaluate a template with a set " "of variables and take the return value as string." msgstr "" @@ -155,21 +155,21 @@ msgstr "" #: ../../design.rst:110 msgid "" "But that's about where similarities end. Jinja2 for example has an " -"extensive filter system, a certain way to do template inheritance, " -"support for reusable blocks (macros) that can be used from inside " -"templates and also from Python code, supports iterative template " -"rendering, configurable syntax and more. On the other hand an engine like" -" Genshi is based on XML stream evaluation, template inheritance by taking" -" the availability of XPath into account and more. Mako on the other hand " -"treats templates similar to Python modules." +"extensive filter system, a certain way to do template inheritance, support" +" for reusable blocks (macros) that can be used from inside templates and " +"also from Python code, supports iterative template rendering, configurable" +" syntax and more. On the other hand an engine like Genshi is based on XML " +"stream evaluation, template inheritance by taking the availability of " +"XPath into account and more. Mako on the other hand treats templates " +"similar to Python modules." msgstr "" #: ../../design.rst:119 msgid "" "When it comes to connecting a template engine with an application or " "framework there is more than just rendering templates. For instance, " -"Flask uses Jinja2's extensive autoescaping support. Also it provides " -"ways to access macros from Jinja2 templates." +"Flask uses Jinja2's extensive autoescaping support. Also it provides ways" +" to access macros from Jinja2 templates." msgstr "" #: ../../design.rst:124 @@ -197,13 +197,13 @@ msgid "" "over to the Ruby side of web development there we have a protocol very " "similar to WSGI. Just that it's called Rack there, but besides that it " "looks very much like a WSGI rendition for Ruby. But nearly all " -"applications in Ruby land do not work with Rack directly, but on top of a" -" library with the same name. This Rack library has two equivalents in " +"applications in Ruby land do not work with Rack directly, but on top of a " +"library with the same name. This Rack library has two equivalents in " "Python: WebOb (formerly Paste) and Werkzeug. Paste is still around but " "from my understanding it's sort of deprecated in favour of WebOb. The " -"development of WebOb and Werkzeug started side by side with similar ideas" -" in mind: be a good implementation of WSGI for other applications to take" -" advantage." +"development of WebOb and Werkzeug started side by side with similar ideas " +"in mind: be a good implementation of WSGI for other applications to take " +"advantage." msgstr "" #: ../../design.rst:149 @@ -212,8 +212,7 @@ msgid "" "Werkzeug to properly interface WSGI (which can be a complex task at " "times). Thanks to recent developments in the Python package " "infrastructure, packages with dependencies are no longer an issue and " -"there are very few reasons against having libraries that depend on " -"others." +"there are very few reasons against having libraries that depend on others." msgstr "" #: ../../design.rst:157 @@ -224,17 +223,17 @@ msgstr "" msgid "" "Flask uses thread local objects (context local objects in fact, they " "support greenlet contexts as well) for request, session and an extra " -"object you can put your own things on (:data:`~flask.g`). Why is that " -"and isn't that a bad idea?" +"object you can put your own things on (:data:`~flask.g`). Why is that and" +" isn't that a bad idea?" msgstr "" #: ../../design.rst:164 msgid "" -"Yes it is usually not such a bright idea to use thread locals. They " -"cause troubles for servers that are not based on the concept of threads " -"and make large applications harder to maintain. However Flask is just " -"not designed for large applications or asynchronous servers. Flask wants" -" to make it quick and easy to write a traditional web application." +"Yes it is usually not such a bright idea to use thread locals. They cause" +" troubles for servers that are not based on the concept of threads and " +"make large applications harder to maintain. However Flask is just not " +"designed for large applications or asynchronous servers. Flask wants to " +"make it quick and easy to write a traditional web application." msgstr "" #: ../../design.rst:170 @@ -250,12 +249,12 @@ msgstr "" #: ../../design.rst:177 msgid "" "Flask supports ``async`` coroutines for view functions by executing the " -"coroutine on a separate thread instead of using an event loop on the main" -" thread as an async-first (ASGI) framework would. This is necessary for " -"Flask to remain backwards compatible with extensions and code built " -"before ``async`` was introduced into Python. This compromise introduces a" -" performance cost compared with the ASGI frameworks, due to the overhead " -"of the threads." +"coroutine on a separate thread instead of using an event loop on the main " +"thread as an async-first (ASGI) framework would. This is necessary for " +"Flask to remain backwards compatible with extensions and code built before" +" ``async`` was introduced into Python. This compromise introduces a " +"performance cost compared with the ASGI frameworks, due to the overhead of" +" the threads." msgstr "" #: ../../design.rst:185 @@ -277,8 +276,8 @@ msgstr "" #: ../../design.rst:196 msgid "" "Flask will never have a database layer. It will not have a form library " -"or anything else in that direction. Flask itself just bridges to " -"Werkzeug to implement a proper WSGI application and to Jinja2 to handle " +"or anything else in that direction. Flask itself just bridges to Werkzeug" +" to implement a proper WSGI application and to Jinja2 to handle " "templating. It also binds to a few common standard library packages such " "as logging. Everything else is up for extensions." msgstr "" @@ -286,8 +285,8 @@ msgstr "" #: ../../design.rst:202 msgid "" "Why is this the case? Because people have different preferences and " -"requirements and Flask could not meet those if it would force any of this" -" into the core. The majority of web applications will need a template " +"requirements and Flask could not meet those if it would force any of this " +"into the core. The majority of web applications will need a template " "engine in some sort. However not every application needs a SQL database." msgstr "" @@ -296,4 +295,3 @@ msgid "" "The idea of Flask is to build a good foundation for all applications. " "Everything else is up to you or extensions." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/errorhandling.po b/docs/locales/zh_CN/LC_MESSAGES/errorhandling.po index 5246b844e..4a267ca54 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/errorhandling.po +++ b/docs/locales/zh_CN/LC_MESSAGES/errorhandling.po @@ -24,11 +24,11 @@ msgstr "" #: ../../errorhandling.rst:4 #, python-format msgid "" -"Applications fail, servers fail. Sooner or later you will see an " -"exception in production. Even if your code is 100% correct, you will " -"still see exceptions from time to time. Why? Because everything else " -"involved will fail. Here are some situations where perfectly fine code " -"can lead to server errors:" +"Applications fail, servers fail. Sooner or later you will see an exception" +" in production. Even if your code is 100% correct, you will still see " +"exceptions from time to time. Why? Because everything else involved will " +"fail. Here are some situations where perfectly fine code can lead to " +"server errors:" msgstr "" #: ../../errorhandling.rst:10 @@ -63,17 +63,17 @@ msgstr "" #: ../../errorhandling.rst:19 msgid "" -"And that's just a small sample of issues you could be facing. So how do " -"we deal with that sort of problem? By default if your application runs in" -" production mode, and an exception is raised Flask will display a very " +"And that's just a small sample of issues you could be facing. So how do we" +" deal with that sort of problem? By default if your application runs in " +"production mode, and an exception is raised Flask will display a very " "simple page for you and log the exception to the " ":attr:`~flask.Flask.logger`." msgstr "" #: ../../errorhandling.rst:24 msgid "" -"But there is more you can do, and we will cover some better setups to " -"deal with errors including custom exceptions and 3rd party tools." +"But there is more you can do, and we will cover some better setups to deal" +" with errors including custom exceptions and 3rd party tools." msgstr "" #: ../../errorhandling.rst:31 @@ -85,13 +85,13 @@ msgid "" "Sending error mails, even if just for critical ones, can become " "overwhelming if enough users are hitting the error and log files are " "typically never looked at. This is why we recommend using `Sentry " -"`_ for dealing with application errors. It's " -"available as a source-available project `on GitHub " -"`_ and is also available as a " -"`hosted version `_ which you can try for free." -" Sentry aggregates duplicate errors, captures the full stack trace and " -"local variables for debugging, and sends you mails based on new errors or" -" frequency thresholds." +"`_ for dealing with application errors. It's available" +" as a source-available project `on GitHub " +"`_ and is also available as a `hosted" +" version `_ which you can try for free. Sentry " +"aggregates duplicate errors, captures the full stack trace and local " +"variables for debugging, and sends you mails based on new errors or " +"frequency thresholds." msgstr "" #: ../../errorhandling.rst:44 @@ -148,8 +148,8 @@ msgstr "" msgid "" "When an error occurs in Flask, an appropriate `HTTP status code " "`__ will be " -"returned. 400-499 indicate errors with the client's request data, or " -"about the data requested. 500-599 indicate errors with the server or " +"returned. 400-499 indicate errors with the client's request data, or about" +" the data requested. 500-599 indicate errors with the server or " "application itself." msgstr "" @@ -196,18 +196,18 @@ msgstr "" #: ../../errorhandling.rst:119 msgid "" -"Non-standard HTTP codes cannot be registered by code because they are not" -" known by Werkzeug. Instead, define a subclass of " -":class:`~werkzeug.exceptions.HTTPException` with the appropriate code and" -" register and raise that exception class." +"Non-standard HTTP codes cannot be registered by code because they are not " +"known by Werkzeug. Instead, define a subclass of " +":class:`~werkzeug.exceptions.HTTPException` with the appropriate code and " +"register and raise that exception class." msgstr "" #: ../../errorhandling.rst:134 msgid "" "Handlers can be registered for any exception class, not just " -":exc:`~werkzeug.exceptions.HTTPException` subclasses or HTTP status " -"codes. Handlers can be registered for a specific class, or for all " -"subclasses of a parent class." +":exc:`~werkzeug.exceptions.HTTPException` subclasses or HTTP status codes." +" Handlers can be registered for a specific class, or for all subclasses of" +" a parent class." msgstr "" #: ../../errorhandling.rst:141 @@ -216,9 +216,9 @@ msgstr "" #: ../../errorhandling.rst:143 msgid "" -"When building a Flask application you *will* run into exceptions. If some" -" part of your code breaks while handling a request (and you have no error" -" handlers registered), a \"500 Internal Server Error\" " +"When building a Flask application you *will* run into exceptions. If some " +"part of your code breaks while handling a request (and you have no error " +"handlers registered), a \"500 Internal Server Error\" " "(:exc:`~werkzeug.exceptions.InternalServerError`) will be returned by " "default. Similarly, \"404 Not Found\" " "(:exc:`~werkzeug.exceptions.NotFound`) error will occur if a request is " @@ -233,18 +233,18 @@ msgstr "" msgid "" "Flask gives you to the ability to raise any HTTP exception registered by " "Werkzeug. However, the default HTTP exceptions return simple exception " -"pages. You might want to show custom error pages to the user when an " -"error occurs. This can be done by registering error handlers." +"pages. You might want to show custom error pages to the user when an error" +" occurs. This can be done by registering error handlers." msgstr "" #: ../../errorhandling.rst:159 msgid "" "When Flask catches an exception while handling a request, it is first " "looked up by code. If no handler is registered for the code, Flask looks " -"up the error by its class hierarchy; the most specific handler is chosen." -" If no handler is registered, :class:`~werkzeug.exceptions.HTTPException`" -" subclasses show a generic message about their code, while other " -"exceptions are converted to a generic \"500 Internal Server Error\"." +"up the error by its class hierarchy; the most specific handler is chosen. " +"If no handler is registered, :class:`~werkzeug.exceptions.HTTPException` " +"subclasses show a generic message about their code, while other exceptions" +" are converted to a generic \"500 Internal Server Error\"." msgstr "" #: ../../errorhandling.rst:165 @@ -258,11 +258,11 @@ msgstr "" #: ../../errorhandling.rst:170 msgid "" -"Handlers registered on the blueprint take precedence over those " -"registered globally on the application, assuming a blueprint is handling " -"the request that raises the exception. However, the blueprint cannot " -"handle 404 routing errors because the 404 occurs at the routing level " -"before the blueprint can be determined." +"Handlers registered on the blueprint take precedence over those registered" +" globally on the application, assuming a blueprint is handling the request" +" that raises the exception. However, the blueprint cannot handle 404 " +"routing errors because the 404 occurs at the routing level before the " +"blueprint can be determined." msgstr "" #: ../../errorhandling.rst:178 @@ -287,9 +287,9 @@ msgstr "" #: ../../errorhandling.rst:209 msgid "" -"An error handler for ``Exception`` might seem useful for changing how all" -" errors, even unhandled ones, are presented to the user. However, this is" -" similar to doing ``except Exception:`` in Python, it will capture *all* " +"An error handler for ``Exception`` might seem useful for changing how all " +"errors, even unhandled ones, are presented to the user. However, this is " +"similar to doing ``except Exception:`` in Python, it will capture *all* " "otherwise unhandled errors, including all HTTP status codes." msgstr "" @@ -304,8 +304,8 @@ msgstr "" msgid "" "Error handlers still respect the exception class hierarchy. If you " "register handlers for both ``HTTPException`` and ``Exception``, the " -"``Exception`` handler will not handle ``HTTPException`` subclasses " -"because it the ``HTTPException`` handler is more specific." +"``Exception`` handler will not handle ``HTTPException`` subclasses because" +" it the ``HTTPException`` handler is more specific." msgstr "" #: ../../errorhandling.rst:239 @@ -314,17 +314,17 @@ msgstr "" #: ../../errorhandling.rst:241 msgid "" -"When there is no error handler registered for an exception, a 500 " -"Internal Server Error will be returned instead. See " +"When there is no error handler registered for an exception, a 500 Internal" +" Server Error will be returned instead. See " ":meth:`flask.Flask.handle_exception` for information about this behavior." msgstr "" #: ../../errorhandling.rst:246 msgid "" -"If there is an error handler registered for ``InternalServerError``, this" -" will be invoked. As of Flask 1.1.0, this error handler will always be " -"passed an instance of ``InternalServerError``, not the original unhandled" -" error." +"If there is an error handler registered for ``InternalServerError``, this " +"will be invoked. As of Flask 1.1.0, this error handler will always be " +"passed an instance of ``InternalServerError``, not the original unhandled " +"error." msgstr "" #: ../../errorhandling.rst:251 @@ -333,9 +333,9 @@ msgstr "" #: ../../errorhandling.rst:253 msgid "" -"An error handler for \"500 Internal Server Error\" will be passed " -"uncaught exceptions in addition to explicit 500 errors. In debug mode, a " -"handler for \"500 Internal Server Error\" will not be used. Instead, the " +"An error handler for \"500 Internal Server Error\" will be passed uncaught" +" exceptions in addition to explicit 500 errors. In debug mode, a handler " +"for \"500 Internal Server Error\" will not be used. Instead, the " "interactive debugger will be shown." msgstr "" @@ -347,10 +347,10 @@ msgstr "" msgid "" "Sometimes when building a Flask application, you might want to raise a " ":exc:`~werkzeug.exceptions.HTTPException` to signal to the user that " -"something is wrong with the request. Fortunately, Flask comes with a " -"handy :func:`~flask.abort` function that aborts a request with a HTTP " -"error from werkzeug as desired. It will also provide a plain black and " -"white error page for you with a basic description, but nothing fancy." +"something is wrong with the request. Fortunately, Flask comes with a handy" +" :func:`~flask.abort` function that aborts a request with a HTTP error " +"from werkzeug as desired. It will also provide a plain black and white " +"error page for you with a basic description, but nothing fancy." msgstr "" #: ../../errorhandling.rst:269 @@ -363,8 +363,7 @@ msgstr "" msgid "" "Consider the code below, we might have a user profile route, and if the " "user fails to pass a username we can raise a \"400 Bad Request\". If the " -"user passes a username and we can't find it, we raise a \"404 Not " -"Found\"." +"user passes a username and we can't find it, we raise a \"404 Not Found\"." msgstr "" #: ../../errorhandling.rst:296 @@ -407,21 +406,21 @@ msgstr "" #: ../../errorhandling.rst:395 msgid "" -"In :doc:`/blueprints`, most error handlers will work as expected. " -"However, there is a caveat concerning handlers for 404 and 405 " -"exceptions. These error handlers are only invoked from an appropriate " -"``raise`` statement or a call to ``abort`` in another of the blueprint's " -"view functions; they are not invoked by, e.g., an invalid URL access." +"In :doc:`/blueprints`, most error handlers will work as expected. However," +" there is a caveat concerning handlers for 404 and 405 exceptions. These " +"error handlers are only invoked from an appropriate ``raise`` statement or" +" a call to ``abort`` in another of the blueprint's view functions; they " +"are not invoked by, e.g., an invalid URL access." msgstr "" #: ../../errorhandling.rst:401 msgid "" -"This is because the blueprint does not \"own\" a certain URL space, so " -"the application instance has no way of knowing which blueprint error " -"handler it should run if given an invalid URL. If you would like to " -"execute different handling strategies for these errors based on URL " -"prefixes, they may be defined at the application level using the " -"``request`` proxy object." +"This is because the blueprint does not \"own\" a certain URL space, so the" +" application instance has no way of knowing which blueprint error handler " +"it should run if given an invalid URL. If you would like to execute " +"different handling strategies for these errors based on URL prefixes, they" +" may be defined at the application level using the ``request`` proxy " +"object." msgstr "" #: ../../errorhandling.rst:436 @@ -431,25 +430,25 @@ msgstr "" #: ../../errorhandling.rst:438 msgid "" "When building APIs in Flask, some developers realise that the built-in " -"exceptions are not expressive enough for APIs and that the content type " -"of :mimetype:`text/html` they are emitting is not very useful for API " +"exceptions are not expressive enough for APIs and that the content type of" +" :mimetype:`text/html` they are emitting is not very useful for API " "consumers." msgstr "" #: ../../errorhandling.rst:442 msgid "" -"Using the same techniques as above and :func:`~flask.json.jsonify` we can" -" return JSON responses to API errors. :func:`~flask.abort` is called " -"with a ``description`` parameter. The error handler will use that as the " -"JSON error message, and set the status code to 404." +"Using the same techniques as above and :func:`~flask.json.jsonify` we can " +"return JSON responses to API errors. :func:`~flask.abort` is called with " +"a ``description`` parameter. The error handler will use that as the JSON " +"error message, and set the status code to 404." msgstr "" #: ../../errorhandling.rst:464 msgid "" "We can also create custom exception classes. For instance, we can " "introduce a new custom exception for an API that can take a proper human " -"readable message, a status code for the error and some optional payload " -"to give more context for the error." +"readable message, a status code for the error and some optional payload to" +" give more context for the error." msgstr "" #: ../../errorhandling.rst:469 @@ -482,4 +481,3 @@ msgid "" "See :doc:`/debugging` for information about how to debug errors in " "development and production." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/extensiondev.po b/docs/locales/zh_CN/LC_MESSAGES/extensiondev.po index 4d5ec00b6..41710fcdc 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/extensiondev.po +++ b/docs/locales/zh_CN/LC_MESSAGES/extensiondev.po @@ -23,16 +23,16 @@ msgstr "" #: ../../extensiondev.rst:4 msgid "" -"Flask, being a microframework, often requires some repetitive steps to " -"get a third party library working. Many such extensions are already " -"available on `PyPI`_." +"Flask, being a microframework, often requires some repetitive steps to get" +" a third party library working. Many such extensions are already available" +" on `PyPI`_." msgstr "" #: ../../extensiondev.rst:8 msgid "" -"If you want to create your own Flask extension for something that does " -"not exist yet, this guide to extension development will help you get your" -" extension running in no time and to feel like users would expect your " +"If you want to create your own Flask extension for something that does not" +" exist yet, this guide to extension development will help you get your " +"extension running in no time and to feel like users would expect your " "extension to behave." msgstr "" @@ -60,28 +60,27 @@ msgstr "" #: ../../extensiondev.rst:27 msgid "" "But what do extensions look like themselves? An extension has to ensure " -"that it works with multiple Flask application instances at once. This is" -" a requirement because many people will use patterns like the " +"that it works with multiple Flask application instances at once. This is " +"a requirement because many people will use patterns like the " ":doc:`/patterns/appfactories` pattern to create their application as " -"needed to aid unittests and to support multiple configurations. Because " -"of that it is crucial that your application supports that kind of " -"behavior." +"needed to aid unittests and to support multiple configurations. Because of" +" that it is crucial that your application supports that kind of behavior." msgstr "" #: ../../extensiondev.rst:35 msgid "" "Most importantly the extension must be shipped with a :file:`setup.py` " "file and registered on PyPI. Also the development checkout link should " -"work so that people can easily install the development version into their" -" virtualenv without having to download the library by hand." +"work so that people can easily install the development version into their " +"virtualenv without having to download the library by hand." msgstr "" #: ../../extensiondev.rst:40 msgid "" -"Flask extensions must be licensed under a BSD, MIT or more liberal " -"license in order to be listed in the Flask Extension Registry. Keep in " -"mind that the Flask Extension Registry is a moderated place and libraries" -" will be reviewed upfront if they behave as required." +"Flask extensions must be licensed under a BSD, MIT or more liberal license" +" in order to be listed in the Flask Extension Registry. Keep in mind that" +" the Flask Extension Registry is a moderated place and libraries will be " +"reviewed upfront if they behave as required." msgstr "" #: ../../extensiondev.rst:46 @@ -90,8 +89,8 @@ msgstr "" #: ../../extensiondev.rst:48 msgid "" -"So let's get started with creating such a Flask extension. The extension" -" we want to create here will provide very basic support for SQLite3." +"So let's get started with creating such a Flask extension. The extension " +"we want to create here will provide very basic support for SQLite3." msgstr "" #: ../../extensiondev.rst:51 @@ -109,14 +108,14 @@ msgstr "" #: ../../extensiondev.rst:63 msgid "" "The next file that is absolutely required is the :file:`setup.py` file " -"which is used to install your Flask extension. The following contents " -"are something you can work with::" +"which is used to install your Flask extension. The following contents are" +" something you can work with::" msgstr "" #: ../../extensiondev.rst:106 msgid "" -"That's a lot of code but you can really just copy/paste that from " -"existing extensions and adapt." +"That's a lot of code but you can really just copy/paste that from existing" +" extensions and adapt." msgstr "" #: ../../extensiondev.rst:110 @@ -136,8 +135,8 @@ msgstr "" #: ../../extensiondev.rst:119 msgid "" -"Many extensions will need some kind of initialization step. For example," -" consider an application that's currently connecting to SQLite like the " +"Many extensions will need some kind of initialization step. For example, " +"consider an application that's currently connecting to SQLite like the " "documentation suggests (:doc:`/patterns/sqlite3`). So how does the " "extension know the name of the application object?" msgstr "" @@ -156,9 +155,9 @@ msgstr "" #: ../../extensiondev.rst:130 msgid "" -"If your extension is called `helloworld` you might have a function called" -" ``init_helloworld(app[, extra_args])`` that initializes the extension " -"for that application. It could attach before / after handlers etc." +"If your extension is called `helloworld` you might have a function called " +"``init_helloworld(app[, extra_args])`` that initializes the extension for " +"that application. It could attach before / after handlers etc." msgstr "" #: ../../extensiondev.rst:135 @@ -167,15 +166,15 @@ msgstr "" #: ../../extensiondev.rst:137 msgid "" -"Classes work mostly like initialization functions but can later be used " -"to further change the behavior." +"Classes work mostly like initialization functions but can later be used to" +" further change the behavior." msgstr "" #: ../../extensiondev.rst:140 msgid "" -"What to use depends on what you have in mind. For the SQLite 3 extension" -" we will use the class-based approach because it will provide users with " -"an object that handles opening and closing database connections." +"What to use depends on what you have in mind. For the SQLite 3 extension " +"we will use the class-based approach because it will provide users with an" +" object that handles opening and closing database connections." msgstr "" #: ../../extensiondev.rst:144 @@ -208,14 +207,15 @@ msgstr "" msgid "" "The ``init_app`` method exists so that the ``SQLite3`` object can be " "instantiated without requiring an app object. This method supports the " -"factory pattern for creating applications. The ``init_app`` will set the" -" configuration for the database, defaulting to an in memory database if " -"no configuration is supplied. In addition, the ``init_app`` method " -"attaches the ``teardown`` handler." +"factory pattern for creating applications. The ``init_app`` will set the " +"configuration for the database, defaulting to an in memory database if no " +"configuration is supplied. In addition, the ``init_app`` method attaches " +"the ``teardown`` handler." msgstr "" #: ../../extensiondev.rst:195 -msgid "Next, we define a ``connect`` method that opens a database connection." +msgid "" +"Next, we define a ``connect`` method that opens a database connection." msgstr "" #: ../../extensiondev.rst:196 @@ -229,9 +229,9 @@ msgstr "" #: ../../extensiondev.rst:201 msgid "" "Note here that we're attaching our database connection to the top " -"application context via ``_app_ctx_stack.top``. Extensions should use the" -" top context for storing their own information with a sufficiently " -"complex name." +"application context via ``_app_ctx_stack.top``. Extensions should use the " +"top context for storing their own information with a sufficiently complex " +"name." msgstr "" #: ../../extensiondev.rst:206 @@ -274,8 +274,8 @@ msgstr "" #: ../../extensiondev.rst:246 msgid "" -"As you noticed, ``init_app`` does not assign ``app`` to ``self``. This " -"is intentional! Class based Flask extensions must only store the " +"As you noticed, ``init_app`` does not assign ``app`` to ``self``. This is" +" intentional! Class based Flask extensions must only store the " "application on the object when the application was passed to the " "constructor. This tells the extension: I am not interested in using " "multiple applications." @@ -284,9 +284,9 @@ msgstr "" #: ../../extensiondev.rst:252 msgid "" "When the extension needs to find the current application and it does not " -"have a reference to it, it must either use the :data:`~flask.current_app`" -" context local or change the API in a way that you can pass the " -"application explicitly." +"have a reference to it, it must either use the :data:`~flask.current_app` " +"context local or change the API in a way that you can pass the application" +" explicitly." msgstr "" #: ../../extensiondev.rst:259 @@ -296,11 +296,11 @@ msgstr "" #: ../../extensiondev.rst:261 msgid "" "In the example above, before every request, a ``sqlite3_db`` variable is " -"assigned to ``_app_ctx_stack.top``. In a view function, this variable is" -" accessible using the ``connection`` property of ``SQLite3``. During the" -" teardown of a request, the ``sqlite3_db`` connection is closed. By " -"using this pattern, the *same* connection to the sqlite3 database is " -"accessible to anything that needs it for the duration of the request." +"assigned to ``_app_ctx_stack.top``. In a view function, this variable is " +"accessible using the ``connection`` property of ``SQLite3``. During the " +"teardown of a request, the ``sqlite3_db`` connection is closed. By using " +"this pattern, the *same* connection to the sqlite3 database is accessible " +"to anything that needs it for the duration of the request." msgstr "" #: ../../extensiondev.rst:270 @@ -310,14 +310,14 @@ msgstr "" #: ../../extensiondev.rst:272 msgid "" "This documentation only touches the bare minimum for extension " -"development. If you want to learn more, it's a very good idea to check " -"out existing extensions on the `PyPI`_. If you feel lost there is still " -"the `mailinglist`_ and the `Discord server`_ to get some ideas for nice " +"development. If you want to learn more, it's a very good idea to check out" +" existing extensions on the `PyPI`_. If you feel lost there is still the " +"`mailinglist`_ and the `Discord server`_ to get some ideas for nice " "looking APIs. Especially if you do something nobody before you did, it " -"might be a very good idea to get some more input. This not only " -"generates useful feedback on what people might want from an extension, " -"but also avoids having multiple developers working in isolation on pretty" -" much the same problem." +"might be a very good idea to get some more input. This not only generates" +" useful feedback on what people might want from an extension, but also " +"avoids having multiple developers working in isolation on pretty much the " +"same problem." msgstr "" #: ../../extensiondev.rst:281 @@ -329,8 +329,8 @@ msgstr "" #: ../../extensiondev.rst:285 msgid "" -"The best Flask extensions are extensions that share common idioms for the" -" API. And this can only work if collaboration happens early." +"The best Flask extensions are extensions that share common idioms for the " +"API. And this can only work if collaboration happens early." msgstr "" #: ../../extensiondev.rst:289 @@ -341,16 +341,16 @@ msgstr "" msgid "" "Flask previously had the concept of approved extensions. These came with " "some vetting of support and compatibility. While this list became too " -"difficult to maintain over time, the guidelines are still relevant to all" -" extensions maintained and developed today, as they help the Flask " +"difficult to maintain over time, the guidelines are still relevant to all " +"extensions maintained and developed today, as they help the Flask " "ecosystem remain consistent and compatible." msgstr "" #: ../../extensiondev.rst:297 msgid "" "An approved Flask extension requires a maintainer. In the event an " -"extension author would like to move beyond the project, the project " -"should find a new maintainer and transfer access to the repository, " +"extension author would like to move beyond the project, the project should" +" find a new maintainer and transfer access to the repository, " "documentation, PyPI, and any other services. If no maintainer is " "available, give access to the Pallets core team." msgstr "" @@ -358,8 +358,7 @@ msgstr "" #: ../../extensiondev.rst:302 msgid "" "The naming scheme is *Flask-ExtensionName* or *ExtensionName-Flask*. It " -"must provide exactly one package or module named " -"``flask_extension_name``." +"must provide exactly one package or module named ``flask_extension_name``." msgstr "" #: ../../extensiondev.rst:305 @@ -374,21 +373,21 @@ msgstr "" #: ../../extensiondev.rst:309 msgid "" -"It must support multiple applications running in the same Python process." -" Use ``current_app`` instead of ``self.app``, store configuration and " -"state per application instance." +"It must support multiple applications running in the same Python process. " +"Use ``current_app`` instead of ``self.app``, store configuration and state" +" per application instance." msgstr "" #: ../../extensiondev.rst:312 msgid "" -"It must be possible to use the factory pattern for creating applications." -" Use the ``ext.init_app()`` pattern." +"It must be possible to use the factory pattern for creating applications. " +"Use the ``ext.init_app()`` pattern." msgstr "" #: ../../extensiondev.rst:315 msgid "" -"From a clone of the repository, an extension with its dependencies must " -"be installable with ``pip install -e .``." +"From a clone of the repository, an extension with its dependencies must be" +" installable with ``pip install -e .``." msgstr "" #: ../../extensiondev.rst:317 @@ -401,16 +400,15 @@ msgstr "" #: ../../extensiondev.rst:321 msgid "" -"The documentation must use the ``flask`` theme from the `Official Pallets" -" Themes`_. A link to the documentation or project website must be in the " +"The documentation must use the ``flask`` theme from the `Official Pallets " +"Themes`_. A link to the documentation or project website must be in the " "PyPI metadata or the readme." msgstr "" #: ../../extensiondev.rst:324 msgid "" -"For maximum compatibility, the extension should support the same versions" -" of Python that Flask supports. 3.6+ is recommended as of 2020. Use " +"For maximum compatibility, the extension should support the same versions " +"of Python that Flask supports. 3.6+ is recommended as of 2020. Use " "``python_requires=\">= 3.6\"`` in ``setup.py`` to indicate supported " "versions." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/extensions.po b/docs/locales/zh_CN/LC_MESSAGES/extensions.po index a1045b807..1ecf4b45b 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/extensions.po +++ b/docs/locales/zh_CN/LC_MESSAGES/extensions.po @@ -24,9 +24,9 @@ msgstr "" #: ../../extensions.rst:4 msgid "" "Extensions are extra packages that add functionality to a Flask " -"application. For example, an extension might add support for sending " -"email or connecting to a database. Some extensions add entire new " -"frameworks to help build certain types of applications, like a REST API." +"application. For example, an extension might add support for sending email" +" or connecting to a database. Some extensions add entire new frameworks to" +" help build certain types of applications, like a REST API." msgstr "" #: ../../extensions.rst:11 @@ -35,8 +35,8 @@ msgstr "" #: ../../extensions.rst:13 msgid "" -"Flask extensions are usually named \"Flask-Foo\" or \"Foo-Flask\". You " -"can search PyPI for packages tagged with `Framework :: Flask `_." +"Flask extensions are usually named \"Flask-Foo\" or \"Foo-Flask\". You can" +" search PyPI for packages tagged with `Framework :: Flask `_." msgstr "" #: ../../extensions.rst:18 @@ -46,10 +46,10 @@ msgstr "" #: ../../extensions.rst:20 msgid "" "Consult each extension's documentation for installation, configuration, " -"and usage instructions. Generally, extensions pull their own " -"configuration from :attr:`app.config ` and are passed" -" an application instance during initialization. For example, an extension" -" called \"Flask-Foo\" might be used like this::" +"and usage instructions. Generally, extensions pull their own configuration" +" from :attr:`app.config ` and are passed an " +"application instance during initialization. For example, an extension " +"called \"Flask-Foo\" might be used like this::" msgstr "" #: ../../extensions.rst:40 @@ -58,9 +58,7 @@ msgstr "" #: ../../extensions.rst:42 msgid "" -"While the `PyPI `_ contains many Flask extensions, you may not " -"find an extension that fits your need. If this is the case, you can " -"create your own. Read :doc:`/extensiondev` to develop your own Flask " -"extension." +"While the `PyPI `_ contains many Flask extensions, you may not find" +" an extension that fits your need. If this is the case, you can create " +"your own. Read :doc:`/extensiondev` to develop your own Flask extension." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/foreword.po b/docs/locales/zh_CN/LC_MESSAGES/foreword.po index 393f3049a..776098a47 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/foreword.po +++ b/docs/locales/zh_CN/LC_MESSAGES/foreword.po @@ -23,9 +23,9 @@ msgstr "" #: ../../foreword.rst:4 msgid "" -"Read this before you get started with Flask. This hopefully answers some" -" questions about the purpose and goals of the project, and when you " -"should or should not be using it." +"Read this before you get started with Flask. This hopefully answers some " +"questions about the purpose and goals of the project, and when you should " +"or should not be using it." msgstr "" #: ../../foreword.rst:9 @@ -40,8 +40,8 @@ msgid "" "Flask aims to keep the core simple but extensible. Flask won't make many " "decisions for you, such as what database to use. Those decisions that it " "does make, such as what templating engine to use, are easy to change. " -"Everything else is up to you, so that Flask can be everything you need " -"and nothing you don't." +"Everything else is up to you, so that Flask can be everything you need and" +" nothing you don't." msgstr "" #: ../../foreword.rst:19 @@ -50,10 +50,10 @@ msgid "" "validation or anything else where different libraries already exist that " "can handle that. Instead, Flask supports extensions to add such " "functionality to your application as if it was implemented in Flask " -"itself. Numerous extensions provide database integration, form " -"validation, upload handling, various open authentication technologies, " -"and more. Flask may be \"micro\", but it's ready for production use on a " -"variety of needs." +"itself. Numerous extensions provide database integration, form validation," +" upload handling, various open authentication technologies, and more. " +"Flask may be \"micro\", but it's ready for production use on a variety of " +"needs." msgstr "" #: ../../foreword.rst:28 @@ -64,8 +64,8 @@ msgstr "" msgid "" "Flask has many configuration values, with sensible defaults, and a few " "conventions when getting started. By convention, templates and static " -"files are stored in subdirectories within the application's Python source" -" tree, with the names :file:`templates` and :file:`static` respectively. " +"files are stored in subdirectories within the application's Python source " +"tree, with the names :file:`templates` and :file:`static` respectively. " "While this can be changed, you usually don't have to, especially when " "getting started." msgstr "" @@ -84,19 +84,17 @@ msgstr "" msgid "" "As your codebase grows, you are free to make the design decisions " "appropriate for your project. Flask will continue to provide a very " -"simple glue layer to the best that Python has to offer. You can " -"implement advanced patterns in SQLAlchemy or another database tool, " -"introduce non-relational data persistence as appropriate, and take " -"advantage of framework-agnostic tools built for WSGI, the Python web " -"interface." +"simple glue layer to the best that Python has to offer. You can implement" +" advanced patterns in SQLAlchemy or another database tool, introduce non-" +"relational data persistence as appropriate, and take advantage of " +"framework-agnostic tools built for WSGI, the Python web interface." msgstr "" #: ../../foreword.rst:50 msgid "" -"Flask includes many hooks to customize its behavior. Should you need more" -" customization, the Flask class is built for subclassing. If you are " -"interested in that, check out the :doc:`becomingbig` chapter. If you are" -" curious about the Flask design principles, head over to the section " -"about :doc:`design`." +"Flask includes many hooks to customize its behavior. Should you need more " +"customization, the Flask class is built for subclassing. If you are " +"interested in that, check out the :doc:`becomingbig` chapter. If you are " +"curious about the Flask design principles, head over to the section about " +":doc:`design`." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/htmlfaq.po b/docs/locales/zh_CN/LC_MESSAGES/htmlfaq.po index e59a11ef4..18fef1d2a 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/htmlfaq.po +++ b/docs/locales/zh_CN/LC_MESSAGES/htmlfaq.po @@ -23,11 +23,11 @@ msgstr "" #: ../../htmlfaq.rst:4 msgid "" -"The Flask documentation and example applications are using HTML5. You " -"may notice that in many situations, when end tags are optional they are " -"not used, so that the HTML is cleaner and faster to load. Because there " -"is much confusion about HTML and XHTML among developers, this document " -"tries to answer some of the major questions." +"The Flask documentation and example applications are using HTML5. You may" +" notice that in many situations, when end tags are optional they are not " +"used, so that the HTML is cleaner and faster to load. Because there is " +"much confusion about HTML and XHTML among developers, this document tries " +"to answer some of the major questions." msgstr "" #: ../../htmlfaq.rst:12 @@ -38,13 +38,13 @@ msgstr "" msgid "" "For a while, it appeared that HTML was about to be replaced by XHTML. " "However, barely any websites on the Internet are actual XHTML (which is " -"HTML processed using XML rules). There are a couple of major reasons why" -" this is the case. One of them is Internet Explorer's lack of proper " -"XHTML support. The XHTML spec states that XHTML must be served with the " -"MIME type :mimetype:`application/xhtml+xml`, but Internet Explorer " -"refuses to read files with that MIME type. While it is relatively easy to" -" configure Web servers to serve XHTML properly, few people do. This is " -"likely because properly using XHTML can be quite painful." +"HTML processed using XML rules). There are a couple of major reasons why " +"this is the case. One of them is Internet Explorer's lack of proper XHTML" +" support. The XHTML spec states that XHTML must be served with the MIME " +"type :mimetype:`application/xhtml+xml`, but Internet Explorer refuses to " +"read files with that MIME type. While it is relatively easy to configure " +"Web servers to serve XHTML properly, few people do. This is likely " +"because properly using XHTML can be quite painful." msgstr "" #: ../../htmlfaq.rst:25 @@ -52,20 +52,20 @@ msgid "" "One of the most important causes of pain is XML's draconian (strict and " "ruthless) error handling. When an XML parsing error is encountered, the " "browser is supposed to show the user an ugly error message, instead of " -"attempting to recover from the error and display what it can. Most of " -"the (X)HTML generation on the web is based on non-XML template engines " -"(such as Jinja, the one used in Flask) which do not protect you from " +"attempting to recover from the error and display what it can. Most of the" +" (X)HTML generation on the web is based on non-XML template engines (such " +"as Jinja, the one used in Flask) which do not protect you from " "accidentally creating invalid XHTML. There are XML based template " "engines, such as Kid and the popular Genshi, but they often come with a " -"larger runtime overhead and are not as straightforward to use because " -"they have to obey XML rules." +"larger runtime overhead and are not as straightforward to use because they" +" have to obey XML rules." msgstr "" #: ../../htmlfaq.rst:36 msgid "" "The majority of users, however, assumed they were properly using XHTML. " -"They wrote an XHTML doctype at the top of the document and self-closed " -"all the necessary tags (``
`` becomes ``
`` or ``

`` in " +"They wrote an XHTML doctype at the top of the document and self-closed all" +" the necessary tags (``
`` becomes ``
`` or ``

`` in " "XHTML). However, even if the document properly validates as XHTML, what " "really determines XHTML/HTML processing in browsers is the MIME type, " "which as said before is often not set properly. So the valid XHTML was " @@ -75,8 +75,8 @@ msgstr "" #: ../../htmlfaq.rst:44 msgid "" "XHTML also changed the way JavaScript is used. To properly work with " -"XHTML, programmers have to use the namespaced DOM interface with the " -"XHTML namespace to query for HTML elements." +"XHTML, programmers have to use the namespaced DOM interface with the XHTML" +" namespace to query for HTML elements." msgstr "" #: ../../htmlfaq.rst:49 @@ -85,8 +85,8 @@ msgstr "" #: ../../htmlfaq.rst:51 msgid "" -"Development of the HTML5 specification was started in 2004 under the name" -" \"Web Applications 1.0\" by the Web Hypertext Application Technology " +"Development of the HTML5 specification was started in 2004 under the name " +"\"Web Applications 1.0\" by the Web Hypertext Application Technology " "Working Group, or WHATWG (which was formed by the major browser vendors " "Apple, Mozilla, and Opera) with the goal of writing a new and improved " "HTML specification, based on existing browser behavior instead of " @@ -96,18 +96,17 @@ msgstr "" #: ../../htmlfaq.rst:58 msgid "" "For example, in HTML4 ``Hello``. However, since people were using " -"XHTML-like tags along the lines of ````, browser vendors " -"implemented the XHTML syntax over the syntax defined by the " -"specification." +"same as ``Hello``. However, since people were using XHTML-" +"like tags along the lines of ````, browser vendors implemented the" +" XHTML syntax over the syntax defined by the specification." msgstr "" #: ../../htmlfaq.rst:63 msgid "" "In 2007, the specification was adopted as the basis of a new HTML " "specification under the umbrella of the W3C, known as HTML5. Currently, " -"it appears that XHTML is losing traction, as the XHTML 2 working group " -"has been disbanded and HTML5 is being implemented by all major browser " +"it appears that XHTML is losing traction, as the XHTML 2 working group has" +" been disbanded and HTML5 is being implemented by all major browser " "vendors." msgstr "" @@ -237,18 +236,18 @@ msgstr "" #: ../../htmlfaq.rst:119 msgid "" "HTML5 has strictly defined parsing rules, but it also specifies exactly " -"how a browser should react to parsing errors - unlike XHTML, which simply" -" states parsing should abort. Some people are confused by apparently " +"how a browser should react to parsing errors - unlike XHTML, which simply " +"states parsing should abort. Some people are confused by apparently " "invalid syntax that still generates the expected results (for example, " "missing end tags or unquoted attribute values)." msgstr "" #: ../../htmlfaq.rst:125 msgid "" -"Some of these work because of the lenient error handling most browsers " -"use when they encounter a markup error, others are actually specified. " -"The following constructs are optional in HTML5 by standard, but have to " -"be supported by browsers:" +"Some of these work because of the lenient error handling most browsers use" +" when they encounter a markup error, others are actually specified. The " +"following constructs are optional in HTML5 by standard, but have to be " +"supported by browsers:" msgstr "" #: ../../htmlfaq.rst:130 @@ -256,7 +255,8 @@ msgid "Wrapping the document in an ```` tag" msgstr "" #: ../../htmlfaq.rst:131 -msgid "Wrapping header elements in ```` or the body elements in ````" +msgid "" +"Wrapping header elements in ```` or the body elements in ````" msgstr "" #: ../../htmlfaq.rst:133 @@ -303,8 +303,8 @@ msgstr "" #: ../../htmlfaq.rst:178 msgid "" -"The ```` tag, which supports a powerful drawing API, reducing the" -" need for server-generated images to present data graphically." +"The ```` tag, which supports a powerful drawing API, reducing the " +"need for server-generated images to present data graphically." msgstr "" #: ../../htmlfaq.rst:180 @@ -321,9 +321,9 @@ msgstr "" #: ../../htmlfaq.rst:185 msgid "" -"Many other features have been added, as well. A good guide to new " -"features in HTML5 is Mark Pilgrim's book, `Dive Into HTML5`_. Not all of " -"them are supported in browsers yet, however, so use caution." +"Many other features have been added, as well. A good guide to new features" +" in HTML5 is Mark Pilgrim's book, `Dive Into HTML5`_. Not all of them are " +"supported in browsers yet, however, so use caution." msgstr "" #: ../../htmlfaq.rst:192 @@ -362,6 +362,6 @@ msgid "It is much easier to write, and more compact." msgstr "" #: ../../htmlfaq.rst:206 -msgid "For most applications, it is undoubtedly better to use HTML5 than XHTML." +msgid "" +"For most applications, it is undoubtedly better to use HTML5 than XHTML." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/index.po b/docs/locales/zh_CN/LC_MESSAGES/index.po index 1afc4cd4b..7fbd83a6a 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/index.po +++ b/docs/locales/zh_CN/LC_MESSAGES/index.po @@ -26,9 +26,9 @@ msgstr "Flask:Web 开发,一次一滴" #: ../../index.rst:11 msgid "" -"Welcome to Flask's documentation. Get started with :doc:`installation` " -"and then get an overview with the :doc:`quickstart`. There is also a more" -" detailed :doc:`tutorial/index` that shows how to create a small but " +"Welcome to Flask's documentation. Get started with :doc:`installation` and" +" then get an overview with the :doc:`quickstart`. There is also a more " +"detailed :doc:`tutorial/index` that shows how to create a small but " "complete application with Flask. Common patterns are described in the " ":doc:`patterns/index` section. The rest of the docs describe each " "component of Flask in detail, with a full reference in the :doc:`api` " @@ -65,8 +65,8 @@ msgid "" "background information about Flask, then focuses on step-by-step " "instructions for web development with Flask." msgstr "" -"这部分的文档大部分是独立章节,以一些关于 Flask 的背景信息开始,然后重点介绍如何" -"使用 Flask 一步步进行 Web 开发。" +"这部分的文档大部分是独立章节,以一些关于 Flask 的背景信息开始," +"然后重点介绍如何使用 Flask 一步步进行 Web 开发。" #: ../../index.rst:66 msgid "API Reference" @@ -76,13 +76,13 @@ msgstr "API 参考" msgid "" "If you are looking for information on a specific function, class or " "method, this part of the documentation is for you." -msgstr "" -"如果你想找关于某个特定函数、类或方法的信息,那么这部分文档就是为你准备的。" +msgstr "如果你想找关于某个特定函数、类或方法的信息,那么这部分文档就是为你准备的。" #: ../../index.rst:78 msgid "Additional Notes" msgstr "附加笔记" #: ../../index.rst:80 -msgid "Design notes, legal information and changelog are here for the interested." +msgid "" +"Design notes, legal information and changelog are here for the interested." msgstr "如果你感兴趣的话,这里有一些设计笔记、法律信息和变更日志(changelog)。" diff --git a/docs/locales/zh_CN/LC_MESSAGES/installation.po b/docs/locales/zh_CN/LC_MESSAGES/installation.po index ca47f50dc..664efeead 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/installation.po +++ b/docs/locales/zh_CN/LC_MESSAGES/installation.po @@ -27,8 +27,8 @@ msgstr "Python 版本" #: ../../installation.rst:8 msgid "" -"We recommend using the latest version of Python. Flask supports Python " -"3.6 and newer." +"We recommend using the latest version of Python. Flask supports Python 3.6" +" and newer." msgstr "我们建议使用最新版本的 Python。Flask 支持 Python 3.6 及其以上版本。" #: ../../installation.rst:11 @@ -42,14 +42,15 @@ msgid "Dependencies" msgstr "依赖" #: ../../installation.rst:17 -msgid "These distributions will be installed automatically when installing Flask." +msgid "" +"These distributions will be installed automatically when installing Flask." msgstr "这些包会在安装 Flask 的时候被自动安装。" #: ../../installation.rst:19 msgid "" "`Werkzeug`_ implements WSGI, the standard Python interface between " "applications and servers." -msgstr "`Werkzeug`_ 实现了 WSGI——程序和服务器之间交互的 Python 标准。" +msgstr "`Werkzeug`_ 实现了 WSGI—— 程序和服务器之间交互的 Python 标准。" #: ../../installation.rst:21 msgid "" @@ -59,22 +60,26 @@ msgstr "`Jinja`_ 是一个模板语言,它可以渲染你的程序提供的页 #: ../../installation.rst:23 msgid "" -"`MarkupSafe`_ comes with Jinja. It escapes untrusted input when rendering" -" templates to avoid injection attacks." -msgstr "`MarkupSafe`_ 随 Jinja 附带。当渲染模板时,它会转义不受信任的输入以避免注入攻击。" +"`MarkupSafe`_ comes with Jinja. It escapes untrusted input when rendering " +"templates to avoid injection attacks." +msgstr "" +"`MarkupSafe`_ 随 Jinja 附带。当渲染模板时,它会转义不受信任的输入以避免注入攻击。" #: ../../installation.rst:25 msgid "" -"`ItsDangerous`_ securely signs data to ensure its integrity. This is used" -" to protect Flask's session cookie." -msgstr "`ItsDangerous`_ 可以安全地签名数据以确保数据的完整性。这被用来保护 Flask 的 ``session`` cookie。" +"`ItsDangerous`_ securely signs data to ensure its integrity. This is used " +"to protect Flask's session cookie." +msgstr "" +"`ItsDangerous`_ 可以安全地签名数据以确保数据的完整性。这被用来保护 Flask 的 " +"``session`` cookie。" #: ../../installation.rst:27 msgid "" -"`Click`_ is a framework for writing command line applications. It " -"provides the ``flask`` command and allows adding custom management " -"commands." -msgstr "`Click`_ 是一个用来写命令行程序的框架。它提供了 ``flask`` 命令并允许添加自定义管理命令。" +"`Click`_ is a framework for writing command line applications. It provides" +" the ``flask`` command and allows adding custom management commands." +msgstr "" +"`Click`_ 是一个用来写命令行程序的框架。它提供了 ``flask`` " +"命令并允许添加自定义管理命令。" #: ../../installation.rst:38 msgid "Optional dependencies" @@ -82,8 +87,8 @@ msgstr "可选依赖" #: ../../installation.rst:40 msgid "" -"These distributions will not be installed automatically. Flask will " -"detect and use them if you install them." +"These distributions will not be installed automatically. Flask will detect" +" and use them if you install them." msgstr "这些包不会被自动安装。如果你安装了的话,Flask 会检测到并使用它们。" #: ../../installation.rst:43 @@ -92,14 +97,14 @@ msgstr "`Blinker`_ 提供 :doc:`signals` 支持。" #: ../../installation.rst:44 msgid "" -"`python-dotenv`_ enables support for :ref:`dotenv` when running ``flask``" -" commands." +"`python-dotenv`_ enables support for :ref:`dotenv` when running ``flask`` " +"commands." msgstr "`python-dotenv`_ 在执行 ``flask`` 命令时开启对 :ref:`dotenv` 的支持。" #: ../../installation.rst:46 msgid "" -"`Watchdog`_ provides a faster, more efficient reloader for the " -"development server." +"`Watchdog`_ provides a faster, more efficient reloader for the development" +" server." msgstr "`Watchdog`_ 为开发服务器提供更快和更高效的重载器(reloader)。" #: ../../installation.rst:55 @@ -119,15 +124,17 @@ msgid "" "versions of Python libraries, or even Python itself. Newer versions of " "libraries for one project can break compatibility in another project." msgstr "" -"虚拟环境解决了什么问题?你的 Python 项目越多,就越有可能需要使用不同版本的 Python 包,甚至 Python " -"本身。某个项目使用的新版本的库可能会破坏其他项目的兼容性。" +"虚拟环境解决了什么问题?你的 Python 项目越多,就越有可能需要使用不同版本的 Python " +"包,甚至 Python 本身。某个项目使用的新版本的库可能会破坏其他项目的兼容性。" #: ../../installation.rst:65 msgid "" "Virtual environments are independent groups of Python libraries, one for " "each project. Packages installed for one project will not affect other " "projects or the operating system's packages." -msgstr "虚拟环境是 Python 库的独立集合,每一个项目对应一个虚拟环境。安装到某个项目的包不会影响其他项目或是操作系统层级的包。" +msgstr "" +"虚拟环境是 Python 库的独立集合,每一个项目对应一个虚拟环境。" +"安装到某个项目的包不会影响其他项目或是操作系统层级的包。" #: ../../installation.rst:69 msgid "" @@ -156,7 +163,8 @@ msgid "Activate the environment" msgstr "激活虚拟环境" #: ../../installation.rst:104 -msgid "Before you work on your project, activate the corresponding environment:" +msgid "" +"Before you work on your project, activate the corresponding environment:" msgstr "在开始动手做你的项目之前,先激活对应的虚拟环境:" #: ../../installation.rst:120 @@ -180,6 +188,5 @@ msgid "" "Flask is now installed. Check out the :doc:`/quickstart` or go to the " ":doc:`Documentation Overview `." msgstr "" -"Flask 现在已经安装好了。阅读 :doc:`/quickstart` 或是前往 :doc:`文档概览 ` 进一步了解 " -"Flask。" - +"Flask 现在已经安装好了。阅读 :doc:`/quickstart` 或是前往 :doc:`文档概览 " +"` 进一步了解 Flask。" diff --git a/docs/locales/zh_CN/LC_MESSAGES/license.po b/docs/locales/zh_CN/LC_MESSAGES/license.po index c883c5c1a..6e19745b0 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/license.po +++ b/docs/locales/zh_CN/LC_MESSAGES/license.po @@ -27,9 +27,9 @@ msgstr "" #: ../../license.rst:7 msgid "" -"The BSD-3-Clause license applies to all files in the Flask repository and" -" source distribution. This includes Flask's source code, the examples, " -"and tests, as well as the documentation." +"The BSD-3-Clause license applies to all files in the Flask repository and " +"source distribution. This includes Flask's source code, the examples, and " +"tests, as well as the documentation." msgstr "" #: ../../../LICENSE.rst:1 ../../../artwork/LICENSE.rst:1 @@ -51,26 +51,26 @@ msgstr "" #: ../../../LICENSE.rst:10 msgid "" -"Redistributions in binary form must reproduce the above copyright notice," -" this list of conditions and the following disclaimer in the " -"documentation and/or other materials provided with the distribution." +"Redistributions in binary form must reproduce the above copyright notice, " +"this list of conditions and the following disclaimer in the documentation " +"and/or other materials provided with the distribution." msgstr "" #: ../../../LICENSE.rst:14 ../../../artwork/LICENSE.rst:13 msgid "" -"Neither the name of the copyright holder nor the names of its " -"contributors may be used to endorse or promote products derived from this" -" software without specific prior written permission." +"Neither the name of the copyright holder nor the names of its contributors" +" may be used to endorse or promote products derived from this software " +"without specific prior written permission." msgstr "" #: ../../../LICENSE.rst:18 msgid "" "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS " -"IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED " -"TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A " -"PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER" -" OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL," -" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, " +"IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO," +" THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR " +"PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR " +"CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, " +"EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, " "PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR " "PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF " "LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING " @@ -101,8 +101,8 @@ msgstr "" #: ../../../artwork/LICENSE.rst:10 msgid "" -"Redistributions of source code must retain the above copyright notice and" -" this list of conditions." +"Redistributions of source code must retain the above copyright notice and " +"this list of conditions." msgstr "" #: ../../../artwork/LICENSE.rst:17 @@ -111,4 +111,3 @@ msgid "" "https://palletsprojects.com/p/flask/ if you use it in a medium that " "supports links." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/logging.po b/docs/locales/zh_CN/LC_MESSAGES/logging.po index 4902627cd..cb725683b 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/logging.po +++ b/docs/locales/zh_CN/LC_MESSAGES/logging.po @@ -24,9 +24,9 @@ msgstr "" #: ../../logging.rst:4 msgid "" "Flask uses standard Python :mod:`logging`. Messages about your Flask " -"application are logged with :meth:`app.logger `, " -"which takes the same name as :attr:`app.name `. This " -"logger can also be used to log your own messages." +"application are logged with :meth:`app.logger `, which" +" takes the same name as :attr:`app.name `. This logger " +"can also be used to log your own messages." msgstr "" #: ../../logging.rst:23 @@ -44,8 +44,8 @@ msgid "" "When you want to configure logging for your project, you should do it as " "soon as possible when the program starts. If :meth:`app.logger " "` is accessed before logging is configured, it will " -"add a default handler. If possible, configure logging before creating the" -" application object." +"add a default handler. If possible, configure logging before creating the " +"application object." msgstr "" #: ../../logging.rst:35 @@ -61,11 +61,10 @@ msgstr "" #: ../../logging.rst:62 msgid "" "If you do not configure logging yourself, Flask will add a " -":class:`~logging.StreamHandler` to :meth:`app.logger " -"` automatically. During requests, it will write to " -"the stream specified by the WSGI server in ``environ['wsgi.errors']`` " -"(which is usually :data:`sys.stderr`). Outside a request, it will log to " -":data:`sys.stderr`." +":class:`~logging.StreamHandler` to :meth:`app.logger `" +" automatically. During requests, it will write to the stream specified by " +"the WSGI server in ``environ['wsgi.errors']`` (which is usually " +":data:`sys.stderr`). Outside a request, it will log to :data:`sys.stderr`." msgstr "" #: ../../logging.rst:70 @@ -86,9 +85,9 @@ msgstr "" #: ../../logging.rst:84 msgid "" "When running the application on a remote server for production, you " -"probably won't be looking at the log messages very often. The WSGI server" -" will probably send log messages to a file, and you'll only check that " -"file if a user tells you something went wrong." +"probably won't be looking at the log messages very often. The WSGI server " +"will probably send log messages to a file, and you'll only check that file" +" if a user tells you something went wrong." msgstr "" #: ../../logging.rst:89 @@ -100,8 +99,8 @@ msgstr "" #: ../../logging.rst:110 msgid "" -"This requires that you have an SMTP server set up on the same server. See" -" the Python docs for more information about configuring the handler." +"This requires that you have an SMTP server set up on the same server. See " +"the Python docs for more information about configuring the handler." msgstr "" #: ../../logging.rst:115 @@ -111,10 +110,10 @@ msgstr "" #: ../../logging.rst:117 msgid "" "Seeing more information about the request, such as the IP address, may " -"help debugging some errors. You can subclass :class:`logging.Formatter` " -"to inject your own fields that can be used in messages. You can change " -"the formatter for Flask's default handler, the mail handler defined " -"above, or any other handler. ::" +"help debugging some errors. You can subclass :class:`logging.Formatter` to" +" inject your own fields that can be used in messages. You can change the " +"formatter for Flask's default handler, the mail handler defined above, or " +"any other handler. ::" msgstr "" #: ../../logging.rst:146 @@ -123,16 +122,15 @@ msgstr "" #: ../../logging.rst:148 msgid "" -"Other libraries may use logging extensively, and you want to see relevant" -" messages from those logs too. The simplest way to do this is to add " +"Other libraries may use logging extensively, and you want to see relevant " +"messages from those logs too. The simplest way to do this is to add " "handlers to the root logger instead of only the app logger. ::" msgstr "" #: ../../logging.rst:158 msgid "" -"Depending on your project, it may be more useful to configure each logger" -" you care about separately, instead of configuring only the root logger. " -"::" +"Depending on your project, it may be more useful to configure each logger " +"you care about separately, instead of configuring only the root logger. ::" msgstr "" #: ../../logging.rst:171 @@ -156,4 +154,3 @@ msgid "" ":meth:`app.logger ` or its own named logger. Consult " "each extension's documentation for details." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/appdispatch.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/appdispatch.po index 3f9e8ad00..fd0633508 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/appdispatch.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/appdispatch.po @@ -26,8 +26,8 @@ msgid "" "Application dispatching is the process of combining multiple Flask " "applications on the WSGI level. You can combine not only Flask " "applications but any WSGI application. This would allow you to run a " -"Django and a Flask application in the same interpreter side by side if " -"you want. The usefulness of this depends on how the applications work " +"Django and a Flask application in the same interpreter side by side if you" +" want. The usefulness of this depends on how the applications work " "internally." msgstr "" @@ -53,8 +53,8 @@ msgstr "" #: ../../patterns/appdispatch.rst:28 msgid "" -"Note that :func:`run_simple ` is not " -"intended for use in production. Use a production WSGI server. See " +"Note that :func:`run_simple ` is not intended" +" for use in production. Use a production WSGI server. See " ":doc:`/deploying/index`." msgstr "" @@ -72,8 +72,8 @@ msgstr "" #: ../../patterns/appdispatch.rst:53 msgid "" -"If you have entirely separated applications and you want them to work " -"next to each other in the same Python interpreter process you can take " +"If you have entirely separated applications and you want them to work next" +" to each other in the same Python interpreter process you can take " "advantage of the :class:`werkzeug.wsgi.DispatcherMiddleware`. The idea " "here is that each Flask application is a valid WSGI application and they " "are combined by the dispatcher middleware into a larger one that is " @@ -92,22 +92,22 @@ msgstr "" #: ../../patterns/appdispatch.rst:75 msgid "" -"Sometimes you might want to use multiple instances of the same " -"application with different configurations. Assuming the application is " -"created inside a function and you can call that function to instantiate " -"it, that is really easy to implement. In order to develop your " -"application to support creating new instances in functions have a look at" -" the :doc:`appfactories` pattern." +"Sometimes you might want to use multiple instances of the same application" +" with different configurations. Assuming the application is created " +"inside a function and you can call that function to instantiate it, that " +"is really easy to implement. In order to develop your application to " +"support creating new instances in functions have a look at the " +":doc:`appfactories` pattern." msgstr "" #: ../../patterns/appdispatch.rst:82 msgid "" "A very common example would be creating applications per subdomain. For " "instance you configure your webserver to dispatch all requests for all " -"subdomains to your application and you then use the subdomain information" -" to create user-specific instances. Once you have your server set up to " -"listen on all subdomains you can use a very simple WSGI application to do" -" the dynamic application creation." +"subdomains to your application and you then use the subdomain information " +"to create user-specific instances. Once you have your server set up to " +"listen on all subdomains you can use a very simple WSGI application to do " +"the dynamic application creation." msgstr "" #: ../../patterns/appdispatch.rst:89 @@ -139,4 +139,3 @@ msgid "" "falls back to another application if the creator function returns " "``None``::" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/appfactories.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/appfactories.po index 22e0396cb..f305fc81b 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/appfactories.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/appfactories.po @@ -45,8 +45,8 @@ msgstr "" msgid "" "Multiple instances. Imagine you want to run different versions of the " "same application. Of course you could have multiple instances with " -"different configs set up in your webserver, but if you use factories, you" -" can have multiple instances of the same application running in the same " +"different configs set up in your webserver, but if you use factories, you " +"can have multiple instances of the same application running in the same " "application process which can be handy." msgstr "" @@ -86,9 +86,8 @@ msgstr "" #: ../../patterns/appfactories.rst:61 msgid "" -"Using `Flask-SQLAlchemy `_, as an example, you should not do " -"something along those lines::" +"Using `Flask-SQLAlchemy `_," +" as an example, you should not do something along those lines::" msgstr "" #: ../../patterns/appfactories.rst:70 @@ -101,9 +100,9 @@ msgstr "" #: ../../patterns/appfactories.rst:83 msgid "" -"Using this design pattern, no application-specific state is stored on the" -" extension object, so one extension object can be used for multiple apps." -" For more information about the design of extensions refer to " +"Using this design pattern, no application-specific state is stored on the " +"extension object, so one extension object can be used for multiple apps. " +"For more information about the design of extensions refer to " ":doc:`/extensiondev`." msgstr "" @@ -112,7 +111,8 @@ msgid "Using Applications" msgstr "" #: ../../patterns/appfactories.rst:90 -msgid "To run such an application, you can use the :command:`flask` command:" +msgid "" +"To run such an application, you can use the :command:`flask` command:" msgstr "" #: ../../patterns/appfactories.rst:94 ../../patterns/appfactories.rst:120 @@ -146,8 +146,8 @@ msgstr "" #: ../../patterns/appfactories.rst:147 msgid "" -"The factory function above is not very clever, but you can improve it. " -"The following changes are straightforward to implement:" +"The factory function above is not very clever, but you can improve it. The" +" following changes are straightforward to implement:" msgstr "" #: ../../patterns/appfactories.rst:150 @@ -168,4 +168,3 @@ msgid "" "Add in WSGI middlewares when the application is being created if " "necessary." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/caching.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/caching.po index bf39d86a4..8e44a184b 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/caching.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/caching.po @@ -26,15 +26,14 @@ msgid "" "When your application runs slow, throw some caches in. Well, at least " "it's the easiest way to speed up things. What does a cache do? Say you " "have a function that takes some time to complete but the results would " -"still be good enough if they were 5 minutes old. So then the idea is " -"that you actually put the result of that calculation into a cache for " -"some time." +"still be good enough if they were 5 minutes old. So then the idea is that" +" you actually put the result of that calculation into a cache for some " +"time." msgstr "" #: ../../patterns/caching.rst:11 msgid "" "Flask itself does not provide caching for you, but `Flask-Caching`_, an " -"extension for Flask does. Flask-Caching supports various backends, and it" -" is even possible to develop your own caching backend." +"extension for Flask does. Flask-Caching supports various backends, and it " +"is even possible to develop your own caching backend." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/celery.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/celery.po index f74f73bb2..d65ba90ea 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/celery.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/celery.po @@ -25,9 +25,9 @@ msgstr "" msgid "" "If your application has a long running task, such as processing some " "uploaded data or sending email, you don't want to wait for it to finish " -"during a request. Instead, use a task queue to send the necessary data to" -" another process that will run the task in the background while the " -"request returns immediately." +"during a request. Instead, use a task queue to send the necessary data to " +"another process that will run the task in the background while the request" +" returns immediately." msgstr "" #: ../../patterns/celery.rst:10 @@ -36,8 +36,8 @@ msgid "" "tasks as well as complex multi-stage programs and schedules. This guide " "will show you how to configure Celery using Flask, but assumes you've " "already read the `First Steps with Celery " -"`_ guide in the Celery documentation." +"`_ guide in the Celery documentation." msgstr "" #: ../../patterns/celery.rst:17 @@ -45,7 +45,8 @@ msgid "Install" msgstr "" #: ../../patterns/celery.rst:19 -msgid "Celery is a separate Python package. Install it from PyPI using pip::" +msgid "" +"Celery is a separate Python package. Install it from PyPI using pip::" msgstr "" #: ../../patterns/celery.rst:24 @@ -63,14 +64,15 @@ msgstr "" #: ../../patterns/celery.rst:32 msgid "" -"For instance you can place this in a ``tasks`` module. While you can use" -" Celery without any reconfiguration with Flask, it becomes a bit nicer by" -" subclassing tasks and adding support for Flask's application contexts " -"and hooking it up with the Flask configuration." +"For instance you can place this in a ``tasks`` module. While you can use " +"Celery without any reconfiguration with Flask, it becomes a bit nicer by " +"subclassing tasks and adding support for Flask's application contexts and " +"hooking it up with the Flask configuration." msgstr "" #: ../../patterns/celery.rst:37 -msgid "This is all that is necessary to properly integrate Celery with Flask::" +msgid "" +"This is all that is necessary to properly integrate Celery with Flask::" msgstr "" #: ../../patterns/celery.rst:57 @@ -87,10 +89,10 @@ msgstr "" #: ../../patterns/celery.rst:65 msgid "" -"Let's write a task that adds two numbers together and returns the result." -" We configure Celery's broker and backend to use Redis, create a " -"``celery`` application using the factor from above, and then use it to " -"define the task. ::" +"Let's write a task that adds two numbers together and returns the result. " +"We configure Celery's broker and backend to use Redis, create a ``celery``" +" application using the factor from above, and then use it to define the " +"task. ::" msgstr "" #: ../../patterns/celery.rst:82 @@ -104,15 +106,15 @@ msgstr "" #: ../../patterns/celery.rst:90 msgid "" "If you jumped in and already executed the above code you will be " -"disappointed to learn that ``.wait()`` will never actually return. That's" -" because you also need to run a Celery worker to receive and execute the " +"disappointed to learn that ``.wait()`` will never actually return. That's " +"because you also need to run a Celery worker to receive and execute the " "task. ::" msgstr "" #: ../../patterns/celery.rst:97 msgid "" -"The ``your_application`` string has to point to your application's " -"package or module that creates the ``celery`` object." +"The ``your_application`` string has to point to your application's package" +" or module that creates the ``celery`` object." msgstr "" #: ../../patterns/celery.rst:100 @@ -120,4 +122,3 @@ msgid "" "Now that the worker is running, ``wait`` will return the result once the " "task is finished." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/deferredcallbacks.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/deferredcallbacks.po index 49e15a569..1c0724e51 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/deferredcallbacks.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/deferredcallbacks.po @@ -23,19 +23,19 @@ msgstr "" #: ../../patterns/deferredcallbacks.rst:4 msgid "" -"One of the design principles of Flask is that response objects are " -"created and passed down a chain of potential callbacks that can modify " -"them or replace them. When the request handling starts, there is no " -"response object yet. It is created as necessary either by a view function" -" or by some other component in the system." +"One of the design principles of Flask is that response objects are created" +" and passed down a chain of potential callbacks that can modify them or " +"replace them. When the request handling starts, there is no response " +"object yet. It is created as necessary either by a view function or by " +"some other component in the system." msgstr "" #: ../../patterns/deferredcallbacks.rst:10 msgid "" "What happens if you want to modify the response at a point where the " "response does not exist yet? A common example for that would be a " -":meth:`~flask.Flask.before_request` callback that wants to set a cookie " -"on the response object." +":meth:`~flask.Flask.before_request` callback that wants to set a cookie on" +" the response object." msgstr "" #: ../../patterns/deferredcallbacks.rst:15 @@ -49,16 +49,15 @@ msgstr "" #: ../../patterns/deferredcallbacks.rst:20 msgid "" "As an alternative, you can use :func:`~flask.after_this_request` to " -"register callbacks that will execute after only the current request. This" -" way you can defer code execution from anywhere in the application, based" -" on the current request." +"register callbacks that will execute after only the current request. This " +"way you can defer code execution from anywhere in the application, based " +"on the current request." msgstr "" #: ../../patterns/deferredcallbacks.rst:25 msgid "" "At any time during a request, we can register a function to be called at " -"the end of the request. For example you can remember the current language" -" of the user in a cookie in a :meth:`~flask.Flask.before_request` " +"the end of the request. For example you can remember the current language " +"of the user in a cookie in a :meth:`~flask.Flask.before_request` " "callback::" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/distribute.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/distribute.po index 124156b08..e75ef69fb 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/distribute.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/distribute.po @@ -23,27 +23,26 @@ msgstr "" #: ../../patterns/distribute.rst:4 msgid "" -"`Setuptools`_, is an extension library that is commonly used to " -"distribute Python libraries and extensions. It extends distutils, a basic" -" module installation system shipped with Python to also support various " -"more complex constructs that make larger applications easier to " -"distribute:" +"`Setuptools`_, is an extension library that is commonly used to distribute" +" Python libraries and extensions. It extends distutils, a basic module " +"installation system shipped with Python to also support various more " +"complex constructs that make larger applications easier to distribute:" msgstr "" #: ../../patterns/distribute.rst:9 msgid "" -"**support for dependencies**: a library or application can declare a list" -" of other libraries it depends on which will be installed automatically " -"for you." +"**support for dependencies**: a library or application can declare a list " +"of other libraries it depends on which will be installed automatically for" +" you." msgstr "" #: ../../patterns/distribute.rst:12 msgid "" "**package registry**: setuptools registers your package with your Python " -"installation. This makes it possible to query information provided by " -"one package from another package. The best known feature of this system " -"is the entry point support which allows one package to declare an \"entry" -" point\" that another package can hook into to extend the other package." +"installation. This makes it possible to query information provided by one" +" package from another package. The best known feature of this system is " +"the entry point support which allows one package to declare an \"entry " +"point\" that another package can hook into to extend the other package." msgstr "" #: ../../patterns/distribute.rst:18 @@ -61,9 +60,9 @@ msgstr "" #: ../../patterns/distribute.rst:23 msgid "" "In this case we assume your application is called " -":file:`yourapplication.py` and you are not using a module, but a package." -" If you have not yet converted your application into a package, head over" -" to :doc:`packages` to see how this can be done." +":file:`yourapplication.py` and you are not using a module, but a package. " +"If you have not yet converted your application into a package, head over " +"to :doc:`packages` to see how this can be done." msgstr "" #: ../../patterns/distribute.rst:28 @@ -84,7 +83,8 @@ msgid "" msgstr "" #: ../../patterns/distribute.rst:38 -msgid "Standard disclaimer applies: :ref:`use a virtualenv `." +msgid "" +"Standard disclaimer applies: :ref:`use a virtualenv `." msgstr "" #: ../../patterns/distribute.rst:41 @@ -95,14 +95,15 @@ msgid "" msgstr "" #: ../../patterns/distribute.rst:45 -msgid "A basic :file:`setup.py` file for a Flask application looks like this::" +msgid "" +"A basic :file:`setup.py` file for a Flask application looks like this::" msgstr "" #: ../../patterns/distribute.rst:59 msgid "" -"Please keep in mind that you have to list subpackages explicitly. If you" -" want setuptools to lookup the packages for you automatically, you can " -"use the ``find_packages`` function::" +"Please keep in mind that you have to list subpackages explicitly. If you " +"want setuptools to lookup the packages for you automatically, you can use " +"the ``find_packages`` function::" msgstr "" #: ../../patterns/distribute.rst:70 @@ -110,13 +111,13 @@ msgid "" "Most parameters to the ``setup`` function should be self explanatory, " "``include_package_data`` and ``zip_safe`` might not be. " "``include_package_data`` tells setuptools to look for a " -":file:`MANIFEST.in` file and install all the entries that match as " -"package data. We will use this to distribute the static files and " -"templates along with the Python module (see :ref:`distributing-" -"resources`). The ``zip_safe`` flag can be used to force or prevent zip " -"Archive creation. In general you probably don't want your packages to be" -" installed as zip files because some tools do not support them and they " -"make debugging a lot harder." +":file:`MANIFEST.in` file and install all the entries that match as package" +" data. We will use this to distribute the static files and templates " +"along with the Python module (see :ref:`distributing-resources`). The " +"``zip_safe`` flag can be used to force or prevent zip Archive creation. " +"In general you probably don't want your packages to be installed as zip " +"files because some tools do not support them and they make debugging a lot" +" harder." msgstr "" #: ../../patterns/distribute.rst:82 @@ -125,17 +126,16 @@ msgstr "" #: ../../patterns/distribute.rst:84 msgid "" -"It is useful to distinguish between release and development builds. Add a" -" :file:`setup.cfg` file to configure these options. ::" +"It is useful to distinguish between release and development builds. Add a " +":file:`setup.cfg` file to configure these options. ::" msgstr "" #: ../../patterns/distribute.rst:94 msgid "" "Running ``python setup.py sdist`` will create a development package with " -"\".dev\" and the current date appended: " -"``flaskr-1.0.dev20160314.tar.gz``. Running ``python setup.py release " -"sdist`` will create a release package with only the version: " -"``flaskr-1.0.tar.gz``." +"\".dev\" and the current date appended: ``flaskr-1.0.dev20160314.tar.gz``." +" Running ``python setup.py release sdist`` will create a release package " +"with only the version: ``flaskr-1.0.tar.gz``." msgstr "" #: ../../patterns/distribute.rst:103 @@ -146,10 +146,10 @@ msgstr "" msgid "" "If you try to install the package you just created, you will notice that " "folders like :file:`static` or :file:`templates` are not installed for " -"you. The reason for this is that setuptools does not know which files to" -" add for you. What you should do, is to create a :file:`MANIFEST.in` " -"file next to your :file:`setup.py` file. This file lists all the files " -"that should be added to your tarball::" +"you. The reason for this is that setuptools does not know which files to " +"add for you. What you should do, is to create a :file:`MANIFEST.in` file " +"next to your :file:`setup.py` file. This file lists all the files that " +"should be added to your tarball::" msgstr "" #: ../../patterns/distribute.rst:115 @@ -165,26 +165,26 @@ msgstr "" #: ../../patterns/distribute.rst:123 msgid "" -"Dependencies are declared in the ``install_requires`` parameter as a " -"list. Each item in that list is the name of a package that should be " -"pulled from PyPI on installation. By default it will always use the most" -" recent version, but you can also provide minimum and maximum version " +"Dependencies are declared in the ``install_requires`` parameter as a list." +" Each item in that list is the name of a package that should be pulled " +"from PyPI on installation. By default it will always use the most recent " +"version, but you can also provide minimum and maximum version " "requirements. Here some examples::" msgstr "" #: ../../patterns/distribute.rst:135 msgid "" -"As mentioned earlier, dependencies are pulled from PyPI. What if you " -"want to depend on a package that cannot be found on PyPI and won't be " -"because it is an internal package you don't want to share with anyone? " -"Just do it as if there was a PyPI entry and provide a list of alternative" -" locations where setuptools should look for tarballs::" +"As mentioned earlier, dependencies are pulled from PyPI. What if you want" +" to depend on a package that cannot be found on PyPI and won't be because " +"it is an internal package you don't want to share with anyone? Just do it " +"as if there was a PyPI entry and provide a list of alternative locations " +"where setuptools should look for tarballs::" msgstr "" #: ../../patterns/distribute.rst:143 msgid "" -"Make sure that page has a directory listing and the links on the page are" -" pointing to the actual tarballs with their correct filenames as this is " +"Make sure that page has a directory listing and the links on the page are " +"pointing to the actual tarballs with their correct filenames as this is " "how setuptools will find the files. If you have an internal company " "server that contains the packages, provide the URL to that server." msgstr "" @@ -203,14 +203,13 @@ msgstr "" #: ../../patterns/distribute.rst:159 msgid "" -"If you are developing on the package and also want the requirements to be" -" installed, you can use the ``develop`` command instead::" +"If you are developing on the package and also want the requirements to be " +"installed, you can use the ``develop`` command instead::" msgstr "" #: ../../patterns/distribute.rst:164 msgid "" "This has the advantage of just installing a link to the site-packages " -"folder instead of copying the data over. You can then continue to work " -"on the code without having to run ``install`` again after each change." +"folder instead of copying the data over. You can then continue to work on" +" the code without having to run ``install`` again after each change." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/fabric.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/fabric.po index 4a0189178..7fccd6c64 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/fabric.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/fabric.po @@ -32,14 +32,14 @@ msgstr "" #: ../../patterns/fabric.rst:10 msgid "" -"Before we get started, here a quick checklist of things we have to ensure" -" upfront:" +"Before we get started, here a quick checklist of things we have to ensure " +"upfront:" msgstr "" #: ../../patterns/fabric.rst:13 msgid "" -"Fabric 1.0 has to be installed locally. This tutorial assumes the latest" -" version of Fabric." +"Fabric 1.0 has to be installed locally. This tutorial assumes the latest " +"version of Fabric." msgstr "" #: ../../patterns/fabric.rst:15 @@ -50,8 +50,8 @@ msgstr "" #: ../../patterns/fabric.rst:17 msgid "" -"In the following example we are using `mod_wsgi` for the remote servers." -" You can of course use your own favourite server there, but for this " +"In the following example we are using `mod_wsgi` for the remote servers. " +"You can of course use your own favourite server there, but for this " "example we chose Apache + `mod_wsgi` because it's very easy to setup and " "has a simple way to reload applications without root access." msgstr "" @@ -64,10 +64,9 @@ msgstr "" msgid "" "A fabfile is what controls what Fabric executes. It is named " ":file:`fabfile.py` and executed by the `fab` command. All the functions " -"defined in that file will show up as `fab` subcommands. They are " -"executed on one or more hosts. These hosts can be defined either in the " -"fabfile or on the command line. In this case we will add them to the " -"fabfile." +"defined in that file will show up as `fab` subcommands. They are executed" +" on one or more hosts. These hosts can be defined either in the fabfile " +"or on the command line. In this case we will add them to the fabfile." msgstr "" #: ../../patterns/fabric.rst:32 @@ -84,8 +83,8 @@ msgstr "" #: ../../patterns/fabric.rst:67 msgid "" "Now how do you execute that fabfile? You use the `fab` command. To " -"deploy the current version of the code on the remote server you would use" -" this command::" +"deploy the current version of the code on the remote server you would use " +"this command::" msgstr "" #: ../../patterns/fabric.rst:73 @@ -93,8 +92,8 @@ msgid "" "However this requires that our server already has the " ":file:`/var/www/yourapplication` folder created and " ":file:`/var/www/yourapplication/env` to be a virtual environment. " -"Furthermore are we not creating the configuration or ``.wsgi`` file on " -"the server. So how do we bootstrap a new server into our infrastructure?" +"Furthermore are we not creating the configuration or ``.wsgi`` file on the" +" server. So how do we bootstrap a new server into our infrastructure?" msgstr "" #: ../../patterns/fabric.rst:79 @@ -124,8 +123,8 @@ msgstr "" #: ../../patterns/fabric.rst:99 msgid "" "Create a new Apache config for ``yourapplication`` and activate it. Make " -"sure to activate watching for changes of the ``.wsgi`` file so that we " -"can automatically reload the application by touching it. See " +"sure to activate watching for changes of the ``.wsgi`` file so that we can" +" automatically reload the application by touching it. See " ":doc:`/deploying/mod_wsgi`." msgstr "" @@ -141,21 +140,21 @@ msgstr "" #: ../../patterns/fabric.rst:110 msgid "" -"The WSGI file has to import the application and also to set an " -"environment variable so that the application knows where to look for the " -"config. This is a short example that does exactly that::" +"The WSGI file has to import the application and also to set an environment" +" variable so that the application knows where to look for the config. " +"This is a short example that does exactly that::" msgstr "" #: ../../patterns/fabric.rst:118 msgid "" -"The application itself then has to initialize itself like this to look " -"for the config at that environment variable::" +"The application itself then has to initialize itself like this to look for" +" the config at that environment variable::" msgstr "" #: ../../patterns/fabric.rst:125 msgid "" -"This approach is explained in detail in the :doc:`/config` section of the" -" documentation." +"This approach is explained in detail in the :doc:`/config` section of the " +"documentation." msgstr "" #: ../../patterns/fabric.rst:129 @@ -167,8 +166,8 @@ msgid "" "Now as mentioned above, the application will find the correct " "configuration file by looking up the ``YOURAPPLICATION_CONFIG`` " "environment variable. So we have to put the configuration in a place " -"where the application will able to find it. Configuration files have the" -" unfriendly quality of being different on all computers, so you do not " +"where the application will able to find it. Configuration files have the " +"unfriendly quality of being different on all computers, so you do not " "version them usually." msgstr "" @@ -182,8 +181,8 @@ msgstr "" #: ../../patterns/fabric.rst:143 msgid "" -"Either way, in our case here we only expect one or two servers and we can" -" upload them ahead of time by hand." +"Either way, in our case here we only expect one or two servers and we can " +"upload them ahead of time by hand." msgstr "" #: ../../patterns/fabric.rst:148 @@ -193,8 +192,8 @@ msgstr "" #: ../../patterns/fabric.rst:150 msgid "" "Now we can do our first deployment. We have set up the servers so that " -"they have their virtual environments and activated apache configs. Now " -"we can pack up the application and deploy it::" +"they have their virtual environments and activated apache configs. Now we" +" can pack up the application and deploy it::" msgstr "" #: ../../patterns/fabric.rst:156 @@ -202,8 +201,8 @@ msgid "" "Fabric will now connect to all servers and run the commands as written " "down in the fabfile. First it will execute pack so that we have our " "tarball ready and then it will execute deploy and upload the source code " -"to all servers and install it there. Thanks to the :file:`setup.py` file" -" we will automatically pull in the required libraries into our virtual " +"to all servers and install it there. Thanks to the :file:`setup.py` file " +"we will automatically pull in the required libraries into our virtual " "environment." msgstr "" @@ -232,20 +231,19 @@ msgstr "" #: ../../patterns/fabric.rst:173 msgid "" "You could also put your application code into a repository and check out " -"the latest version on the server and then install. That way you can also" -" easily go back to older versions." +"the latest version on the server and then install. That way you can also " +"easily go back to older versions." msgstr "" #: ../../patterns/fabric.rst:176 msgid "" -"hook in testing functionality so that you can deploy to an external " -"server and run the test suite." +"hook in testing functionality so that you can deploy to an external server" +" and run the test suite." msgstr "" #: ../../patterns/fabric.rst:179 msgid "" -"Working with Fabric is fun and you will notice that it's quite magical to" -" type ``fab deploy`` and see your application being deployed " -"automatically to one or more remote servers." +"Working with Fabric is fun and you will notice that it's quite magical to " +"type ``fab deploy`` and see your application being deployed automatically " +"to one or more remote servers." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/favicon.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/favicon.po index 788cb5ec3..dcf0abb14 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/favicon.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/favicon.po @@ -44,13 +44,12 @@ msgstr "" #: ../../patterns/favicon.rst:20 msgid "" -"That's all you need for most browsers, however some really old ones do " -"not support this standard. The old de-facto standard is to serve this " -"file, with this name, at the website root. If your application is not " -"mounted at the root path of the domain you either need to configure the " -"web server to serve the icon at the root or if you can't do that you're " -"out of luck. If however your application is the root you can simply route" -" a redirect::" +"That's all you need for most browsers, however some really old ones do not" +" support this standard. The old de-facto standard is to serve this file, " +"with this name, at the website root. If your application is not mounted at" +" the root path of the domain you either need to configure the web server " +"to serve the icon at the root or if you can't do that you're out of luck. " +"If however your application is the root you can simply route a redirect::" msgstr "" #: ../../patterns/favicon.rst:30 @@ -61,9 +60,9 @@ msgstr "" #: ../../patterns/favicon.rst:41 msgid "" -"We can leave out the explicit mimetype and it will be guessed, but we may" -" as well specify it to avoid the extra guessing, as it will always be the" -" same." +"We can leave out the explicit mimetype and it will be guessed, but we may " +"as well specify it to avoid the extra guessing, as it will always be the " +"same." msgstr "" #: ../../patterns/favicon.rst:45 @@ -82,4 +81,3 @@ msgid "" "The `Favicon `_ article on " "Wikipedia" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/fileuploads.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/fileuploads.po index 9d574dc55..1c333a2dc 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/fileuploads.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/fileuploads.po @@ -52,27 +52,27 @@ msgstr "" #: ../../patterns/fileuploads.rst:17 msgid "" "Let's start with a very basic application that uploads a file to a " -"specific upload folder and displays a file to the user. Let's look at " -"the bootstrapping code for our application::" +"specific upload folder and displays a file to the user. Let's look at the" +" bootstrapping code for our application::" msgstr "" #: ../../patterns/fileuploads.rst:31 msgid "" -"So first we need a couple of imports. Most should be straightforward, " -"the :func:`werkzeug.secure_filename` is explained a little bit later. " -"The ``UPLOAD_FOLDER`` is where we will store the uploaded files and the " +"So first we need a couple of imports. Most should be straightforward, the" +" :func:`werkzeug.secure_filename` is explained a little bit later. The " +"``UPLOAD_FOLDER`` is where we will store the uploaded files and the " "``ALLOWED_EXTENSIONS`` is the set of allowed file extensions." msgstr "" #: ../../patterns/fileuploads.rst:36 msgid "" -"Why do we limit the extensions that are allowed? You probably don't want" -" your users to be able to upload everything there if the server is " -"directly sending out the data to the client. That way you can make sure " -"that users are not able to upload HTML files that would cause XSS " -"problems (see :ref:`security-xss`). Also make sure to disallow ``.php`` " -"files if the server executes them, but who has PHP installed on their " -"server, right? :)" +"Why do we limit the extensions that are allowed? You probably don't want " +"your users to be able to upload everything there if the server is directly" +" sending out the data to the client. That way you can make sure that " +"users are not able to upload HTML files that would cause XSS problems (see" +" :ref:`security-xss`). Also make sure to disallow ``.php`` files if the " +"server executes them, but who has PHP installed on their server, right? " +":)" msgstr "" #: ../../patterns/fileuploads.rst:43 @@ -97,19 +97,19 @@ msgstr "" #: ../../patterns/fileuploads.rst:86 msgid "" -"So you're interested in what that :func:`~werkzeug.utils.secure_filename`" -" function does and what the problem is if you're not using it? So just " -"imagine someone would send the following information as `filename` to " -"your application::" +"So you're interested in what that :func:`~werkzeug.utils.secure_filename` " +"function does and what the problem is if you're not using it? So just " +"imagine someone would send the following information as `filename` to your" +" application::" msgstr "" #: ../../patterns/fileuploads.rst:93 msgid "" -"Assuming the number of ``../`` is correct and you would join this with " -"the ``UPLOAD_FOLDER`` the user might have the ability to modify a file on" -" the server's filesystem he or she should not modify. This does require " -"some knowledge about how the application looks like, but trust me, " -"hackers are patient :)" +"Assuming the number of ``../`` is correct and you would join this with the" +" ``UPLOAD_FOLDER`` the user might have the ability to modify a file on the" +" server's filesystem he or she should not modify. This does require some " +"knowledge about how the application looks like, but trust me, hackers are " +"patient :)" msgstr "" #: ../../patterns/fileuploads.rst:99 @@ -120,8 +120,8 @@ msgstr "" msgid "" "We want to be able to serve the uploaded files so they can be downloaded " "by users. We'll define a ``download_file`` view to serve files in the " -"upload folder by name. ``url_for(\"download_file\", name=name)`` " -"generates download URLs." +"upload folder by name. ``url_for(\"download_file\", name=name)`` generates" +" download URLs." msgstr "" #: ../../patterns/fileuploads.rst:117 @@ -137,19 +137,19 @@ msgstr "" #: ../../patterns/fileuploads.rst:133 msgid "" -"So how exactly does Flask handle uploads? Well it will store them in the" -" webserver's memory if the files are reasonably small, otherwise in a " -"temporary location (as returned by :func:`tempfile.gettempdir`). But how" -" do you specify the maximum file size after which an upload is aborted? " -"By default Flask will happily accept file uploads with an unlimited " -"amount of memory, but you can limit that by setting the " -"``MAX_CONTENT_LENGTH`` config key::" +"So how exactly does Flask handle uploads? Well it will store them in the " +"webserver's memory if the files are reasonably small, otherwise in a " +"temporary location (as returned by :func:`tempfile.gettempdir`). But how " +"do you specify the maximum file size after which an upload is aborted? By" +" default Flask will happily accept file uploads with an unlimited amount " +"of memory, but you can limit that by setting the ``MAX_CONTENT_LENGTH`` " +"config key::" msgstr "" #: ../../patterns/fileuploads.rst:146 msgid "" -"The code above will limit the maximum allowed payload to 16 megabytes. If" -" a larger file is transmitted, Flask will raise a " +"The code above will limit the maximum allowed payload to 16 megabytes. If " +"a larger file is transmitted, Flask will raise a " ":exc:`~werkzeug.exceptions.RequestEntityTooLarge` exception." msgstr "" @@ -160,15 +160,15 @@ msgstr "" #: ../../patterns/fileuploads.rst:152 msgid "" "When using the local development server, you may get a connection reset " -"error instead of a 413 response. You will get the correct status response" -" when running the app with a production WSGI server." +"error instead of a 413 response. You will get the correct status response " +"when running the app with a production WSGI server." msgstr "" #: ../../patterns/fileuploads.rst:156 msgid "" -"This feature was added in Flask 0.6 but can be achieved in older versions" -" as well by subclassing the request object. For more information on that" -" consult the Werkzeug documentation on file handling." +"This feature was added in Flask 0.6 but can be achieved in older versions " +"as well by subclassing the request object. For more information on that " +"consult the Werkzeug documentation on file handling." msgstr "" #: ../../patterns/fileuploads.rst:162 @@ -180,8 +180,8 @@ msgid "" "A while ago many developers had the idea to read the incoming file in " "small chunks and store the upload progress in the database to be able to " "poll the progress with JavaScript from the client. The client asks the " -"server every 5 seconds how much it has transmitted, but this is something" -" it should already know." +"server every 5 seconds how much it has transmitted, but this is something " +"it should already know." msgstr "" #: ../../patterns/fileuploads.rst:171 @@ -191,15 +191,14 @@ msgstr "" #: ../../patterns/fileuploads.rst:173 msgid "" "Now there are better solutions that work faster and are more reliable. " -"There are JavaScript libraries like jQuery_ that have form plugins to " -"ease the construction of progress bar." +"There are JavaScript libraries like jQuery_ that have form plugins to ease" +" the construction of progress bar." msgstr "" #: ../../patterns/fileuploads.rst:177 msgid "" -"Because the common pattern for file uploads exists almost unchanged in " -"all applications dealing with uploads, there is also a Flask extension " -"called `Flask-Uploads`_ that implements a full fledged upload mechanism " -"that allows controlling which file extensions are allowed to be uploaded." +"Because the common pattern for file uploads exists almost unchanged in all" +" applications dealing with uploads, there is also a Flask extension called" +" `Flask-Uploads`_ that implements a full fledged upload mechanism that " +"allows controlling which file extensions are allowed to be uploaded." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/flashing.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/flashing.po index f6beb01c8..8abefbddb 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/flashing.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/flashing.po @@ -23,8 +23,8 @@ msgstr "" #: ../../patterns/flashing.rst:4 msgid "" -"Good applications and user interfaces are all about feedback. If the " -"user does not get enough feedback they will probably end up hating the " +"Good applications and user interfaces are all about feedback. If the user" +" does not get enough feedback they will probably end up hating the " "application. Flask provides a really simple way to give feedback to a " "user with the flashing system. The flashing system basically makes it " "possible to record a message at the end of a request and access it next " @@ -73,8 +73,8 @@ msgstr "" #: ../../patterns/flashing.rst:101 msgid "" -"To flash a message with a different category, just use the second " -"argument to the :func:`~flask.flash` function::" +"To flash a message with a different category, just use the second argument" +" to the :func:`~flask.flash` function::" msgstr "" #: ../../patterns/flashing.rst:106 @@ -97,8 +97,7 @@ msgstr "" #: ../../patterns/flashing.rst:131 msgid "" -"Optionally you can pass a list of categories which filters the results of" -" :func:`~flask.get_flashed_messages`. This is useful if you wish to " -"render each category in a separate block." +"Optionally you can pass a list of categories which filters the results of " +":func:`~flask.get_flashed_messages`. This is useful if you wish to render" +" each category in a separate block." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/index.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/index.po index 098395231..376b8d3cf 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/index.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/index.po @@ -26,9 +26,9 @@ msgid "" "Certain features and interactions are common enough that you will find " "them in most web applications. For example, many applications use a " "relational database and user authentication. They will open a database " -"connection at the beginning of the request and get the information for " -"the logged in user. At the end of the request, the database connection is" -" closed." +"connection at the beginning of the request and get the information for the" +" logged in user. At the end of the request, the database connection is " +"closed." msgstr "" #: ../../patterns/index.rst:11 @@ -37,4 +37,3 @@ msgid "" "but Flask makes it easy to implement them. Some common patterns are " "collected in the following pages." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/jquery.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/jquery.po index b4d2e876a..6454a6134 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/jquery.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/jquery.po @@ -23,8 +23,8 @@ msgstr "" #: ../../patterns/jquery.rst:4 msgid "" -"`jQuery`_ is a small JavaScript library commonly used to simplify working" -" with the DOM and JavaScript in general. It is the perfect tool to make " +"`jQuery`_ is a small JavaScript library commonly used to simplify working " +"with the DOM and JavaScript in general. It is the perfect tool to make " "web applications more dynamic by exchanging JSON between server and " "client." msgstr "" @@ -43,11 +43,10 @@ msgstr "" #: ../../patterns/jquery.rst:19 msgid "" -"In order to use jQuery, you have to download it first and place it in the" -" static folder of your application and then ensure it's loaded. Ideally " -"you have a layout template that is used for all pages where you just have" -" to add a script statement to the bottom of your ```` to load " -"jQuery:" +"In order to use jQuery, you have to download it first and place it in the " +"static folder of your application and then ensure it's loaded. Ideally " +"you have a layout template that is used for all pages where you just have " +"to add a script statement to the bottom of your ```` to load jQuery:" msgstr "" #: ../../patterns/jquery.rst:29 @@ -58,11 +57,11 @@ msgstr "" #: ../../patterns/jquery.rst:38 msgid "" -"In this case you have to put jQuery into your static folder as a " -"fallback, but it will first try to load it directly from Google. This has" -" the advantage that your website will probably load faster for users if " -"they went to at least one other website before using the same jQuery " -"version from Google because it will already be in the browser cache." +"In this case you have to put jQuery into your static folder as a fallback," +" but it will first try to load it directly from Google. This has the " +"advantage that your website will probably load faster for users if they " +"went to at least one other website before using the same jQuery version " +"from Google because it will already be in the browser cache." msgstr "" #: ../../patterns/jquery.rst:45 @@ -72,14 +71,13 @@ msgstr "" #: ../../patterns/jquery.rst:47 msgid "" "Do you know where your application is? If you are developing the answer " -"is quite simple: it's on localhost port something and directly on the " -"root of that server. But what if you later decide to move your " -"application to a different location? For example to " -"``http://example.com/myapp``? On the server side this never was a " -"problem because we were using the handy :func:`~flask.url_for` function " -"that could answer that question for us, but if we are using jQuery we " -"should not hardcode the path to the application but make that dynamic, so" -" how can we do that?" +"is quite simple: it's on localhost port something and directly on the root" +" of that server. But what if you later decide to move your application to" +" a different location? For example to ``http://example.com/myapp``? On " +"the server side this never was a problem because we were using the handy " +":func:`~flask.url_for` function that could answer that question for us, " +"but if we are using jQuery we should not hardcode the path to the " +"application but make that dynamic, so how can we do that?" msgstr "" #: ../../patterns/jquery.rst:56 @@ -95,29 +93,29 @@ msgstr "" #: ../../patterns/jquery.rst:70 msgid "" -"Now let's create a server side function that accepts two URL arguments of" -" numbers which should be added together and then sent back to the " -"application in a JSON object. This is a really ridiculous example and is" -" something you usually would do on the client side alone, but a simple " +"Now let's create a server side function that accepts two URL arguments of " +"numbers which should be added together and then sent back to the " +"application in a JSON object. This is a really ridiculous example and is " +"something you usually would do on the client side alone, but a simple " "example that shows how you would use jQuery and Flask nonetheless::" msgstr "" #: ../../patterns/jquery.rst:89 msgid "" "As you can see I also added an `index` method here that renders a " -"template. This template will load jQuery as above and have a little form" -" where we can add two numbers and a link to trigger the function on the " +"template. This template will load jQuery as above and have a little form " +"where we can add two numbers and a link to trigger the function on the " "server side." msgstr "" #: ../../patterns/jquery.rst:94 msgid "" -"Note that we are using the :meth:`~werkzeug.datastructures.MultiDict.get`" -" method here which will never fail. If the key is missing a default " -"value (here ``0``) is returned. Furthermore it can convert values to a " -"specific type (like in our case `int`). This is especially handy for " -"code that is triggered by a script (APIs, JavaScript etc.) because you " -"don't need special error reporting in that case." +"Note that we are using the :meth:`~werkzeug.datastructures.MultiDict.get` " +"method here which will never fail. If the key is missing a default value " +"(here ``0``) is returned. Furthermore it can convert values to a specific" +" type (like in our case `int`). This is especially handy for code that is" +" triggered by a script (APIs, JavaScript etc.) because you don't need " +"special error reporting in that case." msgstr "" #: ../../patterns/jquery.rst:102 @@ -142,8 +140,8 @@ msgstr "" #: ../../patterns/jquery.rst:134 msgid "" -"``$(function() { ... })`` specifies code that should run once the browser" -" is done loading the basic parts of the page." +"``$(function() { ... })`` specifies code that should run once the browser " +"is done loading the basic parts of the page." msgstr "" #: ../../patterns/jquery.rst:136 @@ -152,17 +150,16 @@ msgstr "" #: ../../patterns/jquery.rst:137 msgid "" -"``element.bind('event', func)`` specifies a function that should run when" -" the user clicked on the element. If that function returns `false`, the " -"default behavior will not kick in (in this case, navigate to the `#` " -"URL)." +"``element.bind('event', func)`` specifies a function that should run when " +"the user clicked on the element. If that function returns `false`, the " +"default behavior will not kick in (in this case, navigate to the `#` URL)." msgstr "" #: ../../patterns/jquery.rst:141 msgid "" "``$.getJSON(url, data, func)`` sends a ``GET`` request to `url` and will " -"send the contents of the `data` object as query parameters. Once the " -"data arrived, it will call the given function with the return value as " +"send the contents of the `data` object as query parameters. Once the data" +" arrived, it will call the given function with the return value as " "argument. Note that we can use the `$SCRIPT_ROOT` variable here that we " "set earlier." msgstr "" @@ -170,7 +167,6 @@ msgstr "" #: ../../patterns/jquery.rst:147 msgid "" "Check out the :gh:`example source ` for a full " -"application demonstrating the code on this page, as well as the same " -"thing using ``XMLHttpRequest`` and ``fetch``." +"application demonstrating the code on this page, as well as the same thing" +" using ``XMLHttpRequest`` and ``fetch``." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/lazyloading.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/lazyloading.po index 037b2c0bd..31ef94f31 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/lazyloading.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/lazyloading.po @@ -23,26 +23,26 @@ msgstr "" #: ../../patterns/lazyloading.rst:4 msgid "" -"Flask is usually used with the decorators. Decorators are simple and you" -" have the URL right next to the function that is called for that specific" -" URL. However there is a downside to this approach: it means all your " -"code that uses decorators has to be imported upfront or Flask will never " +"Flask is usually used with the decorators. Decorators are simple and you " +"have the URL right next to the function that is called for that specific " +"URL. However there is a downside to this approach: it means all your code" +" that uses decorators has to be imported upfront or Flask will never " "actually find your function." msgstr "" #: ../../patterns/lazyloading.rst:10 msgid "" "This can be a problem if your application has to import quick. It might " -"have to do that on systems like Google's App Engine or other systems. So" -" if you suddenly notice that your application outgrows this approach you " +"have to do that on systems like Google's App Engine or other systems. So " +"if you suddenly notice that your application outgrows this approach you " "can fall back to a centralized URL mapping." msgstr "" #: ../../patterns/lazyloading.rst:15 msgid "" "The system that enables having a central URL map is the " -":meth:`~flask.Flask.add_url_rule` function. Instead of using decorators," -" you have a file that sets up the application with all URLs." +":meth:`~flask.Flask.add_url_rule` function. Instead of using decorators, " +"you have a file that sets up the application with all URLs." msgstr "" #: ../../patterns/lazyloading.rst:20 @@ -55,8 +55,8 @@ msgstr "" #: ../../patterns/lazyloading.rst:35 msgid "" -"Then, with the centralized approach you would have one file with the " -"views (:file:`views.py`) but without any decorator::" +"Then, with the centralized approach you would have one file with the views" +" (:file:`views.py`) but without any decorator::" msgstr "" #: ../../patterns/lazyloading.rst:44 @@ -71,21 +71,22 @@ msgstr "" #: ../../patterns/lazyloading.rst:56 msgid "" -"So far we only split up the views and the routing, but the module is " -"still loaded upfront. The trick is to actually load the view function as" -" needed. This can be accomplished with a helper class that behaves just " +"So far we only split up the views and the routing, but the module is still" +" loaded upfront. The trick is to actually load the view function as " +"needed. This can be accomplished with a helper class that behaves just " "like a function but internally imports the real function on first use::" msgstr "" #: ../../patterns/lazyloading.rst:76 msgid "" -"What's important here is is that `__module__` and `__name__` are properly" -" set. This is used by Flask internally to figure out how to name the URL" -" rules in case you don't provide a name for the rule yourself." +"What's important here is is that `__module__` and `__name__` are properly " +"set. This is used by Flask internally to figure out how to name the URL " +"rules in case you don't provide a name for the rule yourself." msgstr "" #: ../../patterns/lazyloading.rst:80 -msgid "Then you can define your central place to combine the views like this::" +msgid "" +"Then you can define your central place to combine the views like this::" msgstr "" #: ../../patterns/lazyloading.rst:90 @@ -93,8 +94,7 @@ msgid "" "You can further optimize this in terms of amount of keystrokes needed to " "write this by having a function that calls into " ":meth:`~flask.Flask.add_url_rule` by prefixing a string with the project " -"name and a dot, and by wrapping `view_func` in a `LazyView` as needed. " -"::" +"name and a dot, and by wrapping `view_func` in a `LazyView` as needed. ::" msgstr "" #: ../../patterns/lazyloading.rst:107 @@ -103,4 +103,3 @@ msgid "" "to be in a file that is imported upfront to work properly on the first " "request. The same goes for any kind of remaining decorator." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/methodoverrides.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/methodoverrides.po index 99b4d07c8..931bab38c 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/methodoverrides.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/methodoverrides.po @@ -42,4 +42,3 @@ msgstr "" #: ../../patterns/methodoverrides.rst:37 msgid "To use this with Flask, wrap the app object with the middleware::" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/mongoengine.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/mongoengine.po index b5f8a4a78..bae40e73f 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/mongoengine.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/mongoengine.po @@ -24,8 +24,8 @@ msgstr "" #: ../../patterns/mongoengine.rst:4 msgid "" "Using a document database like MongoDB is a common alternative to " -"relational SQL databases. This pattern shows how to use `MongoEngine`_, a" -" document mapper library, to integrate with MongoDB." +"relational SQL databases. This pattern shows how to use `MongoEngine`_, a " +"document mapper library, to integrate with MongoDB." msgstr "" #: ../../patterns/mongoengine.rst:8 @@ -38,8 +38,8 @@ msgstr "" #: ../../patterns/mongoengine.rst:19 msgid "" -"Basic setup can be done by defining ``MONGODB_SETTINGS`` on " -"``app.config`` and creating a ``MongoEngine`` instance. ::" +"Basic setup can be done by defining ``MONGODB_SETTINGS`` on ``app.config``" +" and creating a ``MongoEngine`` instance. ::" msgstr "" #: ../../patterns/mongoengine.rst:33 @@ -54,9 +54,9 @@ msgstr "" #: ../../patterns/mongoengine.rst:47 msgid "" -"If the document has nested fields, use ``EmbeddedDocument`` to defined " -"the fields of the embedded document and ``EmbeddedDocumentField`` to " -"declare it on the parent document. ::" +"If the document has nested fields, use ``EmbeddedDocument`` to defined the" +" fields of the embedded document and ``EmbeddedDocumentField`` to declare " +"it on the parent document. ::" msgstr "" #: ../../patterns/mongoengine.rst:62 @@ -65,9 +65,9 @@ msgstr "" #: ../../patterns/mongoengine.rst:64 msgid "" -"Instantiate your document class with keyword arguments for the fields. " -"You can also assign values to the field attributes after instantiation. " -"Then call ``doc.save()``. ::" +"Instantiate your document class with keyword arguments for the fields. You" +" can also assign values to the field attributes after instantiation. Then " +"call ``doc.save()``. ::" msgstr "" #: ../../patterns/mongoengine.rst:78 @@ -100,7 +100,6 @@ msgstr "" #: ../../patterns/mongoengine.rst:102 msgid "" -"Flask-MongoEngine adds helpful utilities on top of MongoEngine. Check out" -" their `documentation `_ as well." +"Flask-MongoEngine adds helpful utilities on top of MongoEngine. Check out " +"their `documentation `_ as well." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/packages.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/packages.po index 15794fa2c..9a709ee7d 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/packages.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/packages.po @@ -27,10 +27,10 @@ msgstr "" #: ../../patterns/packages.rst:16 msgid "" -"While this is fine for small applications, for larger applications it's a" -" good idea to use a package instead of a module. The " -":doc:`/tutorial/index` is structured to use the package pattern, see the " -":gh:`example code `." +"While this is fine for small applications, for larger applications it's a " +"good idea to use a package instead of a module. The :doc:`/tutorial/index`" +" is structured to use the package pattern, see the :gh:`example code " +"`." msgstr "" #: ../../patterns/packages.rst:22 @@ -40,10 +40,10 @@ msgstr "" #: ../../patterns/packages.rst:24 msgid "" "To convert that into a larger one, just create a new folder " -":file:`yourapplication` inside the existing one and move everything below" -" it. Then rename :file:`yourapplication.py` to :file:`__init__.py`. " -"(Make sure to delete all ``.pyc`` files first, otherwise things would " -"most likely break)" +":file:`yourapplication` inside the existing one and move everything below " +"it. Then rename :file:`yourapplication.py` to :file:`__init__.py`. (Make " +"sure to delete all ``.pyc`` files first, otherwise things would most " +"likely break)" msgstr "" #: ../../patterns/packages.rst:29 ../../patterns/packages.rst:139 @@ -54,15 +54,15 @@ msgstr "" msgid "" "But how do you run your application now? The naive ``python " "yourapplication/__init__.py`` will not work. Let's just say that Python " -"does not want modules in packages to be the startup file. But that is " -"not a big problem, just add a new file called :file:`setup.py` next to " -"the inner :file:`yourapplication` folder with the following contents::" +"does not want modules in packages to be the startup file. But that is not" +" a big problem, just add a new file called :file:`setup.py` next to the " +"inner :file:`yourapplication` folder with the following contents::" msgstr "" #: ../../patterns/packages.rst:59 msgid "" -"In order to run the application you need to export an environment " -"variable that tells Flask where to find the application instance:" +"In order to run the application you need to export an environment variable" +" that tells Flask where to find the application instance:" msgstr "" #: ../../patterns/packages.rst:64 ../../patterns/packages.rst:88 @@ -79,8 +79,8 @@ msgstr "" #: ../../patterns/packages.rst:82 msgid "" -"If you are outside of the project directory make sure to provide the " -"exact path to your application directory. Similarly you can turn on the " +"If you are outside of the project directory make sure to provide the exact" +" path to your application directory. Similarly you can turn on the " "development features like this:" msgstr "" @@ -92,8 +92,8 @@ msgstr "" #: ../../patterns/packages.rst:112 msgid "" -"What did we gain from this? Now we can restructure the application a bit" -" into multiple modules. The only thing you have to remember is the " +"What did we gain from this? Now we can restructure the application a bit " +"into multiple modules. The only thing you have to remember is the " "following quick checklist:" msgstr "" @@ -107,8 +107,8 @@ msgstr "" #: ../../patterns/packages.rst:119 msgid "" "all the view functions (the ones with a :meth:`~flask.Flask.route` " -"decorator on top) have to be imported in the :file:`__init__.py` file. " -"Not the object itself, but the module it is in. Import the view module " +"decorator on top) have to be imported in the :file:`__init__.py` file. Not" +" the object itself, but the module it is in. Import the view module " "**after the application object is created**." msgstr "" @@ -128,18 +128,18 @@ msgstr "" msgid "" "Every Python programmer hates them, and yet we just added some: circular " "imports (That's when two modules depend on each other. In this case " -":file:`views.py` depends on :file:`__init__.py`). Be advised that this " -"is a bad idea in general but here it is actually fine. The reason for " -"this is that we are not actually using the views in :file:`__init__.py` " -"and just ensuring the module is imported and we are doing that at the " -"bottom of the file." +":file:`views.py` depends on :file:`__init__.py`). Be advised that this is" +" a bad idea in general but here it is actually fine. The reason for this " +"is that we are not actually using the views in :file:`__init__.py` and " +"just ensuring the module is imported and we are doing that at the bottom " +"of the file." msgstr "" #: ../../patterns/packages.rst:164 msgid "" "There are still some problems with that approach but if you want to use " -"decorators there is no way around that. Check out the " -":doc:`/becomingbig` section for some inspiration how to deal with that." +"decorators there is no way around that. Check out the :doc:`/becomingbig`" +" section for some inspiration how to deal with that." msgstr "" #: ../../patterns/packages.rst:170 @@ -153,4 +153,3 @@ msgid "" "blueprint. For a gentle introduction into this topic refer to the " ":doc:`/blueprints` chapter of the documentation." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/requestchecksum.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/requestchecksum.po index fb40096ff..8fb3ffbb5 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/requestchecksum.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/requestchecksum.po @@ -23,8 +23,8 @@ msgstr "" #: ../../patterns/requestchecksum.rst:4 msgid "" -"Various pieces of code can consume the request data and preprocess it. " -"For instance JSON data ends up on the request object already read and " +"Various pieces of code can consume the request data and preprocess it. For" +" instance JSON data ends up on the request object already read and " "processed, form data ends up there as well but goes through a different " "code path. This seems inconvenient when you want to calculate the " "checksum of the incoming request data. This is necessary sometimes for " @@ -39,19 +39,18 @@ msgstr "" #: ../../patterns/requestchecksum.rst:14 msgid "" -"The following example calculates the SHA1 checksum of the incoming data " -"as it gets read and stores it in the WSGI environment::" +"The following example calculates the SHA1 checksum of the incoming data as" +" it gets read and stores it in the WSGI environment::" msgstr "" #: ../../patterns/requestchecksum.rst:41 msgid "" "To use this, all you need to do is to hook the calculating stream in " "before the request starts consuming data. (Eg: be careful accessing " -"``request.form`` or anything of that nature. ``before_request_handlers``" -" for instance should be careful not to access it)." +"``request.form`` or anything of that nature. ``before_request_handlers`` " +"for instance should be careful not to access it)." msgstr "" #: ../../patterns/requestchecksum.rst:46 msgid "Example usage::" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/singlepageapplications.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/singlepageapplications.po index 03ee79d3f..25dc1981a 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/singlepageapplications.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/singlepageapplications.po @@ -24,12 +24,12 @@ msgstr "" #: ../../patterns/singlepageapplications.rst:4 msgid "" "Flask can be used to serve Single-Page Applications (SPA) by placing " -"static files produced by your frontend framework in a subfolder inside of" -" your project. You will also need to create a catch-all endpoint that " +"static files produced by your frontend framework in a subfolder inside of " +"your project. You will also need to create a catch-all endpoint that " "routes all requests to your SPA." msgstr "" #: ../../patterns/singlepageapplications.rst:9 -msgid "The following example demonstrates how to serve an SPA along with an API::" +msgid "" +"The following example demonstrates how to serve an SPA along with an API::" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/sqlalchemy.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/sqlalchemy.po index 0f12656b0..4cddbfb29 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/sqlalchemy.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/sqlalchemy.po @@ -24,15 +24,15 @@ msgstr "" #: ../../patterns/sqlalchemy.rst:4 msgid "" "Many people prefer `SQLAlchemy`_ for database access. In this case it's " -"encouraged to use a package instead of a module for your flask " -"application and drop the models into a separate module (:doc:`packages`)." -" While that is not necessary, it makes a lot of sense." +"encouraged to use a package instead of a module for your flask application" +" and drop the models into a separate module (:doc:`packages`). While that " +"is not necessary, it makes a lot of sense." msgstr "" #: ../../patterns/sqlalchemy.rst:9 msgid "" -"There are four very common ways to use SQLAlchemy. I will outline each " -"of them here:" +"There are four very common ways to use SQLAlchemy. I will outline each of" +" them here:" msgstr "" #: ../../patterns/sqlalchemy.rst:13 @@ -43,14 +43,14 @@ msgstr "" msgid "" "Because SQLAlchemy is a common database abstraction layer and object " "relational mapper that requires a little bit of configuration effort, " -"there is a Flask extension that handles that for you. This is " -"recommended if you want to get started quickly." +"there is a Flask extension that handles that for you. This is recommended" +" if you want to get started quickly." msgstr "" #: ../../patterns/sqlalchemy.rst:20 msgid "" -"You can download `Flask-SQLAlchemy`_ from `PyPI `_." +"You can download `Flask-SQLAlchemy`_ from `PyPI " +"`_." msgstr "" #: ../../patterns/sqlalchemy.rst:27 @@ -59,10 +59,10 @@ msgstr "" #: ../../patterns/sqlalchemy.rst:29 msgid "" -"The declarative extension in SQLAlchemy is the most recent method of " -"using SQLAlchemy. It allows you to define tables and models in one go, " -"similar to how Django works. In addition to the following text I " -"recommend the official documentation on the `declarative`_ extension." +"The declarative extension in SQLAlchemy is the most recent method of using" +" SQLAlchemy. It allows you to define tables and models in one go, similar" +" to how Django works. In addition to the following text I recommend the " +"official documentation on the `declarative`_ extension." msgstr "" #: ../../patterns/sqlalchemy.rst:34 @@ -71,8 +71,8 @@ msgstr "" #: ../../patterns/sqlalchemy.rst:54 msgid "" -"To define your models, just subclass the `Base` class that was created by" -" the code above. If you are wondering why we don't have to care about " +"To define your models, just subclass the `Base` class that was created by " +"the code above. If you are wondering why we don't have to care about " "threads here (like we did in the SQLite3 example above with the " ":data:`~flask.g` object): that's because SQLAlchemy does that for us " "already with the :class:`~sqlalchemy.orm.scoped_session`." @@ -110,10 +110,10 @@ msgstr "" msgid "" "Manual object relational mapping has a few upsides and a few downsides " "versus the declarative approach from above. The main difference is that " -"you define tables and classes separately and map them together. It's " -"more flexible but a little more to type. In general it works like the " -"declarative approach, so make sure to also split up your application into" -" multiple modules in a package." +"you define tables and classes separately and map them together. It's more" +" flexible but a little more to type. In general it works like the " +"declarative approach, so make sure to also split up your application into " +"multiple modules in a package." msgstr "" #: ../../patterns/sqlalchemy.rst:122 @@ -128,11 +128,13 @@ msgid "" msgstr "" #: ../../patterns/sqlalchemy.rst:145 -msgid "Here is an example table and model (put this into :file:`models.py`)::" +msgid "" +"Here is an example table and model (put this into :file:`models.py`)::" msgstr "" #: ../../patterns/sqlalchemy.rst:168 -msgid "Querying and inserting works exactly the same as in the example above." +msgid "" +"Querying and inserting works exactly the same as in the example above." msgstr "" #: ../../patterns/sqlalchemy.rst:172 @@ -162,7 +164,8 @@ msgid "SQLAlchemy will automatically commit for us." msgstr "" #: ../../patterns/sqlalchemy.rst:197 -msgid "To query your database, you use the engine directly or use a connection:" +msgid "" +"To query your database, you use the engine directly or use a connection:" msgstr "" #: ../../patterns/sqlalchemy.rst:202 @@ -180,4 +183,3 @@ msgid "" "For more information about SQLAlchemy, head over to the `website " "`_." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/sqlite3.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/sqlite3.po index a048a263d..49261ba39 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/sqlite3.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/sqlite3.po @@ -35,11 +35,10 @@ msgstr "" #: ../../patterns/sqlite3.rst:27 msgid "" "Now, to use the database, the application must either have an active " -"application context (which is always true if there is a request in " -"flight) or create an application context itself. At that point the " -"``get_db`` function can be used to get the current database connection. " -"Whenever the context is destroyed the database connection will be " -"terminated." +"application context (which is always true if there is a request in flight)" +" or create an application context itself. At that point the ``get_db`` " +"function can be used to get the current database connection. Whenever the" +" context is destroyed the database connection will be terminated." msgstr "" #: ../../patterns/sqlite3.rst:33 @@ -55,10 +54,10 @@ msgstr "" #: ../../patterns/sqlite3.rst:47 msgid "" -"Please keep in mind that the teardown request and appcontext functions " -"are always executed, even if a before-request handler failed or was never" -" executed. Because of this we have to make sure here that the database " -"is there before we close it." +"Please keep in mind that the teardown request and appcontext functions are" +" always executed, even if a before-request handler failed or was never " +"executed. Because of this we have to make sure here that the database is " +"there before we close it." msgstr "" #: ../../patterns/sqlite3.rst:53 @@ -68,9 +67,9 @@ msgstr "" #: ../../patterns/sqlite3.rst:55 msgid "" "The upside of this approach (connecting on first use) is that this will " -"only open the connection if truly necessary. If you want to use this " -"code outside a request context you can use it in a Python shell by " -"opening the application context by hand::" +"only open the connection if truly necessary. If you want to use this code" +" outside a request context you can use it in a Python shell by opening the" +" application context by hand::" msgstr "" #: ../../patterns/sqlite3.rst:65 @@ -79,41 +78,40 @@ msgstr "" #: ../../patterns/sqlite3.rst:67 msgid "" -"Now in each request handling function you can access `get_db()` to get " -"the current open database connection. To simplify working with SQLite, a" -" row factory function is useful. It is executed for every result " -"returned from the database to convert the result. For instance, in order" -" to get dictionaries instead of tuples, this could be inserted into the " -"``get_db`` function we created above::" +"Now in each request handling function you can access `get_db()` to get the" +" current open database connection. To simplify working with SQLite, a row" +" factory function is useful. It is executed for every result returned " +"from the database to convert the result. For instance, in order to get " +"dictionaries instead of tuples, this could be inserted into the ``get_db``" +" function we created above::" msgstr "" #: ../../patterns/sqlite3.rst:80 msgid "" "This will make the sqlite3 module return dicts for this database " -"connection, which are much nicer to deal with. Even more simply, we could" -" place this in ``get_db`` instead::" +"connection, which are much nicer to deal with. Even more simply, we could " +"place this in ``get_db`` instead::" msgstr "" #: ../../patterns/sqlite3.rst:84 msgid "" "This would use Row objects rather than dicts to return the results of " -"queries. These are ``namedtuple`` s, so we can access them either by " -"index or by key. For example, assuming we have a ``sqlite3.Row`` called " -"``r`` for the rows ``id``, ``FirstName``, ``LastName``, and " -"``MiddleInitial``::" +"queries. These are ``namedtuple`` s, so we can access them either by index" +" or by key. For example, assuming we have a ``sqlite3.Row`` called ``r`` " +"for the rows ``id``, ``FirstName``, ``LastName``, and ``MiddleInitial``::" msgstr "" #: ../../patterns/sqlite3.rst:100 msgid "" -"Additionally, it is a good idea to provide a query function that combines" -" getting the cursor, executing and fetching the results::" +"Additionally, it is a good idea to provide a query function that combines " +"getting the cursor, executing and fetching the results::" msgstr "" #: ../../patterns/sqlite3.rst:109 msgid "" "This handy little function, in combination with a row factory, makes " -"working with the database much more pleasant than it is by just using the" -" raw cursor and connection objects." +"working with the database much more pleasant than it is by just using the " +"raw cursor and connection objects." msgstr "" #: ../../patterns/sqlite3.rst:113 @@ -127,9 +125,9 @@ msgstr "" #: ../../patterns/sqlite3.rst:127 msgid "" "To pass variable parts to the SQL statement, use a question mark in the " -"statement and pass in the arguments as a list. Never directly add them " -"to the SQL statement with string formatting because this makes it " -"possible to attack the application using `SQL Injections " +"statement and pass in the arguments as a list. Never directly add them to" +" the SQL statement with string formatting because this makes it possible " +"to attack the application using `SQL Injections " "`_." msgstr "" @@ -140,12 +138,11 @@ msgstr "" #: ../../patterns/sqlite3.rst:136 msgid "" "Relational databases need schemas, so applications often ship a " -"`schema.sql` file that creates the database. It's a good idea to provide" -" a function that creates the database based on that schema. This " -"function can do that for you::" +"`schema.sql` file that creates the database. It's a good idea to provide " +"a function that creates the database based on that schema. This function " +"can do that for you::" msgstr "" #: ../../patterns/sqlite3.rst:148 msgid "You can then create such a database from the Python shell:" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/streaming.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/streaming.po index a49018f1a..d06913862 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/streaming.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/streaming.po @@ -23,9 +23,9 @@ msgstr "" #: ../../patterns/streaming.rst:4 msgid "" -"Sometimes you want to send an enormous amount of data to the client, much" -" more than you want to keep in memory. When you are generating the data " -"on the fly though, how do you send that back to the client without the " +"Sometimes you want to send an enormous amount of data to the client, much " +"more than you want to keep in memory. When you are generating the data on" +" the fly though, how do you send that back to the client without the " "roundtrip to the filesystem?" msgstr "" @@ -39,18 +39,16 @@ msgstr "" #: ../../patterns/streaming.rst:14 msgid "" -"This is a basic view function that generates a lot of CSV data on the " -"fly. The trick is to have an inner function that uses a generator to " -"generate data and to then invoke that function and pass it to a response " -"object::" +"This is a basic view function that generates a lot of CSV data on the fly." +" The trick is to have an inner function that uses a generator to generate " +"data and to then invoke that function and pass it to a response object::" msgstr "" #: ../../patterns/streaming.rst:25 msgid "" "Each ``yield`` expression is directly sent to the browser. Note though " "that some WSGI middlewares might break streaming, so be careful there in " -"debug environments with profilers and other things you might have " -"enabled." +"debug environments with profilers and other things you might have enabled." msgstr "" #: ../../patterns/streaming.rst:30 @@ -60,22 +58,22 @@ msgstr "" #: ../../patterns/streaming.rst:32 msgid "" "The Jinja2 template engine also supports rendering templates piece by " -"piece. This functionality is not directly exposed by Flask because it is" -" quite uncommon, but you can easily do it yourself::" +"piece. This functionality is not directly exposed by Flask because it is " +"quite uncommon, but you can easily do it yourself::" msgstr "" #: ../../patterns/streaming.rst:48 msgid "" "The trick here is to get the template object from the Jinja2 environment " -"on the application and to call :meth:`~jinja2.Template.stream` instead of" -" :meth:`~jinja2.Template.render` which returns a stream object instead of" -" a string. Since we're bypassing the Flask template render functions and" -" using the template object itself we have to make sure to update the " -"render context ourselves by calling " +"on the application and to call :meth:`~jinja2.Template.stream` instead of " +":meth:`~jinja2.Template.render` which returns a stream object instead of a" +" string. Since we're bypassing the Flask template render functions and " +"using the template object itself we have to make sure to update the render" +" context ourselves by calling " ":meth:`~flask.Flask.update_template_context`. The template is then " -"evaluated as the stream is iterated over. Since each time you do a yield" -" the server will flush the content to the client you might want to buffer" -" up a few items in the template which you can do with " +"evaluated as the stream is iterated over. Since each time you do a yield " +"the server will flush the content to the client you might want to buffer " +"up a few items in the template which you can do with " "``rv.enable_buffering(size)``. ``5`` is a sane default." msgstr "" @@ -96,4 +94,3 @@ msgid "" "Without the :func:`~flask.stream_with_context` function you would get a " ":class:`RuntimeError` at that point." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/subclassing.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/subclassing.po index 9d9144696..6029ad584 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/subclassing.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/subclassing.po @@ -36,4 +36,3 @@ msgid "" "This is the recommended approach for overriding or augmenting Flask's " "internal functionality." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/templateinheritance.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/templateinheritance.po index 5585f84ca..b607af2f1 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/templateinheritance.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/templateinheritance.po @@ -24,9 +24,9 @@ msgstr "" #: ../../patterns/templateinheritance.rst:4 msgid "" "The most powerful part of Jinja is template inheritance. Template " -"inheritance allows you to build a base \"skeleton\" template that " -"contains all the common elements of your site and defines **blocks** that" -" child templates can override." +"inheritance allows you to build a base \"skeleton\" template that contains" +" all the common elements of your site and defines **blocks** that child " +"templates can override." msgstr "" #: ../../patterns/templateinheritance.rst:8 @@ -41,10 +41,9 @@ msgstr "" #: ../../patterns/templateinheritance.rst:15 msgid "" -"This template, which we'll call :file:`layout.html`, defines a simple " -"HTML skeleton document that you might use for a simple two-column page. " -"It's the job of \"child\" templates to fill the empty blocks with " -"content:" +"This template, which we'll call :file:`layout.html`, defines a simple HTML" +" skeleton document that you might use for a simple two-column page. It's " +"the job of \"child\" templates to fill the empty blocks with content:" msgstr "" #: ../../patterns/templateinheritance.rst:39 @@ -66,9 +65,8 @@ msgstr "" #, python-format msgid "" "The ``{% extends %}`` tag is the key here. It tells the template engine " -"that this template \"extends\" another template. When the template " -"system evaluates this template, first it locates the parent. The extends" -" tag must be the first tag in the template. To render the contents of a " -"block defined in the parent template, use ``{{ super() }}``." +"that this template \"extends\" another template. When the template system" +" evaluates this template, first it locates the parent. The extends tag " +"must be the first tag in the template. To render the contents of a block " +"defined in the parent template, use ``{{ super() }}``." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/urlprocessors.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/urlprocessors.po index 1301c29ca..04efd11f4 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/urlprocessors.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/urlprocessors.po @@ -23,11 +23,11 @@ msgstr "" #: ../../patterns/urlprocessors.rst:6 msgid "" -"Flask 0.7 introduces the concept of URL processors. The idea is that you" -" might have a bunch of resources with common parts in the URL that you " +"Flask 0.7 introduces the concept of URL processors. The idea is that you " +"might have a bunch of resources with common parts in the URL that you " "don't always explicitly want to provide. For instance you might have a " -"bunch of URLs that have the language code in it but you don't want to " -"have to handle it in every single function yourself." +"bunch of URLs that have the language code in it but you don't want to have" +" to handle it in every single function yourself." msgstr "" #: ../../patterns/urlprocessors.rst:12 @@ -47,27 +47,27 @@ msgstr "" #: ../../patterns/urlprocessors.rst:35 msgid "" -"This is an awful lot of repetition as you have to handle the language " -"code setting on the :data:`~flask.g` object yourself in every single " -"function. Sure, a decorator could be used to simplify this, but if you " -"want to generate URLs from one function to another you would have to " -"still provide the language code explicitly which can be annoying." +"This is an awful lot of repetition as you have to handle the language code" +" setting on the :data:`~flask.g` object yourself in every single function." +" Sure, a decorator could be used to simplify this, but if you want to " +"generate URLs from one function to another you would have to still provide" +" the language code explicitly which can be annoying." msgstr "" #: ../../patterns/urlprocessors.rst:41 msgid "" -"For the latter, this is where :func:`~flask.Flask.url_defaults` functions" -" come in. They can automatically inject values into a call to " -":func:`~flask.url_for`. The code below checks if the language code is " -"not yet in the dictionary of URL values and if the endpoint wants a value" -" named ``'lang_code'``::" +"For the latter, this is where :func:`~flask.Flask.url_defaults` functions " +"come in. They can automatically inject values into a call to " +":func:`~flask.url_for`. The code below checks if the language code is not" +" yet in the dictionary of URL values and if the endpoint wants a value " +"named ``'lang_code'``::" msgstr "" #: ../../patterns/urlprocessors.rst:54 msgid "" -"The method :meth:`~werkzeug.routing.Map.is_endpoint_expecting` of the URL" -" map can be used to figure out if it would make sense to provide a " -"language code for the given endpoint." +"The method :meth:`~werkzeug.routing.Map.is_endpoint_expecting` of the URL " +"map can be used to figure out if it would make sense to provide a language" +" code for the given endpoint." msgstr "" #: ../../patterns/urlprocessors.rst:58 @@ -83,10 +83,10 @@ msgstr "" msgid "" "That way you no longer have to do the `lang_code` assignment to " ":data:`~flask.g` in every function. You can further improve that by " -"writing your own decorator that prefixes URLs with the language code, but" -" the more beautiful solution is using a blueprint. Once the " -"``'lang_code'`` is popped from the values dictionary and it will no " -"longer be forwarded to the view function reducing the code to this::" +"writing your own decorator that prefixes URLs with the language code, but " +"the more beautiful solution is using a blueprint. Once the " +"``'lang_code'`` is popped from the values dictionary and it will no longer" +" be forwarded to the view function reducing the code to this::" msgstr "" #: ../../patterns/urlprocessors.rst:99 @@ -95,11 +95,10 @@ msgstr "" #: ../../patterns/urlprocessors.rst:101 msgid "" -"Because blueprints can automatically prefix all URLs with a common string" -" it's easy to automatically do that for every function. Furthermore " -"blueprints can have per-blueprint URL processors which removes a whole " -"lot of logic from the :meth:`~flask.Flask.url_defaults` function because " -"it no longer has to check if the URL is really interested in a " +"Because blueprints can automatically prefix all URLs with a common string " +"it's easy to automatically do that for every function. Furthermore " +"blueprints can have per-blueprint URL processors which removes a whole lot" +" of logic from the :meth:`~flask.Flask.url_defaults` function because it " +"no longer has to check if the URL is really interested in a " "``'lang_code'`` parameter::" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/viewdecorators.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/viewdecorators.po index c9a3f7325..bfdee2c20 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/viewdecorators.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/viewdecorators.po @@ -23,16 +23,16 @@ msgstr "" #: ../../patterns/viewdecorators.rst:4 msgid "" -"Python has a really interesting feature called function decorators. This" -" allows some really neat things for web applications. Because each view " -"in Flask is a function, decorators can be used to inject additional " +"Python has a really interesting feature called function decorators. This " +"allows some really neat things for web applications. Because each view in" +" Flask is a function, decorators can be used to inject additional " "functionality to one or more functions. The :meth:`~flask.Flask.route` " "decorator is the one you probably used already. But there are use cases " "for implementing your own decorator. For instance, imagine you have a " "view that should only be used by people that are logged in. If a user " "goes to the site and is not logged in, they should be redirected to the " -"login page. This is a good example of a use case where a decorator is an" -" excellent solution." +"login page. This is a good example of a use case where a decorator is an " +"excellent solution." msgstr "" #: ../../patterns/viewdecorators.rst:16 @@ -41,11 +41,10 @@ msgstr "" #: ../../patterns/viewdecorators.rst:18 msgid "" -"So let's implement such a decorator. A decorator is a function that " -"wraps and replaces another function. Since the original function is " -"replaced, you need to remember to copy the original function's " -"information to the new function. Use :func:`functools.wraps` to handle " -"this for you." +"So let's implement such a decorator. A decorator is a function that wraps" +" and replaces another function. Since the original function is replaced, " +"you need to remember to copy the original function's information to the " +"new function. Use :func:`functools.wraps` to handle this for you." msgstr "" #: ../../patterns/viewdecorators.rst:23 @@ -57,18 +56,17 @@ msgstr "" #: ../../patterns/viewdecorators.rst:38 msgid "" -"To use the decorator, apply it as innermost decorator to a view function." -" When applying further decorators, always remember that the " +"To use the decorator, apply it as innermost decorator to a view function. " +"When applying further decorators, always remember that the " ":meth:`~flask.Flask.route` decorator is the outermost. ::" msgstr "" #: ../../patterns/viewdecorators.rst:48 msgid "" -"The ``next`` value will exist in ``request.args`` after a ``GET`` request" -" for the login page. You'll have to pass it along when sending the " -"``POST`` request from the login form. You can do this with a hidden " -"input tag, then retrieve it from ``request.form`` when logging the user " -"in. ::" +"The ``next`` value will exist in ``request.args`` after a ``GET`` request " +"for the login page. You'll have to pass it along when sending the " +"``POST`` request from the login form. You can do this with a hidden input" +" tag, then retrieve it from ``request.form`` when logging the user in. ::" msgstr "" #: ../../patterns/viewdecorators.rst:57 @@ -105,8 +103,8 @@ msgstr "" #: ../../patterns/viewdecorators.rst:75 msgid "" -"get the value for that key from the cache. If the cache returned " -"something we will return that value." +"get the value for that key from the cache. If the cache returned something" +" we will return that value." msgstr "" #: ../../patterns/viewdecorators.rst:77 @@ -142,12 +140,11 @@ msgstr "" msgid "" "As you can see, if no template name is provided it will use the endpoint " "of the URL map with dots converted to slashes + ``'.html'``. Otherwise " -"the provided template name is used. When the decorated function returns," -" the dictionary returned is passed to the template rendering function. " -"If ``None`` is returned, an empty dictionary is assumed, if something " -"else than a dictionary is returned we return it from the function " -"unchanged. That way you can still use the redirect function or return " -"simple strings." +"the provided template name is used. When the decorated function returns, " +"the dictionary returned is passed to the template rendering function. If " +"``None`` is returned, an empty dictionary is assumed, if something else " +"than a dictionary is returned we return it from the function unchanged. " +"That way you can still use the redirect function or return simple strings." msgstr "" #: ../../patterns/viewdecorators.rst:134 @@ -160,9 +157,7 @@ msgstr "" #: ../../patterns/viewdecorators.rst:159 msgid "" -"When you want to use the werkzeug routing system for more flexibility you" -" need to map the endpoint as defined in the " -":class:`~werkzeug.routing.Rule` to a view function. This is possible with" -" this decorator. For example::" +"When you want to use the werkzeug routing system for more flexibility you " +"need to map the endpoint as defined in the :class:`~werkzeug.routing.Rule`" +" to a view function. This is possible with this decorator. For example::" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/patterns/wtforms.po b/docs/locales/zh_CN/LC_MESSAGES/patterns/wtforms.po index 2f05573f8..ad3538a47 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/patterns/wtforms.po +++ b/docs/locales/zh_CN/LC_MESSAGES/patterns/wtforms.po @@ -24,18 +24,17 @@ msgstr "" #: ../../patterns/wtforms.rst:4 msgid "" "When you have to work with form data submitted by a browser view, code " -"quickly becomes very hard to read. There are libraries out there " -"designed to make this process easier to manage. One of them is " -"`WTForms`_ which we will handle here. If you find yourself in the " -"situation of having many forms, you might want to give it a try." +"quickly becomes very hard to read. There are libraries out there designed" +" to make this process easier to manage. One of them is `WTForms`_ which " +"we will handle here. If you find yourself in the situation of having many" +" forms, you might want to give it a try." msgstr "" #: ../../patterns/wtforms.rst:10 msgid "" -"When you are working with WTForms you have to define your forms as " -"classes first. I recommend breaking up the application into multiple " -"modules (:doc:`packages`) for that and adding a separate module for the " -"forms." +"When you are working with WTForms you have to define your forms as classes" +" first. I recommend breaking up the application into multiple modules " +"(:doc:`packages`) for that and adding a separate module for the forms." msgstr "" #: ../../patterns/wtforms.rst:15 @@ -78,20 +77,20 @@ msgstr "" #: ../../patterns/wtforms.rst:63 msgid "" -"create the form from the request :attr:`~flask.request.form` value if the" -" data is submitted via the HTTP ``POST`` method and " +"create the form from the request :attr:`~flask.request.form` value if the " +"data is submitted via the HTTP ``POST`` method and " ":attr:`~flask.request.args` if the data is submitted as ``GET``." msgstr "" #: ../../patterns/wtforms.rst:66 msgid "" -"to validate the data, call the :func:`~wtforms.form.Form.validate` " -"method, which will return ``True`` if the data validates, ``False`` " -"otherwise." +"to validate the data, call the :func:`~wtforms.form.Form.validate` method," +" which will return ``True`` if the data validates, ``False`` otherwise." msgstr "" #: ../../patterns/wtforms.rst:69 -msgid "to access individual values from the form, access `form..data`." +msgid "" +"to access individual values from the form, access `form..data`." msgstr "" #: ../../patterns/wtforms.rst:72 @@ -103,12 +102,13 @@ msgid "" "Now to the template side. When you pass the form to the templates, you " "can easily render them there. Look at the following example template to " "see how easy this is. WTForms does half the form generation for us " -"already. To make it even nicer, we can write a macro that renders a field" -" with label and a list of errors if there are any." +"already. To make it even nicer, we can write a macro that renders a field " +"with label and a list of errors if there are any." msgstr "" #: ../../patterns/wtforms.rst:80 -msgid "Here's an example :file:`_formhelpers.html` template with such a macro:" +msgid "" +"Here's an example :file:`_formhelpers.html` template with such a macro:" msgstr "" #: ../../patterns/wtforms.rst:97 @@ -117,18 +117,18 @@ msgid "" "WTForm's field function, which renders the field for us. The keyword " "arguments will be inserted as HTML attributes. So, for example, you can " "call ``render_field(form.username, class='username')`` to add a class to " -"the input element. Note that WTForms returns standard Python strings, so" -" we have to tell Jinja2 that this data is already HTML-escaped with the " +"the input element. Note that WTForms returns standard Python strings, so " +"we have to tell Jinja2 that this data is already HTML-escaped with the " "``|safe`` filter." msgstr "" #: ../../patterns/wtforms.rst:105 msgid "" -"Here is the :file:`register.html` template for the function we used " -"above, which takes advantage of the :file:`_formhelpers.html` template:" +"Here is the :file:`register.html` template for the function we used above," +" which takes advantage of the :file:`_formhelpers.html` template:" msgstr "" #: ../../patterns/wtforms.rst:122 -msgid "For more information about WTForms, head over to the `WTForms website`_." +msgid "" +"For more information about WTForms, head over to the `WTForms website`_." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/quickstart.po b/docs/locales/zh_CN/LC_MESSAGES/quickstart.po index 7b6f8b7b4..98b7f20b6 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/quickstart.po +++ b/docs/locales/zh_CN/LC_MESSAGES/quickstart.po @@ -23,8 +23,8 @@ msgstr "" #: ../../quickstart.rst:4 msgid "" -"Eager to get started? This page gives a good introduction to Flask. " -"Follow :doc:`installation` to set up a project and install Flask first." +"Eager to get started? This page gives a good introduction to Flask. Follow" +" :doc:`installation` to set up a project and install Flask first." msgstr "" #: ../../quickstart.rst:9 @@ -50,8 +50,8 @@ msgid "" "Next we create an instance of this class. The first argument is the name " "of the application's module or package. ``__name__`` is a convenient " "shortcut for this that is appropriate for most cases. This is needed so " -"that Flask knows where to look for resources such as templates and static" -" files." +"that Flask knows where to look for resources such as templates and static " +"files." msgstr "" #: ../../quickstart.rst:32 @@ -62,9 +62,9 @@ msgstr "" #: ../../quickstart.rst:34 msgid "" -"The function returns the message we want to display in the user's " -"browser. The default content type is HTML, so HTML in the string will be " -"rendered by the browser." +"The function returns the message we want to display in the user's browser." +" The default content type is HTML, so HTML in the string will be rendered " +"by the browser." msgstr "" #: ../../quickstart.rst:38 @@ -132,9 +132,9 @@ msgstr "" #: ../../quickstart.rst:95 msgid "" -"If you have the debugger disabled or trust the users on your network, you" -" can make the server publicly available simply by adding " -"``--host=0.0.0.0`` to the command line::" +"If you have the debugger disabled or trust the users on your network, you " +"can make the server publicly available simply by adding ``--host=0.0.0.0``" +" to the command line::" msgstr "" #: ../../quickstart.rst:101 @@ -147,9 +147,9 @@ msgstr "" #: ../../quickstart.rst:107 msgid "" -"In case the :command:`python -m flask` fails or :command:`flask` does not" -" exist, there are multiple reasons this might be the case. First of all " -"you need to look at the error message." +"In case the :command:`python -m flask` fails or :command:`flask` does not " +"exist, there are multiple reasons this might be the case. First of all you" +" need to look at the error message." msgstr "" #: ../../quickstart.rst:112 @@ -158,9 +158,9 @@ msgstr "" #: ../../quickstart.rst:114 msgid "" -"Versions of Flask older than 0.11 used to have different ways to start " -"the application. In short, the :command:`flask` command did not exist, " -"and neither did :command:`python -m flask`. In that case you have two " +"Versions of Flask older than 0.11 used to have different ways to start the" +" application. In short, the :command:`flask` command did not exist, and " +"neither did :command:`python -m flask`. In that case you have two " "options: either upgrade to newer Flask versions or have a look at " ":doc:`/server` to see the alternative method for running a server." msgstr "" @@ -171,17 +171,17 @@ msgstr "" #: ../../quickstart.rst:123 msgid "" -"The ``FLASK_APP`` environment variable is the name of the module to " -"import at :command:`flask run`. In case that module is incorrectly named " -"you will get an import error upon start (or if debug is enabled when you " -"navigate to the application). It will tell you what it tried to import " -"and why it failed." +"The ``FLASK_APP`` environment variable is the name of the module to import" +" at :command:`flask run`. In case that module is incorrectly named you " +"will get an import error upon start (or if debug is enabled when you " +"navigate to the application). It will tell you what it tried to import and" +" why it failed." msgstr "" #: ../../quickstart.rst:128 msgid "" -"The most common reason is a typo or because you did not actually create " -"an ``app`` object." +"The most common reason is a typo or because you did not actually create an" +" ``app`` object." msgstr "" #: ../../quickstart.rst:133 @@ -202,8 +202,8 @@ msgstr "" #: ../../quickstart.rst:147 msgid "" "The debugger allows executing arbitrary Python code from the browser. It " -"is protected by a pin, but still represents a major security risk. Do not" -" run the development server or debugger in a production environment." +"is protected by a pin, but still represents a major security risk. Do not " +"run the development server or debugger in a production environment." msgstr "" #: ../../quickstart.rst:152 @@ -255,15 +255,15 @@ msgstr "" #: ../../quickstart.rst:208 msgid "" -"If a user managed to submit the name ````," -" escaping causes it to be rendered as text, rather than running the " -"script in the user's browser." +"If a user managed to submit the name ````, " +"escaping causes it to be rendered as text, rather than running the script " +"in the user's browser." msgstr "" #: ../../quickstart.rst:212 msgid "" -"```` in the route captures a value from the URL and passes it to " -"the view function. These variable rules are explained below." +"```` in the route captures a value from the URL and passes it to the" +" view function. These variable rules are explained below." msgstr "" #: ../../quickstart.rst:217 @@ -272,21 +272,21 @@ msgstr "" #: ../../quickstart.rst:219 msgid "" -"Modern web applications use meaningful URLs to help users. Users are more" -" likely to like a page and come back if the page uses a meaningful URL " -"they can remember and use to directly visit a page." +"Modern web applications use meaningful URLs to help users. Users are more " +"likely to like a page and come back if the page uses a meaningful URL they" +" can remember and use to directly visit a page." msgstr "" #: ../../quickstart.rst:223 msgid "" -"Use the :meth:`~flask.Flask.route` decorator to bind a function to a URL." -" ::" +"Use the :meth:`~flask.Flask.route` decorator to bind a function to a URL. " +"::" msgstr "" #: ../../quickstart.rst:233 msgid "" -"You can do more! You can make parts of the URL dynamic and attach " -"multiple rules to a function." +"You can do more! You can make parts of the URL dynamic and attach multiple" +" rules to a function." msgstr "" #: ../../quickstart.rst:237 @@ -297,8 +297,8 @@ msgstr "" msgid "" "You can add variable sections to a URL by marking sections with " "````. Your function then receives the ```` " -"as a keyword argument. Optionally, you can use a converter to specify the" -" type of the argument like ````. ::" +"as a keyword argument. Optionally, you can use a converter to specify the " +"type of the argument like ````. ::" msgstr "" #: ../../quickstart.rst:261 @@ -355,10 +355,10 @@ msgstr "" #: ../../quickstart.rst:285 msgid "" -"The canonical URL for the ``projects`` endpoint has a trailing slash. " -"It's similar to a folder in a file system. If you access the URL without " -"a trailing slash (``/projects``), Flask redirects you to the canonical " -"URL with the trailing slash (``/projects/``)." +"The canonical URL for the ``projects`` endpoint has a trailing slash. It's" +" similar to a folder in a file system. If you access the URL without a " +"trailing slash (``/projects``), Flask redirects you to the canonical URL " +"with the trailing slash (``/projects/``)." msgstr "" #: ../../quickstart.rst:290 @@ -378,8 +378,8 @@ msgstr "" msgid "" "To build a URL to a specific function, use the :func:`~flask.url_for` " "function. It accepts the name of the function as its first argument and " -"any number of keyword arguments, each corresponding to a variable part of" -" the URL rule. Unknown variable parts are appended to the URL as query " +"any number of keyword arguments, each corresponding to a variable part of " +"the URL rule. Unknown variable parts are appended to the URL as query " "parameters." msgstr "" @@ -420,9 +420,9 @@ msgstr "" msgid "" "For example, here we use the :meth:`~flask.Flask.test_request_context` " "method to try out :func:`~flask.url_for`. " -":meth:`~flask.Flask.test_request_context` tells Flask to behave as though" -" it's handling a request even while we use a Python shell. See :ref" -":`context-locals`." +":meth:`~flask.Flask.test_request_context` tells Flask to behave as though " +"it's handling a request even while we use a Python shell. See " +":ref:`context-locals`." msgstr "" #: ../../quickstart.rst:356 @@ -432,10 +432,10 @@ msgstr "" #: ../../quickstart.rst:358 msgid "" "Web applications use different HTTP methods when accessing URLs. You " -"should familiarize yourself with the HTTP methods as you work with Flask." -" By default, a route only answers to ``GET`` requests. You can use the " -"``methods`` argument of the :meth:`~flask.Flask.route` decorator to " -"handle different HTTP methods. ::" +"should familiarize yourself with the HTTP methods as you work with Flask. " +"By default, a route only answers to ``GET`` requests. You can use the " +"``methods`` argument of the :meth:`~flask.Flask.route` decorator to handle" +" different HTTP methods. ::" msgstr "" #: ../../quickstart.rst:373 @@ -451,11 +451,11 @@ msgstr "" #: ../../quickstart.rst:382 msgid "" -"Dynamic web applications also need static files. That's usually where " -"the CSS and JavaScript files are coming from. Ideally your web server is" -" configured to serve them for you, but during development Flask can do " -"that as well. Just create a folder called :file:`static` in your package" -" or next to your module and it will be available at ``/static`` on the " +"Dynamic web applications also need static files. That's usually where the" +" CSS and JavaScript files are coming from. Ideally your web server is " +"configured to serve them for you, but during development Flask can do that" +" as well. Just create a folder called :file:`static` in your package or " +"next to your module and it will be available at ``/static`` on the " "application." msgstr "" @@ -466,7 +466,8 @@ msgid "" msgstr "" #: ../../quickstart.rst:392 -msgid "The file has to be stored on the filesystem as :file:`static/style.css`." +msgid "" +"The file has to be stored on the filesystem as :file:`static/style.css`." msgstr "" #: ../../quickstart.rst:395 @@ -492,9 +493,9 @@ msgstr "" #: ../../quickstart.rst:414 msgid "" -"Flask will look for templates in the :file:`templates` folder. So if " -"your application is a module, this folder is next to that module, if it's" -" a package it's actually inside your package:" +"Flask will look for templates in the :file:`templates` folder. So if your" +" application is a module, this folder is next to that module, if it's a " +"package it's actually inside your package:" msgstr "" #: ../../quickstart.rst:418 @@ -519,8 +520,8 @@ msgstr "" #: ../../quickstart.rst:447 msgid "" "Inside templates you also have access to the :class:`~flask.request`, " -":class:`~flask.session` and :class:`~flask.g` [#]_ objects as well as the" -" :func:`~flask.get_flashed_messages` function." +":class:`~flask.session` and :class:`~flask.g` [#]_ objects as well as the " +":func:`~flask.get_flashed_messages` function." msgstr "" #: ../../quickstart.rst:451 @@ -535,16 +536,16 @@ msgstr "" msgid "" "Automatic escaping is enabled, so if ``name`` contains HTML it will be " "escaped automatically. If you can trust a variable and you know that it " -"will be safe HTML (for example because it came from a module that " -"converts wiki markup to HTML) you can mark it as safe by using the " -":class:`~markupsafe.Markup` class or by using the ``|safe`` filter in the" -" template. Head over to the Jinja 2 documentation for more examples." +"will be safe HTML (for example because it came from a module that converts" +" wiki markup to HTML) you can mark it as safe by using the " +":class:`~markupsafe.Markup` class or by using the ``|safe`` filter in the " +"template. Head over to the Jinja 2 documentation for more examples." msgstr "" #: ../../quickstart.rst:463 msgid "" -"Here is a basic introduction to how the :class:`~markupsafe.Markup` class" -" works::" +"Here is a basic introduction to how the :class:`~markupsafe.Markup` class " +"works::" msgstr "" #: ../../quickstart.rst:475 @@ -557,8 +558,8 @@ msgstr "" #: ../../quickstart.rst:480 msgid "" -"Unsure what that :class:`~flask.g` object is? It's something in which you" -" can store information for your own needs. See the documentation for " +"Unsure what that :class:`~flask.g` object is? It's something in which you " +"can store information for your own needs. See the documentation for " ":class:`flask.g` and :doc:`patterns/sqlite3`." msgstr "" @@ -571,8 +572,8 @@ msgid "" "For web applications it's crucial to react to the data a client sends to " "the server. In Flask this information is provided by the global " ":class:`~flask.request` object. If you have some experience with Python " -"you might be wondering how that object can be global and how Flask " -"manages to still be threadsafe. The answer is context locals:" +"you might be wondering how that object can be global and how Flask manages" +" to still be threadsafe. The answer is context locals:" msgstr "" #: ../../quickstart.rst:498 @@ -592,21 +593,21 @@ msgstr "" #: ../../quickstart.rst:505 msgid "" "Certain objects in Flask are global objects, but not of the usual kind. " -"These objects are actually proxies to objects that are local to a " -"specific context. What a mouthful. But that is actually quite easy to " +"These objects are actually proxies to objects that are local to a specific" +" context. What a mouthful. But that is actually quite easy to " "understand." msgstr "" #: ../../quickstart.rst:509 msgid "" -"Imagine the context being the handling thread. A request comes in and " -"the web server decides to spawn a new thread (or something else, the " +"Imagine the context being the handling thread. A request comes in and the" +" web server decides to spawn a new thread (or something else, the " "underlying object is capable of dealing with concurrency systems other " -"than threads). When Flask starts its internal request handling it " -"figures out that the current thread is the active context and binds the " -"current application and the WSGI environments to that context (thread). " -"It does that in an intelligent way so that one application can invoke " -"another application without breaking." +"than threads). When Flask starts its internal request handling it figures" +" out that the current thread is the active context and binds the current " +"application and the WSGI environments to that context (thread). It does " +"that in an intelligent way so that one application can invoke another " +"application without breaking." msgstr "" #: ../../quickstart.rst:518 @@ -617,9 +618,9 @@ msgid "" "break because there is no request object. The solution is creating a " "request object yourself and binding it to the context. The easiest " "solution for unit testing is to use the " -":meth:`~flask.Flask.test_request_context` context manager. In " -"combination with the ``with`` statement it will bind a test request so " -"that you can interact with it. Here is an example::" +":meth:`~flask.Flask.test_request_context` context manager. In combination" +" with the ``with`` statement it will bind a test request so that you can " +"interact with it. Here is an example::" msgstr "" #: ../../quickstart.rst:535 @@ -634,10 +635,10 @@ msgstr "" #: ../../quickstart.rst:544 msgid "" -"The request object is documented in the API section and we will not cover" -" it here in detail (see :class:`~flask.Request`). Here is a broad " -"overview of some of the most common operations. First of all you have to" -" import it from the ``flask`` module::" +"The request object is documented in the API section and we will not cover " +"it here in detail (see :class:`~flask.Request`). Here is a broad overview " +"of some of the most common operations. First of all you have to import it" +" from the ``flask`` module::" msgstr "" #: ../../quickstart.rst:551 @@ -645,23 +646,23 @@ msgid "" "The current request method is available by using the " ":attr:`~flask.Request.method` attribute. To access form data (data " "transmitted in a ``POST`` or ``PUT`` request) you can use the " -":attr:`~flask.Request.form` attribute. Here is a full example of the two" -" attributes mentioned above::" +":attr:`~flask.Request.form` attribute. Here is a full example of the two " +"attributes mentioned above::" msgstr "" #: ../../quickstart.rst:570 msgid "" -"What happens if the key does not exist in the ``form`` attribute? In " -"that case a special :exc:`KeyError` is raised. You can catch it like a " -"standard :exc:`KeyError` but if you don't do that, a HTTP 400 Bad Request" -" error page is shown instead. So for many situations you don't have to " +"What happens if the key does not exist in the ``form`` attribute? In that" +" case a special :exc:`KeyError` is raised. You can catch it like a " +"standard :exc:`KeyError` but if you don't do that, a HTTP 400 Bad Request " +"error page is shown instead. So for many situations you don't have to " "deal with that problem." msgstr "" #: ../../quickstart.rst:576 msgid "" -"To access parameters submitted in the URL (``?key=value``) you can use " -"the :attr:`~flask.Request.args` attribute::" +"To access parameters submitted in the URL (``?key=value``) you can use the" +" :attr:`~flask.Request.args` attribute::" msgstr "" #: ../../quickstart.rst:581 @@ -673,8 +674,8 @@ msgstr "" #: ../../quickstart.rst:585 msgid "" -"For a full list of methods and attributes of the request object, head " -"over to the :class:`~flask.Request` documentation." +"For a full list of methods and attributes of the request object, head over" +" to the :class:`~flask.Request` documentation." msgstr "" #: ../../quickstart.rst:590 @@ -705,11 +706,10 @@ msgid "" "If you want to know how the file was named on the client before it was " "uploaded to your application, you can access the " ":attr:`~werkzeug.datastructures.FileStorage.filename` attribute. However " -"please keep in mind that this value can be forged so never ever trust " -"that value. If you want to use the filename of the client to store the " -"file on the server, pass it through the " -":func:`~werkzeug.utils.secure_filename` function that Werkzeug provides " -"for you::" +"please keep in mind that this value can be forged so never ever trust that" +" value. If you want to use the filename of the client to store the file " +"on the server, pass it through the :func:`~werkzeug.utils.secure_filename`" +" function that Werkzeug provides for you::" msgstr "" #: ../../quickstart.rst:632 @@ -726,10 +726,9 @@ msgid "" "attribute. To set cookies you can use the " ":attr:`~flask.Response.set_cookie` method of response objects. The " ":attr:`~flask.Request.cookies` attribute of request objects is a " -"dictionary with all the cookies the client transmits. If you want to use" -" sessions, do not use the cookies directly but instead use the " -":ref:`sessions` in Flask that add some security on top of cookies for " -"you." +"dictionary with all the cookies the client transmits. If you want to use " +"sessions, do not use the cookies directly but instead use the " +":ref:`sessions` in Flask that add some security on top of cookies for you." msgstr "" #: ../../quickstart.rst:645 @@ -772,15 +771,15 @@ msgstr "" #: ../../quickstart.rst:694 msgid "" -"This is a rather pointless example because a user will be redirected from" -" the index to a page they cannot access (401 means access denied) but it " +"This is a rather pointless example because a user will be redirected from " +"the index to a page they cannot access (401 means access denied) but it " "shows how that works." msgstr "" #: ../../quickstart.rst:698 msgid "" -"By default a black and white error page is shown for each error code. If" -" you want to customize the error page, you can use the " +"By default a black and white error page is shown for each error code. If " +"you want to customize the error page, you can use the " ":meth:`~flask.Flask.errorhandler` decorator::" msgstr "" @@ -804,8 +803,8 @@ msgid "" "The return value from a view function is automatically converted into a " "response object for you. If the return value is a string it's converted " "into a response object with the string as response body, a ``200 OK`` " -"status code and a :mimetype:`text/html` mimetype. If the return value is " -"a dict, :func:`jsonify` is called to produce a response. The logic that " +"status code and a :mimetype:`text/html` mimetype. If the return value is a" +" dict, :func:`jsonify` is called to produce a response. The logic that " "Flask applies to converting return values into response objects is as " "follows:" msgstr "" @@ -837,8 +836,8 @@ msgstr "" #: ../../quickstart.rst:738 msgid "" -"If none of that works, Flask will assume the return value is a valid WSGI" -" application and convert that into a response object." +"If none of that works, Flask will assume the return value is a valid WSGI " +"application and convert that into a response object." msgstr "" #: ../../quickstart.rst:741 @@ -874,8 +873,8 @@ msgid "" "Depending on your API design, you may want to create JSON responses for " "types other than ``dict``. In that case, use the " ":func:`~flask.json.jsonify` function, which will serialize any supported " -"JSON data type. Or look into Flask community extensions that support more" -" complex applications." +"JSON data type. Or look into Flask community extensions that support more " +"complex applications." msgstr "" #: ../../quickstart.rst:802 @@ -885,11 +884,11 @@ msgstr "" #: ../../quickstart.rst:804 msgid "" "In addition to the request object there is also a second object called " -":class:`~flask.session` which allows you to store information specific to" -" a user from one request to the next. This is implemented on top of " -"cookies for you and signs the cookies cryptographically. What this means" -" is that the user could look at the contents of your cookie but not " -"modify it, unless they know the secret key used for signing." +":class:`~flask.session` which allows you to store information specific to " +"a user from one request to the next. This is implemented on top of " +"cookies for you and signs the cookies cryptographically. What this means " +"is that the user could look at the contents of your cookie but not modify " +"it, unless they know the secret key used for signing." msgstr "" #: ../../quickstart.rst:811 @@ -933,20 +932,20 @@ msgstr "" #: ../../quickstart.rst:866 msgid "" -"Good applications and user interfaces are all about feedback. If the " -"user does not get enough feedback they will probably end up hating the " +"Good applications and user interfaces are all about feedback. If the user" +" does not get enough feedback they will probably end up hating the " "application. Flask provides a really simple way to give feedback to a " "user with the flashing system. The flashing system basically makes it " -"possible to record a message at the end of a request and access it on the" -" next (and only the next) request. This is usually combined with a " -"layout template to expose the message." +"possible to record a message at the end of a request and access it on the " +"next (and only the next) request. This is usually combined with a layout " +"template to expose the message." msgstr "" #: ../../quickstart.rst:874 msgid "" -"To flash a message use the :func:`~flask.flash` method, to get hold of " -"the messages you can use :func:`~flask.get_flashed_messages` which is " -"also available in the templates. See :doc:`patterns/flashing` for a full " +"To flash a message use the :func:`~flask.flash` method, to get hold of the" +" messages you can use :func:`~flask.get_flashed_messages` which is also " +"available in the templates. See :doc:`patterns/flashing` for a full " "example." msgstr "" @@ -956,20 +955,20 @@ msgstr "" #: ../../quickstart.rst:884 msgid "" -"Sometimes you might be in a situation where you deal with data that " -"should be correct, but actually is not. For example you may have some " -"client-side code that sends an HTTP request to the server but it's " -"obviously malformed. This might be caused by a user tampering with the " -"data, or the client code failing. Most of the time it's okay to reply " -"with ``400 Bad Request`` in that situation, but sometimes that won't do " -"and the code has to continue working." +"Sometimes you might be in a situation where you deal with data that should" +" be correct, but actually is not. For example you may have some client-" +"side code that sends an HTTP request to the server but it's obviously " +"malformed. This might be caused by a user tampering with the data, or the" +" client code failing. Most of the time it's okay to reply with ``400 Bad " +"Request`` in that situation, but sometimes that won't do and the code has " +"to continue working." msgstr "" #: ../../quickstart.rst:892 msgid "" "You may still want to log that something fishy happened. This is where " -"loggers come in handy. As of Flask 0.3 a logger is preconfigured for you" -" to use." +"loggers come in handy. As of Flask 0.3 a logger is preconfigured for you " +"to use." msgstr "" #: ../../quickstart.rst:896 @@ -979,8 +978,8 @@ msgstr "" #: ../../quickstart.rst:902 msgid "" "The attached :attr:`~flask.Flask.logger` is a standard logging " -":class:`~logging.Logger`, so head over to the official :mod:`logging` " -"docs for more information." +":class:`~logging.Logger`, so head over to the official :mod:`logging` docs" +" for more information." msgstr "" #: ../../quickstart.rst:906 @@ -1013,8 +1012,8 @@ msgstr "" #: ../../quickstart.rst:929 msgid "" "Extensions are packages that help you accomplish common tasks. For " -"example, Flask-SQLAlchemy provides SQLAlchemy support that makes it " -"simple and easy to use with Flask." +"example, Flask-SQLAlchemy provides SQLAlchemy support that makes it simple" +" and easy to use with Flask." msgstr "" #: ../../quickstart.rst:933 @@ -1028,4 +1027,3 @@ msgstr "" #: ../../quickstart.rst:938 msgid "Ready to deploy your new Flask app? See :doc:`deploying/index`." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/reqcontext.po b/docs/locales/zh_CN/LC_MESSAGES/reqcontext.po index efd00fc6f..a0d0e5874 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/reqcontext.po +++ b/docs/locales/zh_CN/LC_MESSAGES/reqcontext.po @@ -24,9 +24,9 @@ msgstr "" #: ../../reqcontext.rst:6 msgid "" "The request context keeps track of the request-level data during a " -"request. Rather than passing the request object to each function that " -"runs during a request, the :data:`request` and :data:`session` proxies " -"are accessed instead." +"request. Rather than passing the request object to each function that runs" +" during a request, the :data:`request` and :data:`session` proxies are " +"accessed instead." msgstr "" #: ../../reqcontext.rst:11 @@ -43,19 +43,19 @@ msgstr "" #: ../../reqcontext.rst:19 msgid "" "When the :class:`Flask` application handles a request, it creates a " -":class:`Request` object based on the environment it received from the " -"WSGI server. Because a *worker* (thread, process, or coroutine depending " -"on the server) handles only one request at a time, the request data can " -"be considered global to that worker during that request. Flask uses the " -"term *context local* for this." +":class:`Request` object based on the environment it received from the WSGI" +" server. Because a *worker* (thread, process, or coroutine depending on " +"the server) handles only one request at a time, the request data can be " +"considered global to that worker during that request. Flask uses the term " +"*context local* for this." msgstr "" #: ../../reqcontext.rst:26 msgid "" "Flask automatically *pushes* a request context when handling a request. " "View functions, error handlers, and other functions that run during a " -"request will have access to the :data:`request` proxy, which points to " -"the request object for the current request." +"request will have access to the :data:`request` proxy, which points to the" +" request object for the current request." msgstr "" #: ../../reqcontext.rst:33 @@ -65,22 +65,22 @@ msgstr "" #: ../../reqcontext.rst:35 msgid "" "When a Flask application begins handling a request, it pushes a request " -"context, which also pushes an :doc:`/appcontext`. When the request ends " -"it pops the request context then the application context." +"context, which also pushes an :doc:`/appcontext`. When the request ends it" +" pops the request context then the application context." msgstr "" #: ../../reqcontext.rst:39 msgid "" "The context is unique to each thread (or other worker type). " -":data:`request` cannot be passed to another thread, the other thread will" -" have a different context stack and will not know about the request the " +":data:`request` cannot be passed to another thread, the other thread will " +"have a different context stack and will not know about the request the " "parent thread was pointing to." msgstr "" #: ../../reqcontext.rst:44 msgid "" -"Context locals are implemented in Werkzeug. See :doc:`werkzeug:local` for" -" more information on how this works internally." +"Context locals are implemented in Werkzeug. See :doc:`werkzeug:local` for " +"more information on how this works internally." msgstr "" #: ../../reqcontext.rst:49 @@ -89,24 +89,24 @@ msgstr "" #: ../../reqcontext.rst:51 msgid "" -"If you try to access :data:`request`, or anything that uses it, outside a" -" request context, you'll get this error message:" +"If you try to access :data:`request`, or anything that uses it, outside a " +"request context, you'll get this error message:" msgstr "" #: ../../reqcontext.rst:62 msgid "" -"This should typically only happen when testing code that expects an " -"active request. One option is to use the :meth:`test client " -"` to simulate a full request. Or you can use " +"This should typically only happen when testing code that expects an active" +" request. One option is to use the :meth:`test client `" +" to simulate a full request. Or you can use " ":meth:`~Flask.test_request_context` in a ``with`` block, and everything " -"that runs in the block will have access to :data:`request`, populated " -"with your test data. ::" +"that runs in the block will have access to :data:`request`, populated with" +" your test data. ::" msgstr "" #: ../../reqcontext.rst:77 msgid "" -"If you see that error somewhere else in your code not related to testing," -" it most likely indicates that you should move that code into a view " +"If you see that error somewhere else in your code not related to testing, " +"it most likely indicates that you should move that code into a view " "function." msgstr "" @@ -135,23 +135,23 @@ msgid "" "When the request starts, a :class:`~ctx.RequestContext` is created and " "pushed, which creates and pushes an :class:`~ctx.AppContext` first if a " "context for that application is not already the top context. While these " -"contexts are pushed, the :data:`current_app`, :data:`g`, :data:`request`," -" and :data:`session` proxies are available to the original thread " -"handling the request." +"contexts are pushed, the :data:`current_app`, :data:`g`, :data:`request`, " +"and :data:`session` proxies are available to the original thread handling " +"the request." msgstr "" #: ../../reqcontext.rst:102 msgid "" "Because the contexts are stacks, other contexts may be pushed to change " "the proxies during a request. While this is not a common pattern, it can " -"be used in advanced applications to, for example, do internal redirects " -"or chain different applications together." +"be used in advanced applications to, for example, do internal redirects or" +" chain different applications together." msgstr "" #: ../../reqcontext.rst:107 msgid "" -"After the request is dispatched and a response is generated and sent, the" -" request context is popped, which then pops the application context. " +"After the request is dispatched and a response is generated and sent, the " +"request context is popped, which then pops the application context. " "Immediately before they are popped, the :meth:`~Flask.teardown_request` " "and :meth:`~Flask.teardown_appcontext` functions are executed. These " "execute even if an unhandled exception occurred during dispatch." @@ -178,16 +178,15 @@ msgstr "" #: ../../reqcontext.rst:127 msgid "" "Before each request, :meth:`~Flask.before_request` functions are called. " -"If one of these functions return a value, the other functions are " -"skipped. The return value is treated as the response and the view " -"function is not called." +"If one of these functions return a value, the other functions are skipped." +" The return value is treated as the response and the view function is not " +"called." msgstr "" #: ../../reqcontext.rst:132 msgid "" -"If the :meth:`~Flask.before_request` functions did not return a response," -" the view function for the matched route is called and returns a " -"response." +"If the :meth:`~Flask.before_request` functions did not return a response, " +"the view function for the matched route is called and returns a response." msgstr "" #: ../../reqcontext.rst:136 @@ -210,17 +209,17 @@ msgid "" "If an exception is raised before the teardown functions, Flask tries to " "match it with an :meth:`~Flask.errorhandler` function to handle the " "exception and return a response. If no error handler is found, or the " -"handler itself raises an exception, Flask returns a generic ``500 " -"Internal Server Error`` response. The teardown functions are still " -"called, and are passed the exception object." +"handler itself raises an exception, Flask returns a generic ``500 Internal" +" Server Error`` response. The teardown functions are still called, and are" +" passed the exception object." msgstr "" #: ../../reqcontext.rst:152 msgid "" "If debug mode is enabled, unhandled exceptions are not converted to a " "``500`` response and instead are propagated to the WSGI server. This " -"allows the development server to present the interactive debugger with " -"the traceback." +"allows the development server to present the interactive debugger with the" +" traceback." msgstr "" #: ../../reqcontext.rst:159 @@ -232,8 +231,8 @@ msgid "" "The teardown callbacks are independent of the request dispatch, and are " "instead called by the contexts when they are popped. The functions are " "called even if there is an unhandled exception during dispatch, and for " -"manually pushed contexts. This means there is no guarantee that any other" -" parts of the request dispatch have run first. Be sure to write these " +"manually pushed contexts. This means there is no guarantee that any other " +"parts of the request dispatch have run first. Be sure to write these " "functions in a way that does not depend on other callbacks and will not " "fail." msgstr "" @@ -241,8 +240,8 @@ msgstr "" #: ../../reqcontext.rst:169 msgid "" "During testing, it can be useful to defer popping the contexts after the " -"request ends, so that their data can be accessed in the test function. " -"Use the :meth:`~Flask.test_client` as a ``with`` block to preserve the " +"request ends, so that their data can be accessed in the test function. Use" +" the :meth:`~Flask.test_client` as a ``with`` block to preserve the " "contexts until the ``with`` block exits." msgstr "" @@ -271,8 +270,7 @@ msgstr "" #: ../../reqcontext.rst:214 msgid "" ":data:`got_request_exception` is sent when an exception begins to be " -"handled, but before an :meth:`~Flask.errorhandler` is looked up or " -"called." +"handled, but before an :meth:`~Flask.errorhandler` is looked up or called." msgstr "" #: ../../reqcontext.rst:218 @@ -288,15 +286,15 @@ msgstr "" #: ../../reqcontext.rst:225 msgid "" "At the end of a request, the request context is popped and all data " -"associated with it is destroyed. If an error occurs during development, " -"it is useful to delay destroying the data for debugging purposes." +"associated with it is destroyed. If an error occurs during development, it" +" is useful to delay destroying the data for debugging purposes." msgstr "" #: ../../reqcontext.rst:229 msgid "" "When the development server is running in development mode (the " -"``FLASK_ENV`` environment variable is set to ``'development'``), the " -"error and data will be preserved and shown in the interactive debugger." +"``FLASK_ENV`` environment variable is set to ``'development'``), the error" +" and data will be preserved and shown in the interactive debugger." msgstr "" #: ../../reqcontext.rst:233 @@ -319,9 +317,9 @@ msgstr "" #: ../../reqcontext.rst:246 msgid "" "Some of the objects provided by Flask are proxies to other objects. The " -"proxies are accessed in the same way for each worker thread, but point to" -" the unique object bound to each worker behind the scenes as described on" -" this page." +"proxies are accessed in the same way for each worker thread, but point to " +"the unique object bound to each worker behind the scenes as described on " +"this page." msgstr "" #: ../../reqcontext.rst:251 @@ -339,8 +337,8 @@ msgstr "" #: ../../reqcontext.rst:257 msgid "" -"The reference to the proxied object is needed in some situations, such as" -" sending :doc:`signals` or passing data to a background thread." +"The reference to the proxied object is needed in some situations, such as " +"sending :doc:`signals` or passing data to a background thread." msgstr "" #: ../../reqcontext.rst:261 @@ -348,4 +346,3 @@ msgid "" "If you need to access the underlying object that is proxied, use the " ":meth:`~werkzeug.local.LocalProxy._get_current_object` method::" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/security.po b/docs/locales/zh_CN/LC_MESSAGES/security.po index 0a3f985c7..7beec9bbe 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/security.po +++ b/docs/locales/zh_CN/LC_MESSAGES/security.po @@ -23,10 +23,9 @@ msgstr "" #: ../../security.rst:4 msgid "" -"Web applications usually face all kinds of security problems and it's " -"very hard to get everything right. Flask tries to solve a few of these " -"things for you, but there are a couple more you have to take care of " -"yourself." +"Web applications usually face all kinds of security problems and it's very" +" hard to get everything right. Flask tries to solve a few of these things" +" for you, but there are a couple more you have to take care of yourself." msgstr "" #: ../../security.rst:11 @@ -35,12 +34,12 @@ msgstr "" #: ../../security.rst:13 msgid "" -"Cross site scripting is the concept of injecting arbitrary HTML (and with" -" it JavaScript) into the context of a website. To remedy this, " -"developers have to properly escape text so that it cannot include " -"arbitrary HTML tags. For more information on that have a look at the " -"Wikipedia article on `Cross-Site Scripting `_." +"Cross site scripting is the concept of injecting arbitrary HTML (and with " +"it JavaScript) into the context of a website. To remedy this, developers " +"have to properly escape text so that it cannot include arbitrary HTML " +"tags. For more information on that have a look at the Wikipedia article " +"on `Cross-Site Scripting `_." msgstr "" #: ../../security.rst:20 @@ -68,17 +67,17 @@ msgstr "" #: ../../security.rst:29 msgid "" "sending out textfiles from uploaded files. Some browsers are using " -"content-type guessing based on the first few bytes so users could trick a" -" browser to execute HTML." +"content-type guessing based on the first few bytes so users could trick a " +"browser to execute HTML." msgstr "" #: ../../security.rst:33 msgid "" "Another thing that is very important are unquoted attributes. While " "Jinja2 can protect you from XSS issues by escaping HTML, there is one " -"thing it cannot protect you from: XSS by attribute injection. To counter" -" this possible attack vector, be sure to always quote your attributes " -"with either double or single quotes when using Jinja expressions in them:" +"thing it cannot protect you from: XSS by attribute injection. To counter " +"this possible attack vector, be sure to always quote your attributes with " +"either double or single quotes when using Jinja expressions in them:" msgstr "" #: ../../security.rst:43 @@ -91,12 +90,11 @@ msgstr "" #: ../../security.rst:51 msgid "" "When the user would then move with the mouse over the input, the cookie " -"would be presented to the user in an alert window. But instead of " -"showing the cookie to the user, a good attacker might also execute any " -"other JavaScript code. In combination with CSS injections the attacker " -"might even make the element fill out the entire page so that the user " -"would just have to have the mouse anywhere on the page to trigger the " -"attack." +"would be presented to the user in an alert window. But instead of showing" +" the cookie to the user, a good attacker might also execute any other " +"JavaScript code. In combination with CSS injections the attacker might " +"even make the element fill out the entire page so that the user would just" +" have to have the mouse anywhere on the page to trigger the attack." msgstr "" #: ../../security.rst:58 @@ -119,26 +117,25 @@ msgstr "" #: ../../security.rst:72 msgid "" "Another big problem is CSRF. This is a very complex topic and I won't " -"outline it here in detail just mention what it is and how to " -"theoretically prevent it." +"outline it here in detail just mention what it is and how to theoretically" +" prevent it." msgstr "" #: ../../security.rst:76 msgid "" -"If your authentication information is stored in cookies, you have " -"implicit state management. The state of \"being logged in\" is " -"controlled by a cookie, and that cookie is sent with each request to a " -"page. Unfortunately that includes requests triggered by 3rd party sites." -" If you don't keep that in mind, some people might be able to trick your" -" application's users with social engineering to do stupid things without " -"them knowing." +"If your authentication information is stored in cookies, you have implicit" +" state management. The state of \"being logged in\" is controlled by a " +"cookie, and that cookie is sent with each request to a page. Unfortunately" +" that includes requests triggered by 3rd party sites. If you don't keep " +"that in mind, some people might be able to trick your application's users " +"with social engineering to do stupid things without them knowing." msgstr "" #: ../../security.rst:84 msgid "" -"Say you have a specific URL that, when you sent ``POST`` requests to will" -" delete a user's profile (say ``http://example.com/user/delete``). If an" -" attacker now creates a page that sends a post request to that page with " +"Say you have a specific URL that, when you sent ``POST`` requests to will " +"delete a user's profile (say ``http://example.com/user/delete``). If an " +"attacker now creates a page that sends a post request to that page with " "some JavaScript they just have to trick some users to load that page and " "their profiles will end up being deleted." msgstr "" @@ -162,8 +159,8 @@ msgstr "" #: ../../security.rst:101 msgid "" -"Why does Flask not do that for you? The ideal place for this to happen " -"is the form validation framework, which does not exist in Flask." +"Why does Flask not do that for you? The ideal place for this to happen is" +" the form validation framework, which does not exist in Flask." msgstr "" #: ../../security.rst:107 @@ -179,11 +176,11 @@ msgstr "" #: ../../security.rst:112 msgid "" -"ECMAScript 5 closed this vulnerability, so only extremely old browsers " -"are still vulnerable. All of these browsers have `other more serious " +"ECMAScript 5 closed this vulnerability, so only extremely old browsers are" +" still vulnerable. All of these browsers have `other more serious " "vulnerabilities " -"`_, so" -" this behavior was changed and :func:`~flask.jsonify` now supports " +"`_, so " +"this behavior was changed and :func:`~flask.jsonify` now supports " "serializing arrays." msgstr "" @@ -193,8 +190,8 @@ msgstr "" #: ../../security.rst:122 msgid "" -"Browsers recognize various response headers in order to control security." -" We recommend reviewing each of the headers below for use in your " +"Browsers recognize various response headers in order to control security. " +"We recommend reviewing each of the headers below for use in your " "application. The `Flask-Talisman`_ extension can be used to manage HTTPS " "and the security headers for you." msgstr "" @@ -222,8 +219,8 @@ msgstr "" #: ../../security.rst:144 msgid "" "Tell the browser where it can load various types of resource from. This " -"header should be used whenever possible, but requires some work to define" -" the correct policy for your site. A very strict policy would be::" +"header should be used whenever possible, but requires some work to define " +"the correct policy for your site. A very strict policy would be::" msgstr "" #: ../../security.rst:150 @@ -242,9 +239,9 @@ msgstr "" #: ../../security.rst:156 msgid "" -"Forces the browser to honor the response content type instead of trying " -"to detect it, which can be abused to generate a cross-site scripting " -"(XSS) attack. ::" +"Forces the browser to honor the response content type instead of trying to" +" detect it, which can be abused to generate a cross-site scripting (XSS) " +"attack. ::" msgstr "" #: ../../security.rst:162 @@ -261,12 +258,13 @@ msgstr "" msgid "" "Prevents external sites from embedding your site in an ``iframe``. This " "prevents a class of attacks where clicks in the outer frame can be " -"translated invisibly to clicks on your page's elements. This is also " -"known as \"clickjacking\". ::" +"translated invisibly to clicks on your page's elements. This is also known" +" as \"clickjacking\". ::" msgstr "" #: ../../security.rst:174 -msgid "https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options" +msgid "" +"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options" msgstr "" #: ../../security.rst:177 @@ -276,12 +274,13 @@ msgstr "" #: ../../security.rst:179 msgid "" "The browser will try to prevent reflected XSS attacks by not loading the " -"page if the request contains something that looks like JavaScript and the" -" response contains the same data. ::" +"page if the request contains something that looks like JavaScript and the " +"response contains the same data. ::" msgstr "" #: ../../security.rst:185 -msgid "https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection" +msgid "" +"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection" msgstr "" #: ../../security.rst:191 @@ -325,11 +324,11 @@ msgstr "" #: ../../security.rst:223 msgid "" "For the session cookie, if :attr:`session.permanent " -"` is set, then " -":data:`PERMANENT_SESSION_LIFETIME` is used to set the expiration. Flask's" -" default cookie implementation validates that the cryptographic signature" -" is not older than this value. Lowering this value may help mitigate " -"replay attacks, where intercepted cookies can be sent at a later time. ::" +"` is set, then :data:`PERMANENT_SESSION_LIFETIME`" +" is used to set the expiration. Flask's default cookie implementation " +"validates that the cryptographic signature is not older than this value. " +"Lowering this value may help mitigate replay attacks, where intercepted " +"cookies can be sent at a later time. ::" msgstr "" #: ../../security.rst:241 @@ -358,8 +357,8 @@ msgstr "" #: ../../security.rst:257 msgid "" -"Be careful when enabling this, as it is very difficult to undo if you set" -" up or upgrade your key incorrectly." +"Be careful when enabling this, as it is very difficult to undo if you set " +"up or upgrade your key incorrectly." msgstr "" #: ../../security.rst:260 @@ -386,8 +385,8 @@ msgstr "" #: ../../security.rst:274 msgid "" -"If you expect users to copy and paste untrusted code from your site, such" -" as from comments posted by users on a technical blog, consider applying " +"If you expect users to copy and paste untrusted code from your site, such " +"as from comments posted by users on a technical blog, consider applying " "extra filtering, such as replacing all ``\\b`` characters." msgstr "" @@ -395,8 +394,7 @@ msgstr "" msgid "" "Most modern terminals will warn about and remove hidden characters when " "pasting, so this isn't strictly necessary. It's also possible to craft " -"dangerous commands in other ways that aren't possible to filter. " -"Depending on your site's use case, it may be good to show a warning about" -" copying code in general." +"dangerous commands in other ways that aren't possible to filter. Depending" +" on your site's use case, it may be good to show a warning about copying " +"code in general." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/server.po b/docs/locales/zh_CN/LC_MESSAGES/server.po index 6fe0298f1..9772b2151 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/server.po +++ b/docs/locales/zh_CN/LC_MESSAGES/server.po @@ -23,9 +23,9 @@ msgstr "" #: ../../server.rst:6 msgid "" -"Flask provides a ``run`` command to run the application with a " -"development server. In development mode, this server provides an " -"interactive debugger and will reload when code is changed." +"Flask provides a ``run`` command to run the application with a development" +" server. In development mode, this server provides an interactive debugger" +" and will reload when code is changed." msgstr "" #: ../../server.rst:12 @@ -68,8 +68,8 @@ msgid "" "This enables the development environment, including the interactive " "debugger and reloader, and then starts the server on " "http://localhost:5000/. Use ``flask run --help`` to see the available " -"options, and :doc:`/cli` for detailed instructions about configuring and" -" using the CLI." +"options, and :doc:`/cli` for detailed instructions about configuring and " +"using the CLI." msgstr "" #: ../../server.rst:60 @@ -89,16 +89,16 @@ msgid "" "When using the ``flask run`` command with the reloader, the server will " "continue to run even if you introduce syntax errors or other " "initialization errors into the code. Accessing the site will show the " -"interactive debugger for the error, rather than crashing the server. This" -" feature is called \"lazy loading\"." +"interactive debugger for the error, rather than crashing the server. This " +"feature is called \"lazy loading\"." msgstr "" #: ../../server.rst:76 msgid "" "If a syntax error is already present when calling ``flask run``, it will " -"fail immediately and show the traceback rather than waiting until the " -"site is accessed. This is intended to make errors more visible initially " -"while still allowing the server to handle errors on reload." +"fail immediately and show the traceback rather than waiting until the site" +" is accessed. This is intended to make errors more visible initially while" +" still allowing the server to handle errors on reload." msgstr "" #: ../../server.rst:81 @@ -114,23 +114,22 @@ msgstr "" #: ../../server.rst:89 msgid "" -"As an alternative to the ``flask run`` command, the development server " -"can also be started from Python with the :meth:`Flask.run` method. This " +"As an alternative to the ``flask run`` command, the development server can" +" also be started from Python with the :meth:`Flask.run` method. This " "method takes arguments similar to the CLI options to control the server. " -"The main difference from the CLI command is that the server will crash if" -" there are errors when reloading." +"The main difference from the CLI command is that the server will crash if " +"there are errors when reloading." msgstr "" #: ../../server.rst:95 msgid "" -"``debug=True`` can be passed to enable the debugger and reloader, but the" -" ``FLASK_ENV=development`` environment variable is still required to " -"fully enable development mode." +"``debug=True`` can be passed to enable the debugger and reloader, but the " +"``FLASK_ENV=development`` environment variable is still required to fully " +"enable development mode." msgstr "" #: ../../server.rst:99 msgid "" -"Place the call in a main block, otherwise it will interfere when trying " -"to import and run the application with a production server later." +"Place the call in a main block, otherwise it will interfere when trying to" +" import and run the application with a production server later." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/shell.po b/docs/locales/zh_CN/LC_MESSAGES/shell.po index b8e19d582..c305ce1fc 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/shell.po +++ b/docs/locales/zh_CN/LC_MESSAGES/shell.po @@ -26,18 +26,18 @@ msgid "" "One of the reasons everybody loves Python is the interactive shell. It " "basically allows you to execute Python commands in real time and " "immediately get results back. Flask itself does not come with an " -"interactive shell, because it does not require any specific setup " -"upfront, just import your application and start playing around." +"interactive shell, because it does not require any specific setup upfront," +" just import your application and start playing around." msgstr "" #: ../../shell.rst:12 msgid "" -"There are however some handy helpers to make playing around in the shell " -"a more pleasant experience. The main issue with interactive console " -"sessions is that you're not triggering a request like a browser does " -"which means that :data:`~flask.g`, :data:`~flask.request` and others are " -"not available. But the code you want to test might depend on them, so " -"what can you do?" +"There are however some handy helpers to make playing around in the shell a" +" more pleasant experience. The main issue with interactive console " +"sessions is that you're not triggering a request like a browser does which" +" means that :data:`~flask.g`, :data:`~flask.request` and others are not " +"available. But the code you want to test might depend on them, so what " +"can you do?" msgstr "" #: ../../shell.rst:19 @@ -50,8 +50,8 @@ msgstr "" #: ../../shell.rst:24 msgid "" -"Generally it's recommended that you read the :doc:`reqcontext` chapter of" -" the documentation first." +"Generally it's recommended that you read the :doc:`reqcontext` chapter of " +"the documentation first." msgstr "" #: ../../shell.rst:28 @@ -60,9 +60,9 @@ msgstr "" #: ../../shell.rst:30 msgid "" -"Starting with Flask 0.11 the recommended way to work with the shell is " -"the ``flask shell`` command which does a lot of this automatically for " -"you. For instance the shell is automatically initialized with a loaded " +"Starting with Flask 0.11 the recommended way to work with the shell is the" +" ``flask shell`` command which does a lot of this automatically for you. " +"For instance the shell is automatically initialized with a loaded " "application context." msgstr "" @@ -83,8 +83,8 @@ msgstr "" #: ../../shell.rst:46 msgid "" -"Normally you would use the ``with`` statement to make this request object" -" active, but in the shell it's easier to use the " +"Normally you would use the ``with`` statement to make this request object " +"active, but in the shell it's easier to use the " ":meth:`~flask.ctx.RequestContext.push` and " ":meth:`~flask.ctx.RequestContext.pop` methods by hand:" msgstr "" @@ -101,10 +101,10 @@ msgstr "" #: ../../shell.rst:61 msgid "" -"By just creating a request context, you still don't have run the code " -"that is normally run before a request. This might result in your " -"database being unavailable if you are connecting to the database in a " -"before-request callback or the current user not being stored on the " +"By just creating a request context, you still don't have run the code that" +" is normally run before a request. This might result in your database " +"being unavailable if you are connecting to the database in a before-" +"request callback or the current user not being stored on the " ":data:`~flask.g` object etc." msgstr "" @@ -123,16 +123,16 @@ msgstr "" #: ../../shell.rst:77 msgid "" "To shutdown a request, you need to trick a bit before the after request " -"functions (triggered by :meth:`~flask.Flask.process_response`) operate on" -" a response object:" +"functions (triggered by :meth:`~flask.Flask.process_response`) operate on " +"a response object:" msgstr "" #: ../../shell.rst:85 msgid "" "The functions registered as :meth:`~flask.Flask.teardown_request` are " "automatically called when the context is popped. So this is the perfect " -"place to automatically tear down resources that were needed by the " -"request context (such as database connections)." +"place to automatically tear down resources that were needed by the request" +" context (such as database connections)." msgstr "" #: ../../shell.rst:92 @@ -141,13 +141,13 @@ msgstr "" #: ../../shell.rst:94 msgid "" -"If you like the idea of experimenting in a shell, create yourself a " -"module with stuff you want to star import into your interactive session." -" There you could also define some more helper methods for common things " -"such as initializing the database, dropping tables etc." +"If you like the idea of experimenting in a shell, create yourself a module" +" with stuff you want to star import into your interactive session. There " +"you could also define some more helper methods for common things such as " +"initializing the database, dropping tables etc." msgstr "" #: ../../shell.rst:99 -msgid "Just put them into a module (like `shelltools`) and import from there:" +msgid "" +"Just put them into a module (like `shelltools`) and import from there:" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/signals.po b/docs/locales/zh_CN/LC_MESSAGES/signals.po index 08f3db9b0..659ae9c0a 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/signals.po +++ b/docs/locales/zh_CN/LC_MESSAGES/signals.po @@ -40,12 +40,12 @@ msgstr "" msgid "" "Flask comes with a couple of signals and other extensions might provide " "more. Also keep in mind that signals are intended to notify subscribers " -"and should not encourage subscribers to modify data. You will notice " -"that there are signals that appear to do the same thing like some of the " -"builtin decorators do (eg: :data:`~flask.request_started` is very similar" -" to :meth:`~flask.Flask.before_request`). However, there are differences" -" in how they work. The core :meth:`~flask.Flask.before_request` handler," -" for example, is executed in a specific order and is able to abort the " +"and should not encourage subscribers to modify data. You will notice that" +" there are signals that appear to do the same thing like some of the " +"builtin decorators do (eg: :data:`~flask.request_started` is very similar " +"to :meth:`~flask.Flask.before_request`). However, there are differences " +"in how they work. The core :meth:`~flask.Flask.before_request` handler, " +"for example, is executed in a specific order and is able to abort the " "request early by returning a response. In contrast all signal handlers " "are executed in undefined order and do not modify any data." msgstr "" @@ -53,8 +53,8 @@ msgstr "" #: ../../signals.rst:26 msgid "" "The big advantage of signals over handlers is that you can safely " -"subscribe to them for just a split second. These temporary subscriptions" -" are helpful for unit testing for example. Say you want to know what " +"subscribe to them for just a split second. These temporary subscriptions " +"are helpful for unit testing for example. Say you want to know what " "templates were rendered as part of a request: signals allow you to do " "exactly that." msgstr "" @@ -67,19 +67,17 @@ msgstr "" msgid "" "To subscribe to a signal, you can use the " ":meth:`~blinker.base.Signal.connect` method of a signal. The first " -"argument is the function that should be called when the signal is " -"emitted, the optional second argument specifies a sender. To unsubscribe" -" from a signal, you can use the :meth:`~blinker.base.Signal.disconnect` " -"method." +"argument is the function that should be called when the signal is emitted," +" the optional second argument specifies a sender. To unsubscribe from a " +"signal, you can use the :meth:`~blinker.base.Signal.disconnect` method." msgstr "" #: ../../signals.rst:41 msgid "" -"For all core Flask signals, the sender is the application that issued the" -" signal. When you subscribe to a signal, be sure to also provide a " -"sender unless you really want to listen for signals from all " -"applications. This is especially true if you are developing an " -"extension." +"For all core Flask signals, the sender is the application that issued the " +"signal. When you subscribe to a signal, be sure to also provide a sender " +"unless you really want to listen for signals from all applications. This " +"is especially true if you are developing an extension." msgstr "" #: ../../signals.rst:46 @@ -101,19 +99,19 @@ msgstr "" #: ../../signals.rst:77 msgid "" -"All the template rendering in the code issued by the application `app` in" -" the body of the ``with`` block will now be recorded in the `templates` " -"variable. Whenever a template is rendered, the template object as well " -"as context are appended to it." +"All the template rendering in the code issued by the application `app` in " +"the body of the ``with`` block will now be recorded in the `templates` " +"variable. Whenever a template is rendered, the template object as well as" +" context are appended to it." msgstr "" #: ../../signals.rst:82 msgid "" "Additionally there is a convenient helper method " "(:meth:`~blinker.base.Signal.connected_to`) that allows you to " -"temporarily subscribe a function to a signal with a context manager on " -"its own. Because the return value of the context manager cannot be " -"specified that way, you have to pass the list in as an argument::" +"temporarily subscribe a function to a signal with a context manager on its" +" own. Because the return value of the context manager cannot be specified" +" that way, you have to pass the list in as an argument::" msgstr "" #: ../../signals.rst:95 @@ -137,8 +135,8 @@ msgstr "" #: ../../signals.rst:110 msgid "" "If you want to use signals in your own application, you can use the " -"blinker library directly. The most common use case are named signals in " -"a custom :class:`~blinker.base.Namespace`.. This is what is recommended " +"blinker library directly. The most common use case are named signals in a" +" custom :class:`~blinker.base.Namespace`.. This is what is recommended " "most of the time::" msgstr "" @@ -178,8 +176,8 @@ msgstr "" #: ../../signals.rst:148 msgid "" -"Try to always pick a good sender. If you have a class that is emitting a" -" signal, pass ``self`` as sender. If you are emitting a signal from a " +"Try to always pick a good sender. If you have a class that is emitting a " +"signal, pass ``self`` as sender. If you are emitting a signal from a " "random function, you can pass ``current_app._get_current_object()`` as " "sender." msgstr "" @@ -204,9 +202,9 @@ msgstr "" msgid "" "Signals fully support :doc:`reqcontext` when receiving signals. Context-" "local variables are consistently available between " -":data:`~flask.request_started` and :data:`~flask.request_finished`, so " -"you can rely on :class:`flask.g` and others as needed. Note the " -"limitations described in :ref:`signals-sending` and the " +":data:`~flask.request_started` and :data:`~flask.request_finished`, so you" +" can rely on :class:`flask.g` and others as needed. Note the limitations " +"described in :ref:`signals-sending` and the " ":data:`~flask.request_tearing_down` signal." msgstr "" @@ -216,8 +214,8 @@ msgstr "" #: ../../signals.rst:173 msgid "" -"With Blinker 1.1 you can also easily subscribe to signals by using the " -"new :meth:`~blinker.base.NamedSignal.connect_via` decorator::" +"With Blinker 1.1 you can also easily subscribe to signals by using the new" +" :meth:`~blinker.base.NamedSignal.connect_via` decorator::" msgstr "" #: ../../signals.rst:183 @@ -225,6 +223,6 @@ msgid "Core Signals" msgstr "" #: ../../signals.rst:185 -msgid "Take a look at :ref:`core-signals-list` for a list of all builtin signals." +msgid "" +"Take a look at :ref:`core-signals-list` for a list of all builtin signals." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/templating.po b/docs/locales/zh_CN/LC_MESSAGES/templating.po index 42ec818c3..a966c2b3f 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/templating.po +++ b/docs/locales/zh_CN/LC_MESSAGES/templating.po @@ -23,9 +23,9 @@ msgstr "" #: ../../templating.rst:4 msgid "" -"Flask leverages Jinja2 as its template engine. You are obviously free to" -" use a different template engine, but you still have to install Jinja2 to" -" run Flask itself. This requirement is necessary to enable rich " +"Flask leverages Jinja2 as its template engine. You are obviously free to " +"use a different template engine, but you still have to install Jinja2 to " +"run Flask itself. This requirement is necessary to enable rich " "extensions. An extension can depend on Jinja2 being present." msgstr "" @@ -123,16 +123,16 @@ msgstr "" #: ../../templating.rst:80 msgid "" -"These variables are added to the context of variables, they are not " -"global variables. The difference is that by default these will not show " -"up in the context of imported templates. This is partially caused by " +"These variables are added to the context of variables, they are not global" +" variables. The difference is that by default these will not show up in " +"the context of imported templates. This is partially caused by " "performance considerations, partially to keep things explicit." msgstr "" #: ../../templating.rst:85 msgid "" -"What does this mean for you? If you have a macro you want to import, " -"that needs to access the request object you have two possibilities:" +"What does this mean for you? If you have a macro you want to import, that" +" needs to access the request object you have two possibilities:" msgstr "" #: ../../templating.rst:88 @@ -156,20 +156,20 @@ msgstr "" #: ../../templating.rst:102 msgid "" "Autoescaping is the concept of automatically escaping special characters " -"for you. Special characters in the sense of HTML (or XML, and thus " -"XHTML) are ``&``, ``>``, ``<``, ``\"`` as well as ``'``. Because these " +"for you. Special characters in the sense of HTML (or XML, and thus XHTML)" +" are ``&``, ``>``, ``<``, ``\"`` as well as ``'``. Because these " "characters carry specific meanings in documents on their own you have to " -"replace them by so called \"entities\" if you want to use them for text." -" Not doing so would not only cause user frustration by the inability to " -"use these characters in text, but can also lead to security problems. " -"(see :ref:`security-xss`)" +"replace them by so called \"entities\" if you want to use them for text. " +"Not doing so would not only cause user frustration by the inability to use" +" these characters in text, but can also lead to security problems. (see " +":ref:`security-xss`)" msgstr "" #: ../../templating.rst:111 msgid "" -"Sometimes however you will need to disable autoescaping in templates. " -"This can be the case if you want to explicitly inject HTML into pages, " -"for example if they come from a system that generates secure HTML like a " +"Sometimes however you will need to disable autoescaping in templates. This" +" can be the case if you want to explicitly inject HTML into pages, for " +"example if they come from a system that generates secure HTML like a " "markdown to HTML converter." msgstr "" @@ -186,8 +186,8 @@ msgstr "" #: ../../templating.rst:121 msgid "" -"Inside the template, use the ``|safe`` filter to explicitly mark a string" -" as safe HTML (``{{ myvariable|safe }}``)" +"Inside the template, use the ``|safe`` filter to explicitly mark a string " +"as safe HTML (``{{ myvariable|safe }}``)" msgstr "" #: ../../templating.rst:123 @@ -202,8 +202,8 @@ msgstr "" #: ../../templating.rst:135 msgid "" -"Whenever you do this, please be very cautious about the variables you are" -" using in this block." +"Whenever you do this, please be very cautious about the variables you are " +"using in this block." msgstr "" #: ../../templating.rst:141 @@ -212,22 +212,23 @@ msgstr "" #: ../../templating.rst:143 msgid "" -"If you want to register your own filters in Jinja2 you have two ways to " -"do that. You can either put them by hand into the " +"If you want to register your own filters in Jinja2 you have two ways to do" +" that. You can either put them by hand into the " ":attr:`~flask.Flask.jinja_env` of the application or use the " ":meth:`~flask.Flask.template_filter` decorator." msgstr "" #: ../../templating.rst:148 -msgid "The two following examples work the same and both reverse an object::" +msgid "" +"The two following examples work the same and both reverse an object::" msgstr "" #: ../../templating.rst:158 msgid "" "In case of the decorator the argument is optional if you want to use the " "function name as name of the filter. Once registered, you can use the " -"filter in your templates in the same way as Jinja2's builtin filters, for" -" example if you have a Python list in context called `mylist`::" +"filter in your templates in the same way as Jinja2's builtin filters, for " +"example if you have a Python list in context called `mylist`::" msgstr "" #: ../../templating.rst:168 @@ -248,8 +249,8 @@ msgstr "" msgid "" "The context processor above makes a variable called `user` available in " "the template with the value of `g.user`. This example is not very " -"interesting because `g` is available in templates anyways, but it gives " -"an idea how this works." +"interesting because `g` is available in templates anyways, but it gives an" +" idea how this works." msgstr "" #: ../../templating.rst:186 @@ -261,14 +262,13 @@ msgstr "" #: ../../templating.rst:196 msgid "" -"The context processor above makes the `format_price` function available " -"to all templates::" +"The context processor above makes the `format_price` function available to" +" all templates::" msgstr "" #: ../../templating.rst:201 msgid "" -"You could also build `format_price` as a template filter (see :ref" -":`registering-filters`), but this demonstrates how to pass functions in a" -" context processor." +"You could also build `format_price` as a template filter (see " +":ref:`registering-filters`), but this demonstrates how to pass functions " +"in a context processor." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/testing.po b/docs/locales/zh_CN/LC_MESSAGES/testing.po index 0f4d0c78c..248016506 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/testing.po +++ b/docs/locales/zh_CN/LC_MESSAGES/testing.po @@ -27,9 +27,9 @@ msgstr "" #: ../../testing.rst:6 msgid "" -"The origin of this quote is unknown and while it is not entirely correct," -" it is also not far from the truth. Untested applications make it hard " -"to improve existing code and developers of untested applications tend to " +"The origin of this quote is unknown and while it is not entirely correct, " +"it is also not far from the truth. Untested applications make it hard to " +"improve existing code and developers of untested applications tend to " "become pretty paranoid. If an application has automated tests, you can " "safely make changes and instantly know if anything breaks." msgstr "" @@ -54,8 +54,8 @@ msgstr "" #: ../../testing.rst:26 msgid "" "First, we need an application to test; we will use the application from " -"the :doc:`tutorial/index`. If you don't have that application yet, get " -"the source code from :gh:`the examples `." +"the :doc:`tutorial/index`. If you don't have that application yet, get the" +" source code from :gh:`the examples `." msgstr "" #: ../../testing.rst:30 @@ -71,39 +71,39 @@ msgstr "" #: ../../testing.rst:36 msgid "" "We begin by adding a tests directory under the application root. Then " -"create a Python file to store our tests (:file:`test_flaskr.py`). When we" -" format the filename like ``test_*.py``, it will be auto-discoverable by " +"create a Python file to store our tests (:file:`test_flaskr.py`). When we " +"format the filename like ``test_*.py``, it will be auto-discoverable by " "pytest." msgstr "" #: ../../testing.rst:41 msgid "" -"Next, we create a `pytest fixture`_ called :func:`client` that configures" -" the application for testing and initializes a new database::" +"Next, we create a `pytest fixture`_ called :func:`client` that configures " +"the application for testing and initializes a new database::" msgstr "" #: ../../testing.rst:66 msgid "" -"This client fixture will be called by each individual test. It gives us " -"a simple interface to the application, where we can trigger test requests" -" to the application. The client will also keep track of cookies for us." +"This client fixture will be called by each individual test. It gives us a" +" simple interface to the application, where we can trigger test requests " +"to the application. The client will also keep track of cookies for us." msgstr "" #: ../../testing.rst:70 msgid "" -"During setup, the ``TESTING`` config flag is activated. What this does " -"is disable error catching during request handling, so that you get better" -" error reports when performing test requests against the application." +"During setup, the ``TESTING`` config flag is activated. What this does is" +" disable error catching during request handling, so that you get better " +"error reports when performing test requests against the application." msgstr "" #: ../../testing.rst:75 msgid "" -"Because SQLite3 is filesystem-based, we can easily use the " -":mod:`tempfile` module to create a temporary database and initialize it. " -"The :func:`~tempfile.mkstemp` function does two things for us: it returns" -" a low-level file handle and a random file name, the latter we use as " -"database name. We just have to keep the `db_fd` around so that we can " -"use the :func:`os.close` function to close the file." +"Because SQLite3 is filesystem-based, we can easily use the :mod:`tempfile`" +" module to create a temporary database and initialize it. The " +":func:`~tempfile.mkstemp` function does two things for us: it returns a " +"low-level file handle and a random file name, the latter we use as " +"database name. We just have to keep the `db_fd` around so that we can use" +" the :func:`os.close` function to close the file." msgstr "" #: ../../testing.rst:82 @@ -119,8 +119,8 @@ msgstr "" #: ../../testing.rst:95 msgid "" "Even though it did not run any actual tests, we already know that our " -"``flaskr`` application is syntactically valid, otherwise the import would" -" have died with an exception." +"``flaskr`` application is syntactically valid, otherwise the import would " +"have died with an exception." msgstr "" #: ../../testing.rst:103 @@ -129,10 +129,10 @@ msgstr "" #: ../../testing.rst:105 msgid "" -"Now it's time to start testing the functionality of the application. " -"Let's check that the application shows \"No entries here so far\" if we " -"access the root of the application (``/``). To do this, we add a new " -"test function to :file:`test_flaskr.py`, like this::" +"Now it's time to start testing the functionality of the application. Let's" +" check that the application shows \"No entries here so far\" if we access " +"the root of the application (``/``). To do this, we add a new test " +"function to :file:`test_flaskr.py`, like this::" msgstr "" #: ../../testing.rst:116 @@ -147,8 +147,8 @@ msgid "" "application with the given path. The return value will be a " ":class:`~flask.Flask.response_class` object. We can now use the " ":attr:`~werkzeug.wrappers.Response.data` attribute to inspect the return " -"value (as string) from the application. In this case, we ensure that " -"``'No entries here so far'`` is part of the output." +"value (as string) from the application. In this case, we ensure that ``'No" +" entries here so far'`` is part of the output." msgstr "" #: ../../testing.rst:127 @@ -161,16 +161,17 @@ msgstr "" #: ../../testing.rst:142 msgid "" -"The majority of the functionality of our application is only available " -"for the administrative user, so we need a way to log our test client in " -"and out of the application. To do this, we fire some requests to the " -"login and logout pages with the required form data (username and " -"password). And because the login and logout pages redirect, we tell the " -"client to `follow_redirects`." +"The majority of the functionality of our application is only available for" +" the administrative user, so we need a way to log our test client in and " +"out of the application. To do this, we fire some requests to the login " +"and logout pages with the required form data (username and password). And" +" because the login and logout pages redirect, we tell the client to " +"`follow_redirects`." msgstr "" #: ../../testing.rst:148 -msgid "Add the following two functions to your :file:`test_flaskr.py` file::" +msgid "" +"Add the following two functions to your :file:`test_flaskr.py` file::" msgstr "" #: ../../testing.rst:160 @@ -191,8 +192,8 @@ msgstr "" #: ../../testing.rst:199 msgid "" -"Here we check that HTML is allowed in the text but not in the title, " -"which is the intended behavior." +"Here we check that HTML is allowed in the text but not in the title, which" +" is the intended behavior." msgstr "" #: ../../testing.rst:202 @@ -214,7 +215,8 @@ msgid "" msgstr "" #: ../../testing.rst:235 -msgid "All the other objects that are context bound can be used in the same way." +msgid "" +"All the other objects that are context bound can be used in the same way." msgstr "" #: ../../testing.rst:238 @@ -227,13 +229,12 @@ msgstr "" #: ../../testing.rst:242 msgid "" "Note however that if you are using a test request context, the " -":meth:`~flask.Flask.before_request` and " -":meth:`~flask.Flask.after_request` functions are not called " -"automatically. However :meth:`~flask.Flask.teardown_request` functions " -"are indeed executed when the test request context leaves the ``with`` " -"block. If you do want the :meth:`~flask.Flask.before_request` functions " -"to be called as well, you need to call " -":meth:`~flask.Flask.preprocess_request` yourself::" +":meth:`~flask.Flask.before_request` and :meth:`~flask.Flask.after_request`" +" functions are not called automatically. However " +":meth:`~flask.Flask.teardown_request` functions are indeed executed when " +"the test request context leaves the ``with`` block. If you do want the " +":meth:`~flask.Flask.before_request` functions to be called as well, you " +"need to call :meth:`~flask.Flask.preprocess_request` yourself::" msgstr "" #: ../../testing.rst:256 @@ -270,9 +271,9 @@ msgstr "" #: ../../testing.rst:293 msgid "" -"For a test it would be nice to override this user from the outside " -"without having to change some code. This can be accomplished with " -"hooking the :data:`flask.appcontext_pushed` signal::" +"For a test it would be nice to override this user from the outside without" +" having to change some code. This can be accomplished with hooking the " +":data:`flask.appcontext_pushed` signal::" msgstr "" #: ../../testing.rst:307 @@ -294,8 +295,8 @@ msgstr "" #: ../../testing.rst:338 msgid "" "If you were to use just the :meth:`~flask.Flask.test_client` without the " -"``with`` block, the ``assert`` would fail with an error because `request`" -" is no longer available (because you are trying to use it outside of the " +"``with`` block, the ``assert`` would fail with an error because `request` " +"is no longer available (because you are trying to use it outside of the " "actual request)." msgstr "" @@ -305,28 +306,28 @@ msgstr "" #: ../../testing.rst:349 msgid "" -"Sometimes it can be very helpful to access or modify the sessions from " -"the test client. Generally there are two ways for this. If you just " -"want to ensure that a session has certain keys set to certain values you " -"can just keep the context around and access :data:`flask.session`::" +"Sometimes it can be very helpful to access or modify the sessions from the" +" test client. Generally there are two ways for this. If you just want to" +" ensure that a session has certain keys set to certain values you can just" +" keep the context around and access :data:`flask.session`::" msgstr "" #: ../../testing.rst:358 msgid "" "This however does not make it possible to also modify the session or to " -"access the session before a request was fired. Starting with Flask 0.8 " -"we provide a so called “session transaction” which simulates the " -"appropriate calls to open a session in the context of the test client and" -" to modify it. At the end of the transaction the session is stored and " -"ready to be used by the test client. This works independently of the " -"session backend used::" +"access the session before a request was fired. Starting with Flask 0.8 we" +" provide a so called “session transaction” which simulates the appropriate" +" calls to open a session in the context of the test client and to modify " +"it. At the end of the transaction the session is stored and ready to be " +"used by the test client. This works independently of the session backend " +"used::" msgstr "" #: ../../testing.rst:372 msgid "" -"Note that in this case you have to use the ``sess`` object instead of the" -" :data:`flask.session` proxy. The object however itself will provide the" -" same interface." +"Note that in this case you have to use the ``sess`` object instead of the " +":data:`flask.session` proxy. The object however itself will provide the " +"same interface." msgstr "" #: ../../testing.rst:378 @@ -342,8 +343,8 @@ msgstr "" #: ../../testing.rst:402 msgid "" -"Passing the ``json`` argument in the test client methods sets the request" -" data to the JSON-serialized object and sets the content type to " +"Passing the ``json`` argument in the test client methods sets the request " +"data to the JSON-serialized object and sets the content type to " "``application/json``. You can get the JSON data from the request or " "response with ``get_json``." msgstr "" @@ -355,8 +356,8 @@ msgstr "" #: ../../testing.rst:413 msgid "" "Click comes with `utilities for testing`_ your CLI commands. A " -":class:`~click.testing.CliRunner` runs commands in isolation and captures" -" the output in a :class:`~click.testing.Result` object." +":class:`~click.testing.CliRunner` runs commands in isolation and captures " +"the output in a :class:`~click.testing.Result` object." msgstr "" #: ../../testing.rst:417 @@ -377,7 +378,6 @@ msgstr "" #: ../../testing.rst:444 msgid "" "If you want to test how your command parses parameters, without running " -"the command, use its :meth:`~click.BaseCommand.make_context` method. This" -" is useful for testing complex validation rules and custom types. ::" +"the command, use its :meth:`~click.BaseCommand.make_context` method. This " +"is useful for testing complex validation rules and custom types. ::" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/tutorial/blog.po b/docs/locales/zh_CN/LC_MESSAGES/tutorial/blog.po index a60e19242..e66030136 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/tutorial/blog.po +++ b/docs/locales/zh_CN/LC_MESSAGES/tutorial/blog.po @@ -24,9 +24,9 @@ msgstr "" #: ../../tutorial/blog.rst:6 msgid "" "You'll use the same techniques you learned about when writing the " -"authentication blueprint to write the blog blueprint. The blog should " -"list all posts, allow logged in users to create posts, and allow the " -"author of a post to edit or delete it." +"authentication blueprint to write the blog blueprint. The blog should list" +" all posts, allow logged in users to create posts, and allow the author of" +" a post to edit or delete it." msgstr "" #: ../../tutorial/blog.rst:11 @@ -53,8 +53,8 @@ msgstr "" #: ../../tutorial/blog.rst:33 msgid "" "Import and register the blueprint from the factory using " -":meth:`app.register_blueprint() `. Place the " -"new code at the end of the factory function before returning the app." +":meth:`app.register_blueprint() `. Place the new" +" code at the end of the factory function before returning the app." msgstr "" #: ../../tutorial/blog.rst:37 @@ -65,8 +65,8 @@ msgstr "" msgid "" "Unlike the auth blueprint, the blog blueprint does not have a " "``url_prefix``. So the ``index`` view will be at ``/``, the ``create`` " -"view at ``/create``, and so on. The blog is the main feature of Flaskr, " -"so it makes sense that the blog index will be the main index." +"view at ``/create``, and so on. The blog is the main feature of Flaskr, so" +" it makes sense that the blog index will be the main index." msgstr "" #: ../../tutorial/blog.rst:56 @@ -81,10 +81,10 @@ msgstr "" #: ../../tutorial/blog.rst:63 msgid "" -"In another application you might give the blog blueprint a ``url_prefix``" -" and define a separate ``index`` view in the application factory, similar" -" to the ``hello`` view. Then the ``index`` and ``blog.index`` endpoints " -"and URLs would be different." +"In another application you might give the blog blueprint a ``url_prefix`` " +"and define a separate ``index`` view in the application factory, similar " +"to the ``hello`` view. Then the ``index`` and ``blog.index`` endpoints and" +" URLs would be different." msgstr "" #: ../../tutorial/blog.rst:70 @@ -107,9 +107,8 @@ msgid "" "When a user is logged in, the ``header`` block adds a link to the " "``create`` view. When the user is the author of a post, they'll see an " "\"Edit\" link to the ``update`` view for that post. ``loop.last`` is a " -"special variable available inside `Jinja for loops`_. It's used to " -"display a line after each post except the last one, to visually separate " -"them." +"special variable available inside `Jinja for loops`_. It's used to display" +" a line after each post except the last one, to visually separate them." msgstr "" #: ../../tutorial/blog.rst:132 @@ -126,8 +125,8 @@ msgstr "" #: ../../tutorial/blog.rst:138 msgid "" "The ``login_required`` decorator you wrote earlier is used on the blog " -"views. A user must be logged in to visit these views, otherwise they will" -" be redirected to the login page." +"views. A user must be logged in to visit these views, otherwise they will " +"be redirected to the login page." msgstr "" #: ../../tutorial/blog.rst:170 @@ -140,10 +139,10 @@ msgstr "" #: ../../tutorial/blog.rst:193 msgid "" -"Both the ``update`` and ``delete`` views will need to fetch a ``post`` by" -" ``id`` and check if the author matches the logged in user. To avoid " -"duplicating code, you can write a function to get the ``post`` and call " -"it from each view." +"Both the ``update`` and ``delete`` views will need to fetch a ``post`` by " +"``id`` and check if the author matches the logged in user. To avoid " +"duplicating code, you can write a function to get the ``post`` and call it" +" from each view." msgstr "" #: ../../tutorial/blog.rst:217 @@ -157,10 +156,10 @@ msgstr "" #: ../../tutorial/blog.rst:223 msgid "" -"The ``check_author`` argument is defined so that the function can be used" -" to get a ``post`` without checking the author. This would be useful if " -"you wrote a view to show an individual post on a page, where the user " -"doesn't matter because they're not modifying the post." +"The ``check_author`` argument is defined so that the function can be used " +"to get a ``post`` without checking the author. This would be useful if you" +" wrote a view to show an individual post on a page, where the user doesn't" +" matter because they're not modifying the post." msgstr "" #: ../../tutorial/blog.rst:258 @@ -170,18 +169,18 @@ msgid "" "real URL will look like ``/1/update``. Flask will capture the ``1``, " "ensure it's an :class:`int`, and pass it as the ``id`` argument. If you " "don't specify ``int:`` and instead do ````, it will be a string. To " -"generate a URL to the update page, :func:`url_for` needs to be passed the" -" ``id`` so it knows what to fill in: ``url_for('blog.update', " +"generate a URL to the update page, :func:`url_for` needs to be passed the " +"``id`` so it knows what to fill in: ``url_for('blog.update', " "id=post['id'])``. This is also in the ``index.html`` file above." msgstr "" #: ../../tutorial/blog.rst:268 msgid "" -"The ``create`` and ``update`` views look very similar. The main " -"difference is that the ``update`` view uses a ``post`` object and an " -"``UPDATE`` query instead of an ``INSERT``. With some clever refactoring, " -"you could use one view and template for both actions, but for the " -"tutorial it's clearer to keep them separate." +"The ``create`` and ``update`` views look very similar. The main difference" +" is that the ``update`` view uses a ``post`` object and an ``UPDATE`` " +"query instead of an ``INSERT``. With some clever refactoring, you could " +"use one view and template for both actions, but for the tutorial it's " +"clearer to keep them separate." msgstr "" #: ../../tutorial/blog.rst:274 @@ -191,18 +190,18 @@ msgstr "" #: ../../tutorial/blog.rst:298 msgid "" "This template has two forms. The first posts the edited data to the " -"current page (``//update``). The other form contains only a button " -"and specifies an ``action`` attribute that posts to the delete view " -"instead. The button uses some JavaScript to show a confirmation dialog " -"before submitting." +"current page (``//update``). The other form contains only a button and" +" specifies an ``action`` attribute that posts to the delete view instead. " +"The button uses some JavaScript to show a confirmation dialog before " +"submitting." msgstr "" #: ../../tutorial/blog.rst:304 msgid "" "The pattern ``{{ request.form['title'] or post['title'] }}`` is used to " -"choose what data appears in the form. When the form hasn't been " -"submitted, the original ``post`` data appears, but if invalid form data " -"was posted you want to display that so the user can fix the error, so " +"choose what data appears in the form. When the form hasn't been submitted," +" the original ``post`` data appears, but if invalid form data was posted " +"you want to display that so the user can fix the error, so " "``request.form`` is used instead. :data:`request` is another variable " "that's automatically available in templates." msgstr "" @@ -215,18 +214,17 @@ msgstr "" msgid "" "The delete view doesn't have its own template, the delete button is part " "of ``update.html`` and posts to the ``//delete`` URL. Since there is " -"no template, it will only handle the ``POST`` method and then redirect to" -" the ``index`` view." +"no template, it will only handle the ``POST`` method and then redirect to " +"the ``index`` view." msgstr "" #: ../../tutorial/blog.rst:332 msgid "" "Congratulations, you've now finished writing your application! Take some " -"time to try out everything in the browser. However, there's still more to" -" do before the project is complete." +"time to try out everything in the browser. However, there's still more to " +"do before the project is complete." msgstr "" #: ../../tutorial/blog.rst:336 msgid "Continue to :doc:`install`." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/tutorial/database.po b/docs/locales/zh_CN/LC_MESSAGES/tutorial/database.po index 7625c28c3..97f4cf39c 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/tutorial/database.po +++ b/docs/locales/zh_CN/LC_MESSAGES/tutorial/database.po @@ -31,11 +31,10 @@ msgstr "" #: ../../tutorial/database.rst:10 msgid "" "SQLite is convenient because it doesn't require setting up a separate " -"database server and is built-in to Python. However, if concurrent " -"requests try to write to the database at the same time, they will slow " -"down as each write happens sequentially. Small applications won't notice " -"this. Once you become big, you may want to switch to a different " -"database." +"database server and is built-in to Python. However, if concurrent requests" +" try to write to the database at the same time, they will slow down as " +"each write happens sequentially. Small applications won't notice this. " +"Once you become big, you may want to switch to a different database." msgstr "" #: ../../tutorial/database.rst:17 @@ -50,8 +49,8 @@ msgstr "" #: ../../tutorial/database.rst:27 msgid "" -"The first thing to do when working with a SQLite database (and most other" -" Python database libraries) is to create a connection to it. Any queries " +"The first thing to do when working with a SQLite database (and most other " +"Python database libraries) is to create a connection to it. Any queries " "and operations are performed using the connection, which is closed after " "the work is finished." msgstr "" @@ -70,8 +69,8 @@ msgstr "" #: ../../tutorial/database.rst:63 msgid "" -":data:`g` is a special object that is unique for each request. It is used" -" to store data that might be accessed by multiple functions during the " +":data:`g` is a special object that is unique for each request. It is used " +"to store data that might be accessed by multiple functions during the " "request. The connection is stored and reused instead of creating a new " "connection if ``get_db`` is called a second time in the same request." msgstr "" @@ -87,15 +86,15 @@ msgstr "" #: ../../tutorial/database.rst:75 msgid "" -":func:`sqlite3.connect` establishes a connection to the file pointed at " -"by the ``DATABASE`` configuration key. This file doesn't have to exist " -"yet, and won't until you initialize the database later." +":func:`sqlite3.connect` establishes a connection to the file pointed at by" +" the ``DATABASE`` configuration key. This file doesn't have to exist yet, " +"and won't until you initialize the database later." msgstr "" #: ../../tutorial/database.rst:79 msgid "" -":class:`sqlite3.Row` tells the connection to return rows that behave like" -" dicts. This allows accessing the columns by name." +":class:`sqlite3.Row` tells the connection to return rows that behave like " +"dicts. This allows accessing the columns by name." msgstr "" #: ../../tutorial/database.rst:82 @@ -113,9 +112,9 @@ msgstr "" #: ../../tutorial/database.rst:91 msgid "" "In SQLite, data is stored in *tables* and *columns*. These need to be " -"created before you can store and retrieve data. Flaskr will store users " -"in the ``user`` table, and posts in the ``post`` table. Create a file " -"with the SQL commands needed to create empty tables:" +"created before you can store and retrieve data. Flaskr will store users in" +" the ``user`` table, and posts in the ``post`` table. Create a file with " +"the SQL commands needed to create empty tables:" msgstr "" #: ../../tutorial/database.rst:96 @@ -124,17 +123,17 @@ msgstr "" #: ../../tutorial/database.rst:117 msgid "" -"Add the Python functions that will run these SQL commands to the " -"``db.py`` file:" +"Add the Python functions that will run these SQL commands to the ``db.py``" +" file:" msgstr "" #: ../../tutorial/database.rst:137 msgid "" -":meth:`open_resource() ` opens a file relative to " -"the ``flaskr`` package, which is useful since you won't necessarily know " +":meth:`open_resource() ` opens a file relative to the" +" ``flaskr`` package, which is useful since you won't necessarily know " "where that location is when deploying the application later. ``get_db`` " -"returns a database connection, which is used to execute the commands read" -" from the file." +"returns a database connection, which is used to execute the commands read " +"from the file." msgstr "" #: ../../tutorial/database.rst:143 @@ -152,27 +151,27 @@ msgstr "" msgid "" "The ``close_db`` and ``init_db_command`` functions need to be registered " "with the application instance; otherwise, they won't be used by the " -"application. However, since you're using a factory function, that " -"instance isn't available when writing the functions. Instead, write a " -"function that takes an application and does the registration." +"application. However, since you're using a factory function, that instance" +" isn't available when writing the functions. Instead, write a function " +"that takes an application and does the registration." msgstr "" #: ../../tutorial/database.rst:164 msgid "" -":meth:`app.teardown_appcontext() ` tells Flask" -" to call that function when cleaning up after returning the response." +":meth:`app.teardown_appcontext() ` tells Flask " +"to call that function when cleaning up after returning the response." msgstr "" #: ../../tutorial/database.rst:168 msgid "" -":meth:`app.cli.add_command() ` adds a new " -"command that can be called with the ``flask`` command." +":meth:`app.cli.add_command() ` adds a new command" +" that can be called with the ``flask`` command." msgstr "" #: ../../tutorial/database.rst:171 msgid "" -"Import and call this function from the factory. Place the new code at the" -" end of the factory function before returning the app." +"Import and call this function from the factory. Place the new code at the " +"end of the factory function before returning the app." msgstr "" #: ../../tutorial/database.rst:174 @@ -192,9 +191,9 @@ msgstr "" #: ../../tutorial/database.rst:196 msgid "" -"If you're still running the server from the previous page, you can either" -" stop the server, or run this command in a new terminal. If you use a new" -" terminal, remember to change to your project directory and activate the " +"If you're still running the server from the previous page, you can either " +"stop the server, or run this command in a new terminal. If you use a new " +"terminal, remember to change to your project directory and activate the " "env as described in :doc:`/installation`. You'll also need to set " "``FLASK_APP`` and ``FLASK_ENV`` as shown on the previous page." msgstr "" @@ -212,4 +211,3 @@ msgstr "" #: ../../tutorial/database.rst:213 msgid "Continue to :doc:`views`." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/tutorial/deploy.po b/docs/locales/zh_CN/LC_MESSAGES/tutorial/deploy.po index cbf48f07a..ebda23910 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/tutorial/deploy.po +++ b/docs/locales/zh_CN/LC_MESSAGES/tutorial/deploy.po @@ -54,15 +54,15 @@ msgstr "" #: ../../tutorial/deploy.rst:34 msgid "" -"You can find the file in ``dist/flaskr-1.0.0-py3-none-any.whl``. The file" -" name is in the format of {project name}-{version}-{python tag} -{abi " +"You can find the file in ``dist/flaskr-1.0.0-py3-none-any.whl``. The file " +"name is in the format of {project name}-{version}-{python tag} -{abi " "tag}-{platform tag}." msgstr "" #: ../../tutorial/deploy.rst:38 msgid "" -"Copy this file to another machine, :ref:`set up a new virtualenv " -"`, then install the file with ``pip``." +"Copy this file to another machine, :ref:`set up a new virtualenv `, then install the file with ``pip``." msgstr "" #: ../../tutorial/deploy.rst:46 @@ -153,13 +153,12 @@ msgstr "" #: ../../tutorial/deploy.rst:132 msgid "" -"See :doc:`/deploying/index` for a list of many different ways to host " -"your application. Waitress is just an example, chosen for the tutorial " -"because it supports both Windows and Linux. There are many more WSGI " -"servers and deployment options that you may choose for your project." +"See :doc:`/deploying/index` for a list of many different ways to host your" +" application. Waitress is just an example, chosen for the tutorial because" +" it supports both Windows and Linux. There are many more WSGI servers and " +"deployment options that you may choose for your project." msgstr "" #: ../../tutorial/deploy.rst:139 msgid "Continue to :doc:`next`." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/tutorial/factory.po b/docs/locales/zh_CN/LC_MESSAGES/tutorial/factory.po index a301dc297..142131d17 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/tutorial/factory.po +++ b/docs/locales/zh_CN/LC_MESSAGES/tutorial/factory.po @@ -23,27 +23,26 @@ msgstr "" #: ../../tutorial/factory.rst:6 msgid "" -"A Flask application is an instance of the :class:`Flask` class. " -"Everything about the application, such as configuration and URLs, will be" -" registered with this class." +"A Flask application is an instance of the :class:`Flask` class. Everything" +" about the application, such as configuration and URLs, will be registered" +" with this class." msgstr "" #: ../../tutorial/factory.rst:10 msgid "" -"The most straightforward way to create a Flask application is to create a" -" global :class:`Flask` instance directly at the top of your code, like " -"how the \"Hello, World!\" example did on the previous page. While this is" -" simple and useful in some cases, it can cause some tricky issues as the " +"The most straightforward way to create a Flask application is to create a " +"global :class:`Flask` instance directly at the top of your code, like how " +"the \"Hello, World!\" example did on the previous page. While this is " +"simple and useful in some cases, it can cause some tricky issues as the " "project grows." msgstr "" #: ../../tutorial/factory.rst:16 msgid "" -"Instead of creating a :class:`Flask` instance globally, you will create " -"it inside a function. This function is known as the *application " -"factory*. Any configuration, registration, and other setup the " -"application needs will happen inside the function, then the application " -"will be returned." +"Instead of creating a :class:`Flask` instance globally, you will create it" +" inside a function. This function is known as the *application factory*. " +"Any configuration, registration, and other setup the application needs " +"will happen inside the function, then the application will be returned." msgstr "" #: ../../tutorial/factory.rst:24 @@ -64,8 +63,8 @@ msgstr "" #: ../../tutorial/factory.rst:71 msgid "" -"``create_app`` is the application factory function. You'll add to it " -"later in the tutorial, but it already does a lot." +"``create_app`` is the application factory function. You'll add to it later" +" in the tutorial, but it already does a lot." msgstr "" #: ../../tutorial/factory.rst:74 @@ -92,15 +91,15 @@ msgstr "" #: ../../tutorial/factory.rst:88 msgid "" -":meth:`app.config.from_mapping() ` sets some default" -" configuration that the app will use:" +":meth:`app.config.from_mapping() ` sets some default " +"configuration that the app will use:" msgstr "" #: ../../tutorial/factory.rst:91 msgid "" -":data:`SECRET_KEY` is used by Flask and extensions to keep data safe. " -"It's set to ``'dev'`` to provide a convenient value during development, " -"but it should be overridden with a random value when deploying." +":data:`SECRET_KEY` is used by Flask and extensions to keep data safe. It's" +" set to ``'dev'`` to provide a convenient value during development, but it" +" should be overridden with a random value when deploying." msgstr "" #: ../../tutorial/factory.rst:96 @@ -114,9 +113,9 @@ msgstr "" #: ../../tutorial/factory.rst:102 msgid "" ":meth:`app.config.from_pyfile() ` overrides the " -"default configuration with values taken from the ``config.py`` file in " -"the instance folder if it exists. For example, when deploying, this can " -"be used to set a real ``SECRET_KEY``." +"default configuration with values taken from the ``config.py`` file in the" +" instance folder if it exists. For example, when deploying, this can be " +"used to set a real ``SECRET_KEY``." msgstr "" #: ../../tutorial/factory.rst:107 @@ -131,8 +130,8 @@ msgstr "" msgid "" ":func:`os.makedirs` ensures that :attr:`app.instance_path " "` exists. Flask doesn't create the instance folder " -"automatically, but it needs to be created because your project will " -"create the SQLite database file there." +"automatically, but it needs to be created because your project will create" +" the SQLite database file there." msgstr "" #: ../../tutorial/factory.rst:118 @@ -158,8 +157,8 @@ msgstr "" #: ../../tutorial/factory.rst:133 msgid "" "Development mode shows an interactive debugger whenever a page raises an " -"exception, and restarts the server whenever you make changes to the code." -" You can leave it running and just reload the browser page as you follow " +"exception, and restarts the server whenever you make changes to the code. " +"You can leave it running and just reload the browser page as you follow " "the tutorial." msgstr "" @@ -182,11 +181,10 @@ msgstr "" #: ../../tutorial/factory.rst:176 msgid "" "Visit http://127.0.0.1:5000/hello in a browser and you should see the " -"\"Hello, World!\" message. Congratulations, you're now running your Flask" -" web application!" +"\"Hello, World!\" message. Congratulations, you're now running your Flask " +"web application!" msgstr "" #: ../../tutorial/factory.rst:180 msgid "Continue to :doc:`database`." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/tutorial/index.po b/docs/locales/zh_CN/LC_MESSAGES/tutorial/index.po index aadeb30e0..55a50f66e 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/tutorial/index.po +++ b/docs/locales/zh_CN/LC_MESSAGES/tutorial/index.po @@ -32,8 +32,9 @@ msgid "" "edit or delete their own posts. You will be able to package and install " "the application on other computers." msgstr "" -"这个教程会一步步带你创建一个基础的博客程序,它叫做 " -"Flaskr。在这个程序里,用户将可以注册、登录、创建文章、编辑或删除文章。你还将会学习打包程序,这样就可以在其他电脑上安装这个程序。" +"这个教程会一步步带你创建一个基础的博客程序,它叫做 Flaskr。在这个程序里," +"用户将可以注册、登录、创建文章、编辑或删除文章。你还将会学习打包程序," +"这样就可以在其他电脑上安装这个程序。" msgid "screenshot of index page" msgstr "首页截图" @@ -42,7 +43,9 @@ msgstr "首页截图" msgid "" "It's assumed that you're already familiar with Python. The `official " "tutorial`_ in the Python docs is a great way to learn or review first." -msgstr "这个教程假设你已经熟悉了 Python。Python 文档里的 `官方教程`_ 是一个学习和复习 Python 很好的方式。" +msgstr "" +"这个教程假设你已经熟悉了 Python。Python 文档里的 `官方教程`_ 是一个学习和复习 " +"Python 很好的方式。" #: ../../tutorial/index.rst:35 msgid "" @@ -50,29 +53,34 @@ msgid "" "cover all of Flask's features. Check out the :doc:`/quickstart` for an " "overview of what Flask can do, then dive into the docs to find out more. " "The tutorial only uses what's provided by Flask and Python. In another " -"project, you might decide to use :doc:`/extensions` or other libraries to" -" make some tasks simpler." +"project, you might decide to use :doc:`/extensions` or other libraries to " +"make some tasks simpler." msgstr "" -"虽然这个教程的设计初衷是为了提供一个良好的起点,但它并没有覆盖所有的 Flask特性。你可以阅读 :doc:`/quickstart` 对 " -"Flask 可以做什么建立一个全局认识,然后深入其他文档了解更多内容。这个教程只使用了 Flask 和 Python " -"提供的功能。在你开发的另一个项目里,你也许会想要使用 :doc:`/extensions` 或其他库让某些功能实现起来更简单。" +"虽然这个教程的设计初衷是为了提供一个良好的起点,但它并没有覆盖所有的 Flask 特性。" +"你可以阅读 :doc:`/quickstart` 对 Flask 可以做什么建立一个全局认识," +"然后深入其他文档了解更多内容。这个教程只使用了 Flask 和 Python 提供的功能。" +"在你开发的另一个项目里,你也许会想要使用 :doc:`/extensions` " +"或其他库让某些功能实现起来更简单。" msgid "screenshot of login page" msgstr "登录页截图" #: ../../tutorial/index.rst:47 msgid "" -"Flask is flexible. It doesn't require you to use any particular project " -"or code layout. However, when first starting, it's helpful to use a more " +"Flask is flexible. It doesn't require you to use any particular project or" +" code layout. However, when first starting, it's helpful to use a more " "structured approach. This means that the tutorial will require a bit of " -"boilerplate up front, but it's done to avoid many common pitfalls that " -"new developers encounter, and it creates a project that's easy to expand " -"on. Once you become more comfortable with Flask, you can step out of this" -" structure and take full advantage of Flask's flexibility." +"boilerplate up front, but it's done to avoid many common pitfalls that new" +" developers encounter, and it creates a project that's easy to expand on. " +"Once you become more comfortable with Flask, you can step out of this " +"structure and take full advantage of Flask's flexibility." msgstr "" -"Flask " -"很灵活。它不需要你使用任何特定的项目或代码结构。然而,在刚起步的时候,使用更结构化的代码组织方式会更好一些。这意味着这个教程将会在一开始花费一些时间来创建项目结构和基础代码,不过这样做可以避免很多新手开发者容易遇到的常见错误,而且这样会创建一个容易扩展的项目。一旦你更熟悉" -" Flask,你就可以跳出这个结构并充分利用 Flask 的灵活性。" +"Flask 很灵活。它不需要你使用任何特定的项目或代码结构。然而,在刚起步的时候," +"使用更结构化的代码组织方式会更好一些。" +"这意味着这个教程将会在一开始花费一些时间来创建项目结构和基础代码," +"不过这样做可以避免很多新手开发者容易遇到的常见错误," +"而且这样会创建一个容易扩展的项目。一旦你更熟悉 Flask,你就可以跳出这个结构并充分利用" +" Flask 的灵活性。" #, fuzzy msgid "screenshot of edit page" @@ -81,13 +89,12 @@ msgstr "登录页截图" #: ../../tutorial/index.rst:60 msgid "" ":gh:`The tutorial project is available as an example in the Flask " -"repository `, if you want to compare your project with" -" the final product as you follow the tutorial." +"repository `, if you want to compare your project with " +"the final product as you follow the tutorial." msgstr "" -"如果你想要把你的项目和跟随这个教程实现的最终产品进行比较,这个教程项目的源码可以在 :gh:`Flask 仓库的 examples 文件夹 " -"` 找到。" +"如果你想要把你的项目和跟随这个教程实现的最终产品进行比较,这个教程项目的源码可以在 " +":gh:`Flask 仓库的 examples 文件夹 ` 找到。" #: ../../tutorial/index.rst:64 msgid "Continue to :doc:`layout`." msgstr "下一节是 :doc:`layout`。" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/tutorial/install.po b/docs/locales/zh_CN/LC_MESSAGES/tutorial/install.po index c329748ed..d21caf329 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/tutorial/install.po +++ b/docs/locales/zh_CN/LC_MESSAGES/tutorial/install.po @@ -23,11 +23,11 @@ msgstr "" #: ../../tutorial/install.rst:4 msgid "" -"Making your project installable means that you can build a *distribution*" -" file and install that in another environment, just like you installed " -"Flask in your project's environment. This makes deploying your project " -"the same as installing any other library, so you're using all the " -"standard Python tools to manage everything." +"Making your project installable means that you can build a *distribution* " +"file and install that in another environment, just like you installed " +"Flask in your project's environment. This makes deploying your project the" +" same as installing any other library, so you're using all the standard " +"Python tools to manage everything." msgstr "" #: ../../tutorial/install.rst:10 @@ -45,8 +45,8 @@ msgstr "" #: ../../tutorial/install.rst:17 msgid "" -"You can manage your project's dependencies just like other packages do, " -"so ``pip install yourproject.whl`` installs them." +"You can manage your project's dependencies just like other packages do, so" +" ``pip install yourproject.whl`` installs them." msgstr "" #: ../../tutorial/install.rst:20 @@ -57,8 +57,8 @@ msgstr "" #: ../../tutorial/install.rst:24 msgid "" -"This is being introduced late in the tutorial, but in your future " -"projects you should always start with this." +"This is being introduced late in the tutorial, but in your future projects" +" you should always start with this." msgstr "" #: ../../tutorial/install.rst:29 @@ -67,8 +67,8 @@ msgstr "" #: ../../tutorial/install.rst:31 msgid "" -"The ``setup.py`` file describes your project and the files that belong to" -" it." +"The ``setup.py`` file describes your project and the files that belong to " +"it." msgstr "" #: ../../tutorial/install.rst:34 @@ -79,10 +79,10 @@ msgstr "" msgid "" "``packages`` tells Python what package directories (and the Python files " "they contain) to include. ``find_packages()`` finds these directories " -"automatically so you don't have to type them out. To include other files," -" such as the static and templates directories, ``include_package_data`` " -"is set. Python needs another file named ``MANIFEST.in`` to tell what this" -" other data is." +"automatically so you don't have to type them out. To include other files, " +"such as the static and templates directories, ``include_package_data`` is " +"set. Python needs another file named ``MANIFEST.in`` to tell what this " +"other data is." msgstr "" #: ../../tutorial/install.rst:58 @@ -125,12 +125,11 @@ msgstr "" #: ../../tutorial/install.rst:109 msgid "" "Nothing changes from how you've been running your project so far. " -"``FLASK_APP`` is still set to ``flaskr`` and ``flask run`` still runs the" -" application, but you can call it from anywhere, not just the ``flask-" +"``FLASK_APP`` is still set to ``flaskr`` and ``flask run`` still runs the " +"application, but you can call it from anywhere, not just the ``flask-" "tutorial`` directory." msgstr "" #: ../../tutorial/install.rst:114 msgid "Continue to :doc:`tests`." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/tutorial/layout.po b/docs/locales/zh_CN/LC_MESSAGES/tutorial/layout.po index 4cd23714d..281a0ec1f 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/tutorial/layout.po +++ b/docs/locales/zh_CN/LC_MESSAGES/tutorial/layout.po @@ -27,8 +27,8 @@ msgstr "" #: ../../tutorial/layout.rst:11 msgid "" -"Then follow the :doc:`installation instructions ` to set " -"up a Python virtual environment and install Flask for your project." +"Then follow the :doc:`installation instructions ` to set up" +" a Python virtual environment and install Flask for your project." msgstr "" #: ../../tutorial/layout.rst:14 @@ -48,10 +48,10 @@ msgstr "" #: ../../tutorial/layout.rst:34 msgid "" -"However, as a project gets bigger, it becomes overwhelming to keep all " -"the code in one file. Python projects use *packages* to organize code " -"into multiple modules that can be imported where needed, and the tutorial" -" will do this as well." +"However, as a project gets bigger, it becomes overwhelming to keep all the" +" code in one file. Python projects use *packages* to organize code into " +"multiple modules that can be imported where needed, and the tutorial will " +"do this as well." msgstr "" #: ../../tutorial/layout.rst:39 @@ -59,7 +59,8 @@ msgid "The project directory will contain:" msgstr "" #: ../../tutorial/layout.rst:41 -msgid "``flaskr/``, a Python package containing your application code and files." +msgid "" +"``flaskr/``, a Python package containing your application code and files." msgstr "" #: ../../tutorial/layout.rst:43 @@ -68,8 +69,8 @@ msgstr "" #: ../../tutorial/layout.rst:44 msgid "" -"``venv/``, a Python virtual environment where Flask and other " -"dependencies are installed." +"``venv/``, a Python virtual environment where Flask and other dependencies" +" are installed." msgstr "" #: ../../tutorial/layout.rst:46 @@ -105,4 +106,3 @@ msgstr "" #: ../../tutorial/layout.rst:110 msgid "Continue to :doc:`factory`." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/tutorial/next.po b/docs/locales/zh_CN/LC_MESSAGES/tutorial/next.po index 5564f159a..9576f639d 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/tutorial/next.po +++ b/docs/locales/zh_CN/LC_MESSAGES/tutorial/next.po @@ -23,23 +23,23 @@ msgstr "" #: ../../tutorial/next.rst:4 msgid "" -"You've learned about quite a few Flask and Python concepts throughout the" -" tutorial. Go back and review the tutorial and compare your code with the" -" steps you took to get there. Compare your project to the :gh:`example " -"project `, which might look a bit different due to the" -" step-by-step nature of the tutorial." +"You've learned about quite a few Flask and Python concepts throughout the " +"tutorial. Go back and review the tutorial and compare your code with the " +"steps you took to get there. Compare your project to the :gh:`example " +"project `, which might look a bit different due to the " +"step-by-step nature of the tutorial." msgstr "" #: ../../tutorial/next.rst:10 msgid "" -"There's a lot more to Flask than what you've seen so far. Even so, you're" -" now equipped to start developing your own web applications. Check out " -"the :doc:`/quickstart` for an overview of what Flask can do, then dive " -"into the docs to keep learning. Flask uses `Jinja`_, `Click`_, " -"`Werkzeug`_, and `ItsDangerous`_ behind the scenes, and they all have " -"their own documentation too. You'll also be interested in " -":doc:`/extensions` which make tasks like working with the database or " -"validating form data easier and more powerful." +"There's a lot more to Flask than what you've seen so far. Even so, you're " +"now equipped to start developing your own web applications. Check out the " +":doc:`/quickstart` for an overview of what Flask can do, then dive into " +"the docs to keep learning. Flask uses `Jinja`_, `Click`_, `Werkzeug`_, and" +" `ItsDangerous`_ behind the scenes, and they all have their own " +"documentation too. You'll also be interested in :doc:`/extensions` which " +"make tasks like working with the database or validating form data easier " +"and more powerful." msgstr "" #: ../../tutorial/next.rst:19 @@ -89,4 +89,3 @@ msgstr "" #: ../../tutorial/next.rst:33 msgid "Have fun and make awesome applications!" msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/tutorial/static.po b/docs/locales/zh_CN/LC_MESSAGES/tutorial/static.po index 8734c4294..1db1d6263 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/tutorial/static.po +++ b/docs/locales/zh_CN/LC_MESSAGES/tutorial/static.po @@ -25,15 +25,15 @@ msgstr "" msgid "" "The authentication views and templates work, but they look very plain " "right now. Some `CSS`_ can be added to add style to the HTML layout you " -"constructed. The style won't change, so it's a *static* file rather than " -"a template." +"constructed. The style won't change, so it's a *static* file rather than a" +" template." msgstr "" #: ../../tutorial/static.rst:9 msgid "" "Flask automatically adds a ``static`` view that takes a path relative to " -"the ``flaskr/static`` directory and serves it. The ``base.html`` template" -" already has a link to the ``style.css`` file:" +"the ``flaskr/static`` directory and serves it. The ``base.html`` template " +"already has a link to the ``style.css`` file:" msgstr "" #: ../../tutorial/static.rst:17 @@ -46,8 +46,8 @@ msgstr "" #: ../../tutorial/static.rst:22 msgid "" -"This tutorial isn't focused on how to write CSS, so you can just copy the" -" following into the ``flaskr/static/style.css`` file:" +"This tutorial isn't focused on how to write CSS, so you can just copy the " +"following into the ``flaskr/static/style.css`` file:" msgstr "" #: ../../tutorial/static.rst:25 @@ -71,12 +71,11 @@ msgstr "" #: ../../tutorial/static.rst:66 msgid "" -"You can read more about CSS from `Mozilla's documentation `_. If " -"you change a static file, refresh the browser page. If the change doesn't" -" show up, try clearing your browser's cache." +"You can read more about CSS from `Mozilla's documentation `_. If you" +" change a static file, refresh the browser page. If the change doesn't " +"show up, try clearing your browser's cache." msgstr "" #: ../../tutorial/static.rst:72 msgid "Continue to :doc:`blog`." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/tutorial/templates.po b/docs/locales/zh_CN/LC_MESSAGES/tutorial/templates.po index 952ac1689..d59742ae3 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/tutorial/templates.po +++ b/docs/locales/zh_CN/LC_MESSAGES/tutorial/templates.po @@ -34,31 +34,29 @@ msgstr "" #: ../../tutorial/templates.rst:13 msgid "" "Templates are files that contain static data as well as placeholders for " -"dynamic data. A template is rendered with specific data to produce a " -"final document. Flask uses the `Jinja`_ template library to render " -"templates." +"dynamic data. A template is rendered with specific data to produce a final" +" document. Flask uses the `Jinja`_ template library to render templates." msgstr "" #: ../../tutorial/templates.rst:18 msgid "" "In your application, you will use templates to render `HTML`_ which will " "display in the user's browser. In Flask, Jinja is configured to " -"*autoescape* any data that is rendered in HTML templates. This means that" -" it's safe to render user input; any characters they've entered that " -"could mess with the HTML, such as ``<`` and ``>`` will be *escaped* with " -"*safe* values that look the same in the browser but don't cause unwanted " -"effects." +"*autoescape* any data that is rendered in HTML templates. This means that " +"it's safe to render user input; any characters they've entered that could " +"mess with the HTML, such as ``<`` and ``>`` will be *escaped* with *safe* " +"values that look the same in the browser but don't cause unwanted effects." msgstr "" #: ../../tutorial/templates.rst:26 msgid "" -"Jinja looks and behaves mostly like Python. Special delimiters are used " -"to distinguish Jinja syntax from the static data in the template. " -"Anything between ``{{`` and ``}}`` is an expression that will be output " -"to the final document. ``{%`` and ``%}`` denotes a control flow statement" -" like ``if`` and ``for``. Unlike Python, blocks are denoted by start and " -"end tags rather than indentation since static text within a block could " -"change indentation." +"Jinja looks and behaves mostly like Python. Special delimiters are used to" +" distinguish Jinja syntax from the static data in the template. Anything " +"between ``{{`` and ``}}`` is an expression that will be output to the " +"final document. ``{%`` and ``%}`` denotes a control flow statement like " +"``if`` and ``for``. Unlike Python, blocks are denoted by start and end " +"tags rather than indentation since static text within a block could change" +" indentation." msgstr "" #: ../../tutorial/templates.rst:39 @@ -79,19 +77,19 @@ msgstr "" #: ../../tutorial/templates.rst:74 msgid "" -":data:`g` is automatically available in templates. Based on if ``g.user``" -" is set (from ``load_logged_in_user``), either the username and a log out" -" link are displayed, or links to register and log in are displayed. " +":data:`g` is automatically available in templates. Based on if ``g.user`` " +"is set (from ``load_logged_in_user``), either the username and a log out " +"link are displayed, or links to register and log in are displayed. " ":func:`url_for` is also automatically available, and is used to generate " "URLs to views instead of writing them out manually." msgstr "" #: ../../tutorial/templates.rst:80 msgid "" -"After the page title, and before the content, the template loops over " -"each message returned by :func:`get_flashed_messages`. You used " -":func:`flash` in the views to show error messages, and this is the code " -"that will display them." +"After the page title, and before the content, the template loops over each" +" message returned by :func:`get_flashed_messages`. You used :func:`flash` " +"in the views to show error messages, and this is the code that will " +"display them." msgstr "" #: ../../tutorial/templates.rst:85 @@ -102,8 +100,8 @@ msgstr "" #: ../../tutorial/templates.rst:88 msgid "" -"``{% block title %}`` will change the title displayed in the browser's " -"tab and window title." +"``{% block title %}`` will change the title displayed in the browser's tab" +" and window title." msgstr "" #: ../../tutorial/templates.rst:91 @@ -120,8 +118,8 @@ msgstr "" #: ../../tutorial/templates.rst:97 msgid "" -"The base template is directly in the ``templates`` directory. To keep the" -" others organized, the templates for a blueprint will be placed in a " +"The base template is directly in the ``templates`` directory. To keep the " +"others organized, the templates for a blueprint will be placed in a " "directory with the same name as the blueprint." msgstr "" @@ -145,20 +143,20 @@ msgstr "" #: ../../tutorial/templates.rst:129 msgid "" "A useful pattern used here is to place ``{% block title %}`` inside ``{% " -"block header %}``. This will set the title block and then output the " -"value of it into the header block, so that both the window and page share" -" the same title without writing it twice." +"block header %}``. This will set the title block and then output the value" +" of it into the header block, so that both the window and page share the " +"same title without writing it twice." msgstr "" #: ../../tutorial/templates.rst:134 msgid "" "The ``input`` tags are using the ``required`` attribute here. This tells " "the browser not to submit the form until those fields are filled in. If " -"the user is using an older browser that doesn't support that attribute, " -"or if they are using something besides a browser to make requests, you " -"still want to validate the data in the Flask view. It's important to " -"always fully validate the data on the server, even if the client does " -"some validation as well." +"the user is using an older browser that doesn't support that attribute, or" +" if they are using something besides a browser to make requests, you still" +" want to validate the data in the Flask view. It's important to always " +"fully validate the data on the server, even if the client does some " +"validation as well." msgstr "" #: ../../tutorial/templates.rst:144 @@ -167,8 +165,8 @@ msgstr "" #: ../../tutorial/templates.rst:146 msgid "" -"This is identical to the register template except for the title and " -"submit button." +"This is identical to the register template except for the title and submit" +" button." msgstr "" #: ../../tutorial/templates.rst:149 @@ -188,8 +186,8 @@ msgstr "" #: ../../tutorial/templates.rst:176 msgid "" -"Try clicking the \"Register\" button without filling out the form and see" -" that the browser shows an error message. Try removing the ``required`` " +"Try clicking the \"Register\" button without filling out the form and see " +"that the browser shows an error message. Try removing the ``required`` " "attributes from the ``register.html`` template and click \"Register\" " "again. Instead of the browser showing an error, the page will reload and " "the error from :func:`flash` in the view will be shown." @@ -206,4 +204,3 @@ msgstr "" #: ../../tutorial/templates.rst:187 msgid "Continue to :doc:`static`." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/tutorial/tests.po b/docs/locales/zh_CN/LC_MESSAGES/tutorial/tests.po index f40d37427..8fe770389 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/tutorial/tests.po +++ b/docs/locales/zh_CN/LC_MESSAGES/tutorial/tests.po @@ -39,18 +39,18 @@ msgstr "" #: ../../tutorial/tests.rst:15 #, python-format msgid "" -"The closer you get to 100% coverage, the more comfortable you can be that" -" making a change won't unexpectedly change other behavior. However, 100% " +"The closer you get to 100% coverage, the more comfortable you can be that " +"making a change won't unexpectedly change other behavior. However, 100% " "coverage doesn't guarantee that your application doesn't have bugs. In " -"particular, it doesn't test how the user interacts with the application " -"in the browser. Despite this, test coverage is an important tool to use " +"particular, it doesn't test how the user interacts with the application in" +" the browser. Despite this, test coverage is an important tool to use " "during development." msgstr "" #: ../../tutorial/tests.rst:23 msgid "" -"This is being introduced late in the tutorial, but in your future " -"projects you should test as you develop." +"This is being introduced late in the tutorial, but in your future projects" +" you should test as you develop." msgstr "" #: ../../tutorial/tests.rst:26 @@ -66,18 +66,16 @@ msgstr "" #: ../../tutorial/tests.rst:40 msgid "" "The test code is located in the ``tests`` directory. This directory is " -"*next to* the ``flaskr`` package, not inside it. The " -"``tests/conftest.py`` file contains setup functions called *fixtures* " -"that each test will use. Tests are in Python modules that start with " -"``test_``, and each test function in those modules also starts with " -"``test_``." +"*next to* the ``flaskr`` package, not inside it. The ``tests/conftest.py``" +" file contains setup functions called *fixtures* that each test will use. " +"Tests are in Python modules that start with ``test_``, and each test " +"function in those modules also starts with ``test_``." msgstr "" #: ../../tutorial/tests.rst:47 msgid "" -"Each test will create a new temporary database file and populate some " -"data that will be used in the tests. Write a SQL file to insert that " -"data." +"Each test will create a new temporary database file and populate some data" +" that will be used in the tests. Write a SQL file to insert that data." msgstr "" #: ../../tutorial/tests.rst:51 @@ -97,12 +95,12 @@ msgstr "" #: ../../tutorial/tests.rst:109 msgid "" -":func:`tempfile.mkstemp` creates and opens a temporary file, returning " -"the file descriptor and the path to it. The ``DATABASE`` path is " -"overridden so it points to this temporary path instead of the instance " -"folder. After setting the path, the database tables are created and the " -"test data is inserted. After the test is over, the temporary file is " -"closed and removed." +":func:`tempfile.mkstemp` creates and opens a temporary file, returning the" +" file descriptor and the path to it. The ``DATABASE`` path is overridden " +"so it points to this temporary path instead of the instance folder. After " +"setting the path, the database tables are created and the test data is " +"inserted. After the test is over, the temporary file is closed and " +"removed." msgstr "" #: ../../tutorial/tests.rst:116 @@ -114,10 +112,10 @@ msgstr "" #: ../../tutorial/tests.rst:120 msgid "" -"The ``client`` fixture calls :meth:`app.test_client() " -"` with the application object created by the ``app`` " -"fixture. Tests will use the client to make requests to the application " -"without running the server." +"The ``client`` fixture calls :meth:`app.test_client() `" +" with the application object created by the ``app`` fixture. Tests will " +"use the client to make requests to the application without running the " +"server." msgstr "" #: ../../tutorial/tests.rst:125 @@ -130,8 +128,8 @@ msgstr "" #: ../../tutorial/tests.rst:129 msgid "" "Pytest uses fixtures by matching their function names with the names of " -"arguments in the test functions. For example, the ``test_hello`` function" -" you'll write next takes a ``client`` argument. Pytest matches that with " +"arguments in the test functions. For example, the ``test_hello`` function " +"you'll write next takes a ``client`` argument. Pytest matches that with " "the ``client`` fixture function, calls it, and passes the returned value " "to the test function." msgstr "" @@ -149,8 +147,8 @@ msgstr "" #: ../../tutorial/tests.rst:143 msgid "" -"The only behavior that can change is passing test config. If config is " -"not passed, there should be some default configuration, otherwise the " +"The only behavior that can change is passing test config. If config is not" +" passed, there should be some default configuration, otherwise the " "configuration should be overridden." msgstr "" @@ -172,8 +170,8 @@ msgstr "" #: ../../tutorial/tests.rst:170 msgid "" "Within an application context, ``get_db`` should return the same " -"connection each time it's called. After the context, the connection " -"should be closed." +"connection each time it's called. After the context, the connection should" +" be closed." msgstr "" #: ../../tutorial/tests.rst:174 ../../tutorial/tests.rst:196 @@ -182,16 +180,15 @@ msgstr "" #: ../../tutorial/tests.rst:193 msgid "" -"The ``init-db`` command should call the ``init_db`` function and output a" -" message." +"The ``init-db`` command should call the ``init_db`` function and output a " +"message." msgstr "" #: ../../tutorial/tests.rst:211 msgid "" -"This test uses Pytest's ``monkeypatch`` fixture to replace the " -"``init_db`` function with one that records that it's been called. The " -"``runner`` fixture you wrote above is used to call the ``init-db`` " -"command by name." +"This test uses Pytest's ``monkeypatch`` fixture to replace the ``init_db``" +" function with one that records that it's been called. The ``runner`` " +"fixture you wrote above is used to call the ``init-db`` command by name." msgstr "" #: ../../tutorial/tests.rst:218 @@ -200,17 +197,17 @@ msgstr "" #: ../../tutorial/tests.rst:220 msgid "" -"For most of the views, a user needs to be logged in. The easiest way to " -"do this in tests is to make a ``POST`` request to the ``login`` view with" -" the client. Rather than writing that out every time, you can write a " -"class with methods to do that, and use a fixture to pass it the client " -"for each test." +"For most of the views, a user needs to be logged in. The easiest way to do" +" this in tests is to make a ``POST`` request to the ``login`` view with " +"the client. Rather than writing that out every time, you can write a class" +" with methods to do that, and use a fixture to pass it the client for each" +" test." msgstr "" #: ../../tutorial/tests.rst:247 msgid "" -"With the ``auth`` fixture, you can call ``auth.login()`` in a test to log" -" in as the ``test`` user, which was inserted as part of the test data in " +"With the ``auth`` fixture, you can call ``auth.login()`` in a test to log " +"in as the ``test`` user, which was inserted as part of the test data in " "the ``app`` fixture." msgstr "" @@ -250,18 +247,18 @@ msgstr "" #: ../../tutorial/tests.rst:302 msgid "" -":attr:`~Response.data` contains the body of the response as bytes. If you" -" expect a certain value to render on the page, check that it's in " -"``data``. Bytes must be compared to bytes. If you want to compare text, " -"use :meth:`get_data(as_text=True) ` " +":attr:`~Response.data` contains the body of the response as bytes. If you " +"expect a certain value to render on the page, check that it's in ``data``." +" Bytes must be compared to bytes. If you want to compare text, use " +":meth:`get_data(as_text=True) ` " "instead." msgstr "" #: ../../tutorial/tests.rst:308 msgid "" "``pytest.mark.parametrize`` tells Pytest to run the same test function " -"with different arguments. You use it here to test different invalid input" -" and error messages without writing the same code three times." +"with different arguments. You use it here to test different invalid input " +"and error messages without writing the same code three times." msgstr "" #: ../../tutorial/tests.rst:312 @@ -291,15 +288,15 @@ msgstr "" #: ../../tutorial/tests.rst:359 msgid "" "All the blog views use the ``auth`` fixture you wrote earlier. Call " -"``auth.login()`` and subsequent requests from the client will be logged " -"in as the ``test`` user." +"``auth.login()`` and subsequent requests from the client will be logged in" +" as the ``test`` user." msgstr "" #: ../../tutorial/tests.rst:363 msgid "" "The ``index`` view should display information about the post that was " -"added with the test data. When logged in as the author, there should be a" -" link to edit the post." +"added with the test data. When logged in as the author, there should be a " +"link to edit the post." msgstr "" #: ../../tutorial/tests.rst:367 @@ -318,18 +315,18 @@ msgstr "" msgid "" "A user must be logged in to access the ``create``, ``update``, and " "``delete`` views. The logged in user must be the author of the post to " -"access ``update`` and ``delete``, otherwise a ``403 Forbidden`` status is" -" returned. If a ``post`` with the given ``id`` doesn't exist, ``update`` " +"access ``update`` and ``delete``, otherwise a ``403 Forbidden`` status is " +"returned. If a ``post`` with the given ``id`` doesn't exist, ``update`` " "and ``delete`` should return ``404 Not Found``." msgstr "" #: ../../tutorial/tests.rst:433 msgid "" -"The ``create`` and ``update`` views should render and return a ``200 OK``" -" status for a ``GET`` request. When valid data is sent in a ``POST`` " -"request, ``create`` should insert the new post data into the database, " -"and ``update`` should modify the existing data. Both pages should show an" -" error message on invalid data." +"The ``create`` and ``update`` views should render and return a ``200 OK`` " +"status for a ``GET`` request. When valid data is sent in a ``POST`` " +"request, ``create`` should insert the new post data into the database, and" +" ``update`` should modify the existing data. Both pages should show an " +"error message on invalid data." msgstr "" #: ../../tutorial/tests.rst:473 @@ -355,14 +352,14 @@ msgstr "" #: ../../tutorial/tests.rst:508 msgid "" -"To run the tests, use the ``pytest`` command. It will find and run all " -"the test functions you've written." +"To run the tests, use the ``pytest`` command. It will find and run all the" +" test functions you've written." msgstr "" #: ../../tutorial/tests.rst:527 msgid "" -"If any tests fail, pytest will show the error that was raised. You can " -"run ``pytest -v`` to get a list of each test function rather than dots." +"If any tests fail, pytest will show the error that was raised. You can run" +" ``pytest -v`` to get a list of each test function rather than dots." msgstr "" #: ../../tutorial/tests.rst:530 @@ -376,7 +373,8 @@ msgid "You can either view a simple coverage report in the terminal:" msgstr "" #: ../../tutorial/tests.rst:552 -msgid "An HTML report allows you to see which lines were covered in each file:" +msgid "" +"An HTML report allows you to see which lines were covered in each file:" msgstr "" #: ../../tutorial/tests.rst:558 @@ -388,4 +386,3 @@ msgstr "" #: ../../tutorial/tests.rst:561 msgid "Continue to :doc:`deploy`." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/tutorial/views.po b/docs/locales/zh_CN/LC_MESSAGES/tutorial/views.po index 29d36ac43..7e980f025 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/tutorial/views.po +++ b/docs/locales/zh_CN/LC_MESSAGES/tutorial/views.po @@ -24,10 +24,10 @@ msgstr "" #: ../../tutorial/views.rst:6 msgid "" "A view function is the code you write to respond to requests to your " -"application. Flask uses patterns to match the incoming request URL to the" -" view that should handle it. The view returns data that Flask turns into " -"an outgoing response. Flask can also go the other direction and generate " -"a URL to a view based on its name and arguments." +"application. Flask uses patterns to match the incoming request URL to the " +"view that should handle it. The view returns data that Flask turns into an" +" outgoing response. Flask can also go the other direction and generate a " +"URL to a view based on its name and arguments." msgstr "" #: ../../tutorial/views.rst:14 @@ -37,18 +37,18 @@ msgstr "" #: ../../tutorial/views.rst:16 msgid "" "A :class:`Blueprint` is a way to organize a group of related views and " -"other code. Rather than registering views and other code directly with an" -" application, they are registered with a blueprint. Then the blueprint is" -" registered with the application when it is available in the factory " +"other code. Rather than registering views and other code directly with an " +"application, they are registered with a blueprint. Then the blueprint is " +"registered with the application when it is available in the factory " "function." msgstr "" #: ../../tutorial/views.rst:22 msgid "" -"Flaskr will have two blueprints, one for authentication functions and one" -" for the blog posts functions. The code for each blueprint will go in a " -"separate module. Since the blog needs to know about authentication, " -"you'll write the authentication one first." +"Flaskr will have two blueprints, one for authentication functions and one " +"for the blog posts functions. The code for each blueprint will go in a " +"separate module. Since the blog needs to know about authentication, you'll" +" write the authentication one first." msgstr "" #: ../../tutorial/views.rst:27 ../../tutorial/views.rst:79 @@ -60,16 +60,16 @@ msgstr "" #: ../../tutorial/views.rst:41 msgid "" "This creates a :class:`Blueprint` named ``'auth'``. Like the application " -"object, the blueprint needs to know where it's defined, so ``__name__`` " -"is passed as the second argument. The ``url_prefix`` will be prepended to" -" all the URLs associated with the blueprint." +"object, the blueprint needs to know where it's defined, so ``__name__`` is" +" passed as the second argument. The ``url_prefix`` will be prepended to " +"all the URLs associated with the blueprint." msgstr "" #: ../../tutorial/views.rst:46 msgid "" "Import and register the blueprint from the factory using " -":meth:`app.register_blueprint() `. Place the " -"new code at the end of the factory function before returning the app." +":meth:`app.register_blueprint() `. Place the new" +" code at the end of the factory function before returning the app." msgstr "" #: ../../tutorial/views.rst:50 @@ -78,8 +78,8 @@ msgstr "" #: ../../tutorial/views.rst:62 msgid "" -"The authentication blueprint will have views to register new users and to" -" log in and log out." +"The authentication blueprint will have views to register new users and to " +"log in and log out." msgstr "" #: ../../tutorial/views.rst:67 @@ -89,15 +89,15 @@ msgstr "" #: ../../tutorial/views.rst:69 msgid "" "When the user visits the ``/auth/register`` URL, the ``register`` view " -"will return `HTML`_ with a form for them to fill out. When they submit " -"the form, it will validate their input and either show the form again " -"with an error message or create the new user and go to the login page." +"will return `HTML`_ with a form for them to fill out. When they submit the" +" form, it will validate their input and either show the form again with an" +" error message or create the new user and go to the login page." msgstr "" #: ../../tutorial/views.rst:76 msgid "" -"For now you will just write the view code. On the next page, you'll write" -" templates to generate the HTML form." +"For now you will just write the view code. On the next page, you'll write " +"templates to generate the HTML form." msgstr "" #: ../../tutorial/views.rst:111 @@ -106,10 +106,10 @@ msgstr "" #: ../../tutorial/views.rst:113 msgid "" -":meth:`@bp.route ` associates the URL ``/register`` with" -" the ``register`` view function. When Flask receives a request to " -"``/auth/register``, it will call the ``register`` view and use the return" -" value as the response." +":meth:`@bp.route ` associates the URL ``/register`` with " +"the ``register`` view function. When Flask receives a request to " +"``/auth/register``, it will call the ``register`` view and use the return " +"value as the response." msgstr "" #: ../../tutorial/views.rst:118 @@ -153,31 +153,31 @@ msgid "" "security, passwords should never be stored in the database directly. " "Instead, :func:`~werkzeug.security.generate_password_hash` is used to " "securely hash the password, and that hash is stored. Since this query " -"modifies data, :meth:`db.commit() ` needs to " -"be called afterwards to save the changes." +"modifies data, :meth:`db.commit() ` needs to be" +" called afterwards to save the changes." msgstr "" #: ../../tutorial/views.rst:149 msgid "" "After storing the user, they are redirected to the login page. " ":func:`url_for` generates the URL for the login view based on its name. " -"This is preferable to writing the URL directly as it allows you to change" -" the URL later without changing all code that links to it. " -":func:`redirect` generates a redirect response to the generated URL." +"This is preferable to writing the URL directly as it allows you to change " +"the URL later without changing all code that links to it. :func:`redirect`" +" generates a redirect response to the generated URL." msgstr "" #: ../../tutorial/views.rst:156 msgid "" -"If validation fails, the error is shown to the user. :func:`flash` stores" -" messages that can be retrieved when rendering the template." +"If validation fails, the error is shown to the user. :func:`flash` stores " +"messages that can be retrieved when rendering the template." msgstr "" #: ../../tutorial/views.rst:159 msgid "" "When the user initially navigates to ``auth/register``, or there was a " -"validation error, an HTML page with the registration form should be " -"shown. :func:`render_template` will render a template containing the " -"HTML, which you'll write in the next step of the tutorial." +"validation error, an HTML page with the registration form should be shown." +" :func:`render_template` will render a template containing the HTML, which" +" you'll write in the next step of the tutorial." msgstr "" #: ../../tutorial/views.rst:167 @@ -199,16 +199,16 @@ msgstr "" #: ../../tutorial/views.rst:203 msgid "" ":func:`~werkzeug.security.check_password_hash` hashes the submitted " -"password in the same way as the stored hash and securely compares them. " -"If they match, the password is valid." +"password in the same way as the stored hash and securely compares them. If" +" they match, the password is valid." msgstr "" #: ../../tutorial/views.rst:207 msgid "" -":data:`session` is a :class:`dict` that stores data across requests. When" -" validation succeeds, the user's ``id`` is stored in a new session. The " -"data is stored in a *cookie* that is sent to the browser, and the browser" -" then sends it back with subsequent requests. Flask securely *signs* the " +":data:`session` is a :class:`dict` that stores data across requests. When " +"validation succeeds, the user's ``id`` is stored in a new session. The " +"data is stored in a *cookie* that is sent to the browser, and the browser " +"then sends it back with subsequent requests. Flask securely *signs* the " "data so that it can't be tampered with." msgstr "" @@ -216,19 +216,18 @@ msgstr "" msgid "" "Now that the user's ``id`` is stored in the :data:`session`, it will be " "available on subsequent requests. At the beginning of each request, if a " -"user is logged in their information should be loaded and made available " -"to other views." +"user is logged in their information should be loaded and made available to" +" other views." msgstr "" #: ../../tutorial/views.rst:232 msgid "" -":meth:`bp.before_app_request() ` registers " -"a function that runs before the view function, no matter what URL is " +":meth:`bp.before_app_request() ` registers a" +" function that runs before the view function, no matter what URL is " "requested. ``load_logged_in_user`` checks if a user id is stored in the " -":data:`session` and gets that user's data from the database, storing it " -"on :data:`g.user `, which lasts for the length of the request. If " -"there is no user id, or if the id doesn't exist, ``g.user`` will be " -"``None``." +":data:`session` and gets that user's data from the database, storing it on" +" :data:`g.user `, which lasts for the length of the request. If there " +"is no user id, or if the id doesn't exist, ``g.user`` will be ``None``." msgstr "" #: ../../tutorial/views.rst:242 @@ -237,8 +236,8 @@ msgstr "" #: ../../tutorial/views.rst:244 msgid "" -"To log out, you need to remove the user id from the :data:`session`. Then" -" ``load_logged_in_user`` won't load a user on subsequent requests." +"To log out, you need to remove the user id from the :data:`session`. Then " +"``load_logged_in_user`` won't load a user on subsequent requests." msgstr "" #: ../../tutorial/views.rst:257 @@ -255,10 +254,10 @@ msgstr "" #: ../../tutorial/views.rst:276 msgid "" "This decorator returns a new view function that wraps the original view " -"it's applied to. The new function checks if a user is loaded and " -"redirects to the login page otherwise. If a user is loaded the original " -"view is called and continues normally. You'll use this decorator when " -"writing the blog views." +"it's applied to. The new function checks if a user is loaded and redirects" +" to the login page otherwise. If a user is loaded the original view is " +"called and continues normally. You'll use this decorator when writing the " +"blog views." msgstr "" #: ../../tutorial/views.rst:283 @@ -269,27 +268,25 @@ msgstr "" msgid "" "The :func:`url_for` function generates the URL to a view based on a name " "and arguments. The name associated with a view is also called the " -"*endpoint*, and by default it's the same as the name of the view " -"function." +"*endpoint*, and by default it's the same as the name of the view function." msgstr "" #: ../../tutorial/views.rst:290 msgid "" "For example, the ``hello()`` view that was added to the app factory " -"earlier in the tutorial has the name ``'hello'`` and can be linked to " -"with ``url_for('hello')``. If it took an argument, which you'll see " -"later, it would be linked to using ``url_for('hello', who='World')``." +"earlier in the tutorial has the name ``'hello'`` and can be linked to with" +" ``url_for('hello')``. If it took an argument, which you'll see later, it " +"would be linked to using ``url_for('hello', who='World')``." msgstr "" #: ../../tutorial/views.rst:296 msgid "" -"When using a blueprint, the name of the blueprint is prepended to the " -"name of the function, so the endpoint for the ``login`` function you " -"wrote above is ``'auth.login'`` because you added it to the ``'auth'`` " +"When using a blueprint, the name of the blueprint is prepended to the name" +" of the function, so the endpoint for the ``login`` function you wrote " +"above is ``'auth.login'`` because you added it to the ``'auth'`` " "blueprint." msgstr "" #: ../../tutorial/views.rst:301 msgid "Continue to :doc:`templates`." msgstr "" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/views.po b/docs/locales/zh_CN/LC_MESSAGES/views.po index c37557e04..cf6518b8c 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/views.po +++ b/docs/locales/zh_CN/LC_MESSAGES/views.po @@ -42,8 +42,8 @@ msgstr "" #: ../../views.rst:22 msgid "" "This is simple and flexible, but if you want to provide this view in a " -"generic fashion that can be adapted to other models and templates as well" -" you might want more flexibility. This is where pluggable class-based " +"generic fashion that can be adapted to other models and templates as well " +"you might want more flexibility. This is where pluggable class-based " "views come into place. As the first step to convert this into a class " "based view you would do this::" msgstr "" @@ -52,8 +52,8 @@ msgstr "" msgid "" "As you can see what you have to do is to create a subclass of " ":class:`flask.views.View` and implement " -":meth:`~flask.views.View.dispatch_request`. Then we have to convert that" -" class into an actual view function by using the " +":meth:`~flask.views.View.dispatch_request`. Then we have to convert that " +"class into an actual view function by using the " ":meth:`~flask.views.View.as_view` class method. The string you pass to " "that function is the name of the endpoint that view will then have. But " "this by itself is not helpful, so let's refactor the code a bit::" @@ -61,15 +61,14 @@ msgstr "" #: ../../views.rst:70 msgid "" -"This of course is not that helpful for such a small example, but it's " -"good enough to explain the basic principle. When you have a class-based " -"view the question comes up what ``self`` points to. The way this works " -"is that whenever the request is dispatched a new instance of the class is" -" created and the :meth:`~flask.views.View.dispatch_request` method is " -"called with the parameters from the URL rule. The class itself is " -"instantiated with the parameters passed to the " -":meth:`~flask.views.View.as_view` function. For instance you can write a " -"class like this::" +"This of course is not that helpful for such a small example, but it's good" +" enough to explain the basic principle. When you have a class-based view " +"the question comes up what ``self`` points to. The way this works is that" +" whenever the request is dispatched a new instance of the class is created" +" and the :meth:`~flask.views.View.dispatch_request` method is called with " +"the parameters from the URL rule. The class itself is instantiated with " +"the parameters passed to the :meth:`~flask.views.View.as_view` function. " +"For instance you can write a class like this::" msgstr "" #: ../../views.rst:85 @@ -82,12 +81,12 @@ msgstr "" #: ../../views.rst:93 msgid "" -"Pluggable views are attached to the application like a regular function " -"by either using :func:`~flask.Flask.route` or better " -":meth:`~flask.Flask.add_url_rule`. That however also means that you " -"would have to provide the names of the HTTP methods the view supports " -"when you attach this. In order to move that information to the class you" -" can provide a :attr:`~flask.views.View.methods` attribute that has this " +"Pluggable views are attached to the application like a regular function by" +" either using :func:`~flask.Flask.route` or better " +":meth:`~flask.Flask.add_url_rule`. That however also means that you would" +" have to provide the names of the HTTP methods the view supports when you " +"attach this. In order to move that information to the class you can " +"provide a :attr:`~flask.views.View.methods` attribute that has this " "information::" msgstr "" @@ -106,8 +105,8 @@ msgstr "" #: ../../views.rst:133 msgid "" "That way you also don't have to provide the " -":attr:`~flask.views.View.methods` attribute. It's automatically set " -"based on the methods defined in the class." +":attr:`~flask.views.View.methods` attribute. It's automatically set based" +" on the methods defined in the class." msgstr "" #: ../../views.rst:138 @@ -116,9 +115,9 @@ msgstr "" #: ../../views.rst:140 msgid "" -"Since the view class itself is not the view function that is added to the" -" routing system it does not make much sense to decorate the class itself." -" Instead you either have to decorate the return value of " +"Since the view class itself is not the view function that is added to the " +"routing system it does not make much sense to decorate the class itself. " +"Instead you either have to decorate the return value of " ":meth:`~flask.views.View.as_view` by hand::" msgstr "" @@ -141,12 +140,12 @@ msgstr "" #: ../../views.rst:169 msgid "" -"Web APIs are often working very closely with HTTP verbs so it makes a lot" -" of sense to implement such an API based on the " -":class:`~flask.views.MethodView`. That said, you will notice that the " -"API will require different URL rules that go to the same method view most" -" of the time. For instance consider that you are exposing a user object " -"on the web:" +"Web APIs are often working very closely with HTTP verbs so it makes a lot " +"of sense to implement such an API based on the " +":class:`~flask.views.MethodView`. That said, you will notice that the API" +" will require different URL rules that go to the same method view most of " +"the time. For instance consider that you are exposing a user object on " +"the web:" msgstr "" #: ../../views.rst:177 @@ -227,4 +226,3 @@ msgid "" "If you have a lot of APIs that look similar you can refactor that " "registration code::" msgstr "" -