# SOME DESCRIPTIVE TITLE. # Copyright (C) 2009-2020, Marcel Hellkamp # This file is distributed under the same license as the Bottle package. # # Translators: msgid "" msgstr "" "Project-Id-Version: bottle\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-12-31 18:35+0100\n" "PO-Revision-Date: 2020-12-31 17:35+0000\n" "Last-Translator: defnull \n" "Language-Team: Chinese (China) (http://www.transifex.com/bottle/bottle/language/zh_CN/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: zh_CN\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../../faq.rst:10 msgid "Frequently Asked Questions" msgstr "常见问题" #: ../../faq.rst:13 msgid "About Bottle" msgstr "关于Bottle" #: ../../faq.rst:16 msgid "Is bottle suitable for complex applications?" msgstr "Bottle适合用于复杂的应用吗?" #: ../../faq.rst:18 msgid "" "Bottle is a *micro* framework designed for prototyping and building small " "web applications and services. It stays out of your way and allows you to " "get things done fast, but misses some advanced features and ready-to-use " "solutions found in other frameworks (MVC, ORM, form validation, scaffolding," " XML-RPC). Although it *is* possible to add these features and build complex" " applications with Bottle, you should consider using a full-stack Web " "framework like pylons_ or paste_ instead." msgstr "Bottle是一个 *迷你* 框架,被设计来提供原型开发和创建小的Web应用和服务。它能快速上手,并帮助你快速完成任务,但缺少一些高级功能和一些其他框架已提供的已知问题解决方法(例如:MVC, ORM,表单验证,手脚架,XML-RPC)。尽管 *可以* 添加这些功能,然后通过Bottle来开发复杂的应用,但我们还是建议你使用一些功能完备的Web框架,例如 pylons_ 或 paste_ 。" #: ../../faq.rst:22 msgid "Common Problems and Pitfalls" msgstr "常见的,意料之外的问题" #: ../../faq.rst:29 msgid "\"Template Not Found\" in mod_wsgi/mod_python" msgstr "在mod_wsgi/mod_python中的 \"Template Not Found\" 错误" #: ../../faq.rst:31 msgid "" "Bottle searches in ``./`` and ``./views/`` for templates. In a mod_python_ " "or mod_wsgi_ environment, the working directory (``./``) depends on your " "Apache settings. You should add an absolute path to the template search " "path::" msgstr "Bottle会在 ``./`` 和 ``./views/`` 目录中搜索模板。在一个 mod_python_ 或 mod_wsgi_ 环境,当前工作目录( ``./`` )是由Apache的设置决定的。你应该在模板的搜索路径中添加一个绝对路径。" #: ../../faq.rst:35 msgid "so bottle searches the right paths." msgstr "这样,Bottle就能在正确的目录下搜索模板了" #: ../../faq.rst:38 msgid "Dynamic Routes and Slashes" msgstr "动态route和反斜杠" #: ../../faq.rst:40 msgid "" "In :ref:`dynamic route syntax `, a placeholder " "token (````) matches everything up to the next slash. This equals to " "``[^/]+`` in regular expression syntax. To accept slashes too, you have to " "add a custom regular pattern to the placeholder. An example: " "``/images/`` would match ``/images/icons/error.png`` but " "``/images/`` won't." msgstr "" #: ../../faq.rst:43 msgid "Problems with reverse proxies" msgstr "反向代理的问题" #: ../../faq.rst:45 msgid "" "Redirects and url-building only works if bottle knows the public address and" " location of your application. If you run bottle locally behind a reverse " "proxy or load balancer, some information might get lost along the way. For " "example, the ``wsgi.url_scheme`` value or the ``Host`` header might reflect " "the local request by your proxy, not the real request by the client. Here is" " a small WSGI middleware snippet that helps to fix these values::" msgstr "只用Bottle知道公共地址和应用位置的情况下,重定向和url-building才会起作用。(译者注:保留原文)Redirects and url-building only works if bottle knows the public address and location of your application.如果Bottle应用运行在反向代理或负载均衡后面,一些信息也许会丢失。例如, ``wsgi.url_scheme`` 的值或 ``Host`` 头或许只能获取到代理的请求信息,而不是真实的用户请求。下面是一个简单的中间件代码片段,处理上面的问题,获取正确的值。"