diff options
author | Thiago Avelino <thiagoavelinoster@gmail.com> | 2015-01-22 19:04:23 -0200 |
---|---|---|
committer | Thiago Avelino <thiagoavelinoster@gmail.com> | 2015-01-22 19:04:23 -0200 |
commit | a4faa5a40f012bf45110d27f46422d3733dbe1fc (patch) | |
tree | b76b6ebf900bebe5ffc439da253f8701a9cedf36 /docs | |
parent | 42762a42a9719441670ac0a8cd7d23a37e96c3ca (diff) | |
download | bottle-a4faa5a40f012bf45110d27f46422d3733dbe1fc.tar.gz |
generate _locale pt_BR langue
Diffstat (limited to 'docs')
31 files changed, 15832 insertions, 0 deletions
diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/api.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/api.po new file mode 100644 index 0000000..2f3d98a --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/api.po @@ -0,0 +1,1404 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../api.rst:3 +msgid "API Reference" +msgstr "" + +#: ../../api.rst:10 +msgid "" +"This is a mostly auto-generated API. If you are new to bottle, you might " +"find the narrative :doc:`tutorial` more helpful." +msgstr "" + +#: ../../api.rst:17 +msgid "Module Contents" +msgstr "" + +#: ../../api.rst:19 +msgid "The module defines several functions, constants, and an exception." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.debug:1 +msgid "" +"Change the debug level. There is only one debug level supported at the " +"moment." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.run:1 +msgid "" +"Start a server instance. This method blocks until the server terminates." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.run:3 +msgid "" +"WSGI application or target string supported by :func:`load_app`. (default: " +":func:`default_app`)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.run:5 +msgid "" +"Server adapter to use. See :data:`server_names` keys for valid names or pass" +" a :class:`ServerAdapter` subclass. (default: `wsgiref`)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.run:8 +msgid "" +"Server address to bind to. Pass ``0.0.0.0`` to listens on all interfaces " +"including the external one. (default: 127.0.0.1)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.run:10 +msgid "" +"Server port to bind to. Values below 1024 require root privileges. (default:" +" 8080)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.run:12 +msgid "Start auto-reloading server? (default: False)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.run:13 +msgid "Auto-reloader interval in seconds (default: 1)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.run:14 +msgid "Suppress output to stdout and stderr? (default: False)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.run:15 +msgid "Options passed to the server adapter." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.load:1 +msgid "Import a module or fetch an object from a module." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.load:3 +msgid "``package.module`` returns `module` as a module object." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.load:4 +msgid "``pack.mod:name`` returns the module variable `name` from `pack.mod`." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.load:5 +msgid "``pack.mod:func()`` calls `pack.mod.func()` and returns the result." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.load:7 +msgid "" +"The last form accepts not only function calls, but any type of expression. " +"Keyword arguments passed to this function are available as local variables. " +"Example: ``import_string('re:compile(x)', x='[a-z]')``" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.load_app:1 +msgid "" +"Load a bottle application from a module and make sure that the import does " +"not affect the current default application, but returns a separate " +"application object. See :func:`load` for the target parameter." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.request:1 ../../../bottle.pydocstring +#: of bottle.request:1 +msgid "" +"A thread-safe instance of :class:`LocalRequest`. If accessed from within a " +"request callback, this instance always refers to the *current* request (even" +" on a multithreaded server)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.response:1 +msgid "" +"A thread-safe instance of :class:`LocalResponse`. It is used to change the " +"HTTP response for the *current* request." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.HTTP_CODES:1 +msgid "" +"A dict to map HTTP status codes (e.g. 404) to phrases (e.g. 'Not Found')" +msgstr "" + +#: ../../api.rst:38 +msgid "" +"Return the current :ref:`default-app`. Actually, these are callable " +"instances of :class:`AppStack` and implement a stack-like API." +msgstr "" + +#: ../../api.rst:42 +msgid "Routing" +msgstr "" + +#: ../../api.rst:44 +msgid "" +"Bottle maintains a stack of :class:`Bottle` instances (see :func:`app` and " +":class:`AppStack`) and uses the top of the stack as a *default application* " +"for some of the module-level functions and decorators." +msgstr "" + +#: ../../api.rst:54 +msgid "" +"Decorator to install a route to the current default application. See " +":meth:`Bottle.route` for details." +msgstr "" + +#: ../../api.rst:59 +msgid "" +"Decorator to install an error handler to the current default application. " +"See :meth:`Bottle.error` for details." +msgstr "" + +#: ../../api.rst:63 +msgid "WSGI and HTTP Utilities" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.parse_date:1 +msgid "Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.parse_auth:1 +msgid "" +"Parse rfc2617 HTTP authentication header string (basic) and return " +"(user,pass) tuple or None" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.cookie_encode:1 +msgid "Encode and sign a pickle-able object. Return a (byte) string" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.cookie_decode:1 +msgid "Verify and decode an encoded string. Return an object or None." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.cookie_is_encoded:1 +msgid "Return True if the argument looks like a encoded cookie." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.yieldroutes:1 +msgid "" +"Return a generator for routes that match the signature (name, args) of the " +"func parameter. This may yield more than one route if the function takes " +"optional keyword arguments. The output is best described by example::" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.path_shift:1 +msgid "Shift path fragments from PATH_INFO to SCRIPT_NAME and vice versa." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.path_shift:3 +msgid "The modified paths." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.path_shift:4 +msgid "The SCRIPT_NAME path." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.path_shift:5 +msgid "The PATH_INFO path." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.path_shift:6 +msgid "" +"The number of path fragments to shift. May be negative to change the shift " +"direction. (default: 1)" +msgstr "" + +#: ../../api.rst:81 +msgid "Data Structures" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.MultiDict:1 +msgid "" +"This dict stores multiple values per key, but behaves exactly like a normal " +"dict in that it returns only the newest value for any given key. There are " +"special methods available to access the full list of values." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.MultiDict.get:1 +msgid "Return the most recent value for a key." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.MultiDict.get:3 +msgid "" +"The default value to be returned if the key is not present or the type " +"conversion fails." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.MultiDict.get:5 +msgid "An index for the list of available values." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.MultiDict.get:6 +msgid "" +"If defined, this callable is used to cast the value into a specific type. " +"Exception are suppressed and result in the default value to be returned." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.MultiDict.append:1 +msgid "Add a new value to the list of values for this key." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.MultiDict.replace:1 +msgid "Replace the list of values with a single value." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1 +#: ../../../bottle.pydocstring of bottle.MultiDict.getlist:1 +msgid "Return a (possibly empty) list of values for a key." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.MultiDict.getone:1 +msgid "Aliases for WTForms to mimic other multi-dict APIs (Django)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.HeaderDict:1 +msgid "" +"A case-insensitive version of :class:`MultiDict` that defaults to replace " +"the old value instead of appending it." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FormsDict:1 +msgid "" +"This :class:`MultiDict` subclass is used to store request form data. " +"Additionally to the normal dict-like item access methods (which return " +"unmodified data as native strings), this container also supports attribute-" +"like access to its values. Attributes are automatically de- or recoded to " +"match :attr:`input_encoding` (default: 'utf8'). Missing attributes default " +"to an empty string." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FormsDict.input_encoding:1 +msgid "Encoding used for attribute values." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FormsDict.recode_unicode:1 +msgid "" +"If true (default), unicode strings are first encoded with `latin1` and then " +"decoded to match :attr:`input_encoding`." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FormsDict.decode:1 +msgid "" +"Returns a copy with all keys and values de- or recoded to match " +":attr:`input_encoding`. Some libraries (e.g. WTForms) want a unicode " +"dictionary." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FormsDict.getunicode:1 +msgid "Return the value as a unicode string, or the default." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:1 +msgid "" +"This dict-like class wraps a WSGI environ dict and provides convenient " +"access to HTTP_* fields. Keys and values are native strings (2.x bytes or " +"3.x unicode) and keys are case-insensitive. If the WSGI environment contains" +" non-native string values, these are de- or encoded using a lossless " +"'latin1' character set." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:7 +msgid "" +"The API will remain stable even on changes to the relevant PEPs. Currently " +"PEP 333, 444 and 3333 are supported. (PEP 444 is the only one that uses non-" +"native strings.)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.cgikeys:1 +msgid "List of keys that do not have a ``HTTP_`` prefix." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.raw:1 +msgid "Return the header value as is (may be bytes or unicode)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.AppStack:1 +msgid "A stack-like list. Calling it returns the head of the stack." +msgstr "" + +#: ../../api.rst:100 +msgid "Return the current default application and remove it from the stack." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.AppStack.push:1 +msgid "Add a new :class:`Bottle` instance to the stack" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ResourceManager:1 +msgid "" +"This class manages a list of search paths and helps to find and open " +"application-bound resources (files)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ResourceManager:4 +msgid "default value for :meth:`add_path` calls." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ResourceManager:5 +msgid "callable used to open resources." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ResourceManager:6 +msgid "controls which lookups are cached. One of 'all', 'found' or 'none'." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ResourceManager.path:1 +msgid "A list of search paths. See :meth:`add_path` for details." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ResourceManager.cache:1 +msgid "A cache for resolved paths. ``res.cache.clear()`` clears the cache." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:1 +msgid "" +"Add a new path to the list of search paths. Return False if the path does " +"not exist." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:4 +msgid "" +"The new search path. Relative paths are turned into an absolute and " +"normalized form. If the path looks like a file (not ending in `/`), the " +"filename is stripped off." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:7 +msgid "" +"Path used to absolutize relative search paths. Defaults to :attr:`base` " +"which defaults to ``os.getcwd()``." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:9 +msgid "" +"Position within the list of search paths. Defaults to last index (appends to" +" the list)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:12 +msgid "" +"The `base` parameter makes it easy to reference files installed along with a" +" python module or package::" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:1 +msgid "Search for a resource and return an absolute file path, or `None`." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:3 +msgid "" +"The :attr:`path` list is searched in order. The first match is returend. " +"Symlinks are followed. The result is cached to speed up future lookups." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ResourceManager.open:1 +msgid "Find a resource and return a file object, or raise IOError." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FileUpload.file:1 +msgid "Open file(-like) object (BytesIO buffer or temporary file)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FileUpload.name:1 +msgid "Name of the upload form field" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FileUpload.raw_filename:1 +msgid "Raw filename as sent by the client (may contain unsafe characters)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FileUpload.headers:1 +msgid "A :class:`HeaderDict` with additional headers (e.g. content-type)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FileUpload.content_type:1 +#: ../../../bottle.pydocstring of bottle.BaseResponse.content_type:1 +msgid "Current value of the 'Content-Type' header." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FileUpload.content_length:1 +#: ../../../bottle.pydocstring of bottle.BaseResponse.content_length:1 +msgid "Current value of the 'Content-Length' header." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FileUpload.filename:1 +msgid "" +"Name of the file on the client file system, but normalized to ensure file " +"system compatibility. An empty filename is returned as 'empty'." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FileUpload.filename:4 +msgid "" +"Only ASCII letters, digits, dashes, underscores and dots are allowed in the " +"final filename. Accents are removed, if possible. Whitespace is replaced by " +"a single dash. Leading or tailing dots or dashes are removed. The filename " +"is limited to 255 characters." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FileUpload.save:1 +msgid "" +"Save file to disk or copy its content to an open file(-like) object. If " +"*destination* is a directory, :attr:`filename` is added to the path. " +"Existing files are not overwritten by default (IOError)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FileUpload.save:5 +msgid "File path, directory or file(-like) object." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FileUpload.save:6 +msgid "If True, replace existing files. (default: False)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.FileUpload.save:7 +msgid "Bytes to read at a time. (default: 64kb)" +msgstr "" + +#: ../../api.rst:109 +msgid "Exceptions" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BottleException:1 +msgid "A base class for exceptions used by bottle." +msgstr "" + +#: ../../api.rst:117 +msgid "The :class:`Bottle` Class" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle:1 +msgid "" +"Each Bottle object represents a single, distinct web application and " +"consists of routes, callbacks, plugins, resources and configuration. " +"Instances are callable WSGI applications." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle:5 +msgid "" +"If true (default), handle all exceptions. Turn off to let debugging " +"middleware handle exceptions." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.config:1 +msgid "A :class:`ConfigDict` for app specific configuration." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.resources:1 +msgid "A :class:`ResourceManager` for application files" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.catchall:1 +msgid "If true, most exceptions are caught and returned as :exc:`HTTPError`" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:1 +msgid "Attach a callback to a hook. Three hooks are currently implemented:" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4 +msgid "before_request" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4 +msgid "" +"Executed once before each request. The request context is available, but no " +"routing has happened yet." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:6 +msgid "after_request" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:7 +msgid "Executed once after each request regardless of its outcome." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:8 +msgid "app_reset" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:9 +msgid "Called whenever :meth:`Bottle.reset` is called." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.remove_hook:1 +msgid "Remove a callback from a hook." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.trigger_hook:1 +msgid "Trigger a hook and return a list of results." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.hook:1 +msgid "" +"Return a decorator that attaches a callback to a hook. See :meth:`add_hook` " +"for details." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.mount:1 +msgid "" +"Mount an application (:class:`Bottle` or plain WSGI) to a specific URL " +"prefix. Example::" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.mount:6 +msgid "" +"path prefix or `mount-point`. If it ends in a slash, that slash is " +"mandatory." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.mount:8 +msgid "an instance of :class:`Bottle` or a WSGI application." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.mount:10 +msgid "All other parameters are passed to the underlying :meth:`route` call." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.merge:1 +msgid "" +"Merge the routes of another :class:`Bottle` application or a list of " +":class:`Route` objects into this application. The routes keep their 'owner'," +" meaning that the :data:`Route.app` attribute is not changed." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.install:1 +msgid "" +"Add a plugin to the list of plugins and prepare it for being applied to all " +"routes of this application. A plugin may be a simple decorator or an object " +"that implements the :class:`Plugin` API." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.uninstall:1 +msgid "" +"Uninstall plugins. Pass an instance to remove a specific plugin, a type " +"object to remove all plugins that match that type, a string to remove all " +"plugins with a matching ``name`` attribute or ``True`` to remove all " +"plugins. Return the list of removed plugins." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.reset:1 +msgid "" +"Reset all routes (force plugins to be re-applied) and clear all caches. If " +"an ID or route object is given, only that specific route is affected." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.close:1 +msgid "Close the application and all installed plugins." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.run:1 +msgid "Calls :func:`run` with the same parameters." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.match:1 +msgid "" +"Search for a matching route and return a (:class:`Route` , urlargs) tuple. " +"The second value is a dictionary with parameters extracted from the URL. " +"Raise :exc:`HTTPError` (404/405) on a non-match." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.get_url:1 +msgid "Return a string that matches a named route" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.add_route:1 +msgid "Add a route object, but do not change the :data:`Route.app` attribute." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.route:1 +msgid "A decorator to bind a function to a request URL. Example::" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.route:7 +msgid "" +"The ``:name`` part is a wildcard. See :class:`Router` for syntax details." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.route:10 +msgid "" +"Request path or a list of paths to listen to. If no path is specified, it is" +" automatically generated from the signature of the function." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.route:13 +msgid "" +"HTTP method (`GET`, `POST`, `PUT`, ...) or a list of methods to listen to. " +"(default: `GET`)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.route:15 +msgid "" +"An optional shortcut to avoid the decorator syntax. ``route(..., " +"callback=func)`` equals ``route(...)(func)``" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.route:17 +msgid "The name for this route. (default: None)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.route:18 +msgid "" +"A decorator or plugin or a list of plugins. These are applied to the route " +"callback in addition to installed plugins." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.route:20 +msgid "" +"A list of plugins, plugin classes or names. Matching plugins are not " +"installed to this route. ``True`` skips all." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.route:23 +msgid "" +"Any additional keyword arguments are stored as route-specific configuration " +"and passed to plugins (see :meth:`Plugin.apply`)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.get:1 +msgid "Equals :meth:`route`." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.post:1 +msgid "Equals :meth:`route` with a ``POST`` method parameter." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.put:1 +msgid "Equals :meth:`route` with a ``PUT`` method parameter." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.delete:1 +msgid "Equals :meth:`route` with a ``DELETE`` method parameter." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.patch:1 +msgid "Equals :meth:`route` with a ``PATCH`` method parameter." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.error:1 +msgid "Decorator: Register an output handler for a HTTP error code" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Bottle.wsgi:1 +msgid "The bottle WSGI-interface." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route:1 +msgid "" +"This class wraps a route callback along with route specific metadata and " +"configuration and applies Plugins on demand. It is also responsible for " +"turing an URL path rule into a regular expression usable by the Router." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.app:1 +msgid "The application this route is installed to." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.rule:1 +msgid "The path-rule string (e.g. ``/wiki/<page>``)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.method:1 +msgid "The HTTP method as a string (e.g. ``GET``)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.callback:1 +msgid "" +"The original callback with no plugins applied. Useful for introspection." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.name:1 +msgid "The name of the route (if specified) or ``None``." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.plugins:1 +msgid "A list of route-specific plugins (see :meth:`Bottle.route`)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.skiplist:1 +msgid "" +"A list of plugins to not apply to this route (see :meth:`Bottle.route`)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.config:1 +msgid "" +"Additional keyword arguments passed to the :meth:`Bottle.route` decorator " +"are stored in this dictionary. Used for route-specific plugin configuration " +"and meta-data." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.call:1 +msgid "" +"The route callback with all plugins applied. This property is created on " +"demand and then cached to speed up subsequent requests." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.reset:1 +msgid "" +"Forget any cached values. The next time :attr:`call` is accessed, all " +"plugins are re-applied." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.prepare:1 +msgid "Do all on-demand work immediately (useful for debugging)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.all_plugins:1 +msgid "Yield all Plugins affecting this route." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.get_undecorated_callback:1 +msgid "" +"Return the callback. If the callback is a decorated function, try to recover" +" the original function." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.get_callback_args:1 +msgid "" +"Return a list of argument names the callback (most likely) accepts as " +"keyword arguments. If the callback is a decorated function, try to recover " +"the original function before inspection." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.Route.get_config:1 +msgid "" +"Lookup a config field and return its value, first checking the route.config," +" then route.app.config." +msgstr "" + +#: ../../api.rst:127 +msgid "The :class:`Request` Object" +msgstr "" + +#: ../../api.rst:129 +msgid "" +"The :class:`Request` class wraps a WSGI environment and provides helpful " +"methods to parse and access form data, cookies, file uploads and other " +"metadata. Most of the attributes are read-only." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest:1 +msgid "" +"A wrapper for WSGI environment dictionaries that adds a lot of convenient " +"access methods and properties. Most of them are read-only." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest:4 +msgid "" +"Adding new attributes to a request actually adds them to the environ " +"dictionary (as 'bottle.request.ext.<name>'). This is the recommended way to " +"store and access request-specific data." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.MEMFILE_MAX:1 +msgid "Maximum size of memory buffer for :attr:`body` in bytes." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.environ:1 +msgid "" +"The wrapped WSGI environ dictionary. This is the only real attribute. All " +"other attributes actually are read-only properties." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.app:1 +msgid "Bottle application handling this request." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.route:1 +msgid "The bottle :class:`Route` object that matches this request." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.url_args:1 +msgid "The arguments extracted from the URL." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.path:1 +msgid "" +"The value of ``PATH_INFO`` with exactly one prefixed slash (to fix broken " +"clients and avoid the \"empty path\" edge case)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.method:1 +msgid "The ``REQUEST_METHOD`` value as an uppercase string." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.headers:1 +msgid "" +"A :class:`WSGIHeaderDict` that provides case-insensitive access to HTTP " +"request headers." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.get_header:1 +msgid "Return the value of a request header, or a given default value." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.cookies:1 +msgid "" +"Cookies parsed into a :class:`FormsDict`. Signed cookies are NOT decoded. " +"Use :meth:`get_cookie` if you expect signed cookies." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.get_cookie:1 +msgid "" +"Return the content of a cookie. To read a `Signed Cookie`, the `secret` must" +" match the one used to create the cookie (see " +":meth:`BaseResponse.set_cookie`). If anything goes wrong (missing cookie or " +"wrong signature), return a default value." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1 +msgid "" +"The :attr:`query_string` parsed into a :class:`FormsDict`. These values are " +"sometimes called \"URL arguments\" or \"GET parameters\", but not to be " +"confused with \"URL wildcards\" as they are provided by the :class:`Router`." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.forms:1 +msgid "" +"Form values parsed from an `url-encoded` or `multipart/form-data` encoded " +"POST or PUT request body. The result is returned as a :class:`FormsDict`. " +"All keys and values are strings. File uploads are stored separately in " +":attr:`files`." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.params:1 +msgid "" +"A :class:`FormsDict` with the combined values of :attr:`query` and " +":attr:`forms`. File uploads are stored in :attr:`files`." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.files:1 +msgid "" +"File uploads parsed from `multipart/form-data` encoded POST or PUT request " +"body. The values are instances of :class:`FileUpload`." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.json:1 +msgid "" +"If the ``Content-Type`` header is ``application/json``, this property holds " +"the parsed content of the request body. Only requests smaller than " +":attr:`MEMFILE_MAX` are processed to avoid memory exhaustion." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.body:1 +msgid "" +"The HTTP request body as a seek-able file-like object. Depending on " +":attr:`MEMFILE_MAX`, this is either a temporary file or a " +":class:`io.BytesIO` instance. Accessing this property for the first time " +"reads and replaces the ``wsgi.input`` environ variable. Subsequent accesses " +"just do a `seek(0)` on the file object." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.chunked:1 +msgid "True if Chunked transfer encoding was." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.GET:1 +msgid "An alias for :attr:`query`." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.POST:1 +msgid "" +"The values of :attr:`forms` and :attr:`files` combined into a single " +":class:`FormsDict`. Values are either strings (form values) or instances of " +":class:`cgi.FieldStorage` (file uploads)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.url:1 +msgid "" +"The full request URI including hostname and scheme. If your app lives behind" +" a reverse proxy or load balancer and you get confusing results, make sure " +"that the ``X-Forwarded-Host`` header is set correctly." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.urlparts:1 +msgid "" +"The :attr:`url` string as an :class:`urlparse.SplitResult` tuple. The tuple " +"contains (scheme, host, path, query_string and fragment), but the fragment " +"is always empty because it is not visible to the server." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.fullpath:1 +msgid "Request path including :attr:`script_name` (if present)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.query_string:1 +msgid "" +"The raw :attr:`query` part of the URL (everything in between ``?`` and " +"``#``) as a string." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.script_name:1 +msgid "" +"The initial portion of the URL's `path` that was removed by a higher level " +"(server or routing middleware) before the application was called. This " +"script path is returned with leading and tailing slashes." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2 +msgid "Shift path segments from :attr:`path` to :attr:`script_name` and" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2 +msgid "vice versa." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:4 +msgid "" +"The number of path segments to shift. May be negative to change the shift " +"direction. (default: 1)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.content_length:1 +msgid "" +"The request body length as an integer. The client is responsible to set this" +" header. Otherwise, the real length of the body is unknown and -1 is " +"returned. In this case, :attr:`body` will be empty." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.content_type:1 +msgid "The Content-Type header as a lowercase-string (default: empty)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.is_xhr:1 +msgid "" +"True if the request was triggered by a XMLHttpRequest. This only works with " +"JavaScript libraries that support the `X-Requested-With` header (most of the" +" popular libraries do)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.is_ajax:1 +msgid "Alias for :attr:`is_xhr`. \"Ajax\" is not the right term." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.auth:1 +msgid "" +"HTTP authentication data as a (user, password) tuple. This implementation " +"currently supports basic (not digest) authentication only. If the " +"authentication happened at a higher level (e.g. in the front web-server or a" +" middleware), the password field is None, but the user field is looked up " +"from the ``REMOTE_USER`` environ variable. On any errors, None is returned." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_route:1 +msgid "" +"A list of all IPs that were involved in this request, starting with the " +"client IP and followed by zero or more proxies. This does only work if all " +"proxies support the ```X-Forwarded-For`` header. Note that this information " +"can be forged by malicious clients." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_addr:1 +msgid "" +"The client IP as a string. Note that this information can be forged by " +"malicious clients." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseRequest.copy:1 +msgid "Return a new :class:`Request` with a shallow :attr:`environ` copy." +msgstr "" + +#: ../../api.rst:137 +msgid "" +"The module-level :data:`bottle.request` is a proxy object (implemented in " +":class:`LocalRequest`) and always refers to the `current` request, or in " +"other words, the request that is currently processed by the request handler " +"in the current thread. This `thread locality` ensures that you can safely " +"use a global instance in a multi-threaded environment." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.LocalRequest:1 +msgid "" +"A thread-local subclass of :class:`BaseRequest` with a different set of " +"attributes for each thread. There is usually only one global instance of " +"this class (:data:`request`). If accessed during a request/response cycle, " +"this instance always refers to the *current* request (even on a " +"multithreaded server)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.LocalRequest.bind:1 +msgid "Wrap a WSGI environ dictionary." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.LocalRequest.environ:1 +#: ../../../bottle.pydocstring of bottle.LocalResponse.body:1 +msgid "Thread-local property" +msgstr "" + +#: ../../api.rst:146 +msgid "The :class:`Response` Object" +msgstr "" + +#: ../../api.rst:148 +msgid "" +"The :class:`Response` class stores the HTTP status code as well as headers " +"and cookies that are to be sent to the client. Similar to " +":data:`bottle.request` there is a thread-local :data:`bottle.response` " +"instance that can be used to adjust the `current` response. Moreover, you " +"can instantiate :class:`Response` and return it from your request handler. " +"In this case, the custom instance overrules the headers and cookies defined " +"in the global one." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse:1 +msgid "Storage class for a response body as well as headers and cookies." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse:3 +msgid "" +"This class does support dict-like case-insensitive item-access to headers, " +"but is NOT a dict. Most notably, iterating over a response yields parts of " +"the body and not the headers." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse:7 +msgid "The response body as one of the supported types." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse:8 +msgid "" +"Either an HTTP status code (e.g. 200) or a status line including the reason " +"phrase (e.g. '200 OK')." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse:10 +msgid "A dictionary or a list of name-value pairs." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse:12 +msgid "" +"Additional keyword arguments are added to the list of headers. Underscores " +"in the header name are replaced with dashes." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.copy:1 +msgid "Returns a copy of self." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.status_line:1 +msgid "The HTTP status line as a string (e.g. ``404 Not Found``)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.status_code:1 +msgid "The HTTP status code as an integer (e.g. 404)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.status:1 +msgid "" +"A writeable property to change the HTTP response status. It accepts either a" +" numeric code (100-999) or a string with a custom reason phrase (e.g. \"404 " +"Brain not found\"). Both :data:`status_line` and :data:`status_code` are " +"updated accordingly. The return value is always a status string." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.headers:1 +msgid "" +"An instance of :class:`HeaderDict`, a case-insensitive dict-like view on the" +" response headers." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.get_header:1 +msgid "" +"Return the value of a previously defined header. If there is no header with " +"that name, return a default value." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_header:1 +msgid "" +"Create a new response header, replacing any previously defined headers with " +"the same name." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.add_header:1 +msgid "Add an additional response header, not removing duplicates." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.iter_headers:1 +msgid "" +"Yield (header, value) tuples, skipping headers that are not allowed with the" +" current response status code." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.headerlist:1 +msgid "WSGI conform list of (header, value) tuples." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.expires:1 +msgid "Current value of the 'Expires' header." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.charset:1 +msgid "" +"Return the charset specified in the content-type header (default: utf8)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:1 +msgid "" +"Create a new cookie or replace an old one. If the `secret` parameter is set," +" create a `Signed Cookie` (described below)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:4 +msgid "the name of the cookie." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:5 +msgid "the value of the cookie." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:6 +msgid "a signature key required for signed cookies." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:8 +msgid "" +"Additionally, this method accepts all RFC 2109 attributes that are supported" +" by :class:`cookie.Morsel`, including:" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:11 +msgid "maximum age in seconds. (default: None)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:12 +msgid "a datetime object or UNIX timestamp. (default: None)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:13 +msgid "" +"the domain that is allowed to read the cookie. (default: current domain)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:15 +msgid "limits the cookie to a given path (default: current path)" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:16 +msgid "limit the cookie to HTTPS connections (default: off)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:17 +msgid "" +"prevents client-side javascript to read this cookie (default: off, requires " +"Python 2.6 or newer)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:20 +msgid "" +"If neither `expires` nor `max_age` is set (default), the cookie will expire " +"at the end of the browser session (as soon as the browser window is closed)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:24 +msgid "" +"Signed cookies may store any pickle-able object and are cryptographically " +"signed to prevent manipulation. Keep in mind that cookies are limited to 4kb" +" in most browsers." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:28 +msgid "" +"Warning: Signed cookies are not encrypted (the client can still see the " +"content) and not copy-protected (the client can restore an old cookie). The " +"main intention is to make pickling and unpickling save, not to store secret " +"information at client side." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseResponse.delete_cookie:1 +msgid "" +"Delete a cookie. Be sure to use the same `domain` and `path` settings as " +"used to create the cookie." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.LocalResponse:1 +msgid "" +"A thread-local subclass of :class:`BaseResponse` with a different set of " +"attributes for each thread. There is usually only one global instance of " +"this class (:data:`response`). Its attributes are used to build the HTTP " +"response at the end of the request/response cycle." +msgstr "" + +#: ../../api.rst:160 +msgid "" +"The following two classes can be raised as an exception. The most noticeable" +" difference is that bottle invokes error handlers for :class:`HTTPError`, " +"but not for :class:`HTTPResponse` or other response types." +msgstr "" + +#: ../../api.rst:172 +msgid "Templates" +msgstr "" + +#: ../../api.rst:174 +msgid "" +"All template engines supported by :mod:`bottle` implement the " +":class:`BaseTemplate` API. This way it is possible to switch and mix " +"template engines without changing the application code at all." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseTemplate:1 +msgid "Base class and minimal API for template adapters" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseTemplate.__init__:1 +msgid "" +"Create a new template. If the source parameter (str or buffer) is missing, " +"the name argument is used to guess a template filename. Subclasses can " +"assume that self.source and/or self.filename are set. Both are strings. The " +"lookup, encoding and settings parameters are stored as instance variables. " +"The lookup parameter stores a list containing directory paths. The encoding " +"parameter should be used to decode byte strings or files. The settings " +"parameter contains a dict for engine-specific settings." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseTemplate.search:1 +msgid "" +"Search name in all directories specified in lookup. First without, then with" +" common extensions. Return first hit." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseTemplate.global_config:1 +msgid "This reads or sets the global settings stored in class.settings." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseTemplate.prepare:1 +msgid "" +"Run preparations (parsing, caching, ...). It should be possible to call this" +" again to refresh a template or to update settings." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.BaseTemplate.render:1 +msgid "" +"Render the template with the specified local variables and return a single " +"byte or unicode string. If it is a byte string, the encoding must match " +"self.encoding. This method must be thread-safe! Local variables may be " +"provided in dictionaries (args) or directly, as keywords (kwargs)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.view:1 +msgid "" +"Decorator: renders a template for a handler. The handler can control its " +"behavior like that:" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.view:4 +msgid "return a dict of template vars to fill out the template" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.view:5 +msgid "" +"return something other than a dict and the view decorator will not process " +"the template, but return the handler result as is. This includes returning a" +" HTTPResponse(dict) to get, for instance, JSON with autojson or other " +"castfilters." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.template:1 +msgid "" +"Get a rendered template as a string iterator. You can use a name, a filename" +" or a template string as first parameter. Template rendering arguments can " +"be passed as dictionaries or directly (as keyword arguments)." +msgstr "" + +#: ../../api.rst:185 +msgid "" +"You can write your own adapter for your favourite template engine or use one" +" of the predefined adapters. Currently there are four fully supported " +"template engines:" +msgstr "" + +#: ../../api.rst:188 +msgid "Class" +msgstr "" + +#: ../../api.rst:188 +msgid "URL" +msgstr "" + +#: ../../api.rst:188 +msgid "Decorator" +msgstr "" + +#: ../../api.rst:188 +msgid "Render function" +msgstr "" + +#: ../../api.rst:190 +msgid ":class:`SimpleTemplate`" +msgstr "" + +#: ../../api.rst:190 +msgid ":doc:`stpl`" +msgstr "" + +#: ../../api.rst:190 +msgid ":func:`view`" +msgstr "" + +#: ../../api.rst:190 +msgid ":func:`template`" +msgstr "" + +#: ../../api.rst:191 +msgid ":class:`MakoTemplate`" +msgstr "" + +#: ../../api.rst:191 +msgid "http://www.makotemplates.org" +msgstr "" + +#: ../../api.rst:191 +msgid ":func:`mako_view`" +msgstr "" + +#: ../../api.rst:191 +msgid ":func:`mako_template`" +msgstr "" + +#: ../../api.rst:192 +msgid ":class:`CheetahTemplate`" +msgstr "" + +#: ../../api.rst:192 +msgid "http://www.cheetahtemplate.org/" +msgstr "" + +#: ../../api.rst:192 +msgid ":func:`cheetah_view`" +msgstr "" + +#: ../../api.rst:192 +msgid ":func:`cheetah_template`" +msgstr "" + +#: ../../api.rst:193 +msgid ":class:`Jinja2Template`" +msgstr "" + +#: ../../api.rst:193 +msgid "http://jinja.pocoo.org/" +msgstr "" + +#: ../../api.rst:193 +msgid ":func:`jinja2_view`" +msgstr "" + +#: ../../api.rst:193 +msgid ":func:`jinja2_template`" +msgstr "" + +#: ../../api.rst:196 +msgid "" +"To use :class:`MakoTemplate` as your default template engine, just import " +"its specialised decorator and render function::" +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/async.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/async.po new file mode 100644 index 0000000..2721c08 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/async.po @@ -0,0 +1,202 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../async.rst:2 +msgid "Primer to Asynchronous Applications" +msgstr "" + +#: ../../async.rst:4 +msgid "" +"Asynchronous design patterns don't mix well with the synchronous nature of " +"`WSGI <http://www.python.org/dev/peps/pep-3333/>`_. This is why most " +"asynchronous frameworks (tornado, twisted, ...) implement a specialized API " +"to expose their asynchronous features. Bottle is a WSGI framework and shares" +" the synchronous nature of WSGI, but thanks to the awesome `gevent project " +"<http://www.gevent.org/>`_, it is still possible to write asynchronous " +"applications with bottle. This article documents the usage of Bottle with " +"Asynchronous WSGI." +msgstr "" + +#: ../../async.rst:7 +msgid "The Limits of Synchronous WSGI" +msgstr "" + +#: ../../async.rst:9 +msgid "" +"Briefly worded, the `WSGI specification (pep 3333) " +"<http://www.python.org/dev/peps/pep-3333/>`_ defines a request/response " +"circle as follows: The application callable is invoked once for each request" +" and must return a body iterator. The server then iterates over the body and" +" writes each chunk to the socket. As soon as the body iterator is exhausted," +" the client connection is closed." +msgstr "" + +#: ../../async.rst:11 +msgid "" +"Simple enough, but there is a snag: All this happens synchronously. If your " +"application needs to wait for data (IO, sockets, databases, ...), it must " +"either yield empty strings (busy wait) or block the current thread. Both " +"solutions occupy the handling thread and prevent it from answering new " +"requests. There is consequently only one ongoing request per thread." +msgstr "" + +#: ../../async.rst:13 +msgid "" +"Most servers limit the number of threads to avoid their relatively high " +"overhead. Pools of 20 or less threads are common. As soon as all threads are" +" occupied, any new connection is stalled. The server is effectively dead for" +" everyone else. If you want to implement a chat that uses long-polling ajax " +"requests to get real-time updates, you'd reach the limited at 20 concurrent " +"connections. That's a pretty small chat." +msgstr "" + +#: ../../async.rst:16 +msgid "Greenlets to the rescue" +msgstr "" + +#: ../../async.rst:18 +msgid "" +"Most servers limit the size of their worker pools to a relatively low number" +" of concurrent threads, due to the high overhead involved in switching " +"between and creating new threads. While threads are cheap compared to " +"processes (forks), they are still expensive to create for each new " +"connection." +msgstr "" + +#: ../../async.rst:20 +msgid "" +"The `gevent <http://www.gevent.org/>`_ module adds *greenlets* to the mix. " +"Greenlets behave similar to traditional threads, but are very cheap to " +"create. A gevent-based server can spawn thousands of greenlets (one for each" +" connection) with almost no overhead. Blocking individual greenlets has no " +"impact on the servers ability to accept new requests. The number of " +"concurrent connections is virtually unlimited." +msgstr "" + +#: ../../async.rst:22 +msgid "" +"This makes creating asynchronous applications incredibly easy, because they " +"look and feel like synchronous applications. A gevent-based server is " +"actually not asynchronous, but massively multi-threaded. Here is an " +"example::" +msgstr "" + +#: ../../async.rst:39 +msgid "" +"The first line is important. It causes gevent to monkey-patch most of " +"Python's blocking APIs to not block the current thread, but pass the CPU to " +"the next greenlet instead. It actually replaces Python's threading with " +"gevent-based pseudo-threads. This is why you can still use ``time.sleep()`` " +"which would normally block the whole thread. If you don't feel comfortable " +"with monkey-patching python built-ins, you can use the corresponding gevent " +"functions (``gevent.sleep()`` in this case)." +msgstr "" + +#: ../../async.rst:41 +msgid "" +"If you run this script and point your browser to " +"``http://localhost:8080/stream``, you should see `START`, `MIDDLE`, and " +"`END` show up one by one (rather than waiting 8 seconds to see them all at " +"once). It works exactly as with normal threads, but now your server can " +"handle thousands of concurrent requests without any problems." +msgstr "" + +#: ../../async.rst:45 +msgid "" +"Some browsers buffer a certain amount of data before they start rendering a " +"page. You might need to yield more than a few bytes to see an effect in " +"these browsers. Additionally, many browsers have a limit of one concurrent " +"connection per URL. If this is the case, you can use a second browser or a " +"benchmark tool (e.g. `ab` or `httperf`) to measure performance." +msgstr "" + +#: ../../async.rst:52 +msgid "Event Callbacks" +msgstr "" + +#: ../../async.rst:54 +msgid "" +"A very common design pattern in asynchronous frameworks (including tornado, " +"twisted, node.js and friends) is to use non-blocking APIs and bind callbacks" +" to asynchronous events. The socket object is kept open until it is closed " +"explicitly to allow callbacks to write to the socket at a later point. Here " +"is an example based on the `tornado library " +"<http://www.tornadoweb.org/documentation#non-blocking-asynchronous-" +"requests>`_::" +msgstr "" + +#: ../../async.rst:63 +msgid "" +"The main benefit is that the request handler terminates early. The handling " +"thread can move on and accept new requests while the callbacks continue to " +"write to sockets of previous requests. This is how these frameworks manage " +"to process a lot of concurrent requests with only a small number of OS " +"threads." +msgstr "" + +#: ../../async.rst:65 +msgid "" +"With Gevent+WSGI, things are different: First, terminating early has no " +"benefit because we have an unlimited pool of (pseudo)threads to accept new " +"connections. Second, we cannot terminate early because that would close the " +"socket (as required by WSGI). Third, we must return an iterable to conform " +"to WSGI." +msgstr "" + +#: ../../async.rst:67 +msgid "" +"In order to conform to the WSGI standard, all we have to do is to return a " +"body iterable that we can write to asynchronously. With the help of " +"`gevent.queue <http://www.gevent.org/gevent.queue.html>`_, we can *simulate*" +" a detached socket and rewrite the previous example as follows::" +msgstr "" + +#: ../../async.rst:78 +msgid "" +"From the server perspective, the queue object is iterable. It blocks if " +"empty and stops as soon as it reaches ``StopIteration``. This conforms to " +"WSGI. On the application side, the queue object behaves like a non-blocking " +"socket. You can write to it at any time, pass it around and even start a new" +" (pseudo)thread that writes to it asynchronously. This is how long-polling " +"is implemented most of the time." +msgstr "" + +#: ../../async.rst:82 +msgid "Finally: WebSockets" +msgstr "" + +#: ../../async.rst:84 +msgid "" +"Lets forget about the low-level details for a while and speak about " +"WebSockets. Since you are reading this article, you probably know what " +"WebSockets are: A bidirectional communication channel between a browser " +"(client) and a web application (server)." +msgstr "" + +#: ../../async.rst:86 +msgid "" +"Thankfully the `gevent-websocket <http://pypi.python.org/pypi/gevent-" +"websocket/>`_ package does all the hard work for us. Here is a simple " +"WebSocket endpoint that receives messages and just sends them back to the " +"client::" +msgstr "" + +#: ../../async.rst:111 +msgid "" +"The while-loop runs until the client closes the connection. You get the idea" +" :)" +msgstr "" + +#: ../../async.rst:113 +msgid "The client-site JavaScript API is really straight forward, too::" +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/changelog.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/changelog.po new file mode 100644 index 0000000..218f8a8 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/changelog.po @@ -0,0 +1,751 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../changelog.rst:6 +msgid "Release Notes and Changelog" +msgstr "" + +#: ../../changelog.rst:9 +msgid "Release 0.13" +msgstr "" + +#: ../../changelog.rst:13 +msgid "Added :func:`patch` shortcut for `route(..., method='PATCH')`" +msgstr "" + +#: ../../changelog.rst:17 +msgid "Release 0.12" +msgstr "" + +#: ../../changelog.rst:19 +msgid "" +"New SimpleTemplate parser implementation * Support for multi-line code " +"blocks (`<% ... %>`). * The keywords `include` and `rebase` are functions " +"now and can accept variable template names." +msgstr "" + +#: ../../changelog.rst:22 +msgid "" +"The new :meth:`BaseRequest.route` property returns the :class:`Route` that " +"originally matched the request." +msgstr "" + +#: ../../changelog.rst:23 +msgid "" +"Removed the ``BaseRequest.MAX_PARAMS`` limit. The hash collision bug in " +"CPythons dict() implementation was fixed over a year ago. If you are still " +"using Python 2.5 in production, consider upgrading or at least make sure " +"that you get security fixed from your distributor." +msgstr "" + +#: ../../changelog.rst:24 +msgid "New :class:`ConfigDict` API (see :doc:`configuration`)" +msgstr "" + +#: ../../changelog.rst:26 +msgid "" +"More information can be found in this `development blog post " +"<http://blog.bottlepy.org/2013/07/19/preview-bottle-012.html>`_." +msgstr "" + +#: ../../changelog.rst:30 +msgid "Release 0.11" +msgstr "" + +#: ../../changelog.rst:32 +msgid "" +"Native support for Python 2.x and 3.x syntax. No need to run 2to3 anymore." +msgstr "" + +#: ../../changelog.rst:33 +msgid "" +"Support for partial downloads (``Range`` header) in :func:`static_file`." +msgstr "" + +#: ../../changelog.rst:34 +msgid "" +"The new :class:`ResourceManager` interface helps locating files bundled with" +" an application." +msgstr "" + +#: ../../changelog.rst:35 +msgid "" +"Added a server adapter for `waitress " +"<http://docs.pylonsproject.org/projects/waitress/en/latest/>`_." +msgstr "" + +#: ../../changelog.rst:36 +msgid "" +"New :meth:`Bottle.merge` method to install all routes from one application " +"into another." +msgstr "" + +#: ../../changelog.rst:37 +msgid "" +"New :attr:`BaseRequest.app` property to get the application object that " +"handles a request." +msgstr "" + +#: ../../changelog.rst:38 +msgid "" +"Added :meth:`FormsDict.decode()` to get an all-unicode version (needed by " +"WTForms)." +msgstr "" + +#: ../../changelog.rst:39 +msgid ":class:`MultiDict` and subclasses are now pickle-able." +msgstr "" + +#: ../../changelog.rst:42 +msgid "API Changes" +msgstr "" + +#: ../../changelog.rst:43 +msgid "" +":attr:`Response.status` is a read-write property that can be assigned either" +" a numeric status code or a status string with a reason phrase (``200 OK``)." +" The return value is now a string to better match existing APIs (WebOb, " +"werkzeug). To be absolutely clear, you can use the read-only properties " +":attr:`BaseResponse.status_code` and :attr:`BaseResponse.status_line`." +msgstr "" + +#: ../../changelog.rst:46 +msgid "API Deprecations" +msgstr "" + +#: ../../changelog.rst:47 +msgid "" +":class:`SimpleTALTemplate` is now deprecating. There seems to be no demand." +msgstr "" + +#: ../../changelog.rst:50 +msgid "Release 0.10" +msgstr "" + +#: ../../changelog.rst:52 +msgid "Plugin API v2" +msgstr "" + +#: ../../changelog.rst:54 +msgid "To use the new API, set :attr:`Plugin.api` to ``2``." +msgstr "" + +#: ../../changelog.rst:55 +msgid "" +":meth:`Plugin.apply` receives a :class:`Route` object instead of a context " +"dictionary as second parameter. The new object offers some additional " +"information and may be extended in the future." +msgstr "" + +#: ../../changelog.rst:56 +msgid "" +"Plugin names are considered unique now. The topmost plugin with a given name" +" on a given route is installed, all other plugins with the same name are " +"silently ignored." +msgstr "" + +#: ../../changelog.rst:58 +msgid "The Request/Response Objects" +msgstr "" + +#: ../../changelog.rst:60 +msgid "" +"Added :attr:`BaseRequest.json`, :attr:`BaseRequest.remote_route`, " +":attr:`BaseRequest.remote_addr`, :attr:`BaseRequest.query` and " +":attr:`BaseRequest.script_name`." +msgstr "" + +#: ../../changelog.rst:61 +msgid "" +"Added :attr:`BaseResponse.status_line` and :attr:`BaseResponse.status_code` " +"attributes. In future releases, :attr:`BaseResponse.status` will return a " +"string (e.g. ``200 OK``) instead of an integer to match the API of other " +"common frameworks. To make the transition as smooth as possible, you should " +"use the verbose attributes from now on." +msgstr "" + +#: ../../changelog.rst:62 +msgid "" +"Replaced :class:`MultiDict` with a specialized :class:`FormsDict` in many " +"places. The new dict implementation allows attribute access and handles " +"unicode form values transparently." +msgstr "" + +#: ../../changelog.rst:64 +msgid "Templates" +msgstr "" + +#: ../../changelog.rst:66 +msgid "" +"Added three new functions to the SimpleTemplate default namespace that " +"handle undefined variables: :func:`stpl.defined`, :func:`stpl.get` and " +":func:`stpl.setdefault`." +msgstr "" + +#: ../../changelog.rst:67 +msgid "" +"The default escape function for SimpleTemplate now additionally escapes " +"single and double quotes." +msgstr "" + +#: ../../changelog.rst:69 +msgid "Routing" +msgstr "" + +#: ../../changelog.rst:71 +msgid "" +"A new route syntax (e.g. ``/object/<id:int>``) and support for route " +"wildcard filters." +msgstr "" + +#: ../../changelog.rst:72 +msgid "Four new wildcard filters: `int`, `float`, `path` and `re`." +msgstr "" + +#: ../../changelog.rst:74 +msgid "Other changes" +msgstr "" + +#: ../../changelog.rst:76 +msgid "Added command line interface to load applications and start servers." +msgstr "" + +#: ../../changelog.rst:77 +msgid "" +"Introduced a :class:`ConfigDict` that makes accessing configuration a lot " +"easier (attribute access and auto-expanding namespaces)." +msgstr "" + +#: ../../changelog.rst:78 +msgid "Added support for raw WSGI applications to :meth:`Bottle.mount`." +msgstr "" + +#: ../../changelog.rst:79 +msgid ":meth:`Bottle.mount` parameter order changed." +msgstr "" + +#: ../../changelog.rst:80 +msgid "" +":meth:`Bottle.route` now accpets an import string for the ``callback`` " +"parameter." +msgstr "" + +#: ../../changelog.rst:81 +msgid "Dropped Gunicorn 0.8 support. Current supported version is 0.13." +msgstr "" + +#: ../../changelog.rst:82 +msgid "Added custom options to Gunicorn server." +msgstr "" + +#: ../../changelog.rst:83 +msgid "" +"Finally dropped support for type filters. Replace with a custom plugin of " +"needed." +msgstr "" + +#: ../../changelog.rst:87 +msgid "Release 0.9" +msgstr "" + +#: ../../changelog.rst:90 +msgid "Whats new?" +msgstr "" + +#: ../../changelog.rst:91 +msgid "" +"A brand new plugin-API. See :ref:`plugins` and :doc:`plugindev` for details." +msgstr "" + +#: ../../changelog.rst:92 +msgid "" +"The :func:`route` decorator got a lot of new features. See " +":meth:`Bottle.route` for details." +msgstr "" + +#: ../../changelog.rst:93 +msgid "" +"New server adapters for `gevent <http://www.gevent.org/>`_, `meinheld " +"<http://meinheld.org/>`_ and `bjoern " +"<https://github.com/jonashaag/bjoern>`_." +msgstr "" + +#: ../../changelog.rst:94 +msgid "Support for SimpleTAL templates." +msgstr "" + +#: ../../changelog.rst:95 +msgid "Better runtime exception handling for mako templates in debug mode." +msgstr "" + +#: ../../changelog.rst:96 +msgid "Lots of documentation, fixes and small improvements." +msgstr "" + +#: ../../changelog.rst:97 +msgid "A new :data:`Request.urlparts` property." +msgstr "" + +#: ../../changelog.rst:100 +msgid "Performance improvements" +msgstr "" + +#: ../../changelog.rst:101 +msgid "" +"The :class:`Router` now special-cases ``wsgi.run_once`` environments to " +"speed up CGI." +msgstr "" + +#: ../../changelog.rst:102 +msgid "" +"Reduced module load time by ~30% and optimized template parser. See `8ccb2d " +"</commit/8ccb2d>`_, `f72a7c </commit/f72a7c>`_ and `b14b9a " +"</commit/b14b9a>`_ for details." +msgstr "" + +#: ../../changelog.rst:103 +msgid "" +"Support for \"App Caching\" on Google App Engine. See `af93ec " +"</commit/af93ec>`_." +msgstr "" + +#: ../../changelog.rst:104 +msgid "" +"Some of the rarely used or deprecated features are now plugins that avoid " +"overhead if the feature is not used." +msgstr "" + +#: ../../changelog.rst:107 ../../changelog.rst:118 +msgid "API changes" +msgstr "" + +#: ../../changelog.rst:108 +msgid "" +"This release is mostly backward compatible, but some APIs are marked " +"deprecated now and will be removed for the next release. Most noteworthy:" +msgstr "" + +#: ../../changelog.rst:110 +msgid "" +"The ``static`` route parameter is deprecated. You can escape wild-cards with" +" a backslash." +msgstr "" + +#: ../../changelog.rst:111 +msgid "" +"Type-based output filters are deprecated. They can easily be replaced with " +"plugins." +msgstr "" + +#: ../../changelog.rst:115 +msgid "Release 0.8" +msgstr "" + +#: ../../changelog.rst:119 +msgid "These changes may break compatibility with previous versions." +msgstr "" + +#: ../../changelog.rst:121 +msgid "" +"The built-in Key/Value database is not available anymore. It is marked " +"deprecated since 0.6.4" +msgstr "" + +#: ../../changelog.rst:122 +msgid "The Route syntax and behaviour changed." +msgstr "" + +#: ../../changelog.rst:124 +msgid "" +"Regular expressions must be encapsulated with ``#``. In 0.6 all non-" +"alphanumeric characters not present in the regular expression were allowed." +msgstr "" + +#: ../../changelog.rst:125 +msgid "" +"Regular expressions not part of a route wildcard are escaped automatically. " +"You don't have to escape dots or other regular control characters anymore. " +"In 0.6 the whole URL was interpreted as a regular expression. You can use " +"anonymous wildcards (``/index:#(\\.html)?#``) to achieve a similar " +"behaviour." +msgstr "" + +#: ../../changelog.rst:127 +msgid "" +"The ``BreakTheBottle`` exception is gone. Use :class:`HTTPResponse` instead." +msgstr "" + +#: ../../changelog.rst:128 +msgid "" +"The :class:`SimpleTemplate` engine escapes HTML special characters in " +"``{{bad_html}}`` expressions automatically. Use the new ``{{!good_html}}`` " +"syntax to get old behaviour (no escaping)." +msgstr "" + +#: ../../changelog.rst:129 +msgid "" +"The :class:`SimpleTemplate` engine returns unicode strings instead of lists " +"of byte strings." +msgstr "" + +#: ../../changelog.rst:130 +msgid "" +"``bottle.optimize()`` and the automatic route optimization is obsolete." +msgstr "" + +#: ../../changelog.rst:131 +msgid "Some functions and attributes were renamed:" +msgstr "" + +#: ../../changelog.rst:133 +msgid ":attr:`Request._environ` is now :attr:`Request.environ`" +msgstr "" + +#: ../../changelog.rst:134 +msgid ":attr:`Response.header` is now :attr:`Response.headers`" +msgstr "" + +#: ../../changelog.rst:135 +msgid ":func:`default_app` is obsolete. Use :func:`app` instead." +msgstr "" + +#: ../../changelog.rst:137 +msgid "The default :func:`redirect` code changed from 307 to 303." +msgstr "" + +#: ../../changelog.rst:138 +msgid "Removed support for ``@default``. Use ``@error(404)`` instead." +msgstr "" + +#: ../../changelog.rst:142 +msgid "New features" +msgstr "" + +#: ../../changelog.rst:143 +msgid "This is an incomplete list of new features and improved functionality." +msgstr "" + +#: ../../changelog.rst:145 +msgid "" +"The :class:`Request` object got new properties: :attr:`Request.body`, " +":attr:`Request.auth`, :attr:`Request.url`, :attr:`Request.header`, " +":attr:`Request.forms`, :attr:`Request.files`." +msgstr "" + +#: ../../changelog.rst:146 +msgid "" +"The :meth:`Response.set_cookie` and :meth:`Request.get_cookie` methods are " +"now able to encode and decode python objects. This is called a *secure " +"cookie* because the encoded values are signed and protected from changes on " +"client side. All pickle-able data structures are allowed." +msgstr "" + +#: ../../changelog.rst:147 +msgid "" +"The new :class:`Router` class drastically improves performance for setups " +"with lots of dynamic routes and supports named routes (named route + dict = " +"URL string)." +msgstr "" + +#: ../../changelog.rst:148 +msgid "" +"It is now possible (and recommended) to return :exc:`HTTPError` and " +":exc:`HTTPResponse` instances or other exception objects instead of raising " +"them." +msgstr "" + +#: ../../changelog.rst:149 +msgid "" +"The new function :func:`static_file` equals :func:`send_file` but returns a " +":exc:`HTTPResponse` or :exc:`HTTPError` instead of raising it. " +":func:`send_file` is deprecated." +msgstr "" + +#: ../../changelog.rst:150 +msgid "" +"New :func:`get`, :func:`post`, :func:`put` and :func:`delete` decorators." +msgstr "" + +#: ../../changelog.rst:151 +msgid "The :class:`SimpleTemplate` engine got full unicode support." +msgstr "" + +#: ../../changelog.rst:152 +msgid "Lots of non-critical bugfixes." +msgstr "" + +#: ../../changelog.rst:158 +msgid "Contributors" +msgstr "" + +#: ../../../AUTHORS:1 +msgid "" +"Bottle is written and maintained by Marcel Hellkamp <marc@bottlepy.org>." +msgstr "" + +#: ../../../AUTHORS:3 +msgid "" +"Thanks to all the people who found bugs, sent patches, spread the word, " +"helped each other on the mailing-list and made this project possible. I hope" +" the following (alphabetically sorted) list is complete. If you miss your " +"name on that list (or want your name removed) please :doc:`tell me " +"<contact>` or add it yourself." +msgstr "" + +#: ../../../AUTHORS:5 +msgid "acasajus" +msgstr "" + +#: ../../../AUTHORS:6 +msgid "Adam R. Smith" +msgstr "" + +#: ../../../AUTHORS:7 +msgid "Alexey Borzenkov" +msgstr "" + +#: ../../../AUTHORS:8 +msgid "Alexis Daboville" +msgstr "" + +#: ../../../AUTHORS:9 +msgid "Anton I. Sipos" +msgstr "" + +#: ../../../AUTHORS:10 +msgid "Anton Kolechkin" +msgstr "" + +#: ../../../AUTHORS:11 +msgid "apexi200sx" +msgstr "" + +#: ../../../AUTHORS:12 +msgid "apheage" +msgstr "" + +#: ../../../AUTHORS:13 +msgid "BillMa" +msgstr "" + +#: ../../../AUTHORS:14 +msgid "Brad Greenlee" +msgstr "" + +#: ../../../AUTHORS:15 +msgid "Brandon Gilmore" +msgstr "" + +#: ../../../AUTHORS:16 +msgid "Branko Vukelic" +msgstr "" + +#: ../../../AUTHORS:17 +msgid "Brian Sierakowski" +msgstr "" + +#: ../../../AUTHORS:18 +msgid "Brian Wickman" +msgstr "" + +#: ../../../AUTHORS:19 +msgid "Carl Scharenberg" +msgstr "" + +#: ../../../AUTHORS:20 +msgid "Damien Degois" +msgstr "" + +#: ../../../AUTHORS:21 +msgid "David Buxton" +msgstr "" + +#: ../../../AUTHORS:22 +msgid "Duane Johnson" +msgstr "" + +#: ../../../AUTHORS:23 +msgid "fcamel" +msgstr "" + +#: ../../../AUTHORS:24 +msgid "Frank Murphy" +msgstr "" + +#: ../../../AUTHORS:25 +msgid "Frederic Junod" +msgstr "" + +#: ../../../AUTHORS:26 +msgid "goldfaber3012" +msgstr "" + +#: ../../../AUTHORS:27 +msgid "Greg Milby" +msgstr "" + +#: ../../../AUTHORS:28 +msgid "gstein" +msgstr "" + +#: ../../../AUTHORS:29 +msgid "Ian Davis" +msgstr "" + +#: ../../../AUTHORS:30 +msgid "Itamar Nabriski" +msgstr "" + +#: ../../../AUTHORS:31 +msgid "Iuri de Silvio" +msgstr "" + +#: ../../../AUTHORS:32 +msgid "Jaimie Murdock" +msgstr "" + +#: ../../../AUTHORS:33 +msgid "Jeff Nichols" +msgstr "" + +#: ../../../AUTHORS:34 +msgid "Jeremy Kelley" +msgstr "" + +#: ../../../AUTHORS:35 +msgid "joegester" +msgstr "" + +#: ../../../AUTHORS:36 +msgid "Johannes Krampf" +msgstr "" + +#: ../../../AUTHORS:37 +msgid "Jonas Haag" +msgstr "" + +#: ../../../AUTHORS:38 +msgid "Joshua Roesslein" +msgstr "" + +#: ../../../AUTHORS:39 +msgid "Judson Neer" +msgstr "" + +#: ../../../AUTHORS:40 +msgid "Karl" +msgstr "" + +#: ../../../AUTHORS:41 +msgid "Kevin Zuber" +msgstr "" + +#: ../../../AUTHORS:42 +msgid "Kraken" +msgstr "" + +#: ../../../AUTHORS:43 +msgid "Kyle Fritz" +msgstr "" + +#: ../../../AUTHORS:44 +msgid "m35" +msgstr "" + +#: ../../../AUTHORS:45 +msgid "Marcos Neves" +msgstr "" + +#: ../../../AUTHORS:46 +msgid "masklinn" +msgstr "" + +#: ../../../AUTHORS:47 +msgid "Michael Labbe" +msgstr "" + +#: ../../../AUTHORS:48 +msgid "Michael Soulier" +msgstr "" + +#: ../../../AUTHORS:49 +msgid "`reddit <http://reddit.com/r/python>`_" +msgstr "" + +#: ../../../AUTHORS:50 +msgid "Nicolas Vanhoren" +msgstr "" + +#: ../../../AUTHORS:51 +msgid "Robert Rollins" +msgstr "" + +#: ../../../AUTHORS:52 +msgid "rogererens" +msgstr "" + +#: ../../../AUTHORS:53 +msgid "rwxrwx" +msgstr "" + +#: ../../../AUTHORS:54 +msgid "Santiago Gala" +msgstr "" + +#: ../../../AUTHORS:55 +msgid "Sean M. Collins" +msgstr "" + +#: ../../../AUTHORS:56 +msgid "Sebastian Wollrath" +msgstr "" + +#: ../../../AUTHORS:57 +msgid "Seth" +msgstr "" + +#: ../../../AUTHORS:58 +msgid "Sigurd Høgsbro" +msgstr "" + +#: ../../../AUTHORS:59 +msgid "Stuart Rackham" +msgstr "" + +#: ../../../AUTHORS:60 +msgid "Sun Ning" +msgstr "" + +#: ../../../AUTHORS:61 +msgid "Tomás A. Schertel" +msgstr "" + +#: ../../../AUTHORS:62 +msgid "Tristan Zajonc" +msgstr "" + +#: ../../../AUTHORS:63 +msgid "voltron" +msgstr "" + +#: ../../../AUTHORS:64 +msgid "Wieland Hoffmann" +msgstr "" + +#: ../../../AUTHORS:65 +msgid "zombat" +msgstr "" + +#: ../../../AUTHORS:66 +msgid "Thiago Avelino" +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/configuration.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/configuration.po new file mode 100644 index 0000000..02219b7 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/configuration.po @@ -0,0 +1,221 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../configuration.rst:3 +msgid "Configuration (DRAFT)" +msgstr "" + +#: ../../configuration.rst:8 +msgid "" +"This is a draft for a new API. `Tell us <mailto:bottlepy@googlegroups.com>`_" +" what you think." +msgstr "" + +#: ../../configuration.rst:10 +msgid "" +"Bottle applications can store their configuration in :attr:`Bottle.config`, " +"a dict-like object and central place for application specific settings. This" +" dictionary controls many aspects of the framework, tells (newer) plugins " +"what to do, and can be used to store your own configuration as well." +msgstr "" + +#: ../../configuration.rst:13 +msgid "Configuration Basics" +msgstr "" + +#: ../../configuration.rst:15 +msgid "" +"The :attr:`Bottle.config` object behaves a lot like an ordinary dictionary. " +"All the common dict methods work as expected. Let us start with some " +"examples::" +msgstr "" + +#: ../../configuration.rst:44 +msgid "" +"The app object is not always available, but as long as you are within a " +"request context, you can use the `request` object to get the current " +"application and its configuration::" +msgstr "" + +#: ../../configuration.rst:51 +msgid "Naming Convention" +msgstr "" + +#: ../../configuration.rst:53 +msgid "" +"To make life easier, plugins and applications should follow some simple " +"rules when it comes to config parameter names:" +msgstr "" + +#: ../../configuration.rst:55 +msgid "" +"All keys should be lowercase strings and follow the rules for python " +"identifiers (no special characters but the underscore)." +msgstr "" + +#: ../../configuration.rst:56 +msgid "" +"Namespaces are separated by dots (e.g. ``namespace.field`` or " +"``namespace.subnamespace.field``)." +msgstr "" + +#: ../../configuration.rst:57 +msgid "" +"Bottle uses the root namespace for its own configuration. Plugins should " +"store all their variables in their own namespace (e.g. ``sqlite.db`` or " +"``werkzeug.use_debugger``)." +msgstr "" + +#: ../../configuration.rst:58 +msgid "" +"Your own application should use a separate namespace (e.g. ``myapp.*``)." +msgstr "" + +#: ../../configuration.rst:62 +msgid "Loading Configuration from a File" +msgstr "" + +#: ../../configuration.rst:66 +msgid "" +"Configuration files are useful if you want to enable non-programmers to " +"configure your application, or just don't want to hack python module files " +"just to change the database port. A very common syntax for configuration " +"files is shown here:" +msgstr "" + +#: ../../configuration.rst:78 +msgid "" +"With :meth:`ConfigDict.load_config` you can load these ``*.ini`` style " +"configuration files from disk and import their values into your existing " +"configuration::" +msgstr "" + +#: ../../configuration.rst:84 +msgid "Loading Configuration from a nested :class:`dict`" +msgstr "" + +#: ../../configuration.rst:88 +msgid "" +"Another useful method is :meth:`ConfigDict.load_dict`. This method takes an " +"entire structure of nested dictionaries and turns it into a flat list of " +"keys and values with namespaced keys::" +msgstr "" + +#: ../../configuration.rst:109 +msgid "Listening to configuration changes" +msgstr "" + +#: ../../configuration.rst:113 +msgid "" +"The ``config`` hook on the application object is triggered each time a value" +" in :attr:`Bottle.config` is changed. This hook can be used to react on " +"configuration changes at runtime, for example reconnect to a new database, " +"change the debug settings on a background service or resize worker thread " +"pools. The hook callback receives two arguments (key, new_value) and is " +"called before the value is actually changed in the dictionary. Raising an " +"exception from a hook callback cancels the change and the old value is " +"preserved." +msgstr "" + +#: ../../configuration.rst:122 +msgid "" +"The hook callbacks cannot *change* the value that is to be stored to the " +"dictionary. That is what filters are for." +msgstr "" + +#: ../../configuration.rst:128 +msgid "Filters and other Meta Data" +msgstr "" + +#: ../../configuration.rst:132 +msgid "" +":class:`ConfigDict` allows you to store meta data along with configuration " +"keys. Two meta fields are currently defined:" +msgstr "" + +#: ../../configuration.rst:136 +msgid "help" +msgstr "" + +#: ../../configuration.rst:135 +msgid "" +"A help or description string. May be used by debugging, introspection or " +"admin tools to help the site maintainer configuring their application." +msgstr "" + +#: ../../configuration.rst:139 +msgid "filter" +msgstr "" + +#: ../../configuration.rst:139 +msgid "" +"A callable that accepts and returns a single value. If a filter is defined " +"for a key, any new value stored to that key is first passed through the " +"filter callback. The filter can be used to cast the value to a different " +"type, check for invalid values (throw a ValueError) or trigger side effects." +msgstr "" + +#: ../../configuration.rst:141 +msgid "" +"This feature is most useful for plugins. They can validate their config " +"parameters or trigger side effects using filters and document their " +"configuration via ``help`` fields::" +msgstr "" + +#: ../../configuration.rst:163 +msgid "API Documentation" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ConfigDict:1 +msgid "" +"A dict-like configuration storage with additional support for namespaces, " +"validators, meta-data, on_change listeners and more." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:1 +msgid "Load values from an ``*.ini`` style config file." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:3 +msgid "" +"If the config file contains sections, their names are used as namespaces for" +" the values within. The two special sections ``DEFAULT`` and ``bottle`` " +"refer to the root namespace (no prefix)." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ConfigDict.load_dict:1 +msgid "" +"Load values from a dictionary structure. Nesting can be used to represent " +"namespaces." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ConfigDict.update:1 +msgid "" +"If the first parameter is a string, all keys are prefixed with this " +"namespace. Apart from that it works just as the usual dict.update(). " +"Example: ``update('some.namespace', key='value')``" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_get:1 +msgid "Return the value of a meta field for a key." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_set:1 +msgid "" +"Set the meta field for a key to a new value. This triggers the on-change " +"handler for existing keys." +msgstr "" + +#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_list:1 +msgid "Return an iterable of meta field names defined for a key." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/contact.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/contact.po new file mode 100644 index 0000000..9357101 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/contact.po @@ -0,0 +1,81 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../contact.rst:3 +msgid "Contact" +msgstr "" + +#: ../../contact.rst:6 +msgid "About the Autor" +msgstr "" + +#: ../../contact.rst:7 +msgid "" +"Hi, I'm *Marcel Hellkamp* (aka *defnull*), author of Bottle and the guy " +"behind this website. I'm 27 years old and studying computer science at the " +"Georg-August-University in Göttingen, Germany. Python is my favorite " +"language, but I also code in ruby and JavaScript a lot. Watch me on `twitter" +" <http://twitter.com/bottlepy>`_ or visit my profile at `GitHub " +"<http://github.com/defnull>`_ to get in contact. A `mailinglist " +"<http://groups.google.de/group/bottlepy>`_ is open for Bottle related " +"questions, too." +msgstr "" + +#: ../../contact.rst:10 +msgid "About Bottle" +msgstr "" + +#: ../../contact.rst:11 +msgid "" +"This is my first open source project so far. It started and a small " +"experiment but soon got so much positive feedback I decided to make " +"something real out of it. Here it is." +msgstr "" + +#: ../../contact.rst:14 +msgid "Impressum und Kontaktdaten" +msgstr "" + +#: ../../contact.rst:15 +msgid "" +"(This is required by `German law " +"<http://bundesrecht.juris.de/tmg/__5.html>`_)" +msgstr "" + +#: ../../contact.rst:17 +msgid "" +"Die Nutzung der folgenden Kontaktdaten ist ausschließlich für die " +"Kontaktaufnahme mit dem Betreiber dieser Webseite bei rechtlichen Problemen " +"vorgesehen. Insbesondere die Nutzung zu Werbe- oder ähnlichen Zwecken ist " +"ausdrücklich untersagt." +msgstr "" + +#: ../../contact.rst:22 +msgid "**Betreiber**: Marcel Hellkamp" +msgstr "" + +#: ../../contact.rst:23 +msgid "**Ort**: D - 37075 Göttingen" +msgstr "" + +#: ../../contact.rst:24 +msgid "**Strasse**: Theodor-Heuss Strasse 13" +msgstr "" + +#: ../../contact.rst:25 +msgid "**Telefon**: +49 (0) 551 20005915" +msgstr "" + +#: ../../contact.rst:26 +msgid "**E-Mail**: marc at gsites dot de" +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/deployment.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/deployment.po new file mode 100644 index 0000000..18dce7d --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/deployment.po @@ -0,0 +1,445 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../deployment.rst:27 +msgid "Deployment" +msgstr "" + +#: ../../deployment.rst:29 +msgid "" +"The bottle :func:`run` function, when called without any parameters, starts " +"a local development server on port 8080. You can access and test your " +"application via http://localhost:8080/ if you are on the same host." +msgstr "" + +#: ../../deployment.rst:31 +msgid "" +"To get your application available to the outside world, specify the IP of " +"the interface the server should listen to (e.g. ``run(host='192.168.0.1')``)" +" or let the server listen to all interfaces at once (e.g. " +"``run(host='0.0.0.0')``). The listening port can be changed in a similar " +"way, but you need root or admin rights to choose a port below 1024. Port 80 " +"is the standard for HTTP servers::" +msgstr "" + +#: ../../deployment.rst:36 +msgid "Server Options" +msgstr "" + +#: ../../deployment.rst:38 +msgid "" +"The built-in default server is based on `wsgiref WSGIServer " +"<http://docs.python.org/library/wsgiref.html#module-" +"wsgiref.simple_server>`_. This non-threading HTTP server is perfectly fine " +"for development and early production, but may become a performance " +"bottleneck when server load increases. There are three ways to eliminate " +"this bottleneck:" +msgstr "" + +#: ../../deployment.rst:40 +msgid "Use a different server that is either multi-threaded or asynchronous." +msgstr "" + +#: ../../deployment.rst:41 +msgid "" +"Start multiple server processes and spread the load with a load-balancer." +msgstr "" + +#: ../../deployment.rst:42 +msgid "Do both." +msgstr "" + +#: ../../deployment.rst:44 +msgid "" +"**Multi-threaded** servers are the 'classic' way to do it. They are very " +"robust, reasonably fast and easy to manage. As a drawback, they can only " +"handle a limited number of connections at the same time and utilize only one" +" CPU core due to the \"Global Interpreter Lock\" (GIL) of the Python " +"runtime. This does not hurt most applications, they are waiting for network " +"IO most of the time anyway, but may slow down CPU intensive tasks (e.g. " +"image processing)." +msgstr "" + +#: ../../deployment.rst:46 +msgid "" +"**Asynchronous** servers are very fast, can handle a virtually unlimited " +"number of concurrent connections and are easy to manage. To take full " +"advantage of their potential, you need to design your application " +"accordingly and understand the concepts of the specific server." +msgstr "" + +#: ../../deployment.rst:48 +msgid "" +"**Multi-processing** (forking) servers are not limited by the GIL and " +"utilize more than one CPU core, but make communication between server " +"instances more expensive. You need a database or external message query to " +"share state between processes, or design your application so that it does " +"not need any shared state. The setup is also a bit more complicated, but " +"there are good tutorials available." +msgstr "" + +#: ../../deployment.rst:51 +msgid "Switching the Server Backend" +msgstr "" + +#: ../../deployment.rst:53 +msgid "" +"The easiest way to increase performance is to install a multi-threaded " +"server library like paste_ or cherrypy_ and tell Bottle to use that instead " +"of the single-threaded default server::" +msgstr "" + +#: ../../deployment.rst:57 +msgid "" +"Bottle ships with a lot of ready-to-use adapters for the most common WSGI " +"servers and automates the setup process. Here is an incomplete list:" +msgstr "" + +#: ../../deployment.rst:60 +msgid "Name" +msgstr "" + +#: ../../deployment.rst:60 +msgid "Homepage" +msgstr "" + +#: ../../deployment.rst:60 +msgid "Description" +msgstr "" + +#: ../../deployment.rst:62 +msgid "cgi" +msgstr "" + +#: ../../deployment.rst:62 +msgid "Run as CGI script" +msgstr "" + +#: ../../deployment.rst:63 +msgid "flup" +msgstr "" + +#: ../../deployment.rst:63 +msgid "flup_" +msgstr "" + +#: ../../deployment.rst:63 +msgid "Run as FastCGI process" +msgstr "" + +#: ../../deployment.rst:64 +msgid "gae" +msgstr "" + +#: ../../deployment.rst:64 +msgid "gae_" +msgstr "" + +#: ../../deployment.rst:64 +msgid "Helper for Google App Engine deployments" +msgstr "" + +#: ../../deployment.rst:65 +msgid "wsgiref" +msgstr "" + +#: ../../deployment.rst:65 +msgid "wsgiref_" +msgstr "" + +#: ../../deployment.rst:65 +msgid "Single-threaded default server" +msgstr "" + +#: ../../deployment.rst:66 +msgid "cherrypy" +msgstr "" + +#: ../../deployment.rst:66 +msgid "cherrypy_" +msgstr "" + +#: ../../deployment.rst:66 +msgid "Multi-threaded and very stable" +msgstr "" + +#: ../../deployment.rst:67 +msgid "paste" +msgstr "" + +#: ../../deployment.rst:67 +msgid "paste_" +msgstr "" + +#: ../../deployment.rst:67 +msgid "Multi-threaded, stable, tried and tested" +msgstr "" + +#: ../../deployment.rst:68 +msgid "rocket" +msgstr "" + +#: ../../deployment.rst:68 +msgid "rocket_" +msgstr "" + +#: ../../deployment.rst:68 +msgid "Multi-threaded" +msgstr "" + +#: ../../deployment.rst:69 +msgid "waitress" +msgstr "" + +#: ../../deployment.rst:69 +msgid "waitress_" +msgstr "" + +#: ../../deployment.rst:69 +msgid "Multi-threaded, poweres Pyramid" +msgstr "" + +#: ../../deployment.rst:70 +msgid "gunicorn" +msgstr "" + +#: ../../deployment.rst:70 +msgid "gunicorn_" +msgstr "" + +#: ../../deployment.rst:70 +msgid "Pre-forked, partly written in C" +msgstr "" + +#: ../../deployment.rst:71 +msgid "eventlet" +msgstr "" + +#: ../../deployment.rst:71 +msgid "eventlet_" +msgstr "" + +#: ../../deployment.rst:71 +msgid "Asynchronous framework with WSGI support." +msgstr "" + +#: ../../deployment.rst:72 +msgid "gevent" +msgstr "" + +#: ../../deployment.rst:72 +msgid "gevent_" +msgstr "" + +#: ../../deployment.rst:72 ../../deployment.rst:73 +msgid "Asynchronous (greenlets)" +msgstr "" + +#: ../../deployment.rst:73 +msgid "diesel" +msgstr "" + +#: ../../deployment.rst:73 +msgid "diesel_" +msgstr "" + +#: ../../deployment.rst:74 +msgid "fapws3" +msgstr "" + +#: ../../deployment.rst:74 +msgid "fapws3_" +msgstr "" + +#: ../../deployment.rst:74 +msgid "Asynchronous (network side only), written in C" +msgstr "" + +#: ../../deployment.rst:75 +msgid "tornado" +msgstr "" + +#: ../../deployment.rst:75 +msgid "tornado_" +msgstr "" + +#: ../../deployment.rst:75 +msgid "Asynchronous, powers some parts of Facebook" +msgstr "" + +#: ../../deployment.rst:76 +msgid "twisted" +msgstr "" + +#: ../../deployment.rst:76 +msgid "twisted_" +msgstr "" + +#: ../../deployment.rst:76 +msgid "Asynchronous, well tested but... twisted" +msgstr "" + +#: ../../deployment.rst:77 +msgid "meinheld" +msgstr "" + +#: ../../deployment.rst:77 +msgid "meinheld_" +msgstr "" + +#: ../../deployment.rst:77 +msgid "Asynchronous, partly written in C" +msgstr "" + +#: ../../deployment.rst:78 +msgid "bjoern" +msgstr "" + +#: ../../deployment.rst:78 +msgid "bjoern_" +msgstr "" + +#: ../../deployment.rst:78 +msgid "Asynchronous, very fast and written in C" +msgstr "" + +#: ../../deployment.rst:79 +msgid "auto" +msgstr "" + +#: ../../deployment.rst:79 +msgid "Automatically selects an available server adapter" +msgstr "" + +#: ../../deployment.rst:82 +msgid "The full list is available through :data:`server_names`." +msgstr "" + +#: ../../deployment.rst:84 +msgid "" +"If there is no adapter for your favorite server or if you need more control " +"over the server setup, you may want to start the server manually. Refer to " +"the server documentation on how to run WSGI applications. Here is an example" +" for paste_::" +msgstr "" + +#: ../../deployment.rst:93 +msgid "Apache mod_wsgi" +msgstr "" + +#: ../../deployment.rst:95 +msgid "" +"Instead of running your own HTTP server from within Bottle, you can attach " +"Bottle applications to an `Apache server <apache>`_ using mod_wsgi_." +msgstr "" + +#: ../../deployment.rst:97 +msgid "" +"All you need is an ``app.wsgi`` file that provides an ``application`` " +"object. This object is used by mod_wsgi to start your application and should" +" be a WSGI-compatible Python callable." +msgstr "" + +#: ../../deployment.rst:99 +msgid "File ``/var/www/yourapp/app.wsgi``::" +msgstr "" + +#: ../../deployment.rst:109 +msgid "The Apache configuration may look like this::" +msgstr "" + +#: ../../deployment.rst:128 +msgid "Google AppEngine" +msgstr "" + +#: ../../deployment.rst:132 +msgid "" +"New App Engine applications using the Python 2.7 runtime environment support" +" any WSGI application and should be configured to use the Bottle application" +" object directly. For example suppose your application's main module is " +"``myapp.py``::" +msgstr "" + +#: ../../deployment.rst:142 +msgid "" +"Then you can configure App Engine's ``app.yaml`` to use the ``app`` object " +"like so::" +msgstr "" + +#: ../../deployment.rst:153 +msgid "" +"Bottle also provides a ``gae`` server adapter for legacy App Engine " +"applications using the Python 2.5 runtime environment. It works similar to " +"the ``cgi`` adapter in that it does not start a new HTTP server, but " +"prepares and optimizes your application for Google App Engine and makes sure" +" it conforms to their API::" +msgstr "" + +#: ../../deployment.rst:157 +msgid "" +"It is always a good idea to let GAE serve static files directly. Here is " +"example for a working ``app.yaml`` (using the legacy Python 2.5 runtime " +"environment)::" +msgstr "" + +#: ../../deployment.rst:173 +msgid "Load Balancer (Manual Setup)" +msgstr "" + +#: ../../deployment.rst:175 +msgid "" +"A single Python process can utilize only one CPU at a time, even if there " +"are more CPU cores available. The trick is to balance the load between " +"multiple independent Python processes to utilize all of your CPU cores." +msgstr "" + +#: ../../deployment.rst:177 +msgid "" +"Instead of a single Bottle application server, you start one instance for " +"each CPU core available using different local port (localhost:8080, 8081, " +"8082, ...). You can choose any server adapter you want, even asynchronous " +"ones. Then a high performance load balancer acts as a reverse proxy and " +"forwards each new requests to a random port, spreading the load between all " +"available back-ends. This way you can use all of your CPU cores and even " +"spread out the load between different physical servers." +msgstr "" + +#: ../../deployment.rst:179 +msgid "" +"One of the fastest load balancers available is Pound_ but most common web " +"servers have a proxy-module that can do the work just fine." +msgstr "" + +#: ../../deployment.rst:181 +msgid "Pound example::" +msgstr "" + +#: ../../deployment.rst:199 +msgid "Apache example::" +msgstr "" + +#: ../../deployment.rst:207 +msgid "Lighttpd example::" +msgstr "" + +#: ../../deployment.rst:219 +msgid "Good old CGI" +msgstr "" + +#: ../../deployment.rst:221 +msgid "" +"A CGI server starts a new process for each request. This adds a lot of " +"overhead but is sometimes the only option, especially on cheap hosting " +"packages. The `cgi` server adapter does not actually start a CGI server, but" +" transforms your bottle application into a valid CGI application::" +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/development.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/development.po new file mode 100644 index 0000000..8da5f66 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/development.po @@ -0,0 +1,434 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../development.rst:2 +msgid "Developer Notes" +msgstr "" + +#: ../../development.rst:4 +msgid "" +"This document is intended for developers and package maintainers interested " +"in the bottle development and release workflow. If you want to contribute, " +"you are just right!" +msgstr "" + +#: ../../development.rst:8 +msgid "Get involved" +msgstr "" + +#: ../../development.rst:10 +msgid "" +"There are several ways to join the community and stay up to date. Here are " +"some of them:" +msgstr "" + +#: ../../development.rst:12 +msgid "" +"**Mailing list**: Join our mailing list by sending an email to " +"`bottlepy+subscribe@googlegroups.com " +"<mailto:bottlepy+subscribe@googlegroups.com>`_ (no google account required)." +msgstr "" + +#: ../../development.rst:13 +msgid "" +"**Twitter**: `Follow us on Twitter <https://twitter.com/bottlepy>`_ or " +"search for the `#bottlepy <https://twitter.com/#!/search/%23bottlepy>`_ tag." +msgstr "" + +#: ../../development.rst:14 +msgid "" +"**IRC**: Join `#bottlepy on irc.freenode.net " +"<irc://irc.freenode.net/bottlepy>`_ or use the `web chat interface " +"<http://webchat.freenode.net/?channels=bottlepy>`_." +msgstr "" + +#: ../../development.rst:15 +msgid "" +"**Google plus**: We sometimes `blog about Bottle, releases and technical " +"stuff " +"<https://plus.google.com/b/104025895326575643538/104025895326575643538/posts>`_" +" on our Google+ page." +msgstr "" + +#: ../../development.rst:19 +msgid "Get the Sources" +msgstr "" + +#: ../../development.rst:21 +msgid "" +"The bottle `development repository <https://github.com/bottlepy/bottle>`_ " +"and the `issue tracker <https://github.com/bottlepy/bottle/issues>`_ are " +"both hosted at `github <https://github.com/bottlepy/bottle>`_. If you plan " +"to contribute, it is a good idea to create an account there and fork the " +"main repository. This way your changes and ideas are visible to other " +"developers and can be discussed openly. Even without an account, you can " +"clone the repository or just download the latest development version as a " +"source archive." +msgstr "" + +#: ../../development.rst:23 +msgid "**git:** ``git clone git://github.com/bottlepy/bottle.git``" +msgstr "" + +#: ../../development.rst:24 +msgid "**git/https:** ``git clone https://github.com/bottlepy/bottle.git``" +msgstr "" + +#: ../../development.rst:25 +msgid "" +"**Download:** Development branch as `tar archive " +"<http://github.com/bottlepy/bottle/tarball/master>`_ or `zip file " +"<http://github.com/bottlepy/bottle/zipball/master>`_." +msgstr "" + +#: ../../development.rst:29 +msgid "Releases and Updates" +msgstr "" + +#: ../../development.rst:31 +msgid "" +"Bottle is released at irregular intervals and distributed through `PyPI " +"<http://pypi.python.org/pypi/bottle>`_. Release candidates and bugfix-" +"revisions of outdated releases are only available from the git repository " +"mentioned above. Some Linux distributions may offer packages for outdated " +"releases, though." +msgstr "" + +#: ../../development.rst:33 +msgid "" +"The Bottle version number splits into three parts " +"(**major.minor.revision**). These are *not* used to promote new features but" +" to indicate important bug-fixes and/or API changes. Critical bugs are fixed" +" in at least the two latest minor releases and announced in all available " +"channels (mailinglist, twitter, github). Non-critical bugs or features are " +"not guaranteed to be backported. This may change in the future, through." +msgstr "" + +#: ../../development.rst:36 +msgid "Major Release (x.0)" +msgstr "" + +#: ../../development.rst:36 +msgid "" +"The major release number is increased on important milestones or updates " +"that completely break backward compatibility. You probably have to work over" +" your entire application to use a new release. These releases are very rare," +" through." +msgstr "" + +#: ../../development.rst:39 +msgid "Minor Release (x.y)" +msgstr "" + +#: ../../development.rst:39 +msgid "" +"The minor release number is increased on updates that change the API or " +"behaviour in some way. You might get some depreciation warnings any may have" +" to tweak some configuration settings to restore the old behaviour, but in " +"most cases these changes are designed to be backward compatible for at least" +" one minor release. You should update to stay up do date, but don't have to." +" An exception is 0.8, which *will* break backward compatibility hard. (This " +"is why 0.7 was skipped). Sorry about that." +msgstr "" + +#: ../../development.rst:42 +msgid "Revision (x.y.z)" +msgstr "" + +#: ../../development.rst:42 +msgid "" +"The revision number is increased on bug-fixes and other patches that do not " +"change the API or behaviour. You can safely update without editing your " +"application code. In fact, you really should as soon as possible, because " +"important security fixes are released this way." +msgstr "" + +#: ../../development.rst:46 +msgid "Pre-Release Versions" +msgstr "" + +#: ../../development.rst:45 +msgid "" +"Release candidates are marked by an ``rc`` in their revision number. These " +"are API stable most of the time and open for testing, but not officially " +"released yet. You should not use these for production." +msgstr "" + +#: ../../development.rst:49 +msgid "Repository Structure" +msgstr "" + +#: ../../development.rst:51 +msgid "The source repository is structured as follows:" +msgstr "" + +#: ../../development.rst:54 +msgid "``master`` branch" +msgstr "" + +#: ../../development.rst:54 +msgid "" +"This is the integration, testing and development branch. All changes that " +"are planned to be part of the next release are merged and tested here." +msgstr "" + +#: ../../development.rst:57 +msgid "``release-x.y`` branches" +msgstr "" + +#: ../../development.rst:57 +msgid "" +"As soon as the master branch is (almost) ready for a new release, it is " +"branched into a new release branch. This \"release candidate\" is feature-" +"frozen but may receive bug-fixes and last-minute changes until it is " +"considered production ready and officially released. From that point on it " +"is called a \"support branch\" and still receives bug-fixes, but only " +"important ones. The revision number is increased on each push to these " +"branches, so you can keep up with important changes." +msgstr "" + +#: ../../development.rst:60 +msgid "``bugfix_name-x.y`` branches" +msgstr "" + +#: ../../development.rst:60 +msgid "" +"These branches are only temporary and used to develop and share non-trivial " +"bug-fixes for existing releases. They are merged into the corresponding " +"release branch and deleted soon after that." +msgstr "" + +#: ../../development.rst:64 +msgid "Feature branches" +msgstr "" + +#: ../../development.rst:63 +msgid "" +"All other branches are feature branches. These are based on the master " +"branch and only live as long as they are still active and not merged back " +"into ``master``." +msgstr "" + +#: ../../development.rst:67 +msgid "What does this mean for a developer?" +msgstr "" + +#: ../../development.rst:68 +msgid "" +"If you want to add a feature, create a new branch from ``master``. If you " +"want to fix a bug, branch ``release-x.y`` for each affected release. Please " +"use a separate branch for each feature or bug to make integration as easy as" +" possible. Thats all. There are git workflow examples at the bottom of this " +"page." +msgstr "" + +#: ../../development.rst:70 +msgid "" +"Oh, and never ever change the release number. We'll do that on integration. " +"You never know in which order we pull pending requests anyway :)" +msgstr "" + +#: ../../development.rst:74 +msgid "What does this mean for a maintainer ?" +msgstr "" + +#: ../../development.rst:75 +msgid "" +"Watch the tags (and the mailing list) for bug-fixes and new releases. If you" +" want to fetch a specific release from the git repository, trust the tags, " +"not the branches. A branch may contain changes that are not released yet, " +"but a tag marks the exact commit which changed the version number." +msgstr "" + +#: ../../development.rst:79 +msgid "Submitting Patches" +msgstr "" + +#: ../../development.rst:81 +msgid "" +"The best way to get your changes integrated into the main development branch" +" is to fork the main repository at github, create a new feature-branch, " +"apply your changes and send a pull-request. Further down this page is a " +"small collection of git workflow examples that may guide you. Submitting " +"git-compatible patches to the mailing list is fine too. In any case, please " +"follow some basic rules:" +msgstr "" + +#: ../../development.rst:83 +msgid "" +"**Documentation:** Tell us what your patch does. Comment your code. If you " +"introduced a new feature, add to the documentation so others can learn about" +" it." +msgstr "" + +#: ../../development.rst:84 +msgid "" +"**Test:** Write tests to prove that your code works as expected and does not" +" break anything. If you fixed a bug, write at least one test-case that " +"triggers the bug. Make sure that all tests pass before you submit a patch." +msgstr "" + +#: ../../development.rst:85 +msgid "" +"**One patch at a time:** Only fix one bug or add one feature at a time. " +"Design your patches so that they can be applyed as a whole. Keep your " +"patches clean, small and focused." +msgstr "" + +#: ../../development.rst:86 +msgid "" +"**Sync with upstream:** If the ``upstream/master`` branch changed while you " +"were working on your patch, rebase or pull to make sure that your patch " +"still applies without conflicts." +msgstr "" + +#: ../../development.rst:90 +msgid "Building the Documentation" +msgstr "" + +#: ../../development.rst:92 +msgid "" +"You need a recent version of Sphinx to build the documentation. The " +"recommended way is to install :command:`virtualenv` using your distribution " +"package repository and install sphinx manually to get an up-to-date version." +msgstr "" + +#: ../../development.rst:123 +msgid "GIT Workflow Examples" +msgstr "" + +#: ../../development.rst:125 +msgid "" +"The following examples assume that you have an (free) `github account " +"<https://github.com>`_. This is not mandatory, but makes things a lot " +"easier." +msgstr "" + +#: ../../development.rst:127 +msgid "" +"First of all you need to create a fork (a personal clone) of the official " +"repository. To do this, you simply click the \"fork\" button on the `bottle " +"project page <https://github.com/bottlepy/bottle>`_. When the fork is done, " +"you will be presented with a short introduction to your new repository." +msgstr "" + +#: ../../development.rst:129 +msgid "" +"The fork you just created is hosted at github and read-able by everyone, but" +" write-able only by you. Now you need to clone the fork locally to actually " +"make changes to it. Make sure you use the private (read-write) URL and *not*" +" the public (read-only) one::" +msgstr "" + +#: ../../development.rst:133 +msgid "" +"Once the clone is complete your repository will have a remote named " +"\"origin\" that points to your fork on github. Don’t let the name confuse " +"you, this does not point to the original bottle repository, but to your own " +"fork. To keep track of the official repository, add another remote named " +"\"upstream\"::" +msgstr "" + +#: ../../development.rst:139 +msgid "" +"Note that \"upstream\" is a public clone URL, which is read-only. You cannot" +" push changes directly to it. Instead, we will pull from your public " +"repository. This is described later." +msgstr "" + +#: ../../development.rst:142 +msgid "Submit a Feature" +msgstr "" + +#: ../../development.rst:143 +msgid "" +"New features are developed in separate feature-branches to make integration " +"easy. Because they are going to be integrated into the ``master`` branch, " +"they must be based on ``upstream/master``. To create a new feature-branch, " +"type the following::" +msgstr "" + +#: ../../development.rst:147 +msgid "" +"Now implement your feature, write tests, update the documentation, make sure" +" that all tests pass and commit your changes::" +msgstr "" + +#: ../../development.rst:151 +msgid "" +"If the ``upstream/master`` branch changed in the meantime, there may be " +"conflicts with your changes. To solve these, 'rebase' your feature-branch " +"onto the top of the updated ``upstream/master`` branch::" +msgstr "" + +#: ../../development.rst:156 +msgid "" +"This is equivalent to undoing all your changes, updating your branch to the " +"latest version and reapplying all your patches again. If you released your " +"branch already (see next step), this is not an option because it rewrites " +"your history. You can do a normal pull instead. Resolve any conflicts, run " +"the tests again and commit." +msgstr "" + +#: ../../development.rst:158 +msgid "" +"Now you are almost ready to send a pull request. But first you need to make " +"your feature-branch public by pushing it to your github fork::" +msgstr "" + +#: ../../development.rst:162 +msgid "" +"After you’ve pushed your commit(s) you need to inform us about the new " +"feature. One way is to send a pull-request using github. Another way would " +"be to start a thread in the mailing-list, which is recommended. It allows " +"other developers to see and discuss your patches and you get some feedback " +"for free :)" +msgstr "" + +#: ../../development.rst:164 +msgid "" +"If we accept your patch, we will integrate it into the official development " +"branch and make it part of the next release." +msgstr "" + +#: ../../development.rst:167 +msgid "Fix a Bug" +msgstr "" + +#: ../../development.rst:168 +msgid "" +"The workflow for bug-fixes is very similar to the one for features, but " +"there are some differences:" +msgstr "" + +#: ../../development.rst:170 +msgid "" +"Branch off of the affected release branches instead of just the development " +"branch." +msgstr "" + +#: ../../development.rst:171 +msgid "Write at least one test-case that triggers the bug." +msgstr "" + +#: ../../development.rst:172 +msgid "" +"Do this for each affected branch including ``upstream/master`` if it is " +"affected. ``git cherry-pick`` may help you reducing repetitive work." +msgstr "" + +#: ../../development.rst:173 +msgid "" +"Name your branch after the release it is based on to avoid confusion. " +"Examples: ``my_bugfix-x.y`` or ``my_bugfix-dev``." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/faq.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/faq.po new file mode 100644 index 0000000..b4b3c82 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/faq.po @@ -0,0 +1,83 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../faq.rst:10 +msgid "Frequently Asked Questions" +msgstr "" + +#: ../../faq.rst:13 +msgid "About Bottle" +msgstr "" + +#: ../../faq.rst:16 +msgid "Is bottle suitable for complex applications?" +msgstr "" + +#: ../../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 "" + +#: ../../faq.rst:22 +msgid "Common Problems and Pitfalls" +msgstr "" + +#: ../../faq.rst:29 +msgid "\"Template Not Found\" in mod_wsgi/mod_python" +msgstr "" + +#: ../../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 "" + +#: ../../faq.rst:35 +msgid "so bottle searches the right paths." +msgstr "" + +#: ../../faq.rst:38 +msgid "Dynamic Routes and Slashes" +msgstr "" + +#: ../../faq.rst:40 +msgid "" +"In :ref:`dynamic route syntax <tutorial-dynamic-routes>`, a placeholder " +"token (``:name``) 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/:filepath#.*#`` would match ``/images/icons/error.png`` but " +"``/images/:filename`` 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 "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/index.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/index.po new file mode 100644 index 0000000..dcfec60 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/index.po @@ -0,0 +1,123 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../index.rst:21 +msgid "Bottle: Python Web Framework" +msgstr "" + +#: ../../index.rst:23 +msgid "" +"Bottle is a fast, simple and lightweight WSGI_ micro web-framework for " +"Python_. It is distributed as a single file module and has no dependencies " +"other than the `Python Standard Library <http://docs.python.org/library/>`_." +msgstr "" + +#: ../../index.rst:26 +msgid "" +"**Routing:** Requests to function-call mapping with support for clean and " +"dynamic URLs." +msgstr "" + +#: ../../index.rst:27 +msgid "" +"**Templates:** Fast and pythonic :ref:`built-in template engine <tutorial-" +"templates>` and support for mako_, jinja2_ and cheetah_ templates." +msgstr "" + +#: ../../index.rst:28 +msgid "" +"**Utilities:** Convenient access to form data, file uploads, cookies, " +"headers and other HTTP-related metadata." +msgstr "" + +#: ../../index.rst:29 +msgid "" +"**Server:** Built-in HTTP development server and support for paste_, " +"fapws3_, bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server." +msgstr "" + +#: ../../index.rst:32 +msgid "Example: \"Hello World\" in a bottle" +msgstr "" + +#: ../../index.rst:43 +msgid "" +"Run this script or paste it into a Python console, then point your browser " +"to `<http://localhost:8080/hello/world>`_. That's it." +msgstr "" + +#: ../../index.rst:46 +msgid "Download and Install" +msgstr "" + +#: ../../index.rst:49 +msgid "" +"Install the latest stable release with ``pip install bottle``, " +"``easy_install -U bottle`` or download `bottle.py`__ (unstable) into your " +"project directory. There are no hard [1]_ dependencies other than the Python" +" standard library. Bottle runs with **Python 2.5+ and 3.x**." +msgstr "" + +#: ../../index.rst:52 +msgid "User's Guide" +msgstr "" + +#: ../../index.rst:53 +msgid "" +"Start here if you want to learn how to use the bottle framework for web " +"development. If you have any questions not answered here, feel free to ask " +"the `mailing list <mailto:bottlepy@googlegroups.com>`_." +msgstr "" + +#: ../../index.rst:68 +msgid "Knowledge Base" +msgstr "" + +#: ../../index.rst:69 +msgid "A collection of articles, guides and HOWTOs." +msgstr "" + +#: ../../index.rst:81 +msgid "Development and Contribution" +msgstr "" + +#: ../../index.rst:83 +msgid "" +"These chapters are intended for developers interested in the bottle " +"development and release workflow." +msgstr "" + +#: ../../index.rst:100 +msgid "License" +msgstr "" + +#: ../../index.rst:102 +msgid "Code and documentation are available according to the MIT License:" +msgstr "" + +#: ../../index.rst:107 +msgid "" +"The Bottle logo however is *NOT* covered by that license. It is allowed to " +"use the logo as a link to the bottle homepage or in direct context with the " +"unmodified library. In all other cases please ask first." +msgstr "" + +#: ../../index.rst:112 +msgid "Footnotes" +msgstr "" + +#: ../../index.rst:113 +msgid "" +"Usage of the template or server adapter classes of course requires the " +"corresponding template or server modules." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/plugindev.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/plugindev.po new file mode 100644 index 0000000..914a742 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/plugindev.po @@ -0,0 +1,390 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../plugindev.rst:6 +msgid "Plugin Development Guide" +msgstr "" + +#: ../../plugindev.rst:8 +msgid "" +"This guide explains the plugin API and how to write custom plugins. I " +"suggest reading :ref:`plugins` first if you have not done that already. You " +"might also want to have a look at the :doc:`/plugins/index` for some " +"practical examples." +msgstr "" + +#: ../../plugindev.rst:12 +msgid "" +"This is a draft. If you see any errors or find that a specific part is not " +"explained clear enough, please tell the `mailing-list " +"<mailto:bottlepy@googlegroups.com>`_ or file a `bug report " +"<https://github.com/bottlepy/bottle/issues>`_." +msgstr "" + +#: ../../plugindev.rst:16 +msgid "How Plugins Work: The Basics" +msgstr "" + +#: ../../plugindev.rst:18 +msgid "" +"The plugin API builds on the concept of `decorators " +"<http://docs.python.org/glossary.html#term-decorator>`_. To put it briefly, " +"a plugin is a decorator applied to every single route callback of an " +"application." +msgstr "" + +#: ../../plugindev.rst:20 +msgid "" +"Of course, this is just a simplification. Plugins can do a lot more than " +"just decorating route callbacks, but it is a good starting point. Lets have " +"a look at some code::" +msgstr "" + +#: ../../plugindev.rst:36 +msgid "" +"This plugin measures the execution time for each request and adds an " +"appropriate ``X-Exec-Time`` header to the response. As you can see, the " +"plugin returns a wrapper and the wrapper calls the original callback " +"recursively. This is how decorators usually work." +msgstr "" + +#: ../../plugindev.rst:38 +msgid "" +"The last line tells Bottle to install the plugin to the default application." +" This causes the plugin to be automatically applied to all routes of that " +"application. In other words, ``stopwatch()`` is called once for each route " +"callback and the return value is used as a replacement for the original " +"callback." +msgstr "" + +#: ../../plugindev.rst:40 +msgid "" +"Plugins are applied on demand, that is, as soon as a route is requested for " +"the first time. For this to work properly in multi-threaded environments, " +"the plugin should be thread-safe. This is not a problem most of the time, " +"but keep it in mind." +msgstr "" + +#: ../../plugindev.rst:42 +msgid "" +"Once all plugins are applied to a route, the wrapped callback is cached and " +"subsequent requests are handled by the cached version directly. This means " +"that a plugin is usually applied only once to a specific route. That cache, " +"however, is cleared every time the list of installed plugins changes. Your " +"plugin should be able to decorate the same route more than once." +msgstr "" + +#: ../../plugindev.rst:44 +msgid "" +"The decorator API is quite limited, though. You don't know anything about " +"the route being decorated or the associated application object and have no " +"way to efficiently store data that is shared among all routes. But fear not!" +" Plugins are not limited to just decorator functions. Bottle accepts " +"anything as a plugin as long as it is callable or implements an extended " +"API. This API is described below and gives you a lot of control over the " +"whole process." +msgstr "" + +#: ../../plugindev.rst:48 +msgid "Plugin API" +msgstr "" + +#: ../../plugindev.rst:50 +msgid "" +":class:`Plugin` is not a real class (you cannot import it from " +":mod:`bottle`) but an interface that plugins are expected to implement. " +"Bottle accepts any object of any type as a plugin, as long as it conforms to" +" the following API." +msgstr "" + +#: ../../plugindev.rst:54 +msgid "" +"Plugins must be callable or implement :meth:`apply`. If :meth:`apply` is " +"defined, it is always preferred over calling the plugin directly. All other " +"methods and attributes are optional." +msgstr "" + +#: ../../plugindev.rst:58 +msgid "" +"Both :meth:`Bottle.uninstall` and the `skip` parameter of " +":meth:`Bottle.route()` accept a name string to refer to a plugin or plugin " +"type. This works only for plugins that have a name attribute." +msgstr "" + +#: ../../plugindev.rst:62 +msgid "" +"The Plugin API is still evolving. This integer attribute tells bottle which " +"version to use. If it is missing, bottle defaults to the first version. The " +"current version is ``2``. See :ref:`plugin-changelog` for details." +msgstr "" + +#: ../../plugindev.rst:66 +msgid "" +"Called as soon as the plugin is installed to an application (see " +":meth:`Bottle.install`). The only parameter is the associated application " +"object." +msgstr "" + +#: ../../plugindev.rst:70 +msgid "" +"As long as :meth:`apply` is not defined, the plugin itself is used as a " +"decorator and applied directly to each route callback. The only parameter is" +" the callback to decorate. Whatever is returned by this method replaces the " +"original callback. If there is no need to wrap or replace a given callback, " +"just return the unmodified callback parameter." +msgstr "" + +#: ../../plugindev.rst:74 +msgid "" +"If defined, this method is used in favor of :meth:`__call__` to decorate " +"route callbacks. The additional `route` parameter is an instance of " +":class:`Route` and provides a lot of meta-information and context for that " +"route. See :ref:`route-context` for details." +msgstr "" + +#: ../../plugindev.rst:78 +msgid "" +"Called immediately before the plugin is uninstalled or the application is " +"closed (see :meth:`Bottle.uninstall` or :meth:`Bottle.close`)." +msgstr "" + +#: ../../plugindev.rst:81 +msgid "" +"Both :meth:`Plugin.setup` and :meth:`Plugin.close` are *not* called for " +"plugins that are applied directly to a route via the :meth:`Bottle.route()` " +"decorator, but only for plugins installed to an application." +msgstr "" + +#: ../../plugindev.rst:87 +msgid "Plugin API changes" +msgstr "" + +#: ../../plugindev.rst:89 +msgid "" +"The Plugin API is still evolving and changed with Bottle 0.10 to address " +"certain issues with the route context dictionary. To ensure backwards " +"compatibility with 0.9 Plugins, we added an optional :attr:`Plugin.api` " +"attribute to tell bottle which API to use. The API differences are " +"summarized here." +msgstr "" + +#: ../../plugindev.rst:91 +msgid "**Bottle 0.9 API 1** (:attr:`Plugin.api` not present)" +msgstr "" + +#: ../../plugindev.rst:93 +msgid "Original Plugin API as described in the 0.9 docs." +msgstr "" + +#: ../../plugindev.rst:95 +msgid "**Bottle 0.10 API 2** (:attr:`Plugin.api` equals 2)" +msgstr "" + +#: ../../plugindev.rst:97 +msgid "" +"The `context` parameter of the :meth:`Plugin.apply` method is now an " +"instance of :class:`Route` instead of a context dictionary." +msgstr "" + +#: ../../plugindev.rst:103 +msgid "The Route Context" +msgstr "" + +#: ../../plugindev.rst:105 +msgid "" +"The :class:`Route` instance passed to :meth:`Plugin.apply` provides detailed" +" informations about the associated route. The most important attributes are " +"summarized here:" +msgstr "" + +#: ../../plugindev.rst:108 +msgid "Attribute" +msgstr "" + +#: ../../plugindev.rst:108 +msgid "Description" +msgstr "" + +#: ../../plugindev.rst:110 +msgid "app" +msgstr "" + +#: ../../plugindev.rst:110 +msgid "The application object this route is installed to." +msgstr "" + +#: ../../plugindev.rst:111 +msgid "rule" +msgstr "" + +#: ../../plugindev.rst:111 +msgid "The rule string (e.g. ``/wiki/:page``)." +msgstr "" + +#: ../../plugindev.rst:112 +msgid "method" +msgstr "" + +#: ../../plugindev.rst:112 +msgid "The HTTP method as a string (e.g. ``GET``)." +msgstr "" + +#: ../../plugindev.rst:113 +msgid "callback" +msgstr "" + +#: ../../plugindev.rst:113 +msgid "" +"The original callback with no plugins applied. Useful for introspection." +msgstr "" + +#: ../../plugindev.rst:115 +msgid "name" +msgstr "" + +#: ../../plugindev.rst:115 +msgid "The name of the route (if specified) or ``None``." +msgstr "" + +#: ../../plugindev.rst:116 +msgid "plugins" +msgstr "" + +#: ../../plugindev.rst:116 +msgid "" +"A list of route-specific plugins. These are applied in addition to " +"application-wide plugins. (see :meth:`Bottle.route`)." +msgstr "" + +#: ../../plugindev.rst:118 +msgid "skiplist" +msgstr "" + +#: ../../plugindev.rst:118 +msgid "" +"A list of plugins to not apply to this route (again, see " +":meth:`Bottle.route`)." +msgstr "" + +#: ../../plugindev.rst:120 +msgid "config" +msgstr "" + +#: ../../plugindev.rst:120 +msgid "" +"Additional keyword arguments passed to the :meth:`Bottle.route` decorator " +"are stored in this dictionary. Used for route-specific configuration and " +"meta-data." +msgstr "" + +#: ../../plugindev.rst:125 +msgid "" +"For your plugin, :attr:`Route.config` is probably the most important " +"attribute. Keep in mind that this dictionary is local to the route, but " +"shared between all plugins. It is always a good idea to add a unique prefix " +"or, if your plugin needs a lot of configuration, store it in a separate " +"namespace within the `config` dictionary. This helps to avoid naming " +"collisions between plugins." +msgstr "" + +#: ../../plugindev.rst:129 +msgid "Changing the :class:`Route` object" +msgstr "" + +#: ../../plugindev.rst:131 +msgid "" +"While some :class:`Route` attributes are mutable, changes may have unwanted " +"effects on other plugins. It is most likely a bad idea to monkey-patch a " +"broken route instead of providing a helpful error message and let the user " +"fix the problem." +msgstr "" + +#: ../../plugindev.rst:133 +msgid "" +"In some rare cases, however, it might be justifiable to break this rule. " +"After you made your changes to the :class:`Route` instance, raise " +":exc:`RouteReset` as an exception. This removes the current route from the " +"cache and causes all plugins to be re-applied. The router is not updated, " +"however. Changes to `rule` or `method` values have no effect on the router, " +"but only on plugins. This may change in the future, though." +msgstr "" + +#: ../../plugindev.rst:137 +msgid "Runtime optimizations" +msgstr "" + +#: ../../plugindev.rst:139 +msgid "" +"Once all plugins are applied to a route, the wrapped route callback is " +"cached to speed up subsequent requests. If the behavior of your plugin " +"depends on configuration, and you want to be able to change that " +"configuration at runtime, you need to read the configuration on each " +"request. Easy enough." +msgstr "" + +#: ../../plugindev.rst:141 +msgid "" +"For performance reasons, however, it might be worthwhile to choose a " +"different wrapper based on current needs, work with closures, or enable or " +"disable a plugin at runtime. Let's take the built-in HooksPlugin as an " +"example: If no hooks are installed, the plugin removes itself from all " +"affected routes and has virtaully no overhead. As soon as you install the " +"first hook, the plugin activates itself and takes effect again." +msgstr "" + +#: ../../plugindev.rst:143 +msgid "" +"To achieve this, you need control over the callback cache: " +":meth:`Route.reset` clears the cache for a single route and " +":meth:`Bottle.reset` clears all caches for all routes of an application at " +"once. On the next request, all plugins are re-applied to the route as if it " +"were requested for the first time." +msgstr "" + +#: ../../plugindev.rst:145 +msgid "" +"Both methods won't affect the current request if called from within a route " +"callback, of cause. To force a restart of the current request, raise " +":exc:`RouteReset` as an exception." +msgstr "" + +#: ../../plugindev.rst:149 +msgid "Plugin Example: SQLitePlugin" +msgstr "" + +#: ../../plugindev.rst:151 +msgid "" +"This plugin provides an sqlite3 database connection handle as an additional " +"keyword argument to wrapped callbacks, but only if the callback expects it. " +"If not, the route is ignored and no overhead is added. The wrapper does not " +"affect the return value, but handles plugin-related exceptions properly. " +":meth:`Plugin.setup` is used to inspect the application and search for " +"conflicting plugins." +msgstr "" + +#: ../../plugindev.rst:218 +msgid "" +"This plugin is actually useful and very similar to the version bundled with " +"Bottle. Not bad for less than 60 lines of code, don't you think? Here is a " +"usage example::" +msgstr "" + +#: ../../plugindev.rst:239 +msgid "" +"The first route needs a database connection and tells the plugin to create a" +" handle by requesting a ``db`` keyword argument. The second route does not " +"need a database and is therefore ignored by the plugin. The third route does" +" expect a 'db' keyword argument, but explicitly skips the sqlite plugin. " +"This way the argument is not overruled by the plugin and still contains the " +"value of the same-named url argument." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/plugins/index.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/plugins/index.po new file mode 100644 index 0000000..f14172d --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/plugins/index.po @@ -0,0 +1,159 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../plugins/index.rst:5 +msgid "List of available Plugins" +msgstr "" + +#: ../../plugins/index.rst:7 +msgid "" +"This is a list of third-party plugins that add extend Bottles core " +"functionality or integrate other libraries with the Bottle framework." +msgstr "" + +#: ../../plugins/index.rst:9 +msgid "" +"Have a look at :ref:`plugins` for general questions about plugins " +"(installation, usage). If you plan to develop a new plugin, the " +":doc:`/plugindev` may help you." +msgstr "" + +#: ../../plugins/index.rst:12 +msgid "`Bottle-Beaker <http://pypi.python.org/pypi/bottle-beaker/>`_" +msgstr "" + +#: ../../plugins/index.rst:12 +msgid "Beaker to session and caching library with WSGI Middleware" +msgstr "" + +#: ../../plugins/index.rst:15 +msgid "`Bottle-Cork <http://cork.firelet.net/>`_" +msgstr "" + +#: ../../plugins/index.rst:15 +msgid "" +"Cork provides a simple set of methods to implement Authentication and " +"Authorization in web applications based on Bottle." +msgstr "" + +#: ../../plugins/index.rst:18 +msgid "`Bottle-Extras <http://pypi.python.org/pypi/bottle-extras/>`_" +msgstr "" + +#: ../../plugins/index.rst:18 +msgid "Meta package to install the bottle plugin collection." +msgstr "" + +#: ../../plugins/index.rst:21 +msgid "`Bottle-Flash <http://pypi.python.org/pypi/bottle-flash/>`_" +msgstr "" + +#: ../../plugins/index.rst:21 +msgid "flash plugin for bottle" +msgstr "" + +#: ../../plugins/index.rst:24 +msgid "`Bottle-Hotqueue <http://pypi.python.org/pypi/bottle-hotqueue/>`_" +msgstr "" + +#: ../../plugins/index.rst:24 +msgid "FIFO Queue for Bottle built upon redis" +msgstr "" + +#: ../../plugins/index.rst:27 +msgid "`Macaron <http://nobrin.github.com/macaron/webapp.html>`_" +msgstr "" + +#: ../../plugins/index.rst:27 +msgid "Macaron is an object-relational mapper (ORM) for SQLite." +msgstr "" + +#: ../../plugins/index.rst:30 +msgid "`Bottle-Memcache <http://pypi.python.org/pypi/bottle-memcache/>`_" +msgstr "" + +#: ../../plugins/index.rst:30 +msgid "Memcache integration for Bottle." +msgstr "" + +#: ../../plugins/index.rst:33 +msgid "`Bottle-Mongo <http://pypi.python.org/pypi/bottle-mongo/>`_" +msgstr "" + +#: ../../plugins/index.rst:33 +msgid "MongoDB integration for Bottle" +msgstr "" + +#: ../../plugins/index.rst:36 +msgid "`Bottle-Redis <http://pypi.python.org/pypi/bottle-redis/>`_" +msgstr "" + +#: ../../plugins/index.rst:36 +msgid "Redis integration for Bottle." +msgstr "" + +#: ../../plugins/index.rst:39 +msgid "`Bottle-Renderer <http://pypi.python.org/pypi/bottle-renderer/>`_" +msgstr "" + +#: ../../plugins/index.rst:39 +msgid "Renderer plugin for bottle" +msgstr "" + +#: ../../plugins/index.rst:42 +msgid "`Bottle-Servefiles <http://pypi.python.org/pypi/bottle-servefiles/>`_" +msgstr "" + +#: ../../plugins/index.rst:42 +msgid "A reusable app that serves static files for bottle apps" +msgstr "" + +#: ../../plugins/index.rst:45 +msgid "`Bottle-Sqlalchemy <http://pypi.python.org/pypi/bottle-sqlalchemy/>`_" +msgstr "" + +#: ../../plugins/index.rst:45 +msgid "SQLAlchemy integration for Bottle." +msgstr "" + +#: ../../plugins/index.rst:48 +msgid "`Bottle-Sqlite <http://pypi.python.org/pypi/bottle-sqlite/>`_" +msgstr "" + +#: ../../plugins/index.rst:48 +msgid "SQLite3 database integration for Bottle." +msgstr "" + +#: ../../plugins/index.rst:51 +msgid "`Bottle-Web2pydal <http://pypi.python.org/pypi/bottle-web2pydal/>`_" +msgstr "" + +#: ../../plugins/index.rst:51 +msgid "Web2py Dal integration for Bottle." +msgstr "" + +#: ../../plugins/index.rst:54 +msgid "`Bottle-Werkzeug <http://pypi.python.org/pypi/bottle-werkzeug/>`_" +msgstr "" + +#: ../../plugins/index.rst:54 +msgid "" +"Integrates the `werkzeug` library (alternative request and response objects," +" advanced debugging middleware and more)." +msgstr "" + +#: ../../plugins/index.rst:56 +msgid "" +"Plugins listed here are not part of Bottle or the Bottle project, but " +"developed and maintained by third parties." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/recipes.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/recipes.po new file mode 100644 index 0000000..7df2850 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/recipes.po @@ -0,0 +1,281 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../recipes.rst:16 +msgid "Recipes" +msgstr "" + +#: ../../recipes.rst:18 +msgid "" +"This is a collection of code snippets and examples for common use cases." +msgstr "" + +#: ../../recipes.rst:21 +msgid "Keeping track of Sessions" +msgstr "" + +#: ../../recipes.rst:23 +msgid "" +"There is no built-in support for sessions because there is no *right* way to" +" do it (in a micro framework). Depending on requirements and environment you" +" could use beaker_ middleware with a fitting backend or implement it " +"yourself. Here is an example for beaker sessions with a file-based backend::" +msgstr "" + +#: ../../recipes.rst:46 +msgid "Debugging with Style: Debugging Middleware" +msgstr "" + +#: ../../recipes.rst:48 +msgid "" +"Bottle catches all Exceptions raised in your app code to prevent your WSGI " +"server from crashing. If the built-in :func:`debug` mode is not enough and " +"you need exceptions to propagate to a debugging middleware, you can turn off" +" this behaviour::" +msgstr "" + +#: ../../recipes.rst:56 +msgid "" +"Now, bottle only catches its own exceptions (:exc:`HTTPError`, " +":exc:`HTTPResponse` and :exc:`BottleException`) and your middleware can " +"handle the rest." +msgstr "" + +#: ../../recipes.rst:58 +msgid "" +"The werkzeug_ and paste_ libraries both ship with very powerful debugging " +"WSGI middleware. Look at :class:`werkzeug.debug.DebuggedApplication` for " +"werkzeug_ and :class:`paste.evalexception.middleware.EvalException` for " +"paste_. They both allow you do inspect the stack and even execute python " +"code within the stack context, so **do not use them in production**." +msgstr "" + +#: ../../recipes.rst:62 +msgid "Unit-Testing Bottle Applications" +msgstr "" + +#: ../../recipes.rst:64 +msgid "" +"Unit-testing is usually performed against methods defined in your web " +"application without running a WSGI environment." +msgstr "" + +#: ../../recipes.rst:66 +msgid "A simple example using `Nose <http://readthedocs.org/docs/nose>`_::" +msgstr "" + +#: ../../recipes.rst:77 +msgid "Test script::" +msgstr "" + +#: ../../recipes.rst:84 +msgid "" +"In the example the Bottle route() method is never executed - only index() is" +" tested." +msgstr "" + +#: ../../recipes.rst:88 +msgid "Functional Testing Bottle Applications" +msgstr "" + +#: ../../recipes.rst:90 +msgid "" +"Any HTTP-based testing system can be used with a running WSGI server, but " +"some testing frameworks work more intimately with WSGI, and provide the " +"ability the call WSGI applications in a controlled environment, with " +"tracebacks and full use of debugging tools. `Testing tools for WSGI " +"<http://www.wsgi.org/en/latest/testing.html>`_ is a good starting point." +msgstr "" + +#: ../../recipes.rst:92 +msgid "" +"Example using `WebTest <http://webtest.pythonpaste.org/>`_ and `Nose " +"<http://readthedocs.org/docs/nose>`_::" +msgstr "" + +#: ../../recipes.rst:112 +msgid "Embedding other WSGI Apps" +msgstr "" + +#: ../../recipes.rst:114 +msgid "" +"This is not the recommend way (you should use a middleware in front of " +"bottle to do this) but you can call other WSGI applications from within your" +" bottle app and let bottle act as a pseudo-middleware. Here is an example::" +msgstr "" + +#: ../../recipes.rst:130 +msgid "" +"Again, this is not the recommend way to implement subprojects. It is only " +"here because many people asked for this and to show how bottle maps to WSGI." +msgstr "" + +#: ../../recipes.rst:134 +msgid "Ignore trailing slashes" +msgstr "" + +#: ../../recipes.rst:136 +msgid "" +"For Bottle, ``/example`` and ``/example/`` are two different routes [1]_. To" +" treat both URLs the same you can add two ``@route`` decorators::" +msgstr "" + +#: ../../recipes.rst:142 +msgid "or add a WSGI middleware that strips trailing slashes from all URLs::" +msgstr "" + +#: ../../recipes.rst:156 +msgid "Footnotes" +msgstr "" + +#: ../../recipes.rst:157 +msgid "Because they are. See <http://www.ietf.org/rfc/rfc3986.txt>" +msgstr "" + +#: ../../recipes.rst:161 +msgid "Keep-alive requests" +msgstr "" + +#: ../../recipes.rst:165 +msgid "For a more detailed explanation, see :doc:`async`." +msgstr "" + +#: ../../recipes.rst:167 +msgid "" +"Several \"push\" mechanisms like XHR multipart need the ability to write " +"response data without closing the connection in conjunction with the " +"response header \"Connection: keep-alive\". WSGI does not easily lend itself" +" to this behavior, but it is still possible to do so in Bottle by using the " +"gevent_ async framework. Here is a sample that works with either the gevent_" +" HTTP server or the paste_ HTTP server (it may work with others, but I have " +"not tried). Just change ``server='gevent'`` to ``server='paste'`` to use the" +" paste_ server::" +msgstr "" + +#: ../../recipes.rst:184 +msgid "" +"If you browse to ``http://localhost:8080/stream``, you should see 'START', " +"'MIDDLE', and 'END' show up one at a time (rather than waiting 8 seconds to " +"see them all at once)." +msgstr "" + +#: ../../recipes.rst:187 +msgid "Gzip Compression in Bottle" +msgstr "" + +#: ../../recipes.rst:190 +msgid "For a detailed discussion, see compression_" +msgstr "" + +#: ../../recipes.rst:192 +msgid "" +"A common feature request is for Bottle to support Gzip compression, which " +"speeds up sites by compressing static resources (like CSS and JS files) " +"during a request." +msgstr "" + +#: ../../recipes.rst:194 +msgid "" +"Supporting Gzip compression is not a straightforward proposition, due to a " +"number of corner cases that crop up frequently. A proper Gzip implementation" +" must:" +msgstr "" + +#: ../../recipes.rst:196 +msgid "Compress on the fly and be fast doing so." +msgstr "" + +#: ../../recipes.rst:197 +msgid "Do not compress for browsers that don't support it." +msgstr "" + +#: ../../recipes.rst:198 +msgid "Do not compress files that are compressed already (images, videos)." +msgstr "" + +#: ../../recipes.rst:199 +msgid "Do not compress dynamic files." +msgstr "" + +#: ../../recipes.rst:200 +msgid "Support two differed compression algorithms (gzip and deflate)." +msgstr "" + +#: ../../recipes.rst:201 +msgid "Cache compressed files that don't change often." +msgstr "" + +#: ../../recipes.rst:202 +msgid "De-validate the cache if one of the files changed anyway." +msgstr "" + +#: ../../recipes.rst:203 +msgid "Make sure the cache does not get to big." +msgstr "" + +#: ../../recipes.rst:204 +msgid "" +"Do not cache small files because a disk seek would take longer than on-the-" +"fly compression." +msgstr "" + +#: ../../recipes.rst:206 +msgid "" +"Because of these requirements, it is the recommendation of the Bottle " +"project that Gzip compression is best handled by the WSGI server Bottle runs" +" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware " +"that can be used to accomplish this." +msgstr "" + +#: ../../recipes.rst:210 +msgid "Using the hooks plugin" +msgstr "" + +#: ../../recipes.rst:212 +msgid "" +"For example, if you want to allow Cross-Origin Resource Sharing for the " +"content returned by all of your URL, you can use the hook decorator and " +"setup a callback function::" +msgstr "" + +#: ../../recipes.rst:230 +msgid "" +"You can also use the ``before_request`` to take an action before every " +"function gets called." +msgstr "" + +#: ../../recipes.rst:235 +msgid "Using Bottle with Heroku" +msgstr "" + +#: ../../recipes.rst:237 +msgid "" +"Heroku_, a popular cloud application platform now provides support for " +"running Python applications on their infastructure." +msgstr "" + +#: ../../recipes.rst:240 +msgid "" +"This recipe is based upon the `Heroku Quickstart " +"<http://devcenter.heroku.com/articles/quickstart>`_, with Bottle specific " +"code replacing the `Write Your App " +"<http://devcenter.heroku.com/articles/python#write_your_app>`_ section of " +"the `Getting Started with Python on Heroku/Cedar " +"<http://devcenter.heroku.com/articles/python>`_ guide::" +msgstr "" + +#: ../../recipes.rst:256 +msgid "" +"Heroku's app stack passes the port that the application needs to listen on " +"for requests, using the `os.environ` dictionary." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/routing.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/routing.po new file mode 100644 index 0000000..e8d348d --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/routing.po @@ -0,0 +1,218 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../routing.rst:3 +msgid "Request Routing" +msgstr "" + +#: ../../routing.rst:5 +msgid "" +"Bottle uses a powerful routing engine to find the right callback for each " +"request. The :ref:`tutorial <tutorial-routing>` shows you the basics. This " +"document covers advanced techniques and rule mechanics in detail." +msgstr "" + +#: ../../routing.rst:8 +msgid "Rule Syntax" +msgstr "" + +#: ../../routing.rst:10 +msgid "" +"The :class:`Router` distinguishes between two basic types of routes: " +"**static routes** (e.g. ``/contact``) and **dynamic routes** (e.g. " +"``/hello/<name>``). A route that contains one or more *wildcards* it is " +"considered dynamic. All other routes are static." +msgstr "" + +#: ../../routing.rst:14 +msgid "" +"The simplest form of a wildcard consists of a name enclosed in angle " +"brackets (e.g. ``<name>``). The name should be unique for a given route and " +"form a valid python identifier (alphanumeric, starting with a letter). This " +"is because wildcards are used as keyword arguments for the request callback " +"later." +msgstr "" + +#: ../../routing.rst:16 +msgid "" +"Each wildcard matches one or more characters, but stops at the first slash " +"(``/``). This equals a regular expression of ``[^/]+`` and ensures that only" +" one path segment is matched and routes with more than one wildcard stay " +"unambiguous." +msgstr "" + +#: ../../routing.rst:18 +msgid "The rule ``/<action>/<item>`` matches as follows:" +msgstr "" + +#: ../../routing.rst:21 +msgid "Path" +msgstr "" + +#: ../../routing.rst:21 +msgid "Result" +msgstr "" + +#: ../../routing.rst:23 +msgid "/save/123" +msgstr "" + +#: ../../routing.rst:23 +msgid "``{'action': 'save', 'item': '123'}``" +msgstr "" + +#: ../../routing.rst:24 +msgid "/save/123/" +msgstr "" + +#: ../../routing.rst:24 ../../routing.rst:25 ../../routing.rst:26 +msgid "`No Match`" +msgstr "" + +#: ../../routing.rst:25 +msgid "/save/" +msgstr "" + +#: ../../routing.rst:26 +msgid "//123" +msgstr "" + +#: ../../routing.rst:29 +msgid "" +"You can change the exact behaviour in many ways using filters. This is " +"described in the next section." +msgstr "" + +#: ../../routing.rst:32 +msgid "Wildcard Filters" +msgstr "" + +#: ../../routing.rst:36 +msgid "" +"Filters are used to define more specific wildcards, and/or transform the " +"matched part of the URL before it is passed to the callback. A filtered " +"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The " +"syntax for the optional config part depends on the filter used." +msgstr "" + +#: ../../routing.rst:38 +msgid "The following standard filters are implemented:" +msgstr "" + +#: ../../routing.rst:40 +msgid "**:int** matches (signed) digits and converts the value to integer." +msgstr "" + +#: ../../routing.rst:41 +msgid "**:float** similar to :int but for decimal numbers." +msgstr "" + +#: ../../routing.rst:42 +msgid "" +"**:path** matches all characters including the slash character in a non-" +"greedy way and may be used to match more than one path segment." +msgstr "" + +#: ../../routing.rst:43 +msgid "" +"**:re[:exp]** allows you to specify a custom regular expression in the " +"config field. The matched value is not modified." +msgstr "" + +#: ../../routing.rst:45 +msgid "" +"You can add your own filters to the router. All you need is a function that " +"returns three elements: A regular expression string, a callable to convert " +"the URL fragment to a python value, and a callable that does the opposite. " +"The filter function is called with the configuration string as the only " +"parameter and may parse it as needed::" +msgstr "" + +#: ../../routing.rst:71 +msgid "Legacy Syntax" +msgstr "" + +#: ../../routing.rst:75 +msgid "" +"The new rule syntax was introduce in **Bottle 0.10** to simplify some common" +" use cases, but the old syntax still works and you can find lot code " +"examples still using it. The differences are best described by example:" +msgstr "" + +#: ../../routing.rst:78 +msgid "Old Syntax" +msgstr "" + +#: ../../routing.rst:78 +msgid "New Syntax" +msgstr "" + +#: ../../routing.rst:80 +msgid "``:name``" +msgstr "" + +#: ../../routing.rst:80 +msgid "``<name>``" +msgstr "" + +#: ../../routing.rst:81 +msgid "``:name#regexp#``" +msgstr "" + +#: ../../routing.rst:81 +msgid "``<name:re:regexp>``" +msgstr "" + +#: ../../routing.rst:82 +msgid "``:#regexp#``" +msgstr "" + +#: ../../routing.rst:82 +msgid "``<:re:regexp>``" +msgstr "" + +#: ../../routing.rst:83 +msgid "``:##``" +msgstr "" + +#: ../../routing.rst:83 +msgid "``<:re>``" +msgstr "" + +#: ../../routing.rst:86 +msgid "" +"Try to avoid the old syntax in future projects if you can. It is not " +"currently deprecated, but will be eventually." +msgstr "" + +#: ../../routing.rst:91 +msgid "Explicit routing configuration" +msgstr "" + +#: ../../routing.rst:93 +msgid "" +"Route decorator can also be directly called as method. This way provides " +"flexibility in complex setups, allowing you to directly control, when and " +"how routing configuration done." +msgstr "" + +#: ../../routing.rst:95 +msgid "" +"Here is a basic example of explicit routing configuration for default bottle" +" application::" +msgstr "" + +#: ../../routing.rst:101 +msgid "" +"In fact, any :class:`Bottle` instance routing can be configured same way::" +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/stpl.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/stpl.po new file mode 100644 index 0000000..009267b --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/stpl.po @@ -0,0 +1,251 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../stpl.rst:3 +msgid "SimpleTemplate Engine" +msgstr "" + +#: ../../stpl.rst:7 +msgid "" +"Bottle comes with a fast, powerful and easy to learn built-in template " +"engine called *SimpleTemplate* or *stpl* for short. It is the default engine" +" used by the :func:`view` and :func:`template` helpers but can be used as a " +"stand-alone general purpose template engine too. This document explains the " +"template syntax and shows examples for common use cases." +msgstr "" + +#: ../../stpl.rst:10 +msgid "Basic API Usage:" +msgstr "" + +#: ../../stpl.rst:11 +msgid ":class:`SimpleTemplate` implements the :class:`BaseTemplate` API::" +msgstr "" + +#: ../../stpl.rst:18 +msgid "" +"In this document we use the :func:`template` helper in examples for the sake" +" of simplicity::" +msgstr "" + +#: ../../stpl.rst:24 +msgid "" +"You can also pass a dictionary into the template using keyword arguments::" +msgstr "" + +#: ../../stpl.rst:31 +msgid "" +"Just keep in mind that compiling and rendering templates are two different " +"actions, even if the :func:`template` helper hides this fact. Templates are " +"usually compiled only once and cached internally, but rendered many times " +"with different keyword arguments." +msgstr "" + +#: ../../stpl.rst:34 +msgid ":class:`SimpleTemplate` Syntax" +msgstr "" + +#: ../../stpl.rst:36 +msgid "" +"Python is a very powerful language but its whitespace-aware syntax makes it " +"difficult to use as a template language. SimpleTemplate removes some of " +"these restrictions and allows you to write clean, readable and maintainable " +"templates while preserving full access to the features, libraries and speed " +"of the Python language." +msgstr "" + +#: ../../stpl.rst:40 +msgid "" +"The :class:`SimpleTemplate` syntax compiles directly to python bytecode and " +"is executed on each :meth:`SimpleTemplate.render` call. Do not render " +"untrusted templates! They may contain and execute harmful python code." +msgstr "" + +#: ../../stpl.rst:43 +msgid "Inline Expressions" +msgstr "" + +#: ../../stpl.rst:45 +msgid "" +"You already learned the use of the ``{{...}}`` syntax from the \"Hello " +"World!\" example above, but there is more: any python expression is allowed " +"within the curly brackets as long as it evaluates to a string or something " +"that has a string representation::" +msgstr "" + +#: ../../stpl.rst:54 +msgid "" +"The contained python expression is executed at render-time and has access to" +" all keyword arguments passed to the :meth:`SimpleTemplate.render` method. " +"HTML special characters are escaped automatically to prevent `XSS " +"<http://en.wikipedia.org/wiki/Cross-Site_Scripting>`_ attacks. You can start" +" the expression with an exclamation mark to disable escaping for that " +"expression::" +msgstr "" + +#: ../../stpl.rst:62 +msgid "Embedded python code" +msgstr "" + +#: ../../stpl.rst:66 +msgid "" +"The template engine allows you to embed lines or blocks of python code " +"within your template. Code lines start with ``%`` and code blocks are " +"surrounded by ``<%`` and ``%>`` tokens::" +msgstr "" + +#: ../../stpl.rst:76 +msgid "" +"Embedded python code follows regular python syntax, but with two additional " +"syntax rules:" +msgstr "" + +#: ../../stpl.rst:78 +msgid "" +"**Indentation is ignored.** You can put as much whitespace in front of " +"statements as you want. This allows you to align your code with the " +"surrounding markup and can greatly improve readability." +msgstr "" + +#: ../../stpl.rst:79 +msgid "" +"Blocks that are normally indented now have to be closed explicitly with an " +"``end`` keyword." +msgstr "" + +#: ../../stpl.rst:89 +msgid "" +"Both the ``%`` and the ``<%`` tokens are only recognized if they are the " +"first non-whitespace characters in a line. You don't have to escape them if " +"they appear mid-text in your template markup. Only if a line of text starts " +"with one of these tokens, you have to escape it with a backslash. In the " +"rare case where the backslash + token combination appears in your markup at " +"the beginning of a line, you can always help yourself with a string literal " +"in an inline expression::" +msgstr "" + +#: ../../stpl.rst:96 +msgid "" +"If you find yourself to escape a lot, consider using :ref:`custom tokens " +"<stpl-custom-tokens>`." +msgstr "" + +#: ../../stpl.rst:99 +msgid "Whitespace Control" +msgstr "" + +#: ../../stpl.rst:101 +msgid "" +"Code blocks and code lines always span the whole line. Whitespace in front " +"of after a code segment is stripped away. You won't see empty lines or " +"dangling whitespace in your template because of embedded code::" +msgstr "" + +#: ../../stpl.rst:109 +msgid "This snippet renders to clean and compact html::" +msgstr "" + +#: ../../stpl.rst:115 +msgid "" +"But embedding code still requires you to start a new line, which may not " +"what you want to see in your rendered template. To skip the newline in front" +" of a code segment, end the text line with a double-backslash::" +msgstr "" + +#: ../../stpl.rst:123 +msgid "THis time the rendered template looks like this::" +msgstr "" + +#: ../../stpl.rst:127 +msgid "" +"This only works directly in front of code segments. In all other places you " +"can control the whitespace yourself and don't need any special syntax." +msgstr "" + +#: ../../stpl.rst:130 +msgid "Template Functions" +msgstr "" + +#: ../../stpl.rst:132 +msgid "" +"Each template is preloaded with a bunch of functions that help with the most" +" common use cases. These functions are always available. You don't have to " +"import or provide them yourself. For everything not covered here there are " +"probably good python libraries available. Remember that you can ``import`` " +"anything you want within your templates. They are python programs after all." +msgstr "" + +#: ../../stpl.rst:136 +msgid "" +"Prior to this release, :func:`include` and :func:`rebase` were syntax " +"keywords, not functions." +msgstr "" + +#: ../../stpl.rst:141 +msgid "" +"Render a sub-template with the specified variables and insert the resulting " +"text into the current template. The function returns a dictionary containing" +" the local variables passed to or defined within the sub-template::" +msgstr "" + +#: ../../stpl.rst:149 +msgid "" +"Mark the current template to be later included into a different template. " +"After the current template is rendered, its resulting text is stored in a " +"variable named ``base`` and passed to the base-template, which is then " +"rendered. This can be used to `wrap` a template with surrounding text, or " +"simulate the inheritance feature found in other template engines::" +msgstr "" + +#: ../../stpl.rst:154 +msgid "This can be combined with the following ``base.tpl``::" +msgstr "" + +#: ../../stpl.rst:166 +msgid "" +"Accessing undefined variables in a template raises :exc:`NameError` and " +"stops rendering immediately. This is standard python behavior and nothing " +"new, but vanilla python lacks an easy way to check the availability of a " +"variable. This quickly gets annoying if you want to support flexible inputs " +"or use the same template in different situations. These functions may help:" +msgstr "" + +#: ../../stpl.rst:174 +msgid "" +"Return True if the variable is defined in the current template namespace, " +"False otherwise." +msgstr "" + +#: ../../stpl.rst:179 +msgid "Return the variable, or a default value." +msgstr "" + +#: ../../stpl.rst:183 +msgid "" +"If the variable is not defined, create it with the given default value. " +"Return the variable." +msgstr "" + +#: ../../stpl.rst:186 +msgid "" +"Here is an example that uses all three functions to implement optional " +"template variables in different ways::" +msgstr "" + +#: ../../stpl.rst:200 +msgid ":class:`SimpleTemplate` API" +msgstr "" + +#: ../../../bottle.pydocstring of bottle.SimpleTemplate.render:1 +msgid "Render the template using keyword arguments as local variables." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/tutorial.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/tutorial.po new file mode 100644 index 0000000..65a437a --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/tutorial.po @@ -0,0 +1,1501 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../tutorial.rst:24 +msgid "Tutorial" +msgstr "" + +#: ../../tutorial.rst:26 +msgid "" +"This tutorial introduces you to the concepts and features of the Bottle web " +"framework and covers basic and advanced topics alike. You can read it from " +"start to end, or use it as a reference later on. The automatically generated" +" :doc:`api` may be interesting for you, too. It covers more details, but " +"explains less than this tutorial. Solutions for the most common questions " +"can be found in our :doc:`recipes` collection or on the :doc:`faq` page. If " +"you need any help, join our `mailing list " +"<mailto:bottlepy@googlegroups.com>`_ or visit us in our `IRC channel " +"<http://webchat.freenode.net/?channels=bottlepy>`_." +msgstr "" + +#: ../../tutorial.rst:31 +msgid "Installation" +msgstr "" + +#: ../../tutorial.rst:33 +msgid "" +"Bottle does not depend on any external libraries. You can just download " +"`bottle.py </bottle.py>`_ into your project directory and start coding:" +msgstr "" + +#: ../../tutorial.rst:39 +msgid "" +"This will get you the latest development snapshot that includes all the new " +"features. If you prefer a more stable environment, you should stick with the" +" stable releases. These are available on `PyPI " +"<http://pypi.python.org/pypi/bottle>`_ and can be installed via " +":command:`pip` (recommended), :command:`easy_install` or your package " +"manager:" +msgstr "" + +#: ../../tutorial.rst:47 +msgid "" +"Either way, you'll need Python 2.5 or newer (including 3.x) to run bottle " +"applications. If you do not have permissions to install packages system-wide" +" or simply don't want to, create a `virtualenv " +"<http://pypi.python.org/pypi/virtualenv>`_ first:" +msgstr "" + +#: ../../tutorial.rst:55 +msgid "Or, if virtualenv is not installed on your system:" +msgstr "" + +#: ../../tutorial.rst:67 +msgid "Quickstart: \"Hello World\"" +msgstr "" + +#: ../../tutorial.rst:69 +msgid "" +"This tutorial assumes you have Bottle either :ref:`installed <installation>`" +" or copied into your project directory. Let's start with a very basic " +"\"Hello World\" example::" +msgstr "" + +#: ../../tutorial.rst:79 +msgid "" +"This is it. Run this script, visit http://localhost:8080/hello and you will " +"see \"Hello World!\" in your browser. Here is how it works:" +msgstr "" + +#: ../../tutorial.rst:81 +msgid "" +"The :func:`route` decorator binds a piece of code to an URL path. In this " +"case, we link the ``/hello`` path to the ``hello()`` function. This is " +"called a `route` (hence the decorator name) and is the most important " +"concept of this framework. You can define as many routes as you want. " +"Whenever a browser requests a URL, the associated function is called and the" +" return value is sent back to the browser. It's as simple as that." +msgstr "" + +#: ../../tutorial.rst:83 +msgid "" +"The :func:`run` call in the last line starts a built-in development server. " +"It runs on ``localhost`` port ``8080`` and serves requests until you hit " +":kbd:`Control-c`. You can switch the server backend later, but for now a " +"development server is all we need. It requires no setup at all and is an " +"incredibly painless way to get your application up and running for local " +"tests." +msgstr "" + +#: ../../tutorial.rst:85 +msgid "" +"The :ref:`tutorial-debugging` is very helpful during early development, but " +"should be switched off for public applications. Keep that in mind." +msgstr "" + +#: ../../tutorial.rst:87 +msgid "" +"Of course this is a very simple example, but it shows the basic concept of " +"how applications are built with Bottle. Continue reading and you'll see what" +" else is possible." +msgstr "" + +#: ../../tutorial.rst:92 +msgid "The Default Application" +msgstr "" + +#: ../../tutorial.rst:94 +msgid "" +"For the sake of simplicity, most examples in this tutorial use a module-" +"level :func:`route` decorator to define routes. This adds routes to a global" +" \"default application\", an instance of :class:`Bottle` that is " +"automatically created the first time you call :func:`route`. Several other " +"module-level decorators and functions relate to this default application, " +"but if you prefer a more object oriented approach and don't mind the extra " +"typing, you can create a separate application object and use that instead of" +" the global one::" +msgstr "" + +#: ../../tutorial.rst:106 +msgid "" +"The object-oriented approach is further described in the :ref:`default-app` " +"section. Just keep in mind that you have a choice." +msgstr "" + +#: ../../tutorial.rst:114 +msgid "Request Routing" +msgstr "" + +#: ../../tutorial.rst:116 +msgid "" +"In the last chapter we built a very simple web application with only a " +"single route. Here is the routing part of the \"Hello World\" example " +"again::" +msgstr "" + +#: ../../tutorial.rst:122 +msgid "" +"The :func:`route` decorator links an URL path to a callback function, and " +"adds a new route to the :ref:`default application <tutorial-default>`. An " +"application with just one route is kind of boring, though. Let's add some " +"more (don't forget ``from bottle import template``)::" +msgstr "" + +#: ../../tutorial.rst:129 +msgid "" +"This example demonstrates two things: You can bind more than one route to a " +"single callback, and you can add wildcards to URLs and access them via " +"keyword arguments." +msgstr "" + +#: ../../tutorial.rst:136 +msgid "Dynamic Routes" +msgstr "" + +#: ../../tutorial.rst:138 +msgid "" +"Routes that contain wildcards are called `dynamic routes` (as opposed to " +"`static routes`) and match more than one URL at the same time. A simple " +"wildcard consists of a name enclosed in angle brackets (e.g. ``<name>``) and" +" accepts one or more characters up to the next slash (``/``). For example, " +"the route ``/hello/<name>`` accepts requests for ``/hello/alice`` as well as" +" ``/hello/bob``, but not for ``/hello``, ``/hello/`` or ``/hello/mr/smith``." +msgstr "" + +#: ../../tutorial.rst:140 +msgid "" +"Each wildcard passes the covered part of the URL as a keyword argument to " +"the request callback. You can use them right away and implement RESTful, " +"nice-looking and meaningful URLs with ease. Here are some other examples " +"along with the URLs they'd match::" +msgstr "" + +#: ../../tutorial.rst:152 +msgid "" +"Filters are used to define more specific wildcards, and/or transform the " +"covered part of the URL before it is passed to the callback. A filtered " +"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The " +"syntax for the optional config part depends on the filter used." +msgstr "" + +#: ../../tutorial.rst:154 +msgid "" +"The following filters are implemented by default and more may be added:" +msgstr "" + +#: ../../tutorial.rst:156 +msgid "" +"**:int** matches (signed) digits only and converts the value to integer." +msgstr "" + +#: ../../tutorial.rst:157 +msgid "**:float** similar to :int but for decimal numbers." +msgstr "" + +#: ../../tutorial.rst:158 +msgid "" +"**:path** matches all characters including the slash character in a non-" +"greedy way and can be used to match more than one path segment." +msgstr "" + +#: ../../tutorial.rst:159 +msgid "" +"**:re** allows you to specify a custom regular expression in the config " +"field. The matched value is not modified." +msgstr "" + +#: ../../tutorial.rst:161 +msgid "Let's have a look at some practical examples::" +msgstr "" + +#: ../../tutorial.rst:175 +msgid "You can add your own filters as well. See :doc:`routing` for details." +msgstr "" + +#: ../../tutorial.rst:179 +msgid "" +"The new rule syntax was introduced in **Bottle 0.10** to simplify some " +"common use cases, but the old syntax still works and you can find a lot of " +"code examples still using it. The differences are best described by example:" +msgstr "" + +#: ../../tutorial.rst:182 +msgid "Old Syntax" +msgstr "" + +#: ../../tutorial.rst:182 +msgid "New Syntax" +msgstr "" + +#: ../../tutorial.rst:184 +msgid "``:name``" +msgstr "" + +#: ../../tutorial.rst:184 +msgid "``<name>``" +msgstr "" + +#: ../../tutorial.rst:185 +msgid "``:name#regexp#``" +msgstr "" + +#: ../../tutorial.rst:185 +msgid "``<name:re:regexp>``" +msgstr "" + +#: ../../tutorial.rst:186 +msgid "``:#regexp#``" +msgstr "" + +#: ../../tutorial.rst:186 +msgid "``<:re:regexp>``" +msgstr "" + +#: ../../tutorial.rst:187 +msgid "``:##``" +msgstr "" + +#: ../../tutorial.rst:187 +msgid "``<:re>``" +msgstr "" + +#: ../../tutorial.rst:190 +msgid "" +"Try to avoid the old syntax in future projects if you can. It is not " +"currently deprecated, but will be eventually." +msgstr "" + +#: ../../tutorial.rst:194 +msgid "HTTP Request Methods" +msgstr "" + +#: ../../tutorial.rst:198 +msgid "" +"The HTTP protocol defines several `request methods`__ (sometimes referred to" +" as \"verbs\") for different tasks. GET is the default for all routes with " +"no other method specified. These routes will match GET requests only. To " +"handle other methods such as POST, PUT, DELETE or PATCH, add a ``method`` " +"keyword argument to the :func:`route` decorator or use one of the four " +"alternative decorators: :func:`get`, :func:`post`, :func:`put`, " +":func:`delete` or :func:`patch`." +msgstr "" + +#: ../../tutorial.rst:200 +msgid "" +"The POST method is commonly used for HTML form submission. This example " +"shows how to handle a login form using POST::" +msgstr "" + +#: ../../tutorial.rst:223 +msgid "" +"In this example the ``/login`` URL is linked to two distinct callbacks, one " +"for GET requests and another for POST requests. The first one displays a " +"HTML form to the user. The second callback is invoked on a form submission " +"and checks the login credentials the user entered into the form. The use of " +":attr:`Request.forms` is further described in the :ref:`tutorial-request` " +"section." +msgstr "" + +#: ../../tutorial.rst:226 +msgid "Special Methods: HEAD and ANY" +msgstr "" + +#: ../../tutorial.rst:227 +msgid "" +"The HEAD method is used to ask for the response identical to the one that " +"would correspond to a GET request, but without the response body. This is " +"useful for retrieving meta-information about a resource without having to " +"download the entire document. Bottle handles these requests automatically by" +" falling back to the corresponding GET route and cutting off the request " +"body, if present. You don't have to specify any HEAD routes yourself." +msgstr "" + +#: ../../tutorial.rst:229 +msgid "" +"Additionally, the non-standard ANY method works as a low priority fallback: " +"Routes that listen to ANY will match requests regardless of their HTTP " +"method but only if no other more specific route is defined. This is helpful " +"for *proxy-routes* that redirect requests to more specific sub-applications." +msgstr "" + +#: ../../tutorial.rst:231 +msgid "" +"To sum it up: HEAD requests fall back to GET routes and all requests fall " +"back to ANY routes, but only if there is no matching route for the original " +"request method. It's as simple as that." +msgstr "" + +#: ../../tutorial.rst:236 +msgid "Routing Static Files" +msgstr "" + +#: ../../tutorial.rst:238 +msgid "" +"Static files such as images or CSS files are not served automatically. You " +"have to add a route and a callback to control which files get served and " +"where to find them::" +msgstr "" + +#: ../../tutorial.rst:245 +msgid "" +"The :func:`static_file` function is a helper to serve files in a safe and " +"convenient way (see :ref:`tutorial-static-files`). This example is limited " +"to files directly within the ``/path/to/your/static/files`` directory " +"because the ``<filename>`` wildcard won't match a path with a slash in it. " +"To serve files in subdirectories, change the wildcard to use the `path` " +"filter::" +msgstr "" + +#: ../../tutorial.rst:251 +msgid "" +"Be careful when specifying a relative root-path such as " +"``root='./static/files'``. The working directory (``./``) and the project " +"directory are not always the same." +msgstr "" + +#: ../../tutorial.rst:259 +msgid "Error Pages" +msgstr "" + +#: ../../tutorial.rst:261 +msgid "" +"If anything goes wrong, Bottle displays an informative but fairly plain " +"error page. You can override the default for a specific HTTP status code " +"with the :func:`error` decorator::" +msgstr "" + +#: ../../tutorial.rst:268 +msgid "" +"From now on, `404 File not Found` errors will display a custom error page to" +" the user. The only parameter passed to the error-handler is an instance of " +":exc:`HTTPError`. Apart from that, an error-handler is quite similar to a " +"regular request callback. You can read from :data:`request`, write to " +":data:`response` and return any supported data-type except for " +":exc:`HTTPError` instances." +msgstr "" + +#: ../../tutorial.rst:270 +msgid "" +"Error handlers are used only if your application returns or raises an " +":exc:`HTTPError` exception (:func:`abort` does just that). Changing " +":attr:`Request.status` or returning :exc:`HTTPResponse` won't trigger the " +"error handler." +msgstr "" + +#: ../../tutorial.rst:280 +msgid "Generating content" +msgstr "" + +#: ../../tutorial.rst:282 +msgid "" +"In pure WSGI, the range of types you may return from your application is " +"very limited. Applications must return an iterable yielding byte strings. " +"You may return a string (because strings are iterable) but this causes most " +"servers to transmit your content char by char. Unicode strings are not " +"allowed at all. This is not very practical." +msgstr "" + +#: ../../tutorial.rst:284 +msgid "" +"Bottle is much more flexible and supports a wide range of types. It even " +"adds a ``Content-Length`` header if possible and encodes unicode " +"automatically, so you don't have to. What follows is a list of data types " +"you may return from your application callbacks and a short description of " +"how these are handled by the framework:" +msgstr "" + +#: ../../tutorial.rst:287 +msgid "Dictionaries" +msgstr "" + +#: ../../tutorial.rst:287 +msgid "" +"As mentioned above, Python dictionaries (or subclasses thereof) are " +"automatically transformed into JSON strings and returned to the browser with" +" the ``Content-Type`` header set to ``application/json``. This makes it easy" +" to implement json-based APIs. Data formats other than json are supported " +"too. See the :ref:`tutorial-output-filter` to learn more." +msgstr "" + +#: ../../tutorial.rst:290 +msgid "Empty Strings, ``False``, ``None`` or other non-true values:" +msgstr "" + +#: ../../tutorial.rst:290 +msgid "" +"These produce an empty output with the ``Content-Length`` header set to 0." +msgstr "" + +#: ../../tutorial.rst:293 +msgid "Unicode strings" +msgstr "" + +#: ../../tutorial.rst:293 +msgid "" +"Unicode strings (or iterables yielding unicode strings) are automatically " +"encoded with the codec specified in the ``Content-Type`` header (utf8 by " +"default) and then treated as normal byte strings (see below)." +msgstr "" + +#: ../../tutorial.rst:296 +msgid "Byte strings" +msgstr "" + +#: ../../tutorial.rst:296 +msgid "" +"Bottle returns strings as a whole (instead of iterating over each char) and " +"adds a ``Content-Length`` header based on the string length. Lists of byte " +"strings are joined first. Other iterables yielding byte strings are not " +"joined because they may grow too big to fit into memory. The ``Content-" +"Length`` header is not set in this case." +msgstr "" + +#: ../../tutorial.rst:299 +msgid "Instances of :exc:`HTTPError` or :exc:`HTTPResponse`" +msgstr "" + +#: ../../tutorial.rst:299 +msgid "" +"Returning these has the same effect as when raising them as an exception. In" +" case of an :exc:`HTTPError`, the error handler is applied. See :ref" +":`tutorial-errorhandling` for details." +msgstr "" + +#: ../../tutorial.rst:302 +msgid "File objects" +msgstr "" + +#: ../../tutorial.rst:302 +msgid "" +"Everything that has a ``.read()`` method is treated as a file or file-like " +"object and passed to the ``wsgi.file_wrapper`` callable defined by the WSGI " +"server framework. Some WSGI server implementations can make use of optimized" +" system calls (sendfile) to transmit files more efficiently. In other cases " +"this just iterates over chunks that fit into memory. Optional headers such " +"as ``Content-Length`` or ``Content-Type`` are *not* set automatically. Use " +":func:`send_file` if possible. See :ref:`tutorial-static-files` for details." +msgstr "" + +#: ../../tutorial.rst:305 +msgid "Iterables and generators" +msgstr "" + +#: ../../tutorial.rst:305 +msgid "" +"You are allowed to use ``yield`` within your callbacks or return an " +"iterable, as long as the iterable yields byte strings, unicode strings, " +":exc:`HTTPError` or :exc:`HTTPResponse` instances. Nested iterables are not " +"supported, sorry. Please note that the HTTP status code and the headers are " +"sent to the browser as soon as the iterable yields its first non-empty " +"value. Changing these later has no effect." +msgstr "" + +#: ../../tutorial.rst:307 +msgid "" +"The ordering of this list is significant. You may for example return a " +"subclass of :class:`str` with a ``read()`` method. It is still treated as a " +"string instead of a file, because strings are handled first." +msgstr "" + +#: ../../tutorial.rst:310 +msgid "Changing the Default Encoding" +msgstr "" + +#: ../../tutorial.rst:311 +msgid "" +"Bottle uses the `charset` parameter of the ``Content-Type`` header to decide" +" how to encode unicode strings. This header defaults to ``text/html; " +"charset=UTF8`` and can be changed using the :attr:`Response.content_type` " +"attribute or by setting the :attr:`Response.charset` attribute directly. " +"(The :class:`Response` object is described in the section :ref:`tutorial-" +"response`.)" +msgstr "" + +#: ../../tutorial.rst:326 +msgid "" +"In some rare cases the Python encoding names differ from the names supported" +" by the HTTP specification. Then, you have to do both: first set the " +":attr:`Response.content_type` header (which is sent to the client unchanged)" +" and then set the :attr:`Response.charset` attribute (which is used to " +"encode unicode)." +msgstr "" + +#: ../../tutorial.rst:331 +msgid "Static Files" +msgstr "" + +#: ../../tutorial.rst:333 +msgid "" +"You can directly return file objects, but :func:`static_file` is the " +"recommended way to serve static files. It automatically guesses a mime-type," +" adds a ``Last-Modified`` header, restricts paths to a ``root`` directory " +"for security reasons and generates appropriate error responses (403 on " +"permission errors, 404 on missing files). It even supports the ``If-" +"Modified-Since`` header and eventually generates a ``304 Not Modified`` " +"response. You can pass a custom MIME type to disable guessing." +msgstr "" + +#: ../../tutorial.rst:346 +msgid "" +"You can raise the return value of :func:`static_file` as an exception if you" +" really need to." +msgstr "" + +#: ../../tutorial.rst:349 +msgid "Forced Download" +msgstr "" + +#: ../../tutorial.rst:350 +msgid "" +"Most browsers try to open downloaded files if the MIME type is known and " +"assigned to an application (e.g. PDF files). If this is not what you want, " +"you can force a download dialog and even suggest a filename to the user::" +msgstr "" + +#: ../../tutorial.rst:356 +msgid "" +"If the ``download`` parameter is just ``True``, the original filename is " +"used." +msgstr "" + +#: ../../tutorial.rst:361 +msgid "HTTP Errors and Redirects" +msgstr "" + +#: ../../tutorial.rst:363 +msgid "" +"The :func:`abort` function is a shortcut for generating HTTP error pages." +msgstr "" + +#: ../../tutorial.rst:372 +msgid "" +"To redirect a client to a different URL, you can send a ``303 See Other`` " +"response with the ``Location`` header set to the new URL. :func:`redirect` " +"does that for you::" +msgstr "" + +#: ../../tutorial.rst:379 +msgid "You may provide a different HTTP status code as a second parameter." +msgstr "" + +#: ../../tutorial.rst:382 +msgid "" +"Both functions will interrupt your callback code by raising an " +":exc:`HTTPError` exception." +msgstr "" + +#: ../../tutorial.rst:385 +msgid "Other Exceptions" +msgstr "" + +#: ../../tutorial.rst:386 +msgid "" +"All exceptions other than :exc:`HTTPResponse` or :exc:`HTTPError` will " +"result in a ``500 Internal Server Error`` response, so they won't crash your" +" WSGI server. You can turn off this behavior to handle exceptions in your " +"middleware by setting ``bottle.app().catchall`` to ``False``." +msgstr "" + +#: ../../tutorial.rst:392 +msgid "The :class:`Response` Object" +msgstr "" + +#: ../../tutorial.rst:394 +msgid "" +"Response metadata such as the HTTP status code, response headers and cookies" +" are stored in an object called :data:`response` up to the point where they " +"are transmitted to the browser. You can manipulate these metadata directly " +"or use the predefined helper methods to do so. The full API and feature list" +" is described in the API section (see :class:`Response`), but the most " +"common use cases and features are covered here, too." +msgstr "" + +#: ../../tutorial.rst:397 +msgid "Status Code" +msgstr "" + +#: ../../tutorial.rst:398 +msgid "" +"The `HTTP status code <http_code>`_ controls the behavior of the browser and" +" defaults to ``200 OK``. In most scenarios you won't need to set the " +":attr:`Response.status` attribute manually, but use the :func:`abort` helper" +" or return an :exc:`HTTPResponse` instance with the appropriate status code." +" Any integer is allowed, but codes other than the ones defined by the `HTTP " +"specification <http_code>`_ will only confuse the browser and break " +"standards." +msgstr "" + +#: ../../tutorial.rst:401 +msgid "Response Header" +msgstr "" + +#: ../../tutorial.rst:402 +msgid "" +"Response headers such as ``Cache-Control`` or ``Location`` are defined via " +":meth:`Response.set_header`. This method takes two parameters, a header name" +" and a value. The name part is case-insensitive::" +msgstr "" + +#: ../../tutorial.rst:409 +msgid "" +"Most headers are unique, meaning that only one header per name is send to " +"the client. Some special headers however are allowed to appear more than " +"once in a response. To add an additional header, use " +":meth:`Response.add_header` instead of :meth:`Response.set_header`::" +msgstr "" + +#: ../../tutorial.rst:414 +msgid "" +"Please note that this is just an example. If you want to work with cookies, " +"read :ref:`ahead <tutorial-cookies>`." +msgstr "" + +#: ../../tutorial.rst:420 ../../tutorial.rst:549 +msgid "Cookies" +msgstr "" + +#: ../../tutorial.rst:422 +msgid "" +"A cookie is a named piece of text stored in the user's browser profile. You " +"can access previously defined cookies via :meth:`Request.get_cookie` and set" +" new cookies with :meth:`Response.set_cookie`::" +msgstr "" + +#: ../../tutorial.rst:432 +msgid "" +"The :meth:`Response.set_cookie` method accepts a number of additional " +"keyword arguments that control the cookies lifetime and behavior. Some of " +"the most common settings are described here:" +msgstr "" + +#: ../../tutorial.rst:434 +msgid "**max_age:** Maximum age in seconds. (default: ``None``)" +msgstr "" + +#: ../../tutorial.rst:435 +msgid "" +"**expires:** A datetime object or UNIX timestamp. (default: ``None``)" +msgstr "" + +#: ../../tutorial.rst:436 +msgid "" +"**domain:** The domain that is allowed to read the cookie. (default: " +"current domain)" +msgstr "" + +#: ../../tutorial.rst:437 +msgid "**path:** Limit the cookie to a given path (default: ``/``)" +msgstr "" + +#: ../../tutorial.rst:438 +msgid "**secure:** Limit the cookie to HTTPS connections (default: off)." +msgstr "" + +#: ../../tutorial.rst:439 +msgid "" +"**httponly:** Prevent client-side javascript to read this cookie (default:" +" off, requires Python 2.6 or newer)." +msgstr "" + +#: ../../tutorial.rst:441 +msgid "" +"If neither `expires` nor `max_age` is set, the cookie expires at the end of " +"the browser session or as soon as the browser window is closed. There are " +"some other gotchas you should consider when using cookies:" +msgstr "" + +#: ../../tutorial.rst:443 +msgid "Cookies are limited to 4 KB of text in most browsers." +msgstr "" + +#: ../../tutorial.rst:444 +msgid "" +"Some users configure their browsers to not accept cookies at all. Most " +"search engines ignore cookies too. Make sure that your application still " +"works without cookies." +msgstr "" + +#: ../../tutorial.rst:445 +msgid "" +"Cookies are stored at client side and are not encrypted in any way. Whatever" +" you store in a cookie, the user can read it. Worse than that, an attacker " +"might be able to steal a user's cookies through `XSS " +"<http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_theft_and_session_hijacking>`_" +" vulnerabilities on your side. Some viruses are known to read the browser " +"cookies, too. Thus, never store confidential information in cookies." +msgstr "" + +#: ../../tutorial.rst:446 +msgid "Cookies are easily forged by malicious clients. Do not trust cookies." +msgstr "" + +#: ../../tutorial.rst:451 +msgid "Signed Cookies" +msgstr "" + +#: ../../tutorial.rst:452 +msgid "" +"As mentioned above, cookies are easily forged by malicious clients. Bottle " +"can cryptographically sign your cookies to prevent this kind of " +"manipulation. All you have to do is to provide a signature key via the " +"`secret` keyword argument whenever you read or set a cookie and keep that " +"key a secret. As a result, :meth:`Request.get_cookie` will return ``None`` " +"if the cookie is not signed or the signature keys don't match::" +msgstr "" + +#: ../../tutorial.rst:472 +msgid "" +"In addition, Bottle automatically pickles and unpickles any data stored to " +"signed cookies. This allows you to store any pickle-able object (not only " +"strings) to cookies, as long as the pickled data does not exceed the 4 KB " +"limit." +msgstr "" + +#: ../../tutorial.rst:474 +msgid "" +"Signed cookies are not encrypted (the client can still see the content) and " +"not copy-protected (the client can restore an old cookie). The main " +"intention is to make pickling and unpickling safe and prevent manipulation, " +"not to store secret information at client side." +msgstr "" + +#: ../../tutorial.rst:487 +msgid "Request Data" +msgstr "" + +#: ../../tutorial.rst:489 +msgid "" +"Cookies, HTTP header, HTML ``<form>`` fields and other request data is " +"available through the global :data:`request` object. This special object " +"always refers to the *current* request, even in multi-threaded environments " +"where multiple client connections are handled at the same time::" +msgstr "" + +#: ../../tutorial.rst:498 +msgid "" +"The :data:`request` object is a subclass of :class:`BaseRequest` and has a " +"very rich API to access data. We only cover the most commonly used features " +"here, but it should be enough to get started." +msgstr "" + +#: ../../tutorial.rst:503 +msgid "Introducing :class:`FormsDict`" +msgstr "" + +#: ../../tutorial.rst:505 +msgid "" +"Bottle uses a special type of dictionary to store form data and cookies. " +":class:`FormsDict` behaves like a normal dictionary, but has some additional" +" features to make your life easier." +msgstr "" + +#: ../../tutorial.rst:507 +msgid "" +"**Attribute access**: All values in the dictionary are also accessible as " +"attributes. These virtual attributes return unicode strings, even if the " +"value is missing or unicode decoding fails. In that case, the string is " +"empty, but still present::" +msgstr "" + +#: ../../tutorial.rst:522 +msgid "" +"**Multiple values per key:** :class:`FormsDict` is a subclass of " +":class:`MultiDict` and can store more than one value per key. The standard " +"dictionary access methods will only return a single value, but the " +":meth:`~MultiDict.getall` method returns a (possibly empty) list of all " +"values for a specific key::" +msgstr "" + +#: ../../tutorial.rst:527 +msgid "" +"**WTForms support:** Some libraries (e.g. `WTForms " +"<http://wtforms.simplecodes.com/>`_) want all-unicode dictionaries as input." +" :meth:`FormsDict.decode` does that for you. It decodes all values and " +"returns a copy of itself, while preserving multiple values per key and all " +"the other features." +msgstr "" + +#: ../../tutorial.rst:531 +msgid "" +"In **Python 2** all keys and values are byte-strings. If you need unicode, " +"you can call :meth:`FormsDict.getunicode` or fetch values via attribute " +"access. Both methods try to decode the string (default: utf8) and return an " +"empty string if that fails. No need to catch :exc:`UnicodeError`::" +msgstr "" + +#: ../../tutorial.rst:538 +msgid "" +"In **Python 3** all strings are unicode, but HTTP is a byte-based wire " +"protocol. The server has to decode the byte strings somehow before they are " +"passed to the application. To be on the safe side, WSGI suggests ISO-8859-1 " +"(aka latin1), a reversible single-byte codec that can be re-encoded with a " +"different encoding later. Bottle does that for :meth:`FormsDict.getunicode` " +"and attribute access, but not for the dict-access methods. These return the " +"unchanged values as provided by the server implementation, which is probably" +" not what you want." +msgstr "" + +#: ../../tutorial.rst:545 +msgid "" +"If you need the whole dictionary with correctly decoded values (e.g. for " +"WTForms), you can call :meth:`FormsDict.decode` to get a re-encoded copy." +msgstr "" + +#: ../../tutorial.rst:551 +msgid "" +"Cookies are small pieces of text stored in the clients browser and sent back" +" to the server with each request. They are useful to keep some state around " +"for more than one request (HTTP itself is stateless), but should not be used" +" for security related stuff. They can be easily forged by the client." +msgstr "" + +#: ../../tutorial.rst:553 +msgid "" +"All cookies sent by the client are available through " +":attr:`BaseRequest.cookies` (a :class:`FormsDict`). This example shows a " +"simple cookie-based view counter::" +msgstr "" + +#: ../../tutorial.rst:563 +msgid "" +"The :meth:`BaseRequest.get_cookie` method is a different way do access " +"cookies. It supports decoding :ref:`signed cookies <tutorial-signed-" +"cookies>` as described in a separate section." +msgstr "" + +#: ../../tutorial.rst:566 +msgid "HTTP Headers" +msgstr "" + +#: ../../tutorial.rst:568 +msgid "" +"All HTTP headers sent by the client (e.g. ``Referer``, ``Agent`` or " +"``Accept-Language``) are stored in a :class:`WSGIHeaderDict` and accessible " +"through the :attr:`BaseRequest.headers` attribute. A :class:`WSGIHeaderDict`" +" is basically a dictionary with case-insensitive keys::" +msgstr "" + +#: ../../tutorial.rst:580 +msgid "Query Variables" +msgstr "" + +#: ../../tutorial.rst:582 +msgid "" +"The query string (as in ``/forum?id=1&page=5``) is commonly used to transmit" +" a small number of key/value pairs to the server. You can use the " +":attr:`BaseRequest.query` attribute (a :class:`FormsDict`) to access these " +"values and the :attr:`BaseRequest.query_string` attribute to get the whole " +"string." +msgstr "" + +#: ../../tutorial.rst:595 +msgid "HTML `<form>` Handling" +msgstr "" + +#: ../../tutorial.rst:597 +msgid "" +"Let us start from the beginning. In HTML, a typical ``<form>`` looks " +"something like this:" +msgstr "" + +#: ../../tutorial.rst:607 +msgid "" +"The ``action`` attribute specifies the URL that will receive the form data. " +"``method`` defines the HTTP method to use (``GET`` or ``POST``). With " +"``method=\"get\"`` the form values are appended to the URL and available " +"through :attr:`BaseRequest.query` as described above. This is considered " +"insecure and has other limitations, so we use ``method=\"post\"`` here. If " +"in doubt, use ``POST`` forms." +msgstr "" + +#: ../../tutorial.rst:609 +msgid "" +"Form fields transmitted via ``POST`` are stored in :attr:`BaseRequest.forms`" +" as a :class:`FormsDict`. The server side code may look like this::" +msgstr "" + +#: ../../tutorial.rst:632 +msgid "" +"There are several other attributes used to access form data. Some of them " +"combine values from different sources for easier access. The following table" +" should give you a decent overview." +msgstr "" + +#: ../../tutorial.rst:635 +msgid "Attribute" +msgstr "" + +#: ../../tutorial.rst:635 +msgid "GET Form fields" +msgstr "" + +#: ../../tutorial.rst:635 +msgid "POST Form fields" +msgstr "" + +#: ../../tutorial.rst:635 +msgid "File Uploads" +msgstr "" + +#: ../../tutorial.rst:637 +msgid ":attr:`BaseRequest.query`" +msgstr "" + +#: ../../tutorial.rst:637 ../../tutorial.rst:638 ../../tutorial.rst:639 +#: ../../tutorial.rst:640 ../../tutorial.rst:640 ../../tutorial.rst:641 +#: ../../tutorial.rst:642 ../../tutorial.rst:642 +msgid "yes" +msgstr "" + +#: ../../tutorial.rst:637 ../../tutorial.rst:637 ../../tutorial.rst:638 +#: ../../tutorial.rst:638 ../../tutorial.rst:639 ../../tutorial.rst:639 +#: ../../tutorial.rst:640 ../../tutorial.rst:641 ../../tutorial.rst:641 +#: ../../tutorial.rst:642 +msgid "no" +msgstr "" + +#: ../../tutorial.rst:638 +msgid ":attr:`BaseRequest.forms`" +msgstr "" + +#: ../../tutorial.rst:639 +msgid ":attr:`BaseRequest.files`" +msgstr "" + +#: ../../tutorial.rst:640 +msgid ":attr:`BaseRequest.params`" +msgstr "" + +#: ../../tutorial.rst:641 +msgid ":attr:`BaseRequest.GET`" +msgstr "" + +#: ../../tutorial.rst:642 +msgid ":attr:`BaseRequest.POST`" +msgstr "" + +#: ../../tutorial.rst:647 +msgid "File uploads" +msgstr "" + +#: ../../tutorial.rst:649 +msgid "" +"To support file uploads, we have to change the ``<form>`` tag a bit. First, " +"we tell the browser to encode the form data in a different way by adding an " +"``enctype=\"multipart/form-data\"`` attribute to the ``<form>`` tag. Then, " +"we add ``<input type=\"file\" />`` tags to allow the user to select a file. " +"Here is an example:" +msgstr "" + +#: ../../tutorial.rst:659 +msgid "" +"Bottle stores file uploads in :attr:`BaseRequest.files` as " +":class:`FileUpload` instances, along with some metadata about the upload. " +"Let us assume you just want to save the file to disk::" +msgstr "" + +#: ../../tutorial.rst:673 +msgid "" +":attr:`FileUpload.filename` contains the name of the file on the clients " +"file system, but is cleaned up and normalized to prevent bugs caused by " +"unsupported characters or path segments in the filename. If you need the " +"unmodified name as sent by the client, have a look at " +":attr:`FileUpload.raw_filename`." +msgstr "" + +#: ../../tutorial.rst:675 +msgid "" +"The :attr:`FileUpload.save` method is highly recommended if you want to " +"store the file to disk. It prevents some common errors (e.g. it does not " +"overwrite existing files unless you tell it to) and stores the file in a " +"memory efficient way. You can access the file object directly via " +":attr:`FileUpload.file`. Just be careful." +msgstr "" + +#: ../../tutorial.rst:679 +msgid "JSON Content" +msgstr "" + +#: ../../tutorial.rst:681 +msgid "" +"Some JavaScript or REST clients send ``application/json`` content to the " +"server. The :attr:`BaseRequest.json` attribute contains the parsed data " +"structure, if available." +msgstr "" + +#: ../../tutorial.rst:685 +msgid "The raw request body" +msgstr "" + +#: ../../tutorial.rst:687 +msgid "" +"You can access the raw body data as a file-like object via " +":attr:`BaseRequest.body`. This is a :class:`BytesIO` buffer or a temporary " +"file depending on the content length and :attr:`BaseRequest.MEMFILE_MAX` " +"setting. In both cases the body is completely buffered before you can access" +" the attribute. If you expect huge amounts of data and want to get direct " +"unbuffered access to the stream, have a look at ``request['wsgi.input']``." +msgstr "" + +#: ../../tutorial.rst:692 +msgid "WSGI Environment" +msgstr "" + +#: ../../tutorial.rst:694 +msgid "" +"Each :class:`BaseRequest` instance wraps a WSGI environment dictionary. The " +"original is stored in :attr:`BaseRequest.environ`, but the request object " +"itself behaves like a dictionary, too. Most of the interesting data is " +"exposed through special methods or attributes, but if you want to access " +"`WSGI environ variables <WSGI specification>`_ directly, you can do so::" +msgstr "" + +#: ../../tutorial.rst:712 +msgid "Templates" +msgstr "" + +#: ../../tutorial.rst:714 +msgid "" +"Bottle comes with a fast and powerful built-in template engine called " +":doc:`stpl`. To render a template you can use the :func:`template` function " +"or the :func:`view` decorator. All you have to do is to provide the name of " +"the template and the variables you want to pass to the template as keyword " +"arguments. Here’s a simple example of how to render a template::" +msgstr "" + +#: ../../tutorial.rst:721 +msgid "" +"This will load the template file ``hello_template.tpl`` and render it with " +"the ``name`` variable set. Bottle will look for templates in the " +"``./views/`` folder or any folder specified in the ``bottle.TEMPLATE_PATH`` " +"list." +msgstr "" + +#: ../../tutorial.rst:723 +msgid "" +"The :func:`view` decorator allows you to return a dictionary with the " +"template variables instead of calling :func:`template`::" +msgstr "" + +#: ../../tutorial.rst:732 +msgid "Syntax" +msgstr "" + +#: ../../tutorial.rst:735 +msgid "" +"The template syntax is a very thin layer around the Python language. Its " +"main purpose is to ensure correct indentation of blocks, so you can format " +"your template without worrying about indentation. Follow the link for a full" +" syntax description: :doc:`stpl`" +msgstr "" + +#: ../../tutorial.rst:737 +msgid "Here is an example template::" +msgstr "" + +#: ../../tutorial.rst:748 +msgid "Caching" +msgstr "" + +#: ../../tutorial.rst:749 +msgid "" +"Templates are cached in memory after compilation. Modifications made to the " +"template files will have no affect until you clear the template cache. Call " +"``bottle.TEMPLATES.clear()`` to do so. Caching is disabled in debug mode." +msgstr "" + +#: ../../tutorial.rst:759 +msgid "Plugins" +msgstr "" + +#: ../../tutorial.rst:763 +msgid "" +"Bottle's core features cover most common use-cases, but as a micro-framework" +" it has its limits. This is where \"Plugins\" come into play. Plugins add " +"missing functionality to the framework, integrate third party libraries, or " +"just automate some repetitive work." +msgstr "" + +#: ../../tutorial.rst:765 +msgid "" +"We have a growing :doc:`/plugins/index` and most plugins are designed to be " +"portable and re-usable across applications. The chances are high that your " +"problem has already been solved and a ready-to-use plugin exists. If not, " +"the :doc:`/plugindev` may help you." +msgstr "" + +#: ../../tutorial.rst:767 +msgid "" +"The effects and APIs of plugins are manifold and depend on the specific " +"plugin. The ``SQLitePlugin`` plugin for example detects callbacks that " +"require a ``db`` keyword argument and creates a fresh database connection " +"object every time the callback is called. This makes it very convenient to " +"use a database::" +msgstr "" + +#: ../../tutorial.rst:787 +msgid "" +"Other plugin may populate the thread-safe :data:`local` object, change " +"details of the :data:`request` object, filter the data returned by the " +"callback or bypass the callback completely. An \"auth\" plugin for example " +"could check for a valid session and return a login page instead of calling " +"the original callback. What happens exactly depends on the plugin." +msgstr "" + +#: ../../tutorial.rst:791 +msgid "Application-wide Installation" +msgstr "" + +#: ../../tutorial.rst:793 +msgid "" +"Plugins can be installed application-wide or just to some specific routes " +"that need additional functionality. Most plugins can safely be installed to " +"all routes and are smart enough to not add overhead to callbacks that do not" +" need their functionality." +msgstr "" + +#: ../../tutorial.rst:795 +msgid "" +"Let us take the ``SQLitePlugin`` plugin for example. It only affects route " +"callbacks that need a database connection. Other routes are left alone. " +"Because of this, we can install the plugin application-wide with no " +"additional overhead." +msgstr "" + +#: ../../tutorial.rst:797 +msgid "" +"To install a plugin, just call :func:`install` with the plugin as first " +"argument::" +msgstr "" + +#: ../../tutorial.rst:802 +msgid "" +"The plugin is not applied to the route callbacks yet. This is delayed to " +"make sure no routes are missed. You can install plugins first and add routes" +" later, if you want to. The order of installed plugins is significant, " +"though. If a plugin requires a database connection, you need to install the " +"database plugin first." +msgstr "" + +#: ../../tutorial.rst:806 +msgid "Uninstall Plugins" +msgstr "" + +#: ../../tutorial.rst:807 +msgid "" +"You can use a name, class or instance to :func:`uninstall` a previously " +"installed plugin::" +msgstr "" + +#: ../../tutorial.rst:817 +msgid "" +"Plugins can be installed and removed at any time, even at runtime while " +"serving requests. This enables some neat tricks (installing slow debugging " +"or profiling plugins only when needed) but should not be overused. Each time" +" the list of plugins changes, the route cache is flushed and all plugins are" +" re-applied." +msgstr "" + +#: ../../tutorial.rst:820 +msgid "" +"The module-level :func:`install` and :func:`uninstall` functions affect the " +":ref:`default-app`. To manage plugins for a specific application, use the " +"corresponding methods on the :class:`Bottle` application object." +msgstr "" + +#: ../../tutorial.rst:824 +msgid "Route-specific Installation" +msgstr "" + +#: ../../tutorial.rst:826 +msgid "" +"The ``apply`` parameter of the :func:`route` decorator comes in handy if you" +" want to install plugins to only a small number of routes::" +msgstr "" + +#: ../../tutorial.rst:836 +msgid "Blacklisting Plugins" +msgstr "" + +#: ../../tutorial.rst:838 +msgid "" +"You may want to explicitly disable a plugin for a number of routes. The " +":func:`route` decorator has a ``skip`` parameter for this purpose::" +msgstr "" + +#: ../../tutorial.rst:860 +msgid "" +"The ``skip`` parameter accepts a single value or a list of values. You can " +"use a name, class or instance to identify the plugin that is to be skipped. " +"Set ``skip=True`` to skip all plugins at once." +msgstr "" + +#: ../../tutorial.rst:863 +msgid "Plugins and Sub-Applications" +msgstr "" + +#: ../../tutorial.rst:865 +msgid "" +"Most plugins are specific to the application they were installed to. " +"Consequently, they should not affect sub-applications mounted with " +":meth:`Bottle.mount`. Here is an example::" +msgstr "" + +#: ../../tutorial.rst:876 +msgid "" +"Whenever you mount an application, Bottle creates a proxy-route on the main-" +"application that forwards all requests to the sub-application. Plugins are " +"disabled for this kind of proxy-route by default. As a result, our " +"(fictional) `WTForms` plugin affects the ``/contact`` route, but does not " +"affect the routes of the ``/blog`` sub-application." +msgstr "" + +#: ../../tutorial.rst:878 +msgid "" +"This behavior is intended as a sane default, but can be overridden. The " +"following example re-activates all plugins for a specific proxy-route::" +msgstr "" + +#: ../../tutorial.rst:882 +msgid "" +"But there is a snag: The plugin sees the whole sub-application as a single " +"route, namely the proxy-route mentioned above. In order to affect each " +"individual route of the sub-application, you have to install the plugin to " +"the mounted application explicitly." +msgstr "" + +#: ../../tutorial.rst:887 +msgid "Development" +msgstr "" + +#: ../../tutorial.rst:889 +msgid "" +"So you have learned the basics and want to write your own application? Here " +"are some tips that might help you beeing more productive." +msgstr "" + +#: ../../tutorial.rst:895 +msgid "Default Application" +msgstr "" + +#: ../../tutorial.rst:897 +msgid "" +"Bottle maintains a global stack of :class:`Bottle` instances and uses the " +"top of the stack as a default for some of the module-level functions and " +"decorators. The :func:`route` decorator, for example, is a shortcut for " +"calling :meth:`Bottle.route` on the default application::" +msgstr "" + +#: ../../tutorial.rst:905 +msgid "" +"This is very convenient for small applications and saves you some typing, " +"but also means that, as soon as your module is imported, routes are " +"installed to the global default application. To avoid this kind of import " +"side-effects, Bottle offers a second, more explicit way to build " +"applications::" +msgstr "" + +#: ../../tutorial.rst:915 +msgid "" +"Separating the application object improves re-usability a lot, too. Other " +"developers can safely import the ``app`` object from your module and use " +":meth:`Bottle.mount` to merge applications together." +msgstr "" + +#: ../../tutorial.rst:920 +msgid "" +"Starting with bottle-0.13 you can use :class:`Bottle` instances as context " +"managers::" +msgstr "" + +#: ../../tutorial.rst:945 +msgid "Debug Mode" +msgstr "" + +#: ../../tutorial.rst:947 +msgid "During early development, the debug mode can be very helpful." +msgstr "" + +#: ../../tutorial.rst:955 +msgid "" +"In this mode, Bottle is much more verbose and provides helpful debugging " +"information whenever an error occurs. It also disables some optimisations " +"that might get in your way and adds some checks that warn you about possible" +" misconfiguration." +msgstr "" + +#: ../../tutorial.rst:957 +msgid "Here is an incomplete list of things that change in debug mode:" +msgstr "" + +#: ../../tutorial.rst:959 +msgid "The default error page shows a traceback." +msgstr "" + +#: ../../tutorial.rst:960 +msgid "Templates are not cached." +msgstr "" + +#: ../../tutorial.rst:961 +msgid "Plugins are applied immediately." +msgstr "" + +#: ../../tutorial.rst:963 +msgid "Just make sure not to use the debug mode on a production server." +msgstr "" + +#: ../../tutorial.rst:966 +msgid "Auto Reloading" +msgstr "" + +#: ../../tutorial.rst:968 +msgid "" +"During development, you have to restart the server a lot to test your recent" +" changes. The auto reloader can do this for you. Every time you edit a " +"module file, the reloader restarts the server process and loads the newest " +"version of your code." +msgstr "" + +#: ../../tutorial.rst:978 +msgid "" +"How it works: the main process will not start a server, but spawn a new " +"child process using the same command line arguments used to start the main " +"process. All module-level code is executed at least twice! Be careful." +msgstr "" + +#: ../../tutorial.rst:983 +msgid "" +"The child process will have ``os.environ['BOTTLE_CHILD']`` set to ``True`` " +"and start as a normal non-reloading app server. As soon as any of the loaded" +" modules changes, the child process is terminated and re-spawned by the main" +" process. Changes in template files will not trigger a reload. Please use " +"debug mode to deactivate template caching." +msgstr "" + +#: ../../tutorial.rst:989 +msgid "" +"The reloading depends on the ability to stop the child process. If you are " +"running on Windows or any other operating system not supporting " +"``signal.SIGINT`` (which raises ``KeyboardInterrupt`` in Python), " +"``signal.SIGTERM`` is used to kill the child. Note that exit handlers and " +"finally clauses, etc., are not executed after a ``SIGTERM``." +msgstr "" + +#: ../../tutorial.rst:997 +msgid "Command Line Interface" +msgstr "" + +#: ../../tutorial.rst:1001 +msgid "Starting with version 0.10 you can use bottle as a command-line tool:" +msgstr "" + +#: ../../tutorial.rst:1021 +msgid "" +"The `ADDRESS` field takes an IP address or an IP:PORT pair and defaults to " +"``localhost:8080``. The other parameters should be self-explanatory." +msgstr "" + +#: ../../tutorial.rst:1023 +msgid "" +"Both plugins and applications are specified via import expressions. These " +"consist of an import path (e.g. ``package.module``) and an expression to be " +"evaluated in the namespace of that module, separated by a colon. See " +":func:`load` for details. Here are some examples:" +msgstr "" + +#: ../../tutorial.rst:1044 +msgid "Deployment" +msgstr "" + +#: ../../tutorial.rst:1046 +msgid "" +"Bottle runs on the built-in `wsgiref WSGIServer " +"<http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_" +" by default. This non-threading HTTP server is perfectly fine for " +"development and early production, but may become a performance bottleneck " +"when server load increases." +msgstr "" + +#: ../../tutorial.rst:1048 +msgid "" +"The easiest way to increase performance is to install a multi-threaded " +"server library like paste_ or cherrypy_ and tell Bottle to use that instead " +"of the single-threaded server::" +msgstr "" + +#: ../../tutorial.rst:1052 +msgid "" +"This, and many other deployment options are described in a separate article:" +" :doc:`deployment`" +msgstr "" + +#: ../../tutorial.rst:1060 +msgid "Glossary" +msgstr "" + +#: ../../tutorial.rst:1063 +msgid "callback" +msgstr "" + +#: ../../tutorial.rst:1065 +msgid "" +"Programmer code that is to be called when some external action happens. In " +"the context of web frameworks, the mapping between URL paths and application" +" code is often achieved by specifying a callback function for each URL." +msgstr "" + +#: ../../tutorial.rst:1069 +msgid "decorator" +msgstr "" + +#: ../../tutorial.rst:1071 +msgid "" +"A function returning another function, usually applied as a function " +"transformation using the ``@decorator`` syntax. See `python documentation " +"for function definition " +"<http://docs.python.org/reference/compound_stmts.html#function>`_ for more " +"about decorators." +msgstr "" + +#: ../../tutorial.rst:1072 +msgid "environ" +msgstr "" + +#: ../../tutorial.rst:1074 +msgid "" +"A structure where information about all documents under the root is saved, " +"and used for cross-referencing. The environment is pickled after the " +"parsing stage, so that successive runs only need to read and parse new and " +"changed documents." +msgstr "" + +#: ../../tutorial.rst:1078 +msgid "handler function" +msgstr "" + +#: ../../tutorial.rst:1080 +msgid "" +"A function to handle some specific event or situation. In a web framework, " +"the application is developed by attaching a handler function as callback for" +" each specific URL comprising the application." +msgstr "" + +#: ../../tutorial.rst:1083 +msgid "source directory" +msgstr "" + +#: ../../tutorial.rst:1085 +msgid "" +"The directory which, including its subdirectories, contains all source files" +" for one Sphinx project." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/_pot/tutorial_app.po b/docs/_locale/pt_BR/LC_MESSAGES/_pot/tutorial_app.po new file mode 100644 index 0000000..dc660e2 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/_pot/tutorial_app.po @@ -0,0 +1,921 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Bottle 0.13-dev\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../tutorial_app.rst:20 +msgid "Tutorial: Todo-List Application" +msgstr "" + +#: ../../tutorial_app.rst:24 +msgid "" +"This tutorial is a work in progess and written by `noisefloor " +"<http://github.com/noisefloor>`_." +msgstr "" + +#: ../../tutorial_app.rst:27 +msgid "" +"This tutorial should give a brief introduction to the Bottle_ WSGI " +"Framework. The main goal is to be able, after reading through this tutorial," +" to create a project using Bottle. Within this document, not all abilities " +"will be shown, but at least the main and important ones like routing, " +"utilizing the Bottle template abilities to format output and handling GET / " +"POST parameters." +msgstr "" + +#: ../../tutorial_app.rst:29 +msgid "" +"To understand the content here, it is not necessary to have a basic " +"knowledge of WSGI, as Bottle tries to keep WSGI away from the user anyway. " +"You should have a fair understanding of the Python_ programming language. " +"Furthermore, the example used in the tutorial retrieves and stores data in a" +" SQL databse, so a basic idea about SQL helps, but is not a must to " +"understand the concepts of Bottle. Right here, SQLite_ is used. The output " +"of Bottle sent to the browser is formatted in some examples by the help of " +"HTML. Thus, a basic idea about the common HTML tags does help as well." +msgstr "" + +#: ../../tutorial_app.rst:31 +msgid "" +"For the sake of introducing Bottle, the Python code \"in between\" is kept " +"short, in order to keep the focus. Also all code within the tutorial is " +"working fine, but you may not necessarily use it \"in the wild\", e.g. on a " +"public web server. In order to do so, you may add e.g. more error handling, " +"protect the database with a password, test and escape the input etc." +msgstr "" + +#: ../../tutorial_app.rst:0 +msgid "Table of Contents" +msgstr "" + +#: ../../tutorial_app.rst:36 +msgid "Goals" +msgstr "" + +#: ../../tutorial_app.rst:38 +msgid "" +"At the end of this tutorial, we will have a simple, web-based ToDo list. The" +" list contains a text (with max 100 characters) and a status (0 for closed, " +"1 for open) for each item. Through the web-based user interface, open items " +"can be view and edited and new items can be added." +msgstr "" + +#: ../../tutorial_app.rst:40 +msgid "" +"During development, all pages will be available on ``localhost`` only, but " +"later on it will be shown how to adapt the application for a \"real\" " +"server, including how to use with Apache's mod_wsgi." +msgstr "" + +#: ../../tutorial_app.rst:42 +msgid "" +"Bottle will do the routing and format the output, with the help of " +"templates. The items of the list will be stored inside a SQLite database. " +"Reading and writing the database will be done by Python code." +msgstr "" + +#: ../../tutorial_app.rst:44 +msgid "" +"We will end up with an application with the following pages and " +"functionality:" +msgstr "" + +#: ../../tutorial_app.rst:46 +msgid "start page ``http://localhost:8080/todo``" +msgstr "" + +#: ../../tutorial_app.rst:47 +msgid "adding new items to the list: ``http://localhost:8080/new``" +msgstr "" + +#: ../../tutorial_app.rst:48 +msgid "page for editing items: ``http://localhost:8080/edit/:no``" +msgstr "" + +#: ../../tutorial_app.rst:49 +msgid "" +"validating data assigned by dynamic routes with the @validate decorator" +msgstr "" + +#: ../../tutorial_app.rst:50 +msgid "catching errors" +msgstr "" + +#: ../../tutorial_app.rst:53 +msgid "Before We Start..." +msgstr "" + +#: ../../tutorial_app.rst:57 +msgid "Install Bottle" +msgstr "" + +#: ../../tutorial_app.rst:58 +msgid "" +"Assuming that you have a fairly new installation of Python (version 2.5 or " +"higher), you only need to install Bottle in addition to that. Bottle has no " +"other dependencies than Python itself." +msgstr "" + +#: ../../tutorial_app.rst:60 +msgid "" +"You can either manually install Bottle or use Python's easy_install: " +"``easy_install bottle``" +msgstr "" + +#: ../../tutorial_app.rst:64 +msgid "Further Software Necessities" +msgstr "" + +#: ../../tutorial_app.rst:65 +msgid "" +"As we use SQLite3 as a database, make sure it is installed. On Linux " +"systems, most distributions have SQLite3 installed by default. SQLite is " +"available for Windows and MacOS X as well and the `sqlite3` module is part " +"of the python standard library." +msgstr "" + +#: ../../tutorial_app.rst:68 +msgid "Create An SQL Database" +msgstr "" + +#: ../../tutorial_app.rst:69 +msgid "" +"First, we need to create the database we use later on. To do so, save the " +"following script in your project directory and run it with python. You can " +"use the interactive interpreter too::" +msgstr "" + +#: ../../tutorial_app.rst:80 +msgid "" +"This generates a database-file `todo.db` with tables called ``todo`` and " +"three columns ``id``, ``task``, and ``status``. ``id`` is a unique id for " +"each row, which is used later on to reference the rows. The column ``task`` " +"holds the text which describes the task, it can be max 100 characters long. " +"Finally, the column ``status`` is used to mark a task as open (value 1) or " +"closed (value 0)." +msgstr "" + +#: ../../tutorial_app.rst:83 +msgid "Using Bottle for a Web-Based ToDo List" +msgstr "" + +#: ../../tutorial_app.rst:85 +msgid "" +"Now it is time to introduce Bottle in order to create a web-based " +"application. But first, we need to look into a basic concept of Bottle: " +"routes." +msgstr "" + +#: ../../tutorial_app.rst:89 +msgid "Understanding routes" +msgstr "" + +#: ../../tutorial_app.rst:90 +msgid "" +"Basically, each page visible in the browser is dynamically generated when " +"the page address is called. Thus, there is no static content. That is " +"exactly what is called a \"route\" within Bottle: a certain address on the " +"server. So, for example, when the page ``http://localhost:8080/todo`` is " +"called from the browser, Bottle \"grabs\" the call and checks if there is " +"any (Python) function defined for the route \"todo\". If so, Bottle will " +"execute the corresponding Python code and return its result." +msgstr "" + +#: ../../tutorial_app.rst:94 +msgid "First Step - Showing All Open Items" +msgstr "" + +#: ../../tutorial_app.rst:95 +msgid "" +"So, after understanding the concept of routes, let's create the first one. " +"The goal is to see all open items from the ToDo list::" +msgstr "" + +#: ../../tutorial_app.rst:110 +msgid "" +"Save the code a ``todo.py``, preferably in the same directory as the file " +"``todo.db``. Otherwise, you need to add the path to ``todo.db`` in the " +"``sqlite3.connect()`` statement." +msgstr "" + +#: ../../tutorial_app.rst:112 +msgid "" +"Let's have a look what we just did: We imported the necessary module " +"``sqlite3`` to access to SQLite database and from Bottle we imported " +"``route`` and ``run``. The ``run()`` statement simply starts the web server " +"included in Bottle. By default, the web server serves the pages on localhost" +" and port 8080. Furthermore, we imported ``route``, which is the function " +"responsible for Bottle's routing. As you can see, we defined one function, " +"``todo_list()``, with a few lines of code reading from the database. The " +"important point is the `decorator statement`_ ``@route('/todo')`` right " +"before the ``def todo_list()`` statement. By doing this, we bind this " +"function to the route ``/todo``, so every time the browsers calls " +"``http://localhost:8080/todo``, Bottle returns the result of the function " +"``todo_list()``. That is how routing within bottle works." +msgstr "" + +#: ../../tutorial_app.rst:114 +msgid "" +"Actually you can bind more than one route to a function. So the following " +"code::" +msgstr "" + +#: ../../tutorial_app.rst:121 +msgid "" +"will work fine, too. What will not work is to bind one route to more than " +"one function." +msgstr "" + +#: ../../tutorial_app.rst:123 +msgid "" +"What you will see in the browser is what is returned, thus the value given " +"by the ``return`` statement. In this example, we need to convert ``result`` " +"in to a string by ``str()``, as Bottle expects a string or a list of strings" +" from the return statement. But here, the result of the database query is a " +"list of tuples, which is the standard defined by the `Python DB API`_." +msgstr "" + +#: ../../tutorial_app.rst:125 +msgid "" +"Now, after understanding the little script above, it is time to execute it " +"and watch the result yourself. Remember that on Linux- / Unix-based systems " +"the file ``todo.py`` needs to be executable first. Then, just run ``python " +"todo.py`` and call the page ``http://localhost:8080/todo`` in your browser. " +"In case you made no mistake writing the script, the output should look like " +"this::" +msgstr "" + +#: ../../tutorial_app.rst:129 +msgid "" +"If so - congratulations! You are now a successful user of Bottle. In case it" +" did not work and you need to make some changes to the script, remember to " +"stop Bottle serving the page, otherwise the revised version will not be " +"loaded." +msgstr "" + +#: ../../tutorial_app.rst:131 +msgid "" +"Actually, the output is not really exciting nor nice to read. It is the raw " +"result returned from the SQL query." +msgstr "" + +#: ../../tutorial_app.rst:133 +msgid "" +"So, in the next step we format the output in a nicer way. But before we do " +"that, we make our life easier." +msgstr "" + +#: ../../tutorial_app.rst:137 +msgid "Debugging and Auto-Reload" +msgstr "" + +#: ../../tutorial_app.rst:138 +msgid "" +"Maybe you already noticed that Bottle sends a short error message to the " +"browser in case something within the script is wrong, e.g. the connection to" +" the database is not working. For debugging purposes it is quite helpful to " +"get more details. This can be easily achieved by adding the following " +"statement to the script::" +msgstr "" + +#: ../../tutorial_app.rst:146 +msgid "" +"By enabling \"debug\", you will get a full stacktrace of the Python " +"interpreter, which usually contains useful information for finding bugs. " +"Furthermore, templates (see below) are not cached, thus changes to templates" +" will take effect without stopping the server." +msgstr "" + +#: ../../tutorial_app.rst:150 +msgid "" +"That ``debug(True)`` is supposed to be used for development only, it should " +"*not* be used in production environments." +msgstr "" + +#: ../../tutorial_app.rst:154 +msgid "" +"Another quite nice feature is auto-reloading, which is enabled by modifying " +"the ``run()`` statement to" +msgstr "" + +#: ../../tutorial_app.rst:160 +msgid "" +"This will automatically detect changes to the script and reload the new " +"version once it is called again, without the need to stop and start the " +"server." +msgstr "" + +#: ../../tutorial_app.rst:162 +msgid "" +"Again, the feature is mainly supposed to be used while developing, not on " +"production systems." +msgstr "" + +#: ../../tutorial_app.rst:166 +msgid "Bottle Template To Format The Output" +msgstr "" + +#: ../../tutorial_app.rst:167 +msgid "" +"Now let's have a look at casting the output of the script into a proper " +"format." +msgstr "" + +#: ../../tutorial_app.rst:169 +msgid "" +"Actually Bottle expects to receive a string or a list of strings from a " +"function and returns them by the help of the built-in server to the browser." +" Bottle does not bother about the content of the string itself, so it can be" +" text formatted with HTML markup, too." +msgstr "" + +#: ../../tutorial_app.rst:171 +msgid "" +"Bottle brings its own easy-to-use template engine with it. Templates are " +"stored as separate files having a ``.tpl`` extension. The template can be " +"called then from within a function. Templates can contain any type of text " +"(which will be most likely HTML-markup mixed with Python statements). " +"Furthermore, templates can take arguments, e.g. the result set of a database" +" query, which will be then formatted nicely within the template." +msgstr "" + +#: ../../tutorial_app.rst:173 +msgid "" +"Right here, we are going to cast the result of our query showing the open " +"ToDo items into a simple table with two columns: the first column will " +"contain the ID of the item, the second column the text. The result set is, " +"as seen above, a list of tuples, each tuple contains one set of results." +msgstr "" + +#: ../../tutorial_app.rst:175 +msgid "To include the template in our example, just add the following lines::" +msgstr "" + +#: ../../tutorial_app.rst:185 +msgid "" +"So we do here two things: first, we import ``template`` from Bottle in order" +" to be able to use templates. Second, we assign the output of the template " +"``make_table`` to the variable ``output``, which is then returned. In " +"addition to calling the template, we assign ``result``, which we received " +"from the database query, to the variable ``rows``, which is later on used " +"within the template. If necessary, you can assign more than one variable / " +"value to a template." +msgstr "" + +#: ../../tutorial_app.rst:187 +msgid "" +"Templates always return a list of strings, thus there is no need to convert " +"anything. Of course, we can save one line of code by writing ``return " +"template('make_table', rows=result)``, which gives exactly the same result " +"as above." +msgstr "" + +#: ../../tutorial_app.rst:189 +msgid "" +"Now it is time to write the corresponding template, which looks like this::" +msgstr "" + +#: ../../tutorial_app.rst:203 +msgid "" +"Save the code as ``make_table.tpl`` in the same directory where ``todo.py`` " +"is stored." +msgstr "" + +#: ../../tutorial_app.rst:205 +msgid "" +"Let's have a look at the code: every line starting with % is interpreted as " +"Python code. Please note that, of course, only valid Python statements are " +"allowed, otherwise the template will raise an exception, just as any other " +"Python code. The other lines are plain HTML markup." +msgstr "" + +#: ../../tutorial_app.rst:207 +msgid "" +"As you can see, we use Python's ``for`` statement two times, in order to go " +"through ``rows``. As seen above, ``rows`` is a variable which holds the " +"result of the database query, so it is a list of tuples. The first ``for`` " +"statement accesses the tuples within the list, the second one the items " +"within the tuple, which are put each into a cell of the table. It is " +"important that you close all ``for``, ``if``, ``while`` etc. statements with" +" ``%end``, otherwise the output may not be what you expect." +msgstr "" + +#: ../../tutorial_app.rst:209 +msgid "" +"If you need to access a variable within a non-Python code line inside the " +"template, you need to put it into double curly braces. This tells the " +"template to insert the actual value of the variable right in place." +msgstr "" + +#: ../../tutorial_app.rst:211 +msgid "" +"Run the script again and look at the output. Still not really nice, but at " +"least more readable than the list of tuples. Of course, you can spice-up the" +" very simple HTML markup above, e.g. by using in-line styles to get a better" +" looking output." +msgstr "" + +#: ../../tutorial_app.rst:215 +msgid "Using GET and POST Values" +msgstr "" + +#: ../../tutorial_app.rst:216 +msgid "" +"As we can review all open items properly, we move to the next step, which is" +" adding new items to the ToDo list. The new item should be received from a " +"regular HTML-based form, which sends its data by the GET method." +msgstr "" + +#: ../../tutorial_app.rst:218 +msgid "" +"To do so, we first add a new route to our script and tell the route that it " +"should get GET data::" +msgstr "" + +#: ../../tutorial_app.rst:241 +msgid "" +"To access GET (or POST) data, we need to import ``request`` from Bottle. To " +"assign the actual data to a variable, we use the statement " +"``request.GET.get('task','').strip()`` statement, where ``task`` is the name" +" of the GET data we want to access. That's all. If your GET data has more " +"than one variable, multiple ``request.GET.get()`` statements can be used and" +" assigned to other variables." +msgstr "" + +#: ../../tutorial_app.rst:243 +msgid "" +"The rest of this piece of code is just processing of the gained data: " +"writing to the database, retrieve the corresponding id from the database and" +" generate the output." +msgstr "" + +#: ../../tutorial_app.rst:245 +msgid "" +"But where do we get the GET data from? Well, we can use a static HTML page " +"holding the form. Or, what we do right now, is to use a template which is " +"output when the route ``/new`` is called without GET data." +msgstr "" + +#: ../../tutorial_app.rst:247 +msgid "The code needs to be extended to::" +msgstr "" + +#: ../../tutorial_app.rst:270 +msgid "``new_task.tpl`` looks like this::" +msgstr "" + +#: ../../tutorial_app.rst:278 +msgid "That's all. As you can see, the template is plain HTML this time." +msgstr "" + +#: ../../tutorial_app.rst:280 +msgid "Now we are able to extend our to do list." +msgstr "" + +#: ../../tutorial_app.rst:282 +msgid "" +"By the way, if you prefer to use POST data: this works exactly the same way," +" just use ``request.POST.get()`` instead." +msgstr "" + +#: ../../tutorial_app.rst:286 +msgid "Editing Existing Items" +msgstr "" + +#: ../../tutorial_app.rst:287 +msgid "The last point to do is to enable editing of existing items." +msgstr "" + +#: ../../tutorial_app.rst:289 +msgid "" +"By using only the routes we know so far it is possible, but may be quite " +"tricky. But Bottle knows something called \"dynamic routes\", which makes " +"this task quite easy." +msgstr "" + +#: ../../tutorial_app.rst:291 +msgid "The basic statement for a dynamic route looks like this::" +msgstr "" + +#: ../../tutorial_app.rst:295 +msgid "" +"The key point here is the colon. This tells Bottle to accept for " +"``:something`` any string up to the next slash. Furthermore, the value of " +"``something`` will be passed to the function assigned to that route, so the " +"data can be processed within the function." +msgstr "" + +#: ../../tutorial_app.rst:297 +msgid "" +"For our ToDo list, we will create a route ``@route('/edit/:no)``, where " +"``no`` is the id of the item to edit." +msgstr "" + +#: ../../tutorial_app.rst:299 +msgid "The code looks like this::" +msgstr "" + +#: ../../tutorial_app.rst:327 +msgid "" +"It is basically pretty much the same what we already did above when adding " +"new items, like using ``GET`` data etc. The main addition here is using the " +"dynamic route ``:no``, which here passes the number to the corresponding " +"function. As you can see, ``no`` is used within the function to access the " +"right row of data within the database." +msgstr "" + +#: ../../tutorial_app.rst:329 +msgid "" +"The template ``edit_task.tpl`` called within the function looks like this::" +msgstr "" + +#: ../../tutorial_app.rst:344 +msgid "" +"Again, this template is a mix of Python statements and HTML, as already " +"explained above." +msgstr "" + +#: ../../tutorial_app.rst:346 +msgid "" +"A last word on dynamic routes: you can even use a regular expression for a " +"dynamic route, as demonstrated later." +msgstr "" + +#: ../../tutorial_app.rst:350 +msgid "Validating Dynamic Routes" +msgstr "" + +#: ../../tutorial_app.rst:351 +msgid "" +"Using dynamic routes is fine, but for many cases it makes sense to validate " +"the dynamic part of the route. For example, we expect an integer number in " +"our route for editing above. But if a float, characters or so are received, " +"the Python interpreter throws an exception, which is not what we want." +msgstr "" + +#: ../../tutorial_app.rst:353 +msgid "" +"For those cases, Bottle offers the ``@validate`` decorator, which validates " +"the \"input\" prior to passing it to the function. In order to apply the " +"validator, extend the code as follows::" +msgstr "" + +#: ../../tutorial_app.rst:362 +msgid "" +"At first, we imported ``validate`` from the Bottle framework, than we apply " +"the @validate-decorator. Right here, we validate if ``no`` is an integer. " +"Basically, the validation works with all types of data like floats, lists " +"etc." +msgstr "" + +#: ../../tutorial_app.rst:364 +msgid "" +"Save the code and call the page again using a \"403 forbidden\" value for " +"``:no``, e.g. a float. You will receive not an exception, but a \"403 - " +"Forbidden\" error, saying that an integer was expected." +msgstr "" + +#: ../../tutorial_app.rst:367 +msgid "Dynamic Routes Using Regular Expressions" +msgstr "" + +#: ../../tutorial_app.rst:368 +msgid "" +"Bottle can also handle dynamic routes, where the \"dynamic part\" of the " +"route can be a regular expression." +msgstr "" + +#: ../../tutorial_app.rst:370 +msgid "" +"So, just to demonstrate that, let's assume that all single items in our ToDo" +" list should be accessible by their plain number, by a term like e.g. " +"\"item1\". For obvious reasons, you do not want to create a route for every " +"item. Furthermore, the simple dynamic routes do not work either, as part of " +"the route, the term \"item\" is static." +msgstr "" + +#: ../../tutorial_app.rst:372 +msgid "As said above, the solution is a regular expression::" +msgstr "" + +#: ../../tutorial_app.rst:386 +msgid "" +"Of course, this example is somehow artificially constructed - it would be " +"easier to use a plain dynamic route only combined with a validation. " +"Nevertheless, we want to see how regular expression routes work: the line " +"``@route(/item:item_#[0-9]+#)`` starts like a normal route, but the part " +"surrounded by # is interpreted as a regular expression, which is the dynamic" +" part of the route. So in this case, we want to match any digit between 0 " +"and 9. The following function \"show_item\" just checks whether the given " +"item is present in the database or not. In case it is present, the " +"corresponding text of the task is returned. As you can see, only the regular" +" expression part of the route is passed forward. Furthermore, it is always " +"forwarded as a string, even if it is a plain integer number, like in this " +"case." +msgstr "" + +#: ../../tutorial_app.rst:390 +msgid "Returning Static Files" +msgstr "" + +#: ../../tutorial_app.rst:391 +msgid "" +"Sometimes it may become necessary to associate a route not to a Python " +"function, but just return a static file. So if you have for example a help " +"page for your application, you may want to return this page as plain HTML. " +"This works as follows::" +msgstr "" + +#: ../../tutorial_app.rst:399 +msgid "" +"At first, we need to import the ``static_file`` function from Bottle. As you" +" can see, the ``return static_file`` statement replaces the ``return`` " +"statement. It takes at least two arguments: the name of the file to be " +"returned and the path to the file. Even if the file is in the same directory" +" as your application, the path needs to be stated. But in this case, you can" +" use ``'.'`` as a path, too. Bottle guesses the MIME-type of the file " +"automatically, but in case you like to state it explicitly, add a third " +"argument to ``static_file``, which would be here ``mimetype='text/html'``. " +"``static_file`` works with any type of route, including the dynamic ones." +msgstr "" + +#: ../../tutorial_app.rst:403 +msgid "Returning JSON Data" +msgstr "" + +#: ../../tutorial_app.rst:404 +msgid "" +"There may be cases where you do not want your application to generate the " +"output directly, but return data to be processed further on, e.g. by " +"JavaScript. For those cases, Bottle offers the possibility to return JSON " +"objects, which is sort of standard for exchanging data between web " +"applications. Furthermore, JSON can be processed by many programming " +"languages, including Python" +msgstr "" + +#: ../../tutorial_app.rst:406 +msgid "" +"So, let's assume we want to return the data generated in the regular " +"expression route example as a JSON object. The code looks like this::" +msgstr "" + +#: ../../tutorial_app.rst:421 +msgid "" +"As you can, that is fairly simple: just return a regular Python dictionary " +"and Bottle will convert it automatically into a JSON object prior to " +"sending. So if you e.g. call \"http://localhost/json1\" Bottle should in " +"this case return the JSON object ``{\"Task\": [\"Read A-byte-of-python to " +"get a good introduction into Python\"]}``." +msgstr "" + +#: ../../tutorial_app.rst:426 +msgid "Catching Errors" +msgstr "" + +#: ../../tutorial_app.rst:427 +msgid "" +"The next step may is to catch the error with Bottle itself, to keep away any" +" type of error message from the user of your application. To do that, Bottle" +" has an \"error-route\", which can be a assigned to a HTML-error." +msgstr "" + +#: ../../tutorial_app.rst:429 +msgid "In our case, we want to catch a 403 error. The code is as follows::" +msgstr "" + +#: ../../tutorial_app.rst:437 +msgid "" +"So, at first we need to import ``error`` from Bottle and define a route by " +"``error(403)``, which catches all \"403 forbidden\" errors. The function " +"\"mistake\" is assigned to that. Please note that ``error()`` always passes " +"the error-code to the function - even if you do not need it. Thus, the " +"function always needs to accept one argument, otherwise it will not work." +msgstr "" + +#: ../../tutorial_app.rst:439 +msgid "" +"Again, you can assign more than one error-route to a function, or catch " +"various errors with one function each. So this code::" +msgstr "" + +#: ../../tutorial_app.rst:446 +msgid "works fine, the following one as well::" +msgstr "" + +#: ../../tutorial_app.rst:458 +msgid "Summary" +msgstr "" + +#: ../../tutorial_app.rst:459 +msgid "" +"After going through all the sections above, you should have a brief " +"understanding how the Bottle WSGI framework works. Furthermore you have all " +"the knowledge necessary to use Bottle for your applications." +msgstr "" + +#: ../../tutorial_app.rst:461 +msgid "" +"The following chapter give a short introduction how to adapt Bottle for " +"larger projects. Furthermore, we will show how to operate Bottle with web " +"servers which perform better on a higher load / more web traffic than the " +"one we used so far." +msgstr "" + +#: ../../tutorial_app.rst:464 +msgid "Server Setup" +msgstr "" + +#: ../../tutorial_app.rst:466 +msgid "" +"So far, we used the standard server used by Bottle, which is the `WSGI " +"reference Server`_ shipped along with Python. Although this server is " +"perfectly suitable for development purposes, it is not really suitable for " +"larger applications. But before we have a look at the alternatives, let's " +"have a look how to tweak the settings of the standard server first." +msgstr "" + +#: ../../tutorial_app.rst:470 +msgid "Running Bottle on a different port and IP" +msgstr "" + +#: ../../tutorial_app.rst:471 +msgid "" +"As standard, Bottle serves the pages on the IP adress 127.0.0.1, also known " +"as ``localhost``, and on port ``8080``. To modify the setting is pretty " +"simple, as additional parameters can be passed to Bottle's ``run()`` " +"function to change the port and the address." +msgstr "" + +#: ../../tutorial_app.rst:473 +msgid "" +"To change the port, just add ``port=portnumber`` to the run command. So, for" +" example::" +msgstr "" + +#: ../../tutorial_app.rst:477 +msgid "would make Bottle listen to port 80." +msgstr "" + +#: ../../tutorial_app.rst:479 +msgid "To change the IP address where Bottle is listening::" +msgstr "" + +#: ../../tutorial_app.rst:483 +msgid "Of course, both parameters can be combined, like::" +msgstr "" + +#: ../../tutorial_app.rst:487 +msgid "" +"The ``port`` and ``host`` parameter can also be applied when Bottle is " +"running with a different server, as shown in the following section." +msgstr "" + +#: ../../tutorial_app.rst:491 +msgid "Running Bottle with a different server" +msgstr "" + +#: ../../tutorial_app.rst:492 +msgid "" +"As said above, the standard server is perfectly suitable for development, " +"personal use or a small group of people only using your application based on" +" Bottle. For larger tasks, the standard server may become a bottleneck, as " +"it is single-threaded, thus it can only serve one request at a time." +msgstr "" + +#: ../../tutorial_app.rst:494 +msgid "" +"But Bottle has already various adapters to multi-threaded servers on board, " +"which perform better on higher load. Bottle supports Cherrypy_, Fapws3_, " +"Flup_ and Paste_." +msgstr "" + +#: ../../tutorial_app.rst:496 +msgid "" +"If you want to run for example Bottle with the Paste server, use the " +"following code::" +msgstr "" + +#: ../../tutorial_app.rst:502 +msgid "" +"This works exactly the same way with ``FlupServer``, ``CherryPyServer`` and " +"``FapwsServer``." +msgstr "" + +#: ../../tutorial_app.rst:506 +msgid "Running Bottle on Apache with mod_wsgi" +msgstr "" + +#: ../../tutorial_app.rst:507 +msgid "" +"Maybe you already have an Apache_ or you want to run a Bottle-based " +"application large scale - then it is time to think about Apache with " +"mod_wsgi_." +msgstr "" + +#: ../../tutorial_app.rst:509 +msgid "" +"We assume that your Apache server is up and running and mod_wsgi is working " +"fine as well. On a lot of Linux distributions, mod_wsgi can be easily " +"installed via whatever package management system is in use." +msgstr "" + +#: ../../tutorial_app.rst:511 +msgid "" +"Bottle brings an adapter for mod_wsgi with it, so serving your application " +"is an easy task." +msgstr "" + +#: ../../tutorial_app.rst:513 +msgid "" +"In the following example, we assume that you want to make your application " +"\"ToDo list\" accessible through ``http://www.mypage.com/todo`` and your " +"code, templates and SQLite database are stored in the path " +"``/var/www/todo``." +msgstr "" + +#: ../../tutorial_app.rst:515 +msgid "" +"When you run your application via mod_wsgi, it is imperative to remove the " +"``run()`` statement from your code, otherwise it won't work here." +msgstr "" + +#: ../../tutorial_app.rst:517 +msgid "" +"After that, create a file called ``adapter.wsgi`` with the following " +"content::" +msgstr "" + +#: ../../tutorial_app.rst:528 +msgid "" +"and save it in the same path, ``/var/www/todo``. Actually the name of the " +"file can be anything, as long as the extension is ``.wsgi``. The name is " +"only used to reference the file from your virtual host." +msgstr "" + +#: ../../tutorial_app.rst:530 +msgid "" +"Finally, we need to add a virtual host to the Apache configuration, which " +"looks like this::" +msgstr "" + +#: ../../tutorial_app.rst:546 +msgid "" +"After restarting the server, your ToDo list should be accessible at " +"``http://www.mypage.com/todo``" +msgstr "" + +#: ../../tutorial_app.rst:549 +msgid "Final Words" +msgstr "" + +#: ../../tutorial_app.rst:551 +msgid "" +"Now we are at the end of this introduction and tutorial to Bottle. We " +"learned about the basic concepts of Bottle and wrote a first application " +"using the Bottle framework. In addition to that, we saw how to adapt Bottle " +"for large tasks and serve Bottle through an Apache web server with mod_wsgi." +msgstr "" + +#: ../../tutorial_app.rst:553 +msgid "" +"As said in the introduction, this tutorial is not showing all shades and " +"possibilities of Bottle. What we skipped here is e.g. receiving file objects" +" and streams and how to handle authentication data. Furthermore, we did not " +"show how templates can be called from within another template. For an " +"introduction into those points, please refer to the full `Bottle " +"documentation`_ ." +msgstr "" + +#: ../../tutorial_app.rst:556 +msgid "Complete Example Listing" +msgstr "" + +#: ../../tutorial_app.rst:558 +msgid "" +"As the ToDo list example was developed piece by piece, here is the complete " +"listing:" +msgstr "" + +#: ../../tutorial_app.rst:560 +msgid "Main code for the application ``todo.py``::" +msgstr "" + +#: ../../tutorial_app.rst:675 +msgid "Template ``make_table.tpl``::" +msgstr "" + +#: ../../tutorial_app.rst:689 +msgid "Template ``edit_task.tpl``::" +msgstr "" + +#: ../../tutorial_app.rst:704 +msgid "Template ``new_task.tpl``::" +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/api.po b/docs/_locale/pt_BR/LC_MESSAGES/api.po new file mode 100644 index 0000000..233751b --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/api.po @@ -0,0 +1,1682 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:17+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# 6e6f1890868c4088befa08b2bf3c09d1 +#: ../../api.rst:3 +msgid "API Reference" +msgstr "" + +# 1555a0201e0545f7a83fc15d8626b5de +#: ../../api.rst:10 +msgid "" +"This is a mostly auto-generated API. If you are new to bottle, you might " +"find the narrative :doc:`tutorial` more helpful." +msgstr "" + +# 08754aebe6d846ea96468045c8b869a0 +#: ../../api.rst:17 +msgid "Module Contents" +msgstr "" + +# 5302aebd29084991b73434573b348161 +#: ../../api.rst:19 +msgid "The module defines several functions, constants, and an exception." +msgstr "" + +# a1318af3cc6341808c79ce8ae5ad9bc6 +#: ../../../bottle.pydocstring of bottle.debug:1 +msgid "" +"Change the debug level. There is only one debug level supported at the " +"moment." +msgstr "" + +# 29009b75d3d243a9951d43e6e6cec603 +#: ../../../bottle.pydocstring of bottle.run:1 +msgid "" +"Start a server instance. This method blocks until the server terminates." +msgstr "" + +# d7574f1e690e40779a504c0da4b49ec1 +#: ../../../bottle.pydocstring of bottle.run:3 +msgid "" +"WSGI application or target string supported by :func:`load_app`. (default: " +":func:`default_app`)" +msgstr "" + +# 4f4605bb1b5f41a190af6b58eca56e92 +#: ../../../bottle.pydocstring of bottle.run:5 +msgid "" +"Server adapter to use. See :data:`server_names` keys for valid names or pass" +" a :class:`ServerAdapter` subclass. (default: `wsgiref`)" +msgstr "" + +# afa4779b3b5b45ccadba9807f47137ee +#: ../../../bottle.pydocstring of bottle.run:8 +msgid "" +"Server address to bind to. Pass ``0.0.0.0`` to listens on all interfaces " +"including the external one. (default: 127.0.0.1)" +msgstr "" + +# 0d9126dd90c349c2aa4dd4667dfa3c80 +#: ../../../bottle.pydocstring of bottle.run:10 +msgid "" +"Server port to bind to. Values below 1024 require root privileges. (default:" +" 8080)" +msgstr "" + +# 6142219b8ae3456c87d1e9b1bc3a2aaf +#: ../../../bottle.pydocstring of bottle.run:12 +msgid "Start auto-reloading server? (default: False)" +msgstr "" + +# 5ab298b46aa54ad58d4b4326eea3258f +#: ../../../bottle.pydocstring of bottle.run:13 +msgid "Auto-reloader interval in seconds (default: 1)" +msgstr "" + +# 8821747925654642bd04a7c9d2f9f7f3 +#: ../../../bottle.pydocstring of bottle.run:14 +msgid "Suppress output to stdout and stderr? (default: False)" +msgstr "" + +# 3dbfb217bc3d484face0d7520f5fdf5f +#: ../../../bottle.pydocstring of bottle.run:15 +msgid "Options passed to the server adapter." +msgstr "" + +# 3bf21c520f5143d8867b769a73b7e1e3 +#: ../../../bottle.pydocstring of bottle.load:1 +msgid "Import a module or fetch an object from a module." +msgstr "" + +# be72344a676c42b69ed2b8f7271efb71 +#: ../../../bottle.pydocstring of bottle.load:3 +msgid "``package.module`` returns `module` as a module object." +msgstr "" + +# 47f1b57d89954810931003e5f5ee464b +#: ../../../bottle.pydocstring of bottle.load:4 +msgid "``pack.mod:name`` returns the module variable `name` from `pack.mod`." +msgstr "" + +# df39e9866a094edb85ebb9c06f048220 +#: ../../../bottle.pydocstring of bottle.load:5 +msgid "``pack.mod:func()`` calls `pack.mod.func()` and returns the result." +msgstr "" + +# 902d77f1a0bc4e48b13e574905f1b05e +#: ../../../bottle.pydocstring of bottle.load:7 +msgid "" +"The last form accepts not only function calls, but any type of expression. " +"Keyword arguments passed to this function are available as local variables. " +"Example: ``import_string('re:compile(x)', x='[a-z]')``" +msgstr "" + +# 561dce83224d49f4ba800390bf3de91c +#: ../../../bottle.pydocstring of bottle.load_app:1 +msgid "" +"Load a bottle application from a module and make sure that the import does " +"not affect the current default application, but returns a separate " +"application object. See :func:`load` for the target parameter." +msgstr "" + +# 60c30ba8932547c3a60d1800c94dd5f7 +# 4671fdf2ebd94882bbd784e5ae3cb701 +#: ../../../bottle.pydocstring of bottle.request:1 ../../../bottle.pydocstring +#: of bottle.request:1 +msgid "" +"A thread-safe instance of :class:`LocalRequest`. If accessed from within a " +"request callback, this instance always refers to the *current* request (even" +" on a multithreaded server)." +msgstr "" + +# 872bf1ee18254cc0a6277cc0984e8ce0 +#: ../../../bottle.pydocstring of bottle.response:1 +msgid "" +"A thread-safe instance of :class:`LocalResponse`. It is used to change the " +"HTTP response for the *current* request." +msgstr "" + +# a49428f08e864c05b0e3fc1dfd0ad3d7 +#: ../../../bottle.pydocstring of bottle.HTTP_CODES:1 +msgid "" +"A dict to map HTTP status codes (e.g. 404) to phrases (e.g. 'Not Found')" +msgstr "" + +# 5710371914e5487591145fcee2dfeda3 +#: ../../api.rst:38 +msgid "" +"Return the current :ref:`default-app`. Actually, these are callable " +"instances of :class:`AppStack` and implement a stack-like API." +msgstr "" + +# bf357e3b4acb493ca1155df94fb46080 +#: ../../api.rst:42 +msgid "Routing" +msgstr "" + +# b1c7697eeee24d6ca83ca2b6a80ad2f6 +#: ../../api.rst:44 +msgid "" +"Bottle maintains a stack of :class:`Bottle` instances (see :func:`app` and " +":class:`AppStack`) and uses the top of the stack as a *default application* " +"for some of the module-level functions and decorators." +msgstr "" + +# 75e0d14b9fb44da7b890abc146ba5bc6 +#: ../../api.rst:54 +msgid "" +"Decorator to install a route to the current default application. See " +":meth:`Bottle.route` for details." +msgstr "" + +# 14821620d48d4383ac39b31c3ba1b436 +#: ../../api.rst:59 +msgid "" +"Decorator to install an error handler to the current default application. " +"See :meth:`Bottle.error` for details." +msgstr "" + +# b0da533bd7f74371ad4fefdd4313e066 +#: ../../api.rst:63 +msgid "WSGI and HTTP Utilities" +msgstr "" + +# 854edb2260744c4fa52c37fbf3980442 +#: ../../../bottle.pydocstring of bottle.parse_date:1 +msgid "Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch." +msgstr "" + +# b8f1c325d3644e6485590e25988d2077 +#: ../../../bottle.pydocstring of bottle.parse_auth:1 +msgid "" +"Parse rfc2617 HTTP authentication header string (basic) and return " +"(user,pass) tuple or None" +msgstr "" + +# bd7f80d76a754cbbbe977d2eec833f86 +#: ../../../bottle.pydocstring of bottle.cookie_encode:1 +msgid "Encode and sign a pickle-able object. Return a (byte) string" +msgstr "" + +# 335ed0a39e054e76882f16135764add2 +#: ../../../bottle.pydocstring of bottle.cookie_decode:1 +msgid "Verify and decode an encoded string. Return an object or None." +msgstr "" + +# 680421ad57ae4dd2954f24ba9c48720e +#: ../../../bottle.pydocstring of bottle.cookie_is_encoded:1 +msgid "Return True if the argument looks like a encoded cookie." +msgstr "" + +# 325f0b3353a54b708f617183ac0fbb93 +#: ../../../bottle.pydocstring of bottle.yieldroutes:1 +msgid "" +"Return a generator for routes that match the signature (name, args) of the " +"func parameter. This may yield more than one route if the function takes " +"optional keyword arguments. The output is best described by example::" +msgstr "" + +# 1b294467fd7a4e1fbbb3e19af423f30a +#: ../../../bottle.pydocstring of bottle.path_shift:1 +msgid "Shift path fragments from PATH_INFO to SCRIPT_NAME and vice versa." +msgstr "" + +# e23f456fcd844151b572849d1687fd29 +#: ../../../bottle.pydocstring of bottle.path_shift:3 +msgid "The modified paths." +msgstr "" + +# d9f39844f4414125a2adea55c76f9ab1 +#: ../../../bottle.pydocstring of bottle.path_shift:4 +msgid "The SCRIPT_NAME path." +msgstr "" + +# bd1620f37b1545e982175ba24df5cfe1 +#: ../../../bottle.pydocstring of bottle.path_shift:5 +msgid "The PATH_INFO path." +msgstr "" + +# 0f9266e833cc414bbf3c8b4124a16003 +#: ../../../bottle.pydocstring of bottle.path_shift:6 +msgid "" +"The number of path fragments to shift. May be negative to change the shift " +"direction. (default: 1)" +msgstr "" + +# 678a6ae1672f4c0d88325bbe43e83f30 +#: ../../api.rst:81 +msgid "Data Structures" +msgstr "" + +# 7279d06962464074b2d1ba61a55b93ad +#: ../../../bottle.pydocstring of bottle.MultiDict:1 +msgid "" +"This dict stores multiple values per key, but behaves exactly like a normal " +"dict in that it returns only the newest value for any given key. There are " +"special methods available to access the full list of values." +msgstr "" + +# 332b43160ab04318ae0088aa8c371f4c +#: ../../../bottle.pydocstring of bottle.MultiDict.get:1 +msgid "Return the most recent value for a key." +msgstr "" + +# 78ed37185b8b45968763ac4772324ea5 +#: ../../../bottle.pydocstring of bottle.MultiDict.get:3 +msgid "" +"The default value to be returned if the key is not present or the type " +"conversion fails." +msgstr "" + +# 039280bb6e3548a88f83e39320cfc416 +#: ../../../bottle.pydocstring of bottle.MultiDict.get:5 +msgid "An index for the list of available values." +msgstr "" + +# 47e2d932db294dd9b57d1ebeb7d797a7 +#: ../../../bottle.pydocstring of bottle.MultiDict.get:6 +msgid "" +"If defined, this callable is used to cast the value into a specific type. " +"Exception are suppressed and result in the default value to be returned." +msgstr "" + +# fef50b5f3e4d407897944209ff13e6e1 +#: ../../../bottle.pydocstring of bottle.MultiDict.append:1 +msgid "Add a new value to the list of values for this key." +msgstr "" + +# 32b71ea024ad4c3dae6ddaa04353a545 +#: ../../../bottle.pydocstring of bottle.MultiDict.replace:1 +msgid "Replace the list of values with a single value." +msgstr "" + +# b1bab1a284c04ad0a120d6a6c050c375 +# b3656606d5a946b3bbf249abe36f0509 +#: ../../../bottle.pydocstring of bottle.MultiDict.getall:1 +#: ../../../bottle.pydocstring of bottle.MultiDict.getlist:1 +msgid "Return a (possibly empty) list of values for a key." +msgstr "" + +# 62b99ce921744dcaa91fc81bed6300a8 +#: ../../../bottle.pydocstring of bottle.MultiDict.getone:1 +msgid "Aliases for WTForms to mimic other multi-dict APIs (Django)" +msgstr "" + +# 3bd7637823c647c188852631285e6656 +#: ../../../bottle.pydocstring of bottle.HeaderDict:1 +msgid "" +"A case-insensitive version of :class:`MultiDict` that defaults to replace " +"the old value instead of appending it." +msgstr "" + +# 332b1d91c2f840aea478b587ae369b34 +#: ../../../bottle.pydocstring of bottle.FormsDict:1 +msgid "" +"This :class:`MultiDict` subclass is used to store request form data. " +"Additionally to the normal dict-like item access methods (which return " +"unmodified data as native strings), this container also supports attribute-" +"like access to its values. Attributes are automatically de- or recoded to " +"match :attr:`input_encoding` (default: 'utf8'). Missing attributes default " +"to an empty string." +msgstr "" + +# cbb7dae08e98470696e48c345f403f05 +#: ../../../bottle.pydocstring of bottle.FormsDict.input_encoding:1 +msgid "Encoding used for attribute values." +msgstr "" + +# 3bd9b27c66624040aa7843e87236b754 +#: ../../../bottle.pydocstring of bottle.FormsDict.recode_unicode:1 +msgid "" +"If true (default), unicode strings are first encoded with `latin1` and then " +"decoded to match :attr:`input_encoding`." +msgstr "" + +# 11f9df2634ee4a87ae7731021a0ff43a +#: ../../../bottle.pydocstring of bottle.FormsDict.decode:1 +msgid "" +"Returns a copy with all keys and values de- or recoded to match " +":attr:`input_encoding`. Some libraries (e.g. WTForms) want a unicode " +"dictionary." +msgstr "" + +# ddbfa2ebd1b64213acc046c12095e3a8 +#: ../../../bottle.pydocstring of bottle.FormsDict.getunicode:1 +msgid "Return the value as a unicode string, or the default." +msgstr "" + +# b621b20fa5834ffd81c6d3b4735d8d88 +#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:1 +msgid "" +"This dict-like class wraps a WSGI environ dict and provides convenient " +"access to HTTP_* fields. Keys and values are native strings (2.x bytes or " +"3.x unicode) and keys are case-insensitive. If the WSGI environment contains" +" non-native string values, these are de- or encoded using a lossless " +"'latin1' character set." +msgstr "" + +# 87a92fe6b7f94bf6b3597e2a7c6e88b7 +#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict:7 +msgid "" +"The API will remain stable even on changes to the relevant PEPs. Currently " +"PEP 333, 444 and 3333 are supported. (PEP 444 is the only one that uses non-" +"native strings.)" +msgstr "" + +# d23f7140fb494f1b954b80fd5981f784 +#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.cgikeys:1 +msgid "List of keys that do not have a ``HTTP_`` prefix." +msgstr "" + +# 9b4e21107d094d7aadcf3c7782cd7301 +#: ../../../bottle.pydocstring of bottle.WSGIHeaderDict.raw:1 +msgid "Return the header value as is (may be bytes or unicode)." +msgstr "" + +# a856ad085fa14e608dd7996cde192d15 +#: ../../../bottle.pydocstring of bottle.AppStack:1 +msgid "A stack-like list. Calling it returns the head of the stack." +msgstr "" + +# 8dd7a416957746c5b1ec44b6948ee5c5 +#: ../../api.rst:100 +msgid "Return the current default application and remove it from the stack." +msgstr "" + +# 60baa898a97a414a858d741f43fa475e +#: ../../../bottle.pydocstring of bottle.AppStack.push:1 +msgid "Add a new :class:`Bottle` instance to the stack" +msgstr "" + +# efd9ddd7626e4866a05f586f60c0ff5b +#: ../../../bottle.pydocstring of bottle.ResourceManager:1 +msgid "" +"This class manages a list of search paths and helps to find and open " +"application-bound resources (files)." +msgstr "" + +# eab412f7ded54862952fee98a36b07a4 +#: ../../../bottle.pydocstring of bottle.ResourceManager:4 +msgid "default value for :meth:`add_path` calls." +msgstr "" + +# 42290c6719d7482b90feb3f184a6b8d2 +#: ../../../bottle.pydocstring of bottle.ResourceManager:5 +msgid "callable used to open resources." +msgstr "" + +# 9184e835b69744978fcfa59bdda4fd0d +#: ../../../bottle.pydocstring of bottle.ResourceManager:6 +msgid "controls which lookups are cached. One of 'all', 'found' or 'none'." +msgstr "" + +# 63ff63e617d14cf5b599ae3daf160471 +#: ../../../bottle.pydocstring of bottle.ResourceManager.path:1 +msgid "A list of search paths. See :meth:`add_path` for details." +msgstr "" + +# 15dfb2a406d24b6eb081ef38ce7e0e37 +#: ../../../bottle.pydocstring of bottle.ResourceManager.cache:1 +msgid "A cache for resolved paths. ``res.cache.clear()`` clears the cache." +msgstr "" + +# f5344d03c3f54f498dd1fb9e99311439 +#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:1 +msgid "" +"Add a new path to the list of search paths. Return False if the path does " +"not exist." +msgstr "" + +# b18b16c1b915494983d7a409c6681620 +#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:4 +msgid "" +"The new search path. Relative paths are turned into an absolute and " +"normalized form. If the path looks like a file (not ending in `/`), the " +"filename is stripped off." +msgstr "" + +# 2d12fbb7606443e6b5d741cfc9eabecc +#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:7 +msgid "" +"Path used to absolutize relative search paths. Defaults to :attr:`base` " +"which defaults to ``os.getcwd()``." +msgstr "" + +# ee02bee8b77447b6926989b78c3d613b +#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:9 +msgid "" +"Position within the list of search paths. Defaults to last index (appends to" +" the list)." +msgstr "" + +# bccbc7e3f7534a78b9b1accf4cd9fa25 +#: ../../../bottle.pydocstring of bottle.ResourceManager.add_path:12 +msgid "" +"The `base` parameter makes it easy to reference files installed along with a" +" python module or package::" +msgstr "" + +# c892658142f842dc959ad96ccddb9fbe +#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:1 +msgid "Search for a resource and return an absolute file path, or `None`." +msgstr "" + +# becb5d6094e9486897e491e36c1e3560 +#: ../../../bottle.pydocstring of bottle.ResourceManager.lookup:3 +msgid "" +"The :attr:`path` list is searched in order. The first match is returend. " +"Symlinks are followed. The result is cached to speed up future lookups." +msgstr "" + +# 1677f80130084b4e9467f43f3d7d4188 +#: ../../../bottle.pydocstring of bottle.ResourceManager.open:1 +msgid "Find a resource and return a file object, or raise IOError." +msgstr "" + +# 158fe9a3639b4970aa7789ecadbed596 +#: ../../../bottle.pydocstring of bottle.FileUpload.file:1 +msgid "Open file(-like) object (BytesIO buffer or temporary file)" +msgstr "" + +# 5a1b03b86526493a8b7bcbf7eb62f922 +#: ../../../bottle.pydocstring of bottle.FileUpload.name:1 +msgid "Name of the upload form field" +msgstr "" + +# 939c81bb9e2741ab85233b8eb59edd55 +#: ../../../bottle.pydocstring of bottle.FileUpload.raw_filename:1 +msgid "Raw filename as sent by the client (may contain unsafe characters)" +msgstr "" + +# b061dc9a587f4a128ccebd2a0a2d0c1e +#: ../../../bottle.pydocstring of bottle.FileUpload.headers:1 +msgid "A :class:`HeaderDict` with additional headers (e.g. content-type)" +msgstr "" + +# 97b67366c01f4896a4cb519439430184 +# b0c53ccc72a04ed68d8f53633005986e +#: ../../../bottle.pydocstring of bottle.FileUpload.content_type:1 +#: ../../../bottle.pydocstring of bottle.BaseResponse.content_type:1 +msgid "Current value of the 'Content-Type' header." +msgstr "" + +# c81bf8a096134919b0f9d666e0f38b13 +# 2c67facb603b43f09c832e02466be9b7 +#: ../../../bottle.pydocstring of bottle.FileUpload.content_length:1 +#: ../../../bottle.pydocstring of bottle.BaseResponse.content_length:1 +msgid "Current value of the 'Content-Length' header." +msgstr "" + +# 86e8a674418349aea54553ede16eb819 +#: ../../../bottle.pydocstring of bottle.FileUpload.filename:1 +msgid "" +"Name of the file on the client file system, but normalized to ensure file " +"system compatibility. An empty filename is returned as 'empty'." +msgstr "" + +# d167702a191149faabe7a852f4894401 +#: ../../../bottle.pydocstring of bottle.FileUpload.filename:4 +msgid "" +"Only ASCII letters, digits, dashes, underscores and dots are allowed in the " +"final filename. Accents are removed, if possible. Whitespace is replaced by " +"a single dash. Leading or tailing dots or dashes are removed. The filename " +"is limited to 255 characters." +msgstr "" + +# 3bd2181f702a4267b113127206683b3b +#: ../../../bottle.pydocstring of bottle.FileUpload.save:1 +msgid "" +"Save file to disk or copy its content to an open file(-like) object. If " +"*destination* is a directory, :attr:`filename` is added to the path. " +"Existing files are not overwritten by default (IOError)." +msgstr "" + +# 32fe556fda8347feba81515537de15ca +#: ../../../bottle.pydocstring of bottle.FileUpload.save:5 +msgid "File path, directory or file(-like) object." +msgstr "" + +# cc4d403f23264d698811ba6a8d33ac72 +#: ../../../bottle.pydocstring of bottle.FileUpload.save:6 +msgid "If True, replace existing files. (default: False)" +msgstr "" + +# aa61856ac4f5426c8c019bbe7f648c9f +#: ../../../bottle.pydocstring of bottle.FileUpload.save:7 +msgid "Bytes to read at a time. (default: 64kb)" +msgstr "" + +# 29b63851e1864ca0a33899294b941c99 +#: ../../api.rst:109 +msgid "Exceptions" +msgstr "" + +# 6e163262f34b422e83b251fb6c36e10f +#: ../../../bottle.pydocstring of bottle.BottleException:1 +msgid "A base class for exceptions used by bottle." +msgstr "" + +# 58e87dab98e946bcb2b22d57fac849cb +#: ../../api.rst:117 +msgid "The :class:`Bottle` Class" +msgstr "" + +# cd6d1ed2f92145adbebfd440e76a38e0 +#: ../../../bottle.pydocstring of bottle.Bottle:1 +msgid "" +"Each Bottle object represents a single, distinct web application and " +"consists of routes, callbacks, plugins, resources and configuration. " +"Instances are callable WSGI applications." +msgstr "" + +# ad8e01ad09bf45c09f47524bf5712c89 +#: ../../../bottle.pydocstring of bottle.Bottle:5 +msgid "" +"If true (default), handle all exceptions. Turn off to let debugging " +"middleware handle exceptions." +msgstr "" + +# be4cfbf92c834eb496fee4378c9b654f +#: ../../../bottle.pydocstring of bottle.Bottle.config:1 +msgid "A :class:`ConfigDict` for app specific configuration." +msgstr "" + +# 943c669538f947ebb508a9c6275b8826 +#: ../../../bottle.pydocstring of bottle.Bottle.resources:1 +msgid "A :class:`ResourceManager` for application files" +msgstr "" + +# 2ea2a5042a094a40ae1b06724d1b1cf9 +#: ../../../bottle.pydocstring of bottle.Bottle.catchall:1 +msgid "If true, most exceptions are caught and returned as :exc:`HTTPError`" +msgstr "" + +# a5992fe1c37448b591f9accd2df26178 +#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:1 +msgid "Attach a callback to a hook. Three hooks are currently implemented:" +msgstr "" + +# b1c25725010c41988006f85869393c85 +#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4 +msgid "before_request" +msgstr "" + +# 23bda4671530451da9810b459c6bb465 +#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:4 +msgid "" +"Executed once before each request. The request context is available, but no " +"routing has happened yet." +msgstr "" + +# 3a8fcf7790874f179f661aa100d2f4cf +#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:6 +msgid "after_request" +msgstr "" + +# 002d9ee625f746e08d7f040b8c78619f +#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:7 +msgid "Executed once after each request regardless of its outcome." +msgstr "" + +# 0e850b67de90456da8f882422d042a98 +#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:8 +msgid "app_reset" +msgstr "" + +# 10fa5238397e4f80a217fc762ea4561d +#: ../../../bottle.pydocstring of bottle.Bottle.add_hook:9 +msgid "Called whenever :meth:`Bottle.reset` is called." +msgstr "" + +# 956c85989abc4bcba9e968a3919f419f +#: ../../../bottle.pydocstring of bottle.Bottle.remove_hook:1 +msgid "Remove a callback from a hook." +msgstr "" + +# 07b66f5038064422947c9ec9f61cc002 +#: ../../../bottle.pydocstring of bottle.Bottle.trigger_hook:1 +msgid "Trigger a hook and return a list of results." +msgstr "" + +# 173a4decfa414251ae35daf7579b28fa +#: ../../../bottle.pydocstring of bottle.Bottle.hook:1 +msgid "" +"Return a decorator that attaches a callback to a hook. See :meth:`add_hook` " +"for details." +msgstr "" + +# 2c44be04d6384cea9921a7580f49bd9e +#: ../../../bottle.pydocstring of bottle.Bottle.mount:1 +msgid "" +"Mount an application (:class:`Bottle` or plain WSGI) to a specific URL " +"prefix. Example::" +msgstr "" + +# ea34ccfb3d2542779ad5efcf51306bf2 +#: ../../../bottle.pydocstring of bottle.Bottle.mount:6 +msgid "" +"path prefix or `mount-point`. If it ends in a slash, that slash is " +"mandatory." +msgstr "" + +# cde929a6d4bb42d6aa8987bee536ea69 +#: ../../../bottle.pydocstring of bottle.Bottle.mount:8 +msgid "an instance of :class:`Bottle` or a WSGI application." +msgstr "" + +# d2230da7b83944f08e4c319e99500a49 +#: ../../../bottle.pydocstring of bottle.Bottle.mount:10 +msgid "All other parameters are passed to the underlying :meth:`route` call." +msgstr "" + +# a857bad1f0e64f568190ca94195fa516 +#: ../../../bottle.pydocstring of bottle.Bottle.merge:1 +msgid "" +"Merge the routes of another :class:`Bottle` application or a list of " +":class:`Route` objects into this application. The routes keep their 'owner'," +" meaning that the :data:`Route.app` attribute is not changed." +msgstr "" + +# 8b323545238c4c7391e4e6932746bb3b +#: ../../../bottle.pydocstring of bottle.Bottle.install:1 +msgid "" +"Add a plugin to the list of plugins and prepare it for being applied to all " +"routes of this application. A plugin may be a simple decorator or an object " +"that implements the :class:`Plugin` API." +msgstr "" + +# 60ebb9a4a6914093813f839ddccdf62a +#: ../../../bottle.pydocstring of bottle.Bottle.uninstall:1 +msgid "" +"Uninstall plugins. Pass an instance to remove a specific plugin, a type " +"object to remove all plugins that match that type, a string to remove all " +"plugins with a matching ``name`` attribute or ``True`` to remove all " +"plugins. Return the list of removed plugins." +msgstr "" + +# cd607eb3f6e44615905ded8adb97b6db +#: ../../../bottle.pydocstring of bottle.Bottle.reset:1 +msgid "" +"Reset all routes (force plugins to be re-applied) and clear all caches. If " +"an ID or route object is given, only that specific route is affected." +msgstr "" + +# 702c4a2d252f4a9eb9d6366189cc53ca +#: ../../../bottle.pydocstring of bottle.Bottle.close:1 +msgid "Close the application and all installed plugins." +msgstr "" + +# 77637ff70804460c860a6eb31676031c +#: ../../../bottle.pydocstring of bottle.Bottle.run:1 +msgid "Calls :func:`run` with the same parameters." +msgstr "" + +# 2ba5548d2b344a6f9d9d9e1b0fd5815b +#: ../../../bottle.pydocstring of bottle.Bottle.match:1 +msgid "" +"Search for a matching route and return a (:class:`Route` , urlargs) tuple. " +"The second value is a dictionary with parameters extracted from the URL. " +"Raise :exc:`HTTPError` (404/405) on a non-match." +msgstr "" + +# e414e0c9d58043bba4b914dbfee77215 +#: ../../../bottle.pydocstring of bottle.Bottle.get_url:1 +msgid "Return a string that matches a named route" +msgstr "" + +# 536433380c5845018425b928a5a6a382 +#: ../../../bottle.pydocstring of bottle.Bottle.add_route:1 +msgid "Add a route object, but do not change the :data:`Route.app` attribute." +msgstr "" + +# 1de8bb1c833d41f2a70f3f54decb19e7 +#: ../../../bottle.pydocstring of bottle.Bottle.route:1 +msgid "A decorator to bind a function to a request URL. Example::" +msgstr "" + +# c2876a4a016f4e6bbebdbd881e5ee946 +#: ../../../bottle.pydocstring of bottle.Bottle.route:7 +msgid "" +"The ``:name`` part is a wildcard. See :class:`Router` for syntax details." +msgstr "" + +# f70c2bea86824b62b40f5cb9b29b2b51 +#: ../../../bottle.pydocstring of bottle.Bottle.route:10 +msgid "" +"Request path or a list of paths to listen to. If no path is specified, it is" +" automatically generated from the signature of the function." +msgstr "" + +# 2aab456e96d847b78a8aecafa2ec9998 +#: ../../../bottle.pydocstring of bottle.Bottle.route:13 +msgid "" +"HTTP method (`GET`, `POST`, `PUT`, ...) or a list of methods to listen to. " +"(default: `GET`)" +msgstr "" + +# f0581275d3344cc498b0507572f025be +#: ../../../bottle.pydocstring of bottle.Bottle.route:15 +msgid "" +"An optional shortcut to avoid the decorator syntax. ``route(..., " +"callback=func)`` equals ``route(...)(func)``" +msgstr "" + +# 14a237dd50f9451f9d1e7b4f562eba46 +#: ../../../bottle.pydocstring of bottle.Bottle.route:17 +msgid "The name for this route. (default: None)" +msgstr "" + +# b340da124931450e8cc9c5cb3196a35b +#: ../../../bottle.pydocstring of bottle.Bottle.route:18 +msgid "" +"A decorator or plugin or a list of plugins. These are applied to the route " +"callback in addition to installed plugins." +msgstr "" + +# b23d6dfc18c44024bb9183ddb35c08b0 +#: ../../../bottle.pydocstring of bottle.Bottle.route:20 +msgid "" +"A list of plugins, plugin classes or names. Matching plugins are not " +"installed to this route. ``True`` skips all." +msgstr "" + +# 21adffa2774b4d828d445071ef4f7559 +#: ../../../bottle.pydocstring of bottle.Bottle.route:23 +msgid "" +"Any additional keyword arguments are stored as route-specific configuration " +"and passed to plugins (see :meth:`Plugin.apply`)." +msgstr "" + +# f0079d8ffa1146fb892fe508e56f80a1 +#: ../../../bottle.pydocstring of bottle.Bottle.get:1 +msgid "Equals :meth:`route`." +msgstr "" + +# 3b1c2781d0bb465dae22de6e23c77961 +#: ../../../bottle.pydocstring of bottle.Bottle.post:1 +msgid "Equals :meth:`route` with a ``POST`` method parameter." +msgstr "" + +# 93a85e83030d4d8ea7e36af79e9e95e9 +#: ../../../bottle.pydocstring of bottle.Bottle.put:1 +msgid "Equals :meth:`route` with a ``PUT`` method parameter." +msgstr "" + +# b096417ed4f44002883cebff4f1e9a14 +#: ../../../bottle.pydocstring of bottle.Bottle.delete:1 +msgid "Equals :meth:`route` with a ``DELETE`` method parameter." +msgstr "" + +# 20d912e01583408ca731ee4aa38a913b +#: ../../../bottle.pydocstring of bottle.Bottle.patch:1 +msgid "Equals :meth:`route` with a ``PATCH`` method parameter." +msgstr "" + +# c334ba452db74d9399d0aa2c4d7aaf75 +#: ../../../bottle.pydocstring of bottle.Bottle.error:1 +msgid "Decorator: Register an output handler for a HTTP error code" +msgstr "" + +# 75438b26765a4e1ab5f64c729251a320 +#: ../../../bottle.pydocstring of bottle.Bottle.wsgi:1 +msgid "The bottle WSGI-interface." +msgstr "" + +# fe9fedfbcd16458a9b554dd1a2e34997 +#: ../../../bottle.pydocstring of bottle.Route:1 +msgid "" +"This class wraps a route callback along with route specific metadata and " +"configuration and applies Plugins on demand. It is also responsible for " +"turing an URL path rule into a regular expression usable by the Router." +msgstr "" + +# 9496b769285146f8a6219b2c2dfcd100 +#: ../../../bottle.pydocstring of bottle.Route.app:1 +msgid "The application this route is installed to." +msgstr "" + +# 6dc89226b6d041ef8e1902dd292c8400 +#: ../../../bottle.pydocstring of bottle.Route.rule:1 +msgid "The path-rule string (e.g. ``/wiki/<page>``)." +msgstr "" + +# b6d1303f19094eb9bd5d6063f8b66191 +#: ../../../bottle.pydocstring of bottle.Route.method:1 +msgid "The HTTP method as a string (e.g. ``GET``)." +msgstr "" + +# f7f54d28b9794e37a416c59468e49c4f +#: ../../../bottle.pydocstring of bottle.Route.callback:1 +msgid "" +"The original callback with no plugins applied. Useful for introspection." +msgstr "" + +# a3b9236a9ec146208651cf9f4478d8ff +#: ../../../bottle.pydocstring of bottle.Route.name:1 +msgid "The name of the route (if specified) or ``None``." +msgstr "" + +# 4590866d52f94166af42d76c8103a2cc +#: ../../../bottle.pydocstring of bottle.Route.plugins:1 +msgid "A list of route-specific plugins (see :meth:`Bottle.route`)." +msgstr "" + +# a1121c61945841c59f337077fdfe7a14 +#: ../../../bottle.pydocstring of bottle.Route.skiplist:1 +msgid "" +"A list of plugins to not apply to this route (see :meth:`Bottle.route`)." +msgstr "" + +# a4f07bf1ab554cc99a8dbcd891a416fe +#: ../../../bottle.pydocstring of bottle.Route.config:1 +msgid "" +"Additional keyword arguments passed to the :meth:`Bottle.route` decorator " +"are stored in this dictionary. Used for route-specific plugin configuration " +"and meta-data." +msgstr "" + +# 1e97056b218c4432844f28bab35ae4b9 +#: ../../../bottle.pydocstring of bottle.Route.call:1 +msgid "" +"The route callback with all plugins applied. This property is created on " +"demand and then cached to speed up subsequent requests." +msgstr "" + +# e54a7a3f6c6b41f68b1f7f6749dcca25 +#: ../../../bottle.pydocstring of bottle.Route.reset:1 +msgid "" +"Forget any cached values. The next time :attr:`call` is accessed, all " +"plugins are re-applied." +msgstr "" + +# 4d664586c1c54559864fdcb9d9c081ca +#: ../../../bottle.pydocstring of bottle.Route.prepare:1 +msgid "Do all on-demand work immediately (useful for debugging)." +msgstr "" + +# 0b7d6fdbf70e41eb9d807c1d8baab4fb +#: ../../../bottle.pydocstring of bottle.Route.all_plugins:1 +msgid "Yield all Plugins affecting this route." +msgstr "" + +# 41a13375a15b4b2b90dcbc8bfaad95f9 +#: ../../../bottle.pydocstring of bottle.Route.get_undecorated_callback:1 +msgid "" +"Return the callback. If the callback is a decorated function, try to recover" +" the original function." +msgstr "" + +# 5d85fbf2b65c477681c1154b5e753c48 +#: ../../../bottle.pydocstring of bottle.Route.get_callback_args:1 +msgid "" +"Return a list of argument names the callback (most likely) accepts as " +"keyword arguments. If the callback is a decorated function, try to recover " +"the original function before inspection." +msgstr "" + +# 24807d5c0dbc41608e25506fc42055be +#: ../../../bottle.pydocstring of bottle.Route.get_config:1 +msgid "" +"Lookup a config field and return its value, first checking the route.config," +" then route.app.config." +msgstr "" + +# 0980ef7f913f41ab8e9a9f24efd8434f +#: ../../api.rst:127 +msgid "The :class:`Request` Object" +msgstr "" + +# 19d62d8700724bd59715f54aa2ab9611 +#: ../../api.rst:129 +msgid "" +"The :class:`Request` class wraps a WSGI environment and provides helpful " +"methods to parse and access form data, cookies, file uploads and other " +"metadata. Most of the attributes are read-only." +msgstr "" + +# d19980104b38454694e02c26f91aa043 +#: ../../../bottle.pydocstring of bottle.BaseRequest:1 +msgid "" +"A wrapper for WSGI environment dictionaries that adds a lot of convenient " +"access methods and properties. Most of them are read-only." +msgstr "" + +# 18a8359c3e234b309c7ca9a0ed691b31 +#: ../../../bottle.pydocstring of bottle.BaseRequest:4 +msgid "" +"Adding new attributes to a request actually adds them to the environ " +"dictionary (as 'bottle.request.ext.<name>'). This is the recommended way to " +"store and access request-specific data." +msgstr "" + +# e7418bd103e64768805719f615287ef9 +#: ../../../bottle.pydocstring of bottle.BaseRequest.MEMFILE_MAX:1 +msgid "Maximum size of memory buffer for :attr:`body` in bytes." +msgstr "" + +# 38309eda596944a38fdc410951288b06 +#: ../../../bottle.pydocstring of bottle.BaseRequest.environ:1 +msgid "" +"The wrapped WSGI environ dictionary. This is the only real attribute. All " +"other attributes actually are read-only properties." +msgstr "" + +# 2e4b925fb03a4d64b7c29542102de1b1 +#: ../../../bottle.pydocstring of bottle.BaseRequest.app:1 +msgid "Bottle application handling this request." +msgstr "" + +# 187f069ff1a54530a3dfc83db5812f4a +#: ../../../bottle.pydocstring of bottle.BaseRequest.route:1 +msgid "The bottle :class:`Route` object that matches this request." +msgstr "" + +# 5b6bc6e7728446d8b311c3d56721ea71 +#: ../../../bottle.pydocstring of bottle.BaseRequest.url_args:1 +msgid "The arguments extracted from the URL." +msgstr "" + +# b7806e2ab3f2487e96d49efe6c212774 +#: ../../../bottle.pydocstring of bottle.BaseRequest.path:1 +msgid "" +"The value of ``PATH_INFO`` with exactly one prefixed slash (to fix broken " +"clients and avoid the \"empty path\" edge case)." +msgstr "" + +# e73b404238eb4dc9aee6c6f6d1a35831 +#: ../../../bottle.pydocstring of bottle.BaseRequest.method:1 +msgid "The ``REQUEST_METHOD`` value as an uppercase string." +msgstr "" + +# 797b9664dddb4bccbabf2e8c52e337f5 +#: ../../../bottle.pydocstring of bottle.BaseRequest.headers:1 +msgid "" +"A :class:`WSGIHeaderDict` that provides case-insensitive access to HTTP " +"request headers." +msgstr "" + +# 894e12d96b894446944764bd144f1252 +#: ../../../bottle.pydocstring of bottle.BaseRequest.get_header:1 +msgid "Return the value of a request header, or a given default value." +msgstr "" + +# 197de294ab4d4ec6b5cb6d6aecd12e18 +#: ../../../bottle.pydocstring of bottle.BaseRequest.cookies:1 +msgid "" +"Cookies parsed into a :class:`FormsDict`. Signed cookies are NOT decoded. " +"Use :meth:`get_cookie` if you expect signed cookies." +msgstr "" + +# 4d35bcb791c144d49800854c27cf24c7 +#: ../../../bottle.pydocstring of bottle.BaseRequest.get_cookie:1 +msgid "" +"Return the content of a cookie. To read a `Signed Cookie`, the `secret` must" +" match the one used to create the cookie (see " +":meth:`BaseResponse.set_cookie`). If anything goes wrong (missing cookie or " +"wrong signature), return a default value." +msgstr "" + +# 52e45424a11d4f3f89bce680502de547 +#: ../../../bottle.pydocstring of bottle.BaseRequest.query:1 +msgid "" +"The :attr:`query_string` parsed into a :class:`FormsDict`. These values are " +"sometimes called \"URL arguments\" or \"GET parameters\", but not to be " +"confused with \"URL wildcards\" as they are provided by the :class:`Router`." +msgstr "" + +# 9c8b68d027324f33a775f04bd9e8188c +#: ../../../bottle.pydocstring of bottle.BaseRequest.forms:1 +msgid "" +"Form values parsed from an `url-encoded` or `multipart/form-data` encoded " +"POST or PUT request body. The result is returned as a :class:`FormsDict`. " +"All keys and values are strings. File uploads are stored separately in " +":attr:`files`." +msgstr "" + +# c166a5f18f5247db8b9c0d775286dcc9 +#: ../../../bottle.pydocstring of bottle.BaseRequest.params:1 +msgid "" +"A :class:`FormsDict` with the combined values of :attr:`query` and " +":attr:`forms`. File uploads are stored in :attr:`files`." +msgstr "" + +# c3218dd21f1a470b9c634574e7d79dd8 +#: ../../../bottle.pydocstring of bottle.BaseRequest.files:1 +msgid "" +"File uploads parsed from `multipart/form-data` encoded POST or PUT request " +"body. The values are instances of :class:`FileUpload`." +msgstr "" + +# 133c3a0b8f5b497abe29c8ffd3bf7636 +#: ../../../bottle.pydocstring of bottle.BaseRequest.json:1 +msgid "" +"If the ``Content-Type`` header is ``application/json``, this property holds " +"the parsed content of the request body. Only requests smaller than " +":attr:`MEMFILE_MAX` are processed to avoid memory exhaustion." +msgstr "" + +# 5729e49a74ca4056b6c96004e54ef01c +#: ../../../bottle.pydocstring of bottle.BaseRequest.body:1 +msgid "" +"The HTTP request body as a seek-able file-like object. Depending on " +":attr:`MEMFILE_MAX`, this is either a temporary file or a " +":class:`io.BytesIO` instance. Accessing this property for the first time " +"reads and replaces the ``wsgi.input`` environ variable. Subsequent accesses " +"just do a `seek(0)` on the file object." +msgstr "" + +# 74e2ad2eccdd450384fc0c58100b5cb0 +#: ../../../bottle.pydocstring of bottle.BaseRequest.chunked:1 +msgid "True if Chunked transfer encoding was." +msgstr "" + +# 26d8d8a46b6c4e97bc658a075b0cc543 +#: ../../../bottle.pydocstring of bottle.BaseRequest.GET:1 +msgid "An alias for :attr:`query`." +msgstr "" + +# dc2407aa502d47bdbdccbbe987b1378e +#: ../../../bottle.pydocstring of bottle.BaseRequest.POST:1 +msgid "" +"The values of :attr:`forms` and :attr:`files` combined into a single " +":class:`FormsDict`. Values are either strings (form values) or instances of " +":class:`cgi.FieldStorage` (file uploads)." +msgstr "" + +# 83fefa837c9c4686b48843452d36edb4 +#: ../../../bottle.pydocstring of bottle.BaseRequest.url:1 +msgid "" +"The full request URI including hostname and scheme. If your app lives behind" +" a reverse proxy or load balancer and you get confusing results, make sure " +"that the ``X-Forwarded-Host`` header is set correctly." +msgstr "" + +# 3102cd1f3daf4d2988ed3eb332d6a0e4 +#: ../../../bottle.pydocstring of bottle.BaseRequest.urlparts:1 +msgid "" +"The :attr:`url` string as an :class:`urlparse.SplitResult` tuple. The tuple " +"contains (scheme, host, path, query_string and fragment), but the fragment " +"is always empty because it is not visible to the server." +msgstr "" + +# dbb2fe1dd13e447c8d6a6051f77c2108 +#: ../../../bottle.pydocstring of bottle.BaseRequest.fullpath:1 +msgid "Request path including :attr:`script_name` (if present)." +msgstr "" + +# f8dfb3c32d344539aeb9beaafb1b8f2b +#: ../../../bottle.pydocstring of bottle.BaseRequest.query_string:1 +msgid "" +"The raw :attr:`query` part of the URL (everything in between ``?`` and " +"``#``) as a string." +msgstr "" + +# 17c227b3922a4c0f83221abad09faed2 +#: ../../../bottle.pydocstring of bottle.BaseRequest.script_name:1 +msgid "" +"The initial portion of the URL's `path` that was removed by a higher level " +"(server or routing middleware) before the application was called. This " +"script path is returned with leading and tailing slashes." +msgstr "" + +# 541f3baa8331490eb8cfa0c82b984f6c +#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2 +msgid "Shift path segments from :attr:`path` to :attr:`script_name` and" +msgstr "" + +# d25eb7998ea74a1599f0dae0dc366998 +#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:2 +msgid "vice versa." +msgstr "" + +# b30d3e677515491ab3293f6699c209b8 +#: ../../../bottle.pydocstring of bottle.BaseRequest.path_shift:4 +msgid "" +"The number of path segments to shift. May be negative to change the shift " +"direction. (default: 1)" +msgstr "" + +# c2eefebcc51d4fd8b8928ff5c123b991 +#: ../../../bottle.pydocstring of bottle.BaseRequest.content_length:1 +msgid "" +"The request body length as an integer. The client is responsible to set this" +" header. Otherwise, the real length of the body is unknown and -1 is " +"returned. In this case, :attr:`body` will be empty." +msgstr "" + +# ec1bc61d62594a18be4d3bcb6b232e26 +#: ../../../bottle.pydocstring of bottle.BaseRequest.content_type:1 +msgid "The Content-Type header as a lowercase-string (default: empty)." +msgstr "" + +# 8b06d6e30c244cb4899e0f18c78b2382 +#: ../../../bottle.pydocstring of bottle.BaseRequest.is_xhr:1 +msgid "" +"True if the request was triggered by a XMLHttpRequest. This only works with " +"JavaScript libraries that support the `X-Requested-With` header (most of the" +" popular libraries do)." +msgstr "" + +# 70694af67bdf4a94afcd795bacf9603c +#: ../../../bottle.pydocstring of bottle.BaseRequest.is_ajax:1 +msgid "Alias for :attr:`is_xhr`. \"Ajax\" is not the right term." +msgstr "" + +# f01c1a9c1f464f4887ef6f7df9e2290c +#: ../../../bottle.pydocstring of bottle.BaseRequest.auth:1 +msgid "" +"HTTP authentication data as a (user, password) tuple. This implementation " +"currently supports basic (not digest) authentication only. If the " +"authentication happened at a higher level (e.g. in the front web-server or a" +" middleware), the password field is None, but the user field is looked up " +"from the ``REMOTE_USER`` environ variable. On any errors, None is returned." +msgstr "" + +# c5e697b8c7bb4f0eb374a0290c4f9ebc +#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_route:1 +msgid "" +"A list of all IPs that were involved in this request, starting with the " +"client IP and followed by zero or more proxies. This does only work if all " +"proxies support the ```X-Forwarded-For`` header. Note that this information " +"can be forged by malicious clients." +msgstr "" + +# d318ecc14e1c4b55aa0b37fa905402b5 +#: ../../../bottle.pydocstring of bottle.BaseRequest.remote_addr:1 +msgid "" +"The client IP as a string. Note that this information can be forged by " +"malicious clients." +msgstr "" + +# 37e2bc129f4344f69f1638242c7a8b6a +#: ../../../bottle.pydocstring of bottle.BaseRequest.copy:1 +msgid "Return a new :class:`Request` with a shallow :attr:`environ` copy." +msgstr "" + +# 783b014fc4d9467fabc53d1002ee8b0c +#: ../../api.rst:137 +msgid "" +"The module-level :data:`bottle.request` is a proxy object (implemented in " +":class:`LocalRequest`) and always refers to the `current` request, or in " +"other words, the request that is currently processed by the request handler " +"in the current thread. This `thread locality` ensures that you can safely " +"use a global instance in a multi-threaded environment." +msgstr "" + +# 6b8fd96f9d864365a306ae8bd7540100 +#: ../../../bottle.pydocstring of bottle.LocalRequest:1 +msgid "" +"A thread-local subclass of :class:`BaseRequest` with a different set of " +"attributes for each thread. There is usually only one global instance of " +"this class (:data:`request`). If accessed during a request/response cycle, " +"this instance always refers to the *current* request (even on a " +"multithreaded server)." +msgstr "" + +# cf28da2200b647d4ab95aa6856da4728 +#: ../../../bottle.pydocstring of bottle.LocalRequest.bind:1 +msgid "Wrap a WSGI environ dictionary." +msgstr "" + +# 5679e84f729c4e18bfdf24e733568a11 +# 8997f48eff01470fac183253d5668646 +#: ../../../bottle.pydocstring of bottle.LocalRequest.environ:1 +#: ../../../bottle.pydocstring of bottle.LocalResponse.body:1 +msgid "Thread-local property" +msgstr "" + +# 75ce75442a1849a6961057ae8c44496d +#: ../../api.rst:146 +msgid "The :class:`Response` Object" +msgstr "" + +# 6c9d0b58bc484258903b66671ef44ae5 +#: ../../api.rst:148 +msgid "" +"The :class:`Response` class stores the HTTP status code as well as headers " +"and cookies that are to be sent to the client. Similar to " +":data:`bottle.request` there is a thread-local :data:`bottle.response` " +"instance that can be used to adjust the `current` response. Moreover, you " +"can instantiate :class:`Response` and return it from your request handler. " +"In this case, the custom instance overrules the headers and cookies defined " +"in the global one." +msgstr "" + +# 7b311ec1097f445eb6f51526e6c7f5da +#: ../../../bottle.pydocstring of bottle.BaseResponse:1 +msgid "Storage class for a response body as well as headers and cookies." +msgstr "" + +# a7c70b3a5dac48d8ad9838aad181b030 +#: ../../../bottle.pydocstring of bottle.BaseResponse:3 +msgid "" +"This class does support dict-like case-insensitive item-access to headers, " +"but is NOT a dict. Most notably, iterating over a response yields parts of " +"the body and not the headers." +msgstr "" + +# f0da442123914c9dbf92ad14ae33d4eb +#: ../../../bottle.pydocstring of bottle.BaseResponse:7 +msgid "The response body as one of the supported types." +msgstr "" + +# 416bec80b1d74581a3545300500cb6bb +#: ../../../bottle.pydocstring of bottle.BaseResponse:8 +msgid "" +"Either an HTTP status code (e.g. 200) or a status line including the reason " +"phrase (e.g. '200 OK')." +msgstr "" + +# 9741c81708e54f45b5f4296099ed3c7c +#: ../../../bottle.pydocstring of bottle.BaseResponse:10 +msgid "A dictionary or a list of name-value pairs." +msgstr "" + +# ed9265c1eff3455982736fa271f6c57b +#: ../../../bottle.pydocstring of bottle.BaseResponse:12 +msgid "" +"Additional keyword arguments are added to the list of headers. Underscores " +"in the header name are replaced with dashes." +msgstr "" + +# 9f60d016c3fd49b993c2ad913296e8d5 +#: ../../../bottle.pydocstring of bottle.BaseResponse.copy:1 +msgid "Returns a copy of self." +msgstr "" + +# f0a115a90f514b559e06913753b31a47 +#: ../../../bottle.pydocstring of bottle.BaseResponse.status_line:1 +msgid "The HTTP status line as a string (e.g. ``404 Not Found``)." +msgstr "" + +# 300fd4f340f84ba2bf8b58c1a3811ee3 +#: ../../../bottle.pydocstring of bottle.BaseResponse.status_code:1 +msgid "The HTTP status code as an integer (e.g. 404)." +msgstr "" + +# 2687af7f1a74451fa2e805d3a497abf9 +#: ../../../bottle.pydocstring of bottle.BaseResponse.status:1 +msgid "" +"A writeable property to change the HTTP response status. It accepts either a" +" numeric code (100-999) or a string with a custom reason phrase (e.g. \"404 " +"Brain not found\"). Both :data:`status_line` and :data:`status_code` are " +"updated accordingly. The return value is always a status string." +msgstr "" + +# 7d3b920436fc4ea888edda05418d2cd6 +#: ../../../bottle.pydocstring of bottle.BaseResponse.headers:1 +msgid "" +"An instance of :class:`HeaderDict`, a case-insensitive dict-like view on the" +" response headers." +msgstr "" + +# d0336baf7c5c465fb6b2d0180ed1f6d6 +#: ../../../bottle.pydocstring of bottle.BaseResponse.get_header:1 +msgid "" +"Return the value of a previously defined header. If there is no header with " +"that name, return a default value." +msgstr "" + +# 751f59807fe2454c9e97b746a3360bb2 +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_header:1 +msgid "" +"Create a new response header, replacing any previously defined headers with " +"the same name." +msgstr "" + +# a0c7a2c72f6347e8adeb4d0f5fd24faa +#: ../../../bottle.pydocstring of bottle.BaseResponse.add_header:1 +msgid "Add an additional response header, not removing duplicates." +msgstr "" + +# 9d7fd718414748458df1b74c6857acdc +#: ../../../bottle.pydocstring of bottle.BaseResponse.iter_headers:1 +msgid "" +"Yield (header, value) tuples, skipping headers that are not allowed with the" +" current response status code." +msgstr "" + +# f51925b096d74eea9c09bb31b4c606c0 +#: ../../../bottle.pydocstring of bottle.BaseResponse.headerlist:1 +msgid "WSGI conform list of (header, value) tuples." +msgstr "" + +# af0d5936cbec4fd0a284572c85183310 +#: ../../../bottle.pydocstring of bottle.BaseResponse.expires:1 +msgid "Current value of the 'Expires' header." +msgstr "" + +# 449fbc42ab534eb0949ce0aca16f870c +#: ../../../bottle.pydocstring of bottle.BaseResponse.charset:1 +msgid "" +"Return the charset specified in the content-type header (default: utf8)." +msgstr "" + +# 278d88c571884e0598ca0a74f28dd821 +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:1 +msgid "" +"Create a new cookie or replace an old one. If the `secret` parameter is set," +" create a `Signed Cookie` (described below)." +msgstr "" + +# 077c6a333f0e42efba2cb3228d4aaa3f +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:4 +msgid "the name of the cookie." +msgstr "" + +# 95fff6916b3742529b998bfad25901b9 +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:5 +msgid "the value of the cookie." +msgstr "" + +# 1f916b38374f4269b6f992d6275a4967 +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:6 +msgid "a signature key required for signed cookies." +msgstr "" + +# 1b7001808bf74513a78985bc1f11df4e +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:8 +msgid "" +"Additionally, this method accepts all RFC 2109 attributes that are supported" +" by :class:`cookie.Morsel`, including:" +msgstr "" + +# 6e8c2187ceac4782973deeea64614a3f +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:11 +msgid "maximum age in seconds. (default: None)" +msgstr "" + +# ea81288c9154463fb426ec239f1457a2 +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:12 +msgid "a datetime object or UNIX timestamp. (default: None)" +msgstr "" + +# 7e970671af6b41259e67cd1820b8d4c6 +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:13 +msgid "" +"the domain that is allowed to read the cookie. (default: current domain)" +msgstr "" + +# 59170752bd8d4e04ad7a14ea30f3567c +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:15 +msgid "limits the cookie to a given path (default: current path)" +msgstr "" + +# 0f14ef439f6b4048ac8d32f0d9d560f4 +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:16 +msgid "limit the cookie to HTTPS connections (default: off)." +msgstr "" + +# 3407b4cd122349b48187d582ee2e93b6 +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:17 +msgid "" +"prevents client-side javascript to read this cookie (default: off, requires " +"Python 2.6 or newer)." +msgstr "" + +# 88323d4474ec4ee395198d179a98b3c2 +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:20 +msgid "" +"If neither `expires` nor `max_age` is set (default), the cookie will expire " +"at the end of the browser session (as soon as the browser window is closed)." +msgstr "" + +# 41ae534497c14b5c819b3a29957b1f46 +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:24 +msgid "" +"Signed cookies may store any pickle-able object and are cryptographically " +"signed to prevent manipulation. Keep in mind that cookies are limited to 4kb" +" in most browsers." +msgstr "" + +# d3b5a35447304a4b84b04271b31f53c0 +#: ../../../bottle.pydocstring of bottle.BaseResponse.set_cookie:28 +msgid "" +"Warning: Signed cookies are not encrypted (the client can still see the " +"content) and not copy-protected (the client can restore an old cookie). The " +"main intention is to make pickling and unpickling save, not to store secret " +"information at client side." +msgstr "" + +# 8ad6fc2228e24dc0bb3bccec97aca868 +#: ../../../bottle.pydocstring of bottle.BaseResponse.delete_cookie:1 +msgid "" +"Delete a cookie. Be sure to use the same `domain` and `path` settings as " +"used to create the cookie." +msgstr "" + +# 3c8efcb26aae498895ca82f18d273289 +#: ../../../bottle.pydocstring of bottle.LocalResponse:1 +msgid "" +"A thread-local subclass of :class:`BaseResponse` with a different set of " +"attributes for each thread. There is usually only one global instance of " +"this class (:data:`response`). Its attributes are used to build the HTTP " +"response at the end of the request/response cycle." +msgstr "" + +# 5dfc033e72814ef09ff2ddc3c1efc61e +#: ../../api.rst:160 +msgid "" +"The following two classes can be raised as an exception. The most noticeable" +" difference is that bottle invokes error handlers for :class:`HTTPError`, " +"but not for :class:`HTTPResponse` or other response types." +msgstr "" + +# ffeecbbe08304a34bb1ec7d3852a9111 +#: ../../api.rst:172 +msgid "Templates" +msgstr "" + +# a144e4a4c5ff45229f0a509a139fac43 +#: ../../api.rst:174 +msgid "" +"All template engines supported by :mod:`bottle` implement the " +":class:`BaseTemplate` API. This way it is possible to switch and mix " +"template engines without changing the application code at all." +msgstr "" + +# 17f903442d074fae882eb6261ed71467 +#: ../../../bottle.pydocstring of bottle.BaseTemplate:1 +msgid "Base class and minimal API for template adapters" +msgstr "" + +# b8d514a59d964465bafa31d0097c90b9 +#: ../../../bottle.pydocstring of bottle.BaseTemplate.__init__:1 +msgid "" +"Create a new template. If the source parameter (str or buffer) is missing, " +"the name argument is used to guess a template filename. Subclasses can " +"assume that self.source and/or self.filename are set. Both are strings. The " +"lookup, encoding and settings parameters are stored as instance variables. " +"The lookup parameter stores a list containing directory paths. The encoding " +"parameter should be used to decode byte strings or files. The settings " +"parameter contains a dict for engine-specific settings." +msgstr "" + +# 0a387a4577f6405eaf98a37a61d0f2ec +#: ../../../bottle.pydocstring of bottle.BaseTemplate.search:1 +msgid "" +"Search name in all directories specified in lookup. First without, then with" +" common extensions. Return first hit." +msgstr "" + +# c5f01699b03848ec83108c3ab3d61e7b +#: ../../../bottle.pydocstring of bottle.BaseTemplate.global_config:1 +msgid "This reads or sets the global settings stored in class.settings." +msgstr "" + +# b469609052c64ab8a2307a101df89794 +#: ../../../bottle.pydocstring of bottle.BaseTemplate.prepare:1 +msgid "" +"Run preparations (parsing, caching, ...). It should be possible to call this" +" again to refresh a template or to update settings." +msgstr "" + +# b0e0cf5738124644b3d6e810ea2c674c +#: ../../../bottle.pydocstring of bottle.BaseTemplate.render:1 +msgid "" +"Render the template with the specified local variables and return a single " +"byte or unicode string. If it is a byte string, the encoding must match " +"self.encoding. This method must be thread-safe! Local variables may be " +"provided in dictionaries (args) or directly, as keywords (kwargs)." +msgstr "" + +# c47623a8c5a343688b09e921168bc196 +#: ../../../bottle.pydocstring of bottle.view:1 +msgid "" +"Decorator: renders a template for a handler. The handler can control its " +"behavior like that:" +msgstr "" + +# d8a29546f79948719055cf70f93a9db6 +#: ../../../bottle.pydocstring of bottle.view:4 +msgid "return a dict of template vars to fill out the template" +msgstr "" + +# ebbd7b3300fb4937bbcf7f5fce68ec03 +#: ../../../bottle.pydocstring of bottle.view:5 +msgid "" +"return something other than a dict and the view decorator will not process " +"the template, but return the handler result as is. This includes returning a" +" HTTPResponse(dict) to get, for instance, JSON with autojson or other " +"castfilters." +msgstr "" + +# aa3fabfae2304feaa7bdbc00548da4d6 +#: ../../../bottle.pydocstring of bottle.template:1 +msgid "" +"Get a rendered template as a string iterator. You can use a name, a filename" +" or a template string as first parameter. Template rendering arguments can " +"be passed as dictionaries or directly (as keyword arguments)." +msgstr "" + +# b45c741d466544a38359d794a1cf8f35 +#: ../../api.rst:185 +msgid "" +"You can write your own adapter for your favourite template engine or use one" +" of the predefined adapters. Currently there are four fully supported " +"template engines:" +msgstr "" + +# be4af6e5b3a64305b8b2878691e2ef06 +#: ../../api.rst:188 +msgid "Class" +msgstr "" + +# 7a38f5e94efc4498885ef607a945cf33 +#: ../../api.rst:188 +msgid "URL" +msgstr "" + +# 8a0e056b53ec45fba497a2b60a0c4649 +#: ../../api.rst:188 +msgid "Decorator" +msgstr "" + +# 7b2f88404a304adc92fd24d0683d9b53 +#: ../../api.rst:188 +msgid "Render function" +msgstr "" + +# 620ced0c0d874a1f9ccc257ee60684c7 +#: ../../api.rst:190 +msgid ":class:`SimpleTemplate`" +msgstr "" + +# 2ff40d9ee2144cef8361810e3c1ffca5 +#: ../../api.rst:190 +msgid ":doc:`stpl`" +msgstr "" + +# 679a5bf04eb84839ba5dce535fac7075 +#: ../../api.rst:190 +msgid ":func:`view`" +msgstr "" + +# 084ceccb6e654de1b7780aacd02b5d7a +#: ../../api.rst:190 +msgid ":func:`template`" +msgstr "" + +# 32d0c9a657514049850040c6165d181d +#: ../../api.rst:191 +msgid ":class:`MakoTemplate`" +msgstr "" + +# eb594f637e894a468174d7f156ea967c +#: ../../api.rst:191 +msgid "http://www.makotemplates.org" +msgstr "" + +# 6a1703ce35474fbb9ae583b83d416fa6 +#: ../../api.rst:191 +msgid ":func:`mako_view`" +msgstr "" + +# 30e950227f08428babe5c2962d8b2bc6 +#: ../../api.rst:191 +msgid ":func:`mako_template`" +msgstr "" + +# 787003553b174372889067d59a439eca +#: ../../api.rst:192 +msgid ":class:`CheetahTemplate`" +msgstr "" + +# af8c6891d36e410b8a1fe19c69404c7d +#: ../../api.rst:192 +msgid "http://www.cheetahtemplate.org/" +msgstr "" + +# 85a4f3d5c61f4e34bab48f5e59e2c431 +#: ../../api.rst:192 +msgid ":func:`cheetah_view`" +msgstr "" + +# 580562fcaef14a179eb8a5b2d3efd58f +#: ../../api.rst:192 +msgid ":func:`cheetah_template`" +msgstr "" + +# 3f74059a7ed94382b974e71b62399785 +#: ../../api.rst:193 +msgid ":class:`Jinja2Template`" +msgstr "" + +# 36b589d422aa4d899a5a7a5695cad02f +#: ../../api.rst:193 +msgid "http://jinja.pocoo.org/" +msgstr "" + +# eb592bda51b841c18d1ec4ad392e23a9 +#: ../../api.rst:193 +msgid ":func:`jinja2_view`" +msgstr "" + +# c1a048d5069e4245a3af8bf1d0aa0d23 +#: ../../api.rst:193 +msgid ":func:`jinja2_template`" +msgstr "" + +# 7d2ff66af77f4f75a6161b03f7ffce80 +#: ../../api.rst:196 +msgid "" +"To use :class:`MakoTemplate` as your default template engine, just import " +"its specialised decorator and render function::" +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/async.po b/docs/_locale/pt_BR/LC_MESSAGES/async.po new file mode 100644 index 0000000..77dbec5 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/async.po @@ -0,0 +1,232 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:17+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# 9ef51644f5aa49d0bed387b81261b720 +#: ../../async.rst:2 +msgid "Primer to Asynchronous Applications" +msgstr "" + +# 326fa8e554264115a9f691a1e7b495b8 +#: ../../async.rst:4 +msgid "" +"Asynchronous design patterns don't mix well with the synchronous nature of " +"`WSGI <http://www.python.org/dev/peps/pep-3333/>`_. This is why most " +"asynchronous frameworks (tornado, twisted, ...) implement a specialized API " +"to expose their asynchronous features. Bottle is a WSGI framework and shares" +" the synchronous nature of WSGI, but thanks to the awesome `gevent project " +"<http://www.gevent.org/>`_, it is still possible to write asynchronous " +"applications with bottle. This article documents the usage of Bottle with " +"Asynchronous WSGI." +msgstr "" + +# eca9a72c2e334ede82136e2d21f78bae +#: ../../async.rst:7 +msgid "The Limits of Synchronous WSGI" +msgstr "" + +# f9177359b41143c9898c956242aacd25 +#: ../../async.rst:9 +msgid "" +"Briefly worded, the `WSGI specification (pep 3333) " +"<http://www.python.org/dev/peps/pep-3333/>`_ defines a request/response " +"circle as follows: The application callable is invoked once for each request" +" and must return a body iterator. The server then iterates over the body and" +" writes each chunk to the socket. As soon as the body iterator is exhausted," +" the client connection is closed." +msgstr "" + +# 46adf9077b4740c8ac6e5b005dc90fc2 +#: ../../async.rst:11 +msgid "" +"Simple enough, but there is a snag: All this happens synchronously. If your " +"application needs to wait for data (IO, sockets, databases, ...), it must " +"either yield empty strings (busy wait) or block the current thread. Both " +"solutions occupy the handling thread and prevent it from answering new " +"requests. There is consequently only one ongoing request per thread." +msgstr "" + +# 8473666079c046aeb6687c9e3fbe4c13 +#: ../../async.rst:13 +msgid "" +"Most servers limit the number of threads to avoid their relatively high " +"overhead. Pools of 20 or less threads are common. As soon as all threads are" +" occupied, any new connection is stalled. The server is effectively dead for" +" everyone else. If you want to implement a chat that uses long-polling ajax " +"requests to get real-time updates, you'd reach the limited at 20 concurrent " +"connections. That's a pretty small chat." +msgstr "" + +# fa2e6158e95540fb86d3c7ad4024d96c +#: ../../async.rst:16 +msgid "Greenlets to the rescue" +msgstr "" + +# 6687d2939eb14b9e81db1267b3f7688c +#: ../../async.rst:18 +msgid "" +"Most servers limit the size of their worker pools to a relatively low number" +" of concurrent threads, due to the high overhead involved in switching " +"between and creating new threads. While threads are cheap compared to " +"processes (forks), they are still expensive to create for each new " +"connection." +msgstr "" + +# 45d387fb238a4cf7bda7cbb3beb509f6 +#: ../../async.rst:20 +msgid "" +"The `gevent <http://www.gevent.org/>`_ module adds *greenlets* to the mix. " +"Greenlets behave similar to traditional threads, but are very cheap to " +"create. A gevent-based server can spawn thousands of greenlets (one for each" +" connection) with almost no overhead. Blocking individual greenlets has no " +"impact on the servers ability to accept new requests. The number of " +"concurrent connections is virtually unlimited." +msgstr "" + +# 2995c29d96c74dc79acb98f1caccb005 +#: ../../async.rst:22 +msgid "" +"This makes creating asynchronous applications incredibly easy, because they " +"look and feel like synchronous applications. A gevent-based server is " +"actually not asynchronous, but massively multi-threaded. Here is an " +"example::" +msgstr "" + +# 96d4ce96ac9e4bceabf3fc24e316eb3d +#: ../../async.rst:39 +msgid "" +"The first line is important. It causes gevent to monkey-patch most of " +"Python's blocking APIs to not block the current thread, but pass the CPU to " +"the next greenlet instead. It actually replaces Python's threading with " +"gevent-based pseudo-threads. This is why you can still use ``time.sleep()`` " +"which would normally block the whole thread. If you don't feel comfortable " +"with monkey-patching python built-ins, you can use the corresponding gevent " +"functions (``gevent.sleep()`` in this case)." +msgstr "" + +# 76dda76cf4e44d87928e801f068c91e7 +#: ../../async.rst:41 +msgid "" +"If you run this script and point your browser to " +"``http://localhost:8080/stream``, you should see `START`, `MIDDLE`, and " +"`END` show up one by one (rather than waiting 8 seconds to see them all at " +"once). It works exactly as with normal threads, but now your server can " +"handle thousands of concurrent requests without any problems." +msgstr "" + +# 0bc5eaa7c35e413e827c405eece57562 +#: ../../async.rst:45 +msgid "" +"Some browsers buffer a certain amount of data before they start rendering a " +"page. You might need to yield more than a few bytes to see an effect in " +"these browsers. Additionally, many browsers have a limit of one concurrent " +"connection per URL. If this is the case, you can use a second browser or a " +"benchmark tool (e.g. `ab` or `httperf`) to measure performance." +msgstr "" + +# 6f7fcfa983f04956b9eda0483f9b0f9a +#: ../../async.rst:52 +msgid "Event Callbacks" +msgstr "" + +# 95882d8f7cf14e09855ddb6cc9cfff02 +#: ../../async.rst:54 +msgid "" +"A very common design pattern in asynchronous frameworks (including tornado, " +"twisted, node.js and friends) is to use non-blocking APIs and bind callbacks" +" to asynchronous events. The socket object is kept open until it is closed " +"explicitly to allow callbacks to write to the socket at a later point. Here " +"is an example based on the `tornado library " +"<http://www.tornadoweb.org/documentation#non-blocking-asynchronous-" +"requests>`_::" +msgstr "" + +# 5629af45ae8a4894b3e0692ec13676f7 +#: ../../async.rst:63 +msgid "" +"The main benefit is that the request handler terminates early. The handling " +"thread can move on and accept new requests while the callbacks continue to " +"write to sockets of previous requests. This is how these frameworks manage " +"to process a lot of concurrent requests with only a small number of OS " +"threads." +msgstr "" + +# 8cbcaebbe9674c20aba305da49360261 +#: ../../async.rst:65 +msgid "" +"With Gevent+WSGI, things are different: First, terminating early has no " +"benefit because we have an unlimited pool of (pseudo)threads to accept new " +"connections. Second, we cannot terminate early because that would close the " +"socket (as required by WSGI). Third, we must return an iterable to conform " +"to WSGI." +msgstr "" + +# b6bd074c929f474baf72d996186f6c20 +#: ../../async.rst:67 +msgid "" +"In order to conform to the WSGI standard, all we have to do is to return a " +"body iterable that we can write to asynchronously. With the help of " +"`gevent.queue <http://www.gevent.org/gevent.queue.html>`_, we can *simulate*" +" a detached socket and rewrite the previous example as follows::" +msgstr "" + +# 677daa10ef8f439a93b1214de9dbc632 +#: ../../async.rst:78 +msgid "" +"From the server perspective, the queue object is iterable. It blocks if " +"empty and stops as soon as it reaches ``StopIteration``. This conforms to " +"WSGI. On the application side, the queue object behaves like a non-blocking " +"socket. You can write to it at any time, pass it around and even start a new" +" (pseudo)thread that writes to it asynchronously. This is how long-polling " +"is implemented most of the time." +msgstr "" + +# 115abb39c9194794b5b5d1773a8133f0 +#: ../../async.rst:82 +msgid "Finally: WebSockets" +msgstr "" + +# a223597e7ecf4066a5b56272628ab6f9 +#: ../../async.rst:84 +msgid "" +"Lets forget about the low-level details for a while and speak about " +"WebSockets. Since you are reading this article, you probably know what " +"WebSockets are: A bidirectional communication channel between a browser " +"(client) and a web application (server)." +msgstr "" + +# 3444ce49a5094189aaa0c57aa172bb77 +#: ../../async.rst:86 +msgid "" +"Thankfully the `gevent-websocket <http://pypi.python.org/pypi/gevent-" +"websocket/>`_ package does all the hard work for us. Here is a simple " +"WebSocket endpoint that receives messages and just sends them back to the " +"client::" +msgstr "" + +# a724effbdaef48dda7d4372ee0f0f0fa +#: ../../async.rst:111 +msgid "" +"The while-loop runs until the client closes the connection. You get the idea" +" :)" +msgstr "" + +# fe643adfe30648988c735c48875ec9c2 +#: ../../async.rst:113 +msgid "The client-site JavaScript API is really straight forward, too::" +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/changelog.po b/docs/_locale/pt_BR/LC_MESSAGES/changelog.po new file mode 100644 index 0000000..a4b6a69 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/changelog.po @@ -0,0 +1,913 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:17+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# 2c827a6b85474451ac6d1b311afbc48e +#: ../../changelog.rst:6 +msgid "Release Notes and Changelog" +msgstr "" + +# 2c038f6c72e3462db84c3b9c6174bcb8 +#: ../../changelog.rst:9 +msgid "Release 0.13" +msgstr "" + +# 90d2ce4be7c946ab81248e09e10226e1 +#: ../../changelog.rst:13 +msgid "Added :func:`patch` shortcut for `route(..., method='PATCH')`" +msgstr "" + +# 5accefe5fae449c39c9f40dd3e0ccb8b +#: ../../changelog.rst:17 +msgid "Release 0.12" +msgstr "" + +# 732dab09fa81456fa715247b9a35e93c +#: ../../changelog.rst:19 +msgid "" +"New SimpleTemplate parser implementation * Support for multi-line code " +"blocks (`<% ... %>`). * The keywords `include` and `rebase` are functions " +"now and can accept variable template names." +msgstr "" + +# d0bb03ee92a64a5ab87feab02b7a9eed +#: ../../changelog.rst:22 +msgid "" +"The new :meth:`BaseRequest.route` property returns the :class:`Route` that " +"originally matched the request." +msgstr "" + +# 9cf2dad038c146d4bc701ce50e141e76 +#: ../../changelog.rst:23 +msgid "" +"Removed the ``BaseRequest.MAX_PARAMS`` limit. The hash collision bug in " +"CPythons dict() implementation was fixed over a year ago. If you are still " +"using Python 2.5 in production, consider upgrading or at least make sure " +"that you get security fixed from your distributor." +msgstr "" + +# 7374c76a656945f0881c7bc0076bcf1b +#: ../../changelog.rst:24 +msgid "New :class:`ConfigDict` API (see :doc:`configuration`)" +msgstr "" + +# 0e1f1441ce394c738495d6c46baf5f54 +#: ../../changelog.rst:26 +msgid "" +"More information can be found in this `development blog post " +"<http://blog.bottlepy.org/2013/07/19/preview-bottle-012.html>`_." +msgstr "" + +# fc420f49db9e421fbf9e3695c0eb4c2e +#: ../../changelog.rst:30 +msgid "Release 0.11" +msgstr "" + +# 7275946a1b3b488180a42012afd18c3c +#: ../../changelog.rst:32 +msgid "" +"Native support for Python 2.x and 3.x syntax. No need to run 2to3 anymore." +msgstr "" + +# 1656569620784d82bc9c97487eec1729 +#: ../../changelog.rst:33 +msgid "" +"Support for partial downloads (``Range`` header) in :func:`static_file`." +msgstr "" + +# 80feb703c40843058a77eaca812d9b7c +#: ../../changelog.rst:34 +msgid "" +"The new :class:`ResourceManager` interface helps locating files bundled with" +" an application." +msgstr "" + +# bca3fdd9d73b4811ac697e9766e4aa09 +#: ../../changelog.rst:35 +msgid "" +"Added a server adapter for `waitress " +"<http://docs.pylonsproject.org/projects/waitress/en/latest/>`_." +msgstr "" + +# f0084e8bac074d29bce2e7e953f6a103 +#: ../../changelog.rst:36 +msgid "" +"New :meth:`Bottle.merge` method to install all routes from one application " +"into another." +msgstr "" + +# 9d3d19299356472b95a214c337bb5f13 +#: ../../changelog.rst:37 +msgid "" +"New :attr:`BaseRequest.app` property to get the application object that " +"handles a request." +msgstr "" + +# 1601400744654d8a9b852130611227f0 +#: ../../changelog.rst:38 +msgid "" +"Added :meth:`FormsDict.decode()` to get an all-unicode version (needed by " +"WTForms)." +msgstr "" + +# bcc680fd33594efd9bbfa43f8030128e +#: ../../changelog.rst:39 +msgid ":class:`MultiDict` and subclasses are now pickle-able." +msgstr "" + +# 9107573403244a82a24734c2d241d75d +#: ../../changelog.rst:42 +msgid "API Changes" +msgstr "" + +# f6591938bdc54dd280391cbe0a0e4621 +#: ../../changelog.rst:43 +msgid "" +":attr:`Response.status` is a read-write property that can be assigned either" +" a numeric status code or a status string with a reason phrase (``200 OK``)." +" The return value is now a string to better match existing APIs (WebOb, " +"werkzeug). To be absolutely clear, you can use the read-only properties " +":attr:`BaseResponse.status_code` and :attr:`BaseResponse.status_line`." +msgstr "" + +# 2daa25fd26b443db9a5150a0c2def983 +#: ../../changelog.rst:46 +msgid "API Deprecations" +msgstr "" + +# 820072567caf4729b3b74fed4f6118b6 +#: ../../changelog.rst:47 +msgid "" +":class:`SimpleTALTemplate` is now deprecating. There seems to be no demand." +msgstr "" + +# 5f2eb52f0d474a4bb053be3a191fe578 +#: ../../changelog.rst:50 +msgid "Release 0.10" +msgstr "" + +# 158db14a56bb43f9b58d28b47e216089 +#: ../../changelog.rst:52 +msgid "Plugin API v2" +msgstr "" + +# 579ae0cd9df049599de4616d6d24703e +#: ../../changelog.rst:54 +msgid "To use the new API, set :attr:`Plugin.api` to ``2``." +msgstr "" + +# 2cdfd046417c4e99a6bd53d249ef2c53 +#: ../../changelog.rst:55 +msgid "" +":meth:`Plugin.apply` receives a :class:`Route` object instead of a context " +"dictionary as second parameter. The new object offers some additional " +"information and may be extended in the future." +msgstr "" + +# 49a0977d71bb499aa2a80cbb9959930f +#: ../../changelog.rst:56 +msgid "" +"Plugin names are considered unique now. The topmost plugin with a given name" +" on a given route is installed, all other plugins with the same name are " +"silently ignored." +msgstr "" + +# 3824dd706a2a4d4b9a6661f05e8b467b +#: ../../changelog.rst:58 +msgid "The Request/Response Objects" +msgstr "" + +# 577141de8723430dad536a0749d577f8 +#: ../../changelog.rst:60 +msgid "" +"Added :attr:`BaseRequest.json`, :attr:`BaseRequest.remote_route`, " +":attr:`BaseRequest.remote_addr`, :attr:`BaseRequest.query` and " +":attr:`BaseRequest.script_name`." +msgstr "" + +# cd389889065a48cd95d0ae2f75f9d62d +#: ../../changelog.rst:61 +msgid "" +"Added :attr:`BaseResponse.status_line` and :attr:`BaseResponse.status_code` " +"attributes. In future releases, :attr:`BaseResponse.status` will return a " +"string (e.g. ``200 OK``) instead of an integer to match the API of other " +"common frameworks. To make the transition as smooth as possible, you should " +"use the verbose attributes from now on." +msgstr "" + +# 132b6fe6e13c41eeabfff0ff1c891522 +#: ../../changelog.rst:62 +msgid "" +"Replaced :class:`MultiDict` with a specialized :class:`FormsDict` in many " +"places. The new dict implementation allows attribute access and handles " +"unicode form values transparently." +msgstr "" + +# e33dd3a79e644f13a994228e1533378f +#: ../../changelog.rst:64 +msgid "Templates" +msgstr "" + +# b0bb171556254dc7871aca5c60a777d5 +#: ../../changelog.rst:66 +msgid "" +"Added three new functions to the SimpleTemplate default namespace that " +"handle undefined variables: :func:`stpl.defined`, :func:`stpl.get` and " +":func:`stpl.setdefault`." +msgstr "" + +# 293cddcc8d3f453ebdb9dd605cfa1029 +#: ../../changelog.rst:67 +msgid "" +"The default escape function for SimpleTemplate now additionally escapes " +"single and double quotes." +msgstr "" + +# 35fe745ed3cd40dab6fb6e5a9f005b37 +#: ../../changelog.rst:69 +msgid "Routing" +msgstr "" + +# 7bf29650e0224c13afbcdcb56fc55d9b +#: ../../changelog.rst:71 +msgid "" +"A new route syntax (e.g. ``/object/<id:int>``) and support for route " +"wildcard filters." +msgstr "" + +# 6ed8557a1a604713ad082a4d6462453a +#: ../../changelog.rst:72 +msgid "Four new wildcard filters: `int`, `float`, `path` and `re`." +msgstr "" + +# b1a3509cf3844b8c9ab5f3917b31546e +#: ../../changelog.rst:74 +msgid "Other changes" +msgstr "" + +# f6697ab0743147849f1df7fe0930652f +#: ../../changelog.rst:76 +msgid "Added command line interface to load applications and start servers." +msgstr "" + +# 8611f032641947168f388f3a4a07696d +#: ../../changelog.rst:77 +msgid "" +"Introduced a :class:`ConfigDict` that makes accessing configuration a lot " +"easier (attribute access and auto-expanding namespaces)." +msgstr "" + +# ec3b9fcadf5e491cb640936be17b77cf +#: ../../changelog.rst:78 +msgid "Added support for raw WSGI applications to :meth:`Bottle.mount`." +msgstr "" + +# 12dd1cc30a50414880b5f544b94a5001 +#: ../../changelog.rst:79 +msgid ":meth:`Bottle.mount` parameter order changed." +msgstr "" + +# 502b129b05aa47bdb5c6bfb34df41a98 +#: ../../changelog.rst:80 +msgid "" +":meth:`Bottle.route` now accpets an import string for the ``callback`` " +"parameter." +msgstr "" + +# 4c9b80fe05904012a89c3e43428e2924 +#: ../../changelog.rst:81 +msgid "Dropped Gunicorn 0.8 support. Current supported version is 0.13." +msgstr "" + +# 5e739d4bc2c54925ad8b86766cb2c791 +#: ../../changelog.rst:82 +msgid "Added custom options to Gunicorn server." +msgstr "" + +# 233be944ddbd4bbb836f83f481b1a915 +#: ../../changelog.rst:83 +msgid "" +"Finally dropped support for type filters. Replace with a custom plugin of " +"needed." +msgstr "" + +# 36dd0a8c8e4a4dafac381339d58df66c +#: ../../changelog.rst:87 +msgid "Release 0.9" +msgstr "" + +# 101cb3e3ef6d4baf9a3ed040e12b7b19 +#: ../../changelog.rst:90 +msgid "Whats new?" +msgstr "" + +# 8a3b1aa389ad471ca43f841f0f317364 +#: ../../changelog.rst:91 +msgid "" +"A brand new plugin-API. See :ref:`plugins` and :doc:`plugindev` for details." +msgstr "" + +# 3be65e71763e433c8aff5472af8e09b8 +#: ../../changelog.rst:92 +msgid "" +"The :func:`route` decorator got a lot of new features. See " +":meth:`Bottle.route` for details." +msgstr "" + +# 94b950340c8841e897d589e9b5b134e4 +#: ../../changelog.rst:93 +msgid "" +"New server adapters for `gevent <http://www.gevent.org/>`_, `meinheld " +"<http://meinheld.org/>`_ and `bjoern " +"<https://github.com/jonashaag/bjoern>`_." +msgstr "" + +# 72a468b5a2ff4cc3a130fb82df0eb3d5 +#: ../../changelog.rst:94 +msgid "Support for SimpleTAL templates." +msgstr "" + +# 30a0c7c37ed449e29686f9bb594adf90 +#: ../../changelog.rst:95 +msgid "Better runtime exception handling for mako templates in debug mode." +msgstr "" + +# 8bc1355b0dcd458dbf4a4eba7d448b1f +#: ../../changelog.rst:96 +msgid "Lots of documentation, fixes and small improvements." +msgstr "" + +# e07fb9f10d92468f9c7cb74474fee3e1 +#: ../../changelog.rst:97 +msgid "A new :data:`Request.urlparts` property." +msgstr "" + +# 1bd92f22acc9414ba3529143d1988c31 +#: ../../changelog.rst:100 +msgid "Performance improvements" +msgstr "" + +# 286c25222ec548d293e3176f357944c2 +#: ../../changelog.rst:101 +msgid "" +"The :class:`Router` now special-cases ``wsgi.run_once`` environments to " +"speed up CGI." +msgstr "" + +# b437a95c5a2c4ca6803b3b4317a8488a +#: ../../changelog.rst:102 +msgid "" +"Reduced module load time by ~30% and optimized template parser. See `8ccb2d " +"</commit/8ccb2d>`_, `f72a7c </commit/f72a7c>`_ and `b14b9a " +"</commit/b14b9a>`_ for details." +msgstr "" + +# 315aaadb8a4541bab81138dc9d551be2 +#: ../../changelog.rst:103 +msgid "" +"Support for \"App Caching\" on Google App Engine. See `af93ec " +"</commit/af93ec>`_." +msgstr "" + +# 22feac860f5f4f778ae3bc0cd5dfdbdd +#: ../../changelog.rst:104 +msgid "" +"Some of the rarely used or deprecated features are now plugins that avoid " +"overhead if the feature is not used." +msgstr "" + +# f9c11c8ec44c46e18575bf0fe05968fd +# 5fdc037880e5447e9a26737a21db2d34 +#: ../../changelog.rst:107 ../../changelog.rst:118 +msgid "API changes" +msgstr "" + +# 9d24322ae2114f468d7518ef8c55a1db +#: ../../changelog.rst:108 +msgid "" +"This release is mostly backward compatible, but some APIs are marked " +"deprecated now and will be removed for the next release. Most noteworthy:" +msgstr "" + +# 34e082f51a794cb8a6fe86adda84e8b0 +#: ../../changelog.rst:110 +msgid "" +"The ``static`` route parameter is deprecated. You can escape wild-cards with" +" a backslash." +msgstr "" + +# 1dd0e5af5f834cbfb61a8573280fdcf8 +#: ../../changelog.rst:111 +msgid "" +"Type-based output filters are deprecated. They can easily be replaced with " +"plugins." +msgstr "" + +# 657f51449b0e49f9a03de59548798d4e +#: ../../changelog.rst:115 +msgid "Release 0.8" +msgstr "" + +# 4d3a993a0d134ac0a9c8a0b29bf48fe3 +#: ../../changelog.rst:119 +msgid "These changes may break compatibility with previous versions." +msgstr "" + +# 1fccac54d0904e4d9468b97732a97734 +#: ../../changelog.rst:121 +msgid "" +"The built-in Key/Value database is not available anymore. It is marked " +"deprecated since 0.6.4" +msgstr "" + +# b7227b98ea1a4a738ed6e9b6f41909a0 +#: ../../changelog.rst:122 +msgid "The Route syntax and behaviour changed." +msgstr "" + +# 12d72ecb20f64391b27040e7f2ee2a15 +#: ../../changelog.rst:124 +msgid "" +"Regular expressions must be encapsulated with ``#``. In 0.6 all non-" +"alphanumeric characters not present in the regular expression were allowed." +msgstr "" + +# d8f083f9637441128997df2f00bb48f8 +#: ../../changelog.rst:125 +msgid "" +"Regular expressions not part of a route wildcard are escaped automatically. " +"You don't have to escape dots or other regular control characters anymore. " +"In 0.6 the whole URL was interpreted as a regular expression. You can use " +"anonymous wildcards (``/index:#(\\.html)?#``) to achieve a similar " +"behaviour." +msgstr "" + +# ecea5eb958534d5e9baef864b2acfad6 +#: ../../changelog.rst:127 +msgid "" +"The ``BreakTheBottle`` exception is gone. Use :class:`HTTPResponse` instead." +msgstr "" + +# 60eb27138b4245f29a411fa14238bb04 +#: ../../changelog.rst:128 +msgid "" +"The :class:`SimpleTemplate` engine escapes HTML special characters in " +"``{{bad_html}}`` expressions automatically. Use the new ``{{!good_html}}`` " +"syntax to get old behaviour (no escaping)." +msgstr "" + +# 4887b0ad500140e89cbda9b18807e7a5 +#: ../../changelog.rst:129 +msgid "" +"The :class:`SimpleTemplate` engine returns unicode strings instead of lists " +"of byte strings." +msgstr "" + +# 9056d2bbd0b048ccac6bae5e1203515e +#: ../../changelog.rst:130 +msgid "" +"``bottle.optimize()`` and the automatic route optimization is obsolete." +msgstr "" + +# ed11f22b500c46faa840eb9fc29324af +#: ../../changelog.rst:131 +msgid "Some functions and attributes were renamed:" +msgstr "" + +# fc45a4aa25cf44b59dc77be0cf2f0385 +#: ../../changelog.rst:133 +msgid ":attr:`Request._environ` is now :attr:`Request.environ`" +msgstr "" + +# 20b88aba4f424207b4e78a1f0f314d54 +#: ../../changelog.rst:134 +msgid ":attr:`Response.header` is now :attr:`Response.headers`" +msgstr "" + +# 1ee20d6d27954048ae54d953a9d4f81b +#: ../../changelog.rst:135 +msgid ":func:`default_app` is obsolete. Use :func:`app` instead." +msgstr "" + +# 7eaaf369a22c40cd98887131653ff120 +#: ../../changelog.rst:137 +msgid "The default :func:`redirect` code changed from 307 to 303." +msgstr "" + +# 2ec80f46ac8941009624dcfbc9bb320c +#: ../../changelog.rst:138 +msgid "Removed support for ``@default``. Use ``@error(404)`` instead." +msgstr "" + +# 7ebba0e9d2c14507a252a73cf0bbe792 +#: ../../changelog.rst:142 +msgid "New features" +msgstr "" + +# 842805d08c084796a12a129ea8bf9800 +#: ../../changelog.rst:143 +msgid "This is an incomplete list of new features and improved functionality." +msgstr "" + +# e1b8b2333fb549b8ad81b61c13a303f8 +#: ../../changelog.rst:145 +msgid "" +"The :class:`Request` object got new properties: :attr:`Request.body`, " +":attr:`Request.auth`, :attr:`Request.url`, :attr:`Request.header`, " +":attr:`Request.forms`, :attr:`Request.files`." +msgstr "" + +# c4731a0b7888483590302e02e11ddd1a +#: ../../changelog.rst:146 +msgid "" +"The :meth:`Response.set_cookie` and :meth:`Request.get_cookie` methods are " +"now able to encode and decode python objects. This is called a *secure " +"cookie* because the encoded values are signed and protected from changes on " +"client side. All pickle-able data structures are allowed." +msgstr "" + +# 080b35bd8b384dd0a7ac63892ca4f34c +#: ../../changelog.rst:147 +msgid "" +"The new :class:`Router` class drastically improves performance for setups " +"with lots of dynamic routes and supports named routes (named route + dict = " +"URL string)." +msgstr "" + +# 97e1af042fe04647adbff077d404caaf +#: ../../changelog.rst:148 +msgid "" +"It is now possible (and recommended) to return :exc:`HTTPError` and " +":exc:`HTTPResponse` instances or other exception objects instead of raising " +"them." +msgstr "" + +# 8321b5f7a3854e56aee3a2f4a99902ab +#: ../../changelog.rst:149 +msgid "" +"The new function :func:`static_file` equals :func:`send_file` but returns a " +":exc:`HTTPResponse` or :exc:`HTTPError` instead of raising it. " +":func:`send_file` is deprecated." +msgstr "" + +# 41f0ec63293945d0bc19234d0fdf6640 +#: ../../changelog.rst:150 +msgid "" +"New :func:`get`, :func:`post`, :func:`put` and :func:`delete` decorators." +msgstr "" + +# 0dc50af1fa164246847f85881bfcfb39 +#: ../../changelog.rst:151 +msgid "The :class:`SimpleTemplate` engine got full unicode support." +msgstr "" + +# 94167cea68144ef1a4022f7ca9dba48b +#: ../../changelog.rst:152 +msgid "Lots of non-critical bugfixes." +msgstr "" + +# 4a63f3d0122f46dc9df7edc4ec3676bd +#: ../../changelog.rst:158 +msgid "Contributors" +msgstr "" + +# 23c9800f9e384e38a65f2a9986f9b3de +#: ../../../AUTHORS:1 +msgid "" +"Bottle is written and maintained by Marcel Hellkamp <marc@bottlepy.org>." +msgstr "" + +# bd81482365f04522ba256609b0e9d4a3 +#: ../../../AUTHORS:3 +msgid "" +"Thanks to all the people who found bugs, sent patches, spread the word, " +"helped each other on the mailing-list and made this project possible. I hope" +" the following (alphabetically sorted) list is complete. If you miss your " +"name on that list (or want your name removed) please :doc:`tell me " +"<contact>` or add it yourself." +msgstr "" + +# 44ac13fbc6a341398353ff4d59867d0e +#: ../../../AUTHORS:5 +msgid "acasajus" +msgstr "" + +# cd2ebbb541f54c949ef211f1b244a157 +#: ../../../AUTHORS:6 +msgid "Adam R. Smith" +msgstr "" + +# c2aaf9aefc48492ea75cc0576e2cd6a3 +#: ../../../AUTHORS:7 +msgid "Alexey Borzenkov" +msgstr "" + +# ed9d763dd24343fb9b198058ae3945e6 +#: ../../../AUTHORS:8 +msgid "Alexis Daboville" +msgstr "" + +# 4517c03d71da422f9e8786101df6b80d +#: ../../../AUTHORS:9 +msgid "Anton I. Sipos" +msgstr "" + +# 250e9e86e381491796e5a47ba11cd33a +#: ../../../AUTHORS:10 +msgid "Anton Kolechkin" +msgstr "" + +# aaa452df4a9746728aebddf5d93a929d +#: ../../../AUTHORS:11 +msgid "apexi200sx" +msgstr "" + +# 21e7ac5dc5474c7fbf57328575081813 +#: ../../../AUTHORS:12 +msgid "apheage" +msgstr "" + +# 59f21fc76cb74864a57529b7813b247c +#: ../../../AUTHORS:13 +msgid "BillMa" +msgstr "" + +# d41b360d6abe42149210d4a244031921 +#: ../../../AUTHORS:14 +msgid "Brad Greenlee" +msgstr "" + +# 7e09658cbfab43f692f847f18854ae0a +#: ../../../AUTHORS:15 +msgid "Brandon Gilmore" +msgstr "" + +# 68bff8ff74a448789d593b24a6f05975 +#: ../../../AUTHORS:16 +msgid "Branko Vukelic" +msgstr "" + +# 452c5b1852064a409f5ac924e64eb114 +#: ../../../AUTHORS:17 +msgid "Brian Sierakowski" +msgstr "" + +# 5e39fd7963b6497eb4f78d913627e189 +#: ../../../AUTHORS:18 +msgid "Brian Wickman" +msgstr "" + +# 4718da57f320462dabb993c62e64c0a9 +#: ../../../AUTHORS:19 +msgid "Carl Scharenberg" +msgstr "" + +# 3fa8c7576531430e8d397b24fc0a77f9 +#: ../../../AUTHORS:20 +msgid "Damien Degois" +msgstr "" + +# dfebc21eb79f4b568c74ac1a3cd38f8b +#: ../../../AUTHORS:21 +msgid "David Buxton" +msgstr "" + +# 1fb4f9aff43c4514b1fcf996c02080a2 +#: ../../../AUTHORS:22 +msgid "Duane Johnson" +msgstr "" + +# d0b08d28dab84ce2a02f6c23f920ecf1 +#: ../../../AUTHORS:23 +msgid "fcamel" +msgstr "" + +# 138a368291c545928d486a5f26be70b6 +#: ../../../AUTHORS:24 +msgid "Frank Murphy" +msgstr "" + +# 6abfb6dc15074edfb411e6e25268c244 +#: ../../../AUTHORS:25 +msgid "Frederic Junod" +msgstr "" + +# bfbc2d5d63aa49dab0601560287e3487 +#: ../../../AUTHORS:26 +msgid "goldfaber3012" +msgstr "" + +# 44638f864d154190bd3cf682dda01f34 +#: ../../../AUTHORS:27 +msgid "Greg Milby" +msgstr "" + +# c7f7cb93e7d74e6abba897010d2a10fd +#: ../../../AUTHORS:28 +msgid "gstein" +msgstr "" + +# 4cd13f0b8ab74c2ba0c460c8fe4d75a7 +#: ../../../AUTHORS:29 +msgid "Ian Davis" +msgstr "" + +# c46aba8972d440e1a8a904e360b32c29 +#: ../../../AUTHORS:30 +msgid "Itamar Nabriski" +msgstr "" + +# b2679c3240984ee0afa7edec71ba488f +#: ../../../AUTHORS:31 +msgid "Iuri de Silvio" +msgstr "" + +# 0dd5cb7a963d4929a721c3740ec750dd +#: ../../../AUTHORS:32 +msgid "Jaimie Murdock" +msgstr "" + +# c3119796d7814104a9aab5ec24c19fa9 +#: ../../../AUTHORS:33 +msgid "Jeff Nichols" +msgstr "" + +# 902e46776f014c0f9a863d0b649f9808 +#: ../../../AUTHORS:34 +msgid "Jeremy Kelley" +msgstr "" + +# 3b8f99f1855b425baef941f1cd2ff980 +#: ../../../AUTHORS:35 +msgid "joegester" +msgstr "" + +# 5c5e03b3e6ce4ff0ae6531e6add0f7f0 +#: ../../../AUTHORS:36 +msgid "Johannes Krampf" +msgstr "" + +# 1da28c428f3c4afd8a0390061007bf30 +#: ../../../AUTHORS:37 +msgid "Jonas Haag" +msgstr "" + +# 8f9ad5ddfb68446ea51c52609ce31260 +#: ../../../AUTHORS:38 +msgid "Joshua Roesslein" +msgstr "" + +# 0335bfab06ac43aa9032ac4d6e333f98 +#: ../../../AUTHORS:39 +msgid "Judson Neer" +msgstr "" + +# d95fb86066d34f398c604c8ae2a92034 +#: ../../../AUTHORS:40 +msgid "Karl" +msgstr "" + +# 41bc91c8c19145b58a1303ebde901482 +#: ../../../AUTHORS:41 +msgid "Kevin Zuber" +msgstr "" + +# 6937902879b9472791487af0a097c595 +#: ../../../AUTHORS:42 +msgid "Kraken" +msgstr "" + +# 65140f9a7f4c40b68a678e7057691e77 +#: ../../../AUTHORS:43 +msgid "Kyle Fritz" +msgstr "" + +# 216de002dbb347a982040a77e8b02ddb +#: ../../../AUTHORS:44 +msgid "m35" +msgstr "" + +# 80e4c199ab7a419f8794524256ed99bb +#: ../../../AUTHORS:45 +msgid "Marcos Neves" +msgstr "" + +# 449d85ec6fdd4889aec58e56f88cbda4 +#: ../../../AUTHORS:46 +msgid "masklinn" +msgstr "" + +# ccdce343ce234b43bd6540db53e00d7f +#: ../../../AUTHORS:47 +msgid "Michael Labbe" +msgstr "" + +# 7141d0f068ee41d2adce09b325016ed5 +#: ../../../AUTHORS:48 +msgid "Michael Soulier" +msgstr "" + +# b8e6480fa2644a40b9a92a59d57cca62 +#: ../../../AUTHORS:49 +msgid "`reddit <http://reddit.com/r/python>`_" +msgstr "" + +# 9f36ba5a0fa64317b3e7cbeaa4d2c3f1 +#: ../../../AUTHORS:50 +msgid "Nicolas Vanhoren" +msgstr "" + +# 1c71a905683744a2825371642d617386 +#: ../../../AUTHORS:51 +msgid "Robert Rollins" +msgstr "" + +# e3ee6dea5e974c89b71ba0dc8fb91b24 +#: ../../../AUTHORS:52 +msgid "rogererens" +msgstr "" + +# 424ac2557bbe4627a86911906c32770f +#: ../../../AUTHORS:53 +msgid "rwxrwx" +msgstr "" + +# ec8859a4871a45f78a9f1a7296d90f6d +#: ../../../AUTHORS:54 +msgid "Santiago Gala" +msgstr "" + +# 81519108bdc4489498b580cf613f3cb5 +#: ../../../AUTHORS:55 +msgid "Sean M. Collins" +msgstr "" + +# 7f055848f95542d982bc1055e199940d +#: ../../../AUTHORS:56 +msgid "Sebastian Wollrath" +msgstr "" + +# 7d21484496df4f659697c6ff9fcb5860 +#: ../../../AUTHORS:57 +msgid "Seth" +msgstr "" + +# 048fe07f65b346ef86cb8e27e98af5cf +#: ../../../AUTHORS:58 +msgid "Sigurd Høgsbro" +msgstr "" + +# 3e2745b4fe5e4ad5ae5c1488ce8fad5f +#: ../../../AUTHORS:59 +msgid "Stuart Rackham" +msgstr "" + +# bc1aef70a6294c13bb0e084fd428ac2f +#: ../../../AUTHORS:60 +msgid "Sun Ning" +msgstr "" + +# d2def08e6f154bbe9ebeb274e349c272 +#: ../../../AUTHORS:61 +msgid "Tomás A. Schertel" +msgstr "" + +# 4dc8185b717e425594ceda46f0611f79 +#: ../../../AUTHORS:62 +msgid "Tristan Zajonc" +msgstr "" + +# d36705e7c8f047c28b721efb2bba5c14 +#: ../../../AUTHORS:63 +msgid "voltron" +msgstr "" + +# 95ebaee97c8041cf96b1ccb65bf2429f +#: ../../../AUTHORS:64 +msgid "Wieland Hoffmann" +msgstr "" + +# 33047a4b52fe419fbda5271ca187ebc6 +#: ../../../AUTHORS:65 +msgid "zombat" +msgstr "" + +# b714fb9982bb4e42a923768f7efca51e +#: ../../../AUTHORS:66 +msgid "Thiago Avelino" +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/configuration.po b/docs/_locale/pt_BR/LC_MESSAGES/configuration.po new file mode 100644 index 0000000..1918429 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/configuration.po @@ -0,0 +1,263 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:18+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# 41dd5a760ca64fd1b2a969eb2e9735d7 +#: ../../configuration.rst:3 +msgid "Configuration (DRAFT)" +msgstr "" + +# 9f5442bfb4ba4ef7a3491f5ee2f83c1d +#: ../../configuration.rst:8 +msgid "" +"This is a draft for a new API. `Tell us <mailto:bottlepy@googlegroups.com>`_" +" what you think." +msgstr "" + +# df022256d2554261a177c1941072519b +#: ../../configuration.rst:10 +msgid "" +"Bottle applications can store their configuration in :attr:`Bottle.config`, " +"a dict-like object and central place for application specific settings. This" +" dictionary controls many aspects of the framework, tells (newer) plugins " +"what to do, and can be used to store your own configuration as well." +msgstr "" + +# 7de19ce5de5146328e6daa85560853b1 +#: ../../configuration.rst:13 +msgid "Configuration Basics" +msgstr "" + +# c2d1d9ca89e946bfb57ca6a751966a23 +#: ../../configuration.rst:15 +msgid "" +"The :attr:`Bottle.config` object behaves a lot like an ordinary dictionary. " +"All the common dict methods work as expected. Let us start with some " +"examples::" +msgstr "" + +# 921ae4e0b55d469e96ae218b5dad242b +#: ../../configuration.rst:44 +msgid "" +"The app object is not always available, but as long as you are within a " +"request context, you can use the `request` object to get the current " +"application and its configuration::" +msgstr "" + +# 3ae97017b4144341ab54e5276441d8c2 +#: ../../configuration.rst:51 +msgid "Naming Convention" +msgstr "" + +# 2c092c7037fe46579c071acf148c939e +#: ../../configuration.rst:53 +msgid "" +"To make life easier, plugins and applications should follow some simple " +"rules when it comes to config parameter names:" +msgstr "" + +# fc3fbb508cd24642b2b5462206c54acb +#: ../../configuration.rst:55 +msgid "" +"All keys should be lowercase strings and follow the rules for python " +"identifiers (no special characters but the underscore)." +msgstr "" + +# 24f2e66b3ae34af9b25114c9fb3e3625 +#: ../../configuration.rst:56 +msgid "" +"Namespaces are separated by dots (e.g. ``namespace.field`` or " +"``namespace.subnamespace.field``)." +msgstr "" + +# 237bffb361414e67988117fb945c93b4 +#: ../../configuration.rst:57 +msgid "" +"Bottle uses the root namespace for its own configuration. Plugins should " +"store all their variables in their own namespace (e.g. ``sqlite.db`` or " +"``werkzeug.use_debugger``)." +msgstr "" + +# cd76f935f79c4e269b988be703f5d741 +#: ../../configuration.rst:58 +msgid "" +"Your own application should use a separate namespace (e.g. ``myapp.*``)." +msgstr "" + +# e51f19210f1048818c4d6d5a3171bb7e +#: ../../configuration.rst:62 +msgid "Loading Configuration from a File" +msgstr "" + +# b7c704ced8de4b80a781e5e8e0861bd6 +#: ../../configuration.rst:66 +msgid "" +"Configuration files are useful if you want to enable non-programmers to " +"configure your application, or just don't want to hack python module files " +"just to change the database port. A very common syntax for configuration " +"files is shown here:" +msgstr "" + +# 641c33bddb35403ab0fe8a6d00339ebb +#: ../../configuration.rst:78 +msgid "" +"With :meth:`ConfigDict.load_config` you can load these ``*.ini`` style " +"configuration files from disk and import their values into your existing " +"configuration::" +msgstr "" + +# bde80d0bfa9f43f78f2d64f90c45b72f +#: ../../configuration.rst:84 +msgid "Loading Configuration from a nested :class:`dict`" +msgstr "" + +# 7319a191901b435b990ee7499608e960 +#: ../../configuration.rst:88 +msgid "" +"Another useful method is :meth:`ConfigDict.load_dict`. This method takes an " +"entire structure of nested dictionaries and turns it into a flat list of " +"keys and values with namespaced keys::" +msgstr "" + +# c5045a1a02544a56aef81d15d98e99e5 +#: ../../configuration.rst:109 +msgid "Listening to configuration changes" +msgstr "" + +# 723b9a5b13bf486b8f1843ab05bc400b +#: ../../configuration.rst:113 +msgid "" +"The ``config`` hook on the application object is triggered each time a value" +" in :attr:`Bottle.config` is changed. This hook can be used to react on " +"configuration changes at runtime, for example reconnect to a new database, " +"change the debug settings on a background service or resize worker thread " +"pools. The hook callback receives two arguments (key, new_value) and is " +"called before the value is actually changed in the dictionary. Raising an " +"exception from a hook callback cancels the change and the old value is " +"preserved." +msgstr "" + +# c7f9316bc6a045bf8e9215a0597b7b38 +#: ../../configuration.rst:122 +msgid "" +"The hook callbacks cannot *change* the value that is to be stored to the " +"dictionary. That is what filters are for." +msgstr "" + +# 27c52380f44c4bfba0c8ca35c74e75d2 +#: ../../configuration.rst:128 +msgid "Filters and other Meta Data" +msgstr "" + +# cb1c23553991419ab8bb660009f67990 +#: ../../configuration.rst:132 +msgid "" +":class:`ConfigDict` allows you to store meta data along with configuration " +"keys. Two meta fields are currently defined:" +msgstr "" + +# 7b73714a96e8483ebfa5f1384e311b29 +#: ../../configuration.rst:136 +msgid "help" +msgstr "" + +# 19be8769e56849788d8b8fd13e5f1ccc +#: ../../configuration.rst:135 +msgid "" +"A help or description string. May be used by debugging, introspection or " +"admin tools to help the site maintainer configuring their application." +msgstr "" + +# 1a17a0ed92f34a5d941d20205ef53ba3 +#: ../../configuration.rst:139 +msgid "filter" +msgstr "" + +# a2873afa468d45fd8dbae4b0ba6b8e71 +#: ../../configuration.rst:139 +msgid "" +"A callable that accepts and returns a single value. If a filter is defined " +"for a key, any new value stored to that key is first passed through the " +"filter callback. The filter can be used to cast the value to a different " +"type, check for invalid values (throw a ValueError) or trigger side effects." +msgstr "" + +# c394622ffc8f46e7a9d3538ea73155fe +#: ../../configuration.rst:141 +msgid "" +"This feature is most useful for plugins. They can validate their config " +"parameters or trigger side effects using filters and document their " +"configuration via ``help`` fields::" +msgstr "" + +# 11079f458d1e430695566c654c93dbc9 +#: ../../configuration.rst:163 +msgid "API Documentation" +msgstr "" + +# 64e730addd274fcbb8a9b72c0aa47918 +#: ../../../bottle.pydocstring of bottle.ConfigDict:1 +msgid "" +"A dict-like configuration storage with additional support for namespaces, " +"validators, meta-data, on_change listeners and more." +msgstr "" + +# c0fd04ccbf6a4891bbae4f4c06409ef0 +#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:1 +msgid "Load values from an ``*.ini`` style config file." +msgstr "" + +# c650309c63f04a23b00cbfe9235f4a99 +#: ../../../bottle.pydocstring of bottle.ConfigDict.load_config:3 +msgid "" +"If the config file contains sections, their names are used as namespaces for" +" the values within. The two special sections ``DEFAULT`` and ``bottle`` " +"refer to the root namespace (no prefix)." +msgstr "" + +# eb236c7b588248229206d0e945150a6e +#: ../../../bottle.pydocstring of bottle.ConfigDict.load_dict:1 +msgid "" +"Load values from a dictionary structure. Nesting can be used to represent " +"namespaces." +msgstr "" + +# 08a5e29d7c3d4a4fa604dd7963b5c848 +#: ../../../bottle.pydocstring of bottle.ConfigDict.update:1 +msgid "" +"If the first parameter is a string, all keys are prefixed with this " +"namespace. Apart from that it works just as the usual dict.update(). " +"Example: ``update('some.namespace', key='value')``" +msgstr "" + +# a9fbbf7583bd47a780c12874017194b8 +#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_get:1 +msgid "Return the value of a meta field for a key." +msgstr "" + +# 5d9c253ad9254a7fb6e7e2fde5c96511 +#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_set:1 +msgid "" +"Set the meta field for a key to a new value. This triggers the on-change " +"handler for existing keys." +msgstr "" + +# 6ff07db9d5a04ad1b67e891192c722e6 +#: ../../../bottle.pydocstring of bottle.ConfigDict.meta_list:1 +msgid "Return an iterable of meta field names defined for a key." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/contact.po b/docs/_locale/pt_BR/LC_MESSAGES/contact.po new file mode 100644 index 0000000..18f9baa --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/contact.po @@ -0,0 +1,100 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:18+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# 6b58c3178f6648849e59258a3b24e455 +#: ../../contact.rst:3 +msgid "Contact" +msgstr "" + +# 98fd8a5636b6428780c7175cc59aaaa6 +#: ../../contact.rst:6 +msgid "About the Autor" +msgstr "" + +# d821640796b94958962716f806f836b2 +#: ../../contact.rst:7 +msgid "" +"Hi, I'm *Marcel Hellkamp* (aka *defnull*), author of Bottle and the guy " +"behind this website. I'm 27 years old and studying computer science at the " +"Georg-August-University in Göttingen, Germany. Python is my favorite " +"language, but I also code in ruby and JavaScript a lot. Watch me on `twitter" +" <http://twitter.com/bottlepy>`_ or visit my profile at `GitHub " +"<http://github.com/defnull>`_ to get in contact. A `mailinglist " +"<http://groups.google.de/group/bottlepy>`_ is open for Bottle related " +"questions, too." +msgstr "" + +# 75e2d7ba8f2442409d069db93d984126 +#: ../../contact.rst:10 +msgid "About Bottle" +msgstr "" + +# e9120958891e4e85b095dc32966a22a7 +#: ../../contact.rst:11 +msgid "" +"This is my first open source project so far. It started and a small " +"experiment but soon got so much positive feedback I decided to make " +"something real out of it. Here it is." +msgstr "" + +# 0f1e65cdebe241ca86f50b07a8fa94e3 +#: ../../contact.rst:14 +msgid "Impressum und Kontaktdaten" +msgstr "" + +# ad906898692142c78550fd2baecb92b4 +#: ../../contact.rst:15 +msgid "" +"(This is required by `German law " +"<http://bundesrecht.juris.de/tmg/__5.html>`_)" +msgstr "" + +# f8c7cf81b92846889d7a579a42505390 +#: ../../contact.rst:17 +msgid "" +"Die Nutzung der folgenden Kontaktdaten ist ausschließlich für die " +"Kontaktaufnahme mit dem Betreiber dieser Webseite bei rechtlichen Problemen " +"vorgesehen. Insbesondere die Nutzung zu Werbe- oder ähnlichen Zwecken ist " +"ausdrücklich untersagt." +msgstr "" + +# 5d663554a0e94f4f95efef2ba864c049 +#: ../../contact.rst:22 +msgid "**Betreiber**: Marcel Hellkamp" +msgstr "" + +# 591eedd4e3c643fc819f95162eb9cbbd +#: ../../contact.rst:23 +msgid "**Ort**: D - 37075 Göttingen" +msgstr "" + +# 51f07c42c1fb475481731944c11ab991 +#: ../../contact.rst:24 +msgid "**Strasse**: Theodor-Heuss Strasse 13" +msgstr "" + +# 8ba88827b8734a97922565b31c1b11fc +#: ../../contact.rst:25 +msgid "**Telefon**: +49 (0) 551 20005915" +msgstr "" + +# a15072e670e848fca2a902ad6817a487 +#: ../../contact.rst:26 +msgid "**E-Mail**: marc at gsites dot de" +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/deployment.po b/docs/_locale/pt_BR/LC_MESSAGES/deployment.po new file mode 100644 index 0000000..c30a0c9 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/deployment.po @@ -0,0 +1,541 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:18+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# c3f524e009824df6bcdcf136bb08ded6 +#: ../../deployment.rst:27 +msgid "Deployment" +msgstr "" + +# 811033cf9ef2444481f5ef5bcbb18e3e +#: ../../deployment.rst:29 +msgid "" +"The bottle :func:`run` function, when called without any parameters, starts " +"a local development server on port 8080. You can access and test your " +"application via http://localhost:8080/ if you are on the same host." +msgstr "" + +# 68543f932d8e45bab1fe941eb39fd6a3 +#: ../../deployment.rst:31 +msgid "" +"To get your application available to the outside world, specify the IP of " +"the interface the server should listen to (e.g. ``run(host='192.168.0.1')``)" +" or let the server listen to all interfaces at once (e.g. " +"``run(host='0.0.0.0')``). The listening port can be changed in a similar " +"way, but you need root or admin rights to choose a port below 1024. Port 80 " +"is the standard for HTTP servers::" +msgstr "" + +# a412e290cfdf4741a5032f6f67a403a3 +#: ../../deployment.rst:36 +msgid "Server Options" +msgstr "" + +# 4d816682e72b4488aea138cd951a3325 +#: ../../deployment.rst:38 +msgid "" +"The built-in default server is based on `wsgiref WSGIServer " +"<http://docs.python.org/library/wsgiref.html#module-" +"wsgiref.simple_server>`_. This non-threading HTTP server is perfectly fine " +"for development and early production, but may become a performance " +"bottleneck when server load increases. There are three ways to eliminate " +"this bottleneck:" +msgstr "" + +# 963e934e4b7e47d2ac33e527aca3f860 +#: ../../deployment.rst:40 +msgid "Use a different server that is either multi-threaded or asynchronous." +msgstr "" + +# 49df642cd4e242b7970a04432f1fd09e +#: ../../deployment.rst:41 +msgid "" +"Start multiple server processes and spread the load with a load-balancer." +msgstr "" + +# 7848123f5095478ca195c607dc9d0ec9 +#: ../../deployment.rst:42 +msgid "Do both." +msgstr "" + +# 492f82d932814c2a8f3d8b327835faeb +#: ../../deployment.rst:44 +msgid "" +"**Multi-threaded** servers are the 'classic' way to do it. They are very " +"robust, reasonably fast and easy to manage. As a drawback, they can only " +"handle a limited number of connections at the same time and utilize only one" +" CPU core due to the \"Global Interpreter Lock\" (GIL) of the Python " +"runtime. This does not hurt most applications, they are waiting for network " +"IO most of the time anyway, but may slow down CPU intensive tasks (e.g. " +"image processing)." +msgstr "" + +# a430c2eda3494102bc8ac86d2038cc95 +#: ../../deployment.rst:46 +msgid "" +"**Asynchronous** servers are very fast, can handle a virtually unlimited " +"number of concurrent connections and are easy to manage. To take full " +"advantage of their potential, you need to design your application " +"accordingly and understand the concepts of the specific server." +msgstr "" + +# f16c78d1bd37478d83b638c1326cef74 +#: ../../deployment.rst:48 +msgid "" +"**Multi-processing** (forking) servers are not limited by the GIL and " +"utilize more than one CPU core, but make communication between server " +"instances more expensive. You need a database or external message query to " +"share state between processes, or design your application so that it does " +"not need any shared state. The setup is also a bit more complicated, but " +"there are good tutorials available." +msgstr "" + +# 8cf18dd5b75d4d4d98cdd72b9cf56dd2 +#: ../../deployment.rst:51 +msgid "Switching the Server Backend" +msgstr "" + +# aa3edbdb18854d2c9dc98bcfa72a6564 +#: ../../deployment.rst:53 +msgid "" +"The easiest way to increase performance is to install a multi-threaded " +"server library like paste_ or cherrypy_ and tell Bottle to use that instead " +"of the single-threaded default server::" +msgstr "" + +# 6b5453352749474799214dce0dd3d4d0 +#: ../../deployment.rst:57 +msgid "" +"Bottle ships with a lot of ready-to-use adapters for the most common WSGI " +"servers and automates the setup process. Here is an incomplete list:" +msgstr "" + +# 6cc253d6e21c423e8960de46401247ec +#: ../../deployment.rst:60 +msgid "Name" +msgstr "" + +# 9c5504b8881c413faebe963e393b96d2 +#: ../../deployment.rst:60 +msgid "Homepage" +msgstr "" + +# 68e2c490d5d34ffabecf3238ccab3790 +#: ../../deployment.rst:60 +msgid "Description" +msgstr "" + +# b471b00d0bfa4fdcbd556272d5be80e0 +#: ../../deployment.rst:62 +msgid "cgi" +msgstr "" + +# 7e5ba5104d5c48a584c5ceef5597fa00 +#: ../../deployment.rst:62 +msgid "Run as CGI script" +msgstr "" + +# e223abdb42a842c2a9464d2cf1c44545 +#: ../../deployment.rst:63 +msgid "flup" +msgstr "" + +# 6a4dec4be6324dca97fbd510b89ffc2e +#: ../../deployment.rst:63 +msgid "flup_" +msgstr "" + +# 962eb475175345f09d6d1cc76c119b53 +#: ../../deployment.rst:63 +msgid "Run as FastCGI process" +msgstr "" + +# 69ff106258ad41fabfe0653939e85f55 +#: ../../deployment.rst:64 +msgid "gae" +msgstr "" + +# be2071f8ef7d45f187ebd70003e287d5 +#: ../../deployment.rst:64 +msgid "gae_" +msgstr "" + +# 06205bd681a44f8498668e98163d4f97 +#: ../../deployment.rst:64 +msgid "Helper for Google App Engine deployments" +msgstr "" + +# abc3eef9fa81465aaeff95914dbb62e2 +#: ../../deployment.rst:65 +msgid "wsgiref" +msgstr "" + +# c43c3ff0d7014cf0a9a1db585a887608 +#: ../../deployment.rst:65 +msgid "wsgiref_" +msgstr "" + +# 52a2e70ac3dc4023bd730cc599aa40c8 +#: ../../deployment.rst:65 +msgid "Single-threaded default server" +msgstr "" + +# ce238f37770e49d29be330bf0098d6f2 +#: ../../deployment.rst:66 +msgid "cherrypy" +msgstr "" + +# 0b205f1813d44c738ae9c095e78366c2 +#: ../../deployment.rst:66 +msgid "cherrypy_" +msgstr "" + +# baa8b1c796fb41eeac96866a1e4b6402 +#: ../../deployment.rst:66 +msgid "Multi-threaded and very stable" +msgstr "" + +# c76e38e216e64f7d996221fe3b12c0e0 +#: ../../deployment.rst:67 +msgid "paste" +msgstr "" + +# 72b0fb19a2e548e7a3043326a0d766a7 +#: ../../deployment.rst:67 +msgid "paste_" +msgstr "" + +# 47714039fdd84c74bec5ca721a27ae56 +#: ../../deployment.rst:67 +msgid "Multi-threaded, stable, tried and tested" +msgstr "" + +# 44425da6c4554faa84eea877a6b65518 +#: ../../deployment.rst:68 +msgid "rocket" +msgstr "" + +# b64da16177834ce8bf5d11fd8ab5149b +#: ../../deployment.rst:68 +msgid "rocket_" +msgstr "" + +# 903d0ae282a747edb1cc1af49dcf3a36 +#: ../../deployment.rst:68 +msgid "Multi-threaded" +msgstr "" + +# 408d4ab197eb4d8cb28478f973a53c9c +#: ../../deployment.rst:69 +msgid "waitress" +msgstr "" + +# 151d7fac5ea24959b77ebf5c297c86a1 +#: ../../deployment.rst:69 +msgid "waitress_" +msgstr "" + +# 8f5838d0dfe542e884733604b2d74e85 +#: ../../deployment.rst:69 +msgid "Multi-threaded, poweres Pyramid" +msgstr "" + +# 4a7cea6e61324fb6a44e789802ac0e95 +#: ../../deployment.rst:70 +msgid "gunicorn" +msgstr "" + +# 343ddfc9f58c4db4b4017efa6fbf0cb8 +#: ../../deployment.rst:70 +msgid "gunicorn_" +msgstr "" + +# de229c4b15f947d793bf7229f1da1dd5 +#: ../../deployment.rst:70 +msgid "Pre-forked, partly written in C" +msgstr "" + +# 2e9826ab145d4bd99f3ded941f241689 +#: ../../deployment.rst:71 +msgid "eventlet" +msgstr "" + +# ac12b72c9b90499fae9a065efa512549 +#: ../../deployment.rst:71 +msgid "eventlet_" +msgstr "" + +# d75a36595a6c46faa4997ca594fc7190 +#: ../../deployment.rst:71 +msgid "Asynchronous framework with WSGI support." +msgstr "" + +# 569ecdcfd75647fa8a5cab952d165cd9 +#: ../../deployment.rst:72 +msgid "gevent" +msgstr "" + +# 61c9c112a71743778c676bb2745222a7 +#: ../../deployment.rst:72 +msgid "gevent_" +msgstr "" + +# 9b4311692d0442a3ae0c61f88d83f31f +# 4385b447f929475fab4accff00f8b7c1 +#: ../../deployment.rst:72 ../../deployment.rst:73 +msgid "Asynchronous (greenlets)" +msgstr "" + +# 13a43fcbc1204e25a80a4c587f409b0a +#: ../../deployment.rst:73 +msgid "diesel" +msgstr "" + +# 956517897af846aaa75a062f7080ffa8 +#: ../../deployment.rst:73 +msgid "diesel_" +msgstr "" + +# 133a4003f1bb4b628c177f58500e408a +#: ../../deployment.rst:74 +msgid "fapws3" +msgstr "" + +# d0a4de28157940ac87829e1863662af1 +#: ../../deployment.rst:74 +msgid "fapws3_" +msgstr "" + +# 9bd4641b35124fc28095ea8e8f0fbd35 +#: ../../deployment.rst:74 +msgid "Asynchronous (network side only), written in C" +msgstr "" + +# 514067a8e4504f528c9641a6ac69c8f7 +#: ../../deployment.rst:75 +msgid "tornado" +msgstr "" + +# 136af1a554f146829d7ff54f4c5533be +#: ../../deployment.rst:75 +msgid "tornado_" +msgstr "" + +# 38d6f7e852574b0b86f9a81d51f56d72 +#: ../../deployment.rst:75 +msgid "Asynchronous, powers some parts of Facebook" +msgstr "" + +# 8650b70a77664266bbf8f4283de22f45 +#: ../../deployment.rst:76 +msgid "twisted" +msgstr "" + +# c0319824132b4398b319a384c7ca12c8 +#: ../../deployment.rst:76 +msgid "twisted_" +msgstr "" + +# ff94d0839e18456f9528bc1cd21482c9 +#: ../../deployment.rst:76 +msgid "Asynchronous, well tested but... twisted" +msgstr "" + +# f85f868c1f854e5288d89d323118fe3c +#: ../../deployment.rst:77 +msgid "meinheld" +msgstr "" + +# 94f51a7258384015b78e354324dde65e +#: ../../deployment.rst:77 +msgid "meinheld_" +msgstr "" + +# 7f447f15bdef4ac997ea1dcaad3e0ca6 +#: ../../deployment.rst:77 +msgid "Asynchronous, partly written in C" +msgstr "" + +# 3c03952763cc4581a395cbff827a3b65 +#: ../../deployment.rst:78 +msgid "bjoern" +msgstr "" + +# 7fdc37617b444223a612000e98252c26 +#: ../../deployment.rst:78 +msgid "bjoern_" +msgstr "" + +# 4e2f0530258a4b3695a9061c60c52ca4 +#: ../../deployment.rst:78 +msgid "Asynchronous, very fast and written in C" +msgstr "" + +# c3390f3f5cb540ab9b5b0df792f78292 +#: ../../deployment.rst:79 +msgid "auto" +msgstr "" + +# 91c6e1b5649b4f78ac818c96301c27d7 +#: ../../deployment.rst:79 +msgid "Automatically selects an available server adapter" +msgstr "" + +# d8989bcdd32a41c7baaf5121fdeadc65 +#: ../../deployment.rst:82 +msgid "The full list is available through :data:`server_names`." +msgstr "" + +# 3c9ac552473e4fa591dfe9f083cb9442 +#: ../../deployment.rst:84 +msgid "" +"If there is no adapter for your favorite server or if you need more control " +"over the server setup, you may want to start the server manually. Refer to " +"the server documentation on how to run WSGI applications. Here is an example" +" for paste_::" +msgstr "" + +# 37aaf02738404aa4945fe65bf7791dcd +#: ../../deployment.rst:93 +msgid "Apache mod_wsgi" +msgstr "" + +# c55b893eb6184de78f82b9c31461635c +#: ../../deployment.rst:95 +msgid "" +"Instead of running your own HTTP server from within Bottle, you can attach " +"Bottle applications to an `Apache server <apache>`_ using mod_wsgi_." +msgstr "" + +# f8158c133b1e4d73b7c003e83422642b +#: ../../deployment.rst:97 +msgid "" +"All you need is an ``app.wsgi`` file that provides an ``application`` " +"object. This object is used by mod_wsgi to start your application and should" +" be a WSGI-compatible Python callable." +msgstr "" + +# 2a8da94c51b648c59afe0b70af743396 +#: ../../deployment.rst:99 +msgid "File ``/var/www/yourapp/app.wsgi``::" +msgstr "" + +# ecc8b03f39f3420d9ba455c1b13ece1f +#: ../../deployment.rst:109 +msgid "The Apache configuration may look like this::" +msgstr "" + +# ee835f1387fa4be69701b4aede11ebf8 +#: ../../deployment.rst:128 +msgid "Google AppEngine" +msgstr "" + +# d0ee0715d19c4fc991c54b9e328ff0bd +#: ../../deployment.rst:132 +msgid "" +"New App Engine applications using the Python 2.7 runtime environment support" +" any WSGI application and should be configured to use the Bottle application" +" object directly. For example suppose your application's main module is " +"``myapp.py``::" +msgstr "" + +# 57dc546c7cf74d9fa80fd96f80a8e70d +#: ../../deployment.rst:142 +msgid "" +"Then you can configure App Engine's ``app.yaml`` to use the ``app`` object " +"like so::" +msgstr "" + +# 4cbc7b59b70e4564900fe247fa8d10d7 +#: ../../deployment.rst:153 +msgid "" +"Bottle also provides a ``gae`` server adapter for legacy App Engine " +"applications using the Python 2.5 runtime environment. It works similar to " +"the ``cgi`` adapter in that it does not start a new HTTP server, but " +"prepares and optimizes your application for Google App Engine and makes sure" +" it conforms to their API::" +msgstr "" + +# ecd80ebf66f843dfa0c2bab351e8546a +#: ../../deployment.rst:157 +msgid "" +"It is always a good idea to let GAE serve static files directly. Here is " +"example for a working ``app.yaml`` (using the legacy Python 2.5 runtime " +"environment)::" +msgstr "" + +# 27d6ad740fd4413596b73bed70cab2d0 +#: ../../deployment.rst:173 +msgid "Load Balancer (Manual Setup)" +msgstr "" + +# afed46d2164b47b0a254abf40990601c +#: ../../deployment.rst:175 +msgid "" +"A single Python process can utilize only one CPU at a time, even if there " +"are more CPU cores available. The trick is to balance the load between " +"multiple independent Python processes to utilize all of your CPU cores." +msgstr "" + +# 4d5e478b13d44326a19aecea46b89e78 +#: ../../deployment.rst:177 +msgid "" +"Instead of a single Bottle application server, you start one instance for " +"each CPU core available using different local port (localhost:8080, 8081, " +"8082, ...). You can choose any server adapter you want, even asynchronous " +"ones. Then a high performance load balancer acts as a reverse proxy and " +"forwards each new requests to a random port, spreading the load between all " +"available back-ends. This way you can use all of your CPU cores and even " +"spread out the load between different physical servers." +msgstr "" + +# e5d495710d6e49459b37dc32606480a5 +#: ../../deployment.rst:179 +msgid "" +"One of the fastest load balancers available is Pound_ but most common web " +"servers have a proxy-module that can do the work just fine." +msgstr "" + +# 0abd9e59e9404392be15c6d60068f4f6 +#: ../../deployment.rst:181 +msgid "Pound example::" +msgstr "" + +# 0ae649a3b6a64f57a5f306c7aef7cd83 +#: ../../deployment.rst:199 +msgid "Apache example::" +msgstr "" + +# 72a12c37e6d942f4a30cdbf4d1511a7b +#: ../../deployment.rst:207 +msgid "Lighttpd example::" +msgstr "" + +# 6ac39d6e2d534ec4a75316966250ed66 +#: ../../deployment.rst:219 +msgid "Good old CGI" +msgstr "" + +# ccf4d6681a6844e085d1a35639e2cdc7 +#: ../../deployment.rst:221 +msgid "" +"A CGI server starts a new process for each request. This adds a lot of " +"overhead but is sometimes the only option, especially on cheap hosting " +"packages. The `cgi` server adapter does not actually start a CGI server, but" +" transforms your bottle application into a valid CGI application::" +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/faq.po b/docs/_locale/pt_BR/LC_MESSAGES/faq.po new file mode 100644 index 0000000..c33a777 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/faq.po @@ -0,0 +1,101 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:19+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# 52e83ba5006348dba53082cf44d160ba +#: ../../faq.rst:10 +msgid "Frequently Asked Questions" +msgstr "" + +# 80a5a5a1091b4e2e80bb1d93320ccfb4 +#: ../../faq.rst:13 +msgid "About Bottle" +msgstr "" + +# 85de266ae4bb4564a9c33f98d9f8244f +#: ../../faq.rst:16 +msgid "Is bottle suitable for complex applications?" +msgstr "" + +# e0d0c22633a34c4eb6d7a57ea1dd1599 +#: ../../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 "" + +# ec3b8ccdedb64fc181132d3eec8c25f5 +#: ../../faq.rst:22 +msgid "Common Problems and Pitfalls" +msgstr "" + +# c9ea3f021fb64708a14092b0bb340ba5 +#: ../../faq.rst:29 +msgid "\"Template Not Found\" in mod_wsgi/mod_python" +msgstr "" + +# 7ae535c473864aeead086bfbd9c1610a +#: ../../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 "" + +# c10be0d717be43f28fd03f218a7ec161 +#: ../../faq.rst:35 +msgid "so bottle searches the right paths." +msgstr "" + +# 7049a06646bc43c6b19697fcaecbfde2 +#: ../../faq.rst:38 +msgid "Dynamic Routes and Slashes" +msgstr "" + +# ec1977a0fb194f37a84914ed0cbfa693 +#: ../../faq.rst:40 +msgid "" +"In :ref:`dynamic route syntax <tutorial-dynamic-routes>`, a placeholder " +"token (``:name``) 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/:filepath#.*#`` would match ``/images/icons/error.png`` but " +"``/images/:filename`` won't." +msgstr "" + +# c66abb0a46474797bda8875024694350 +#: ../../faq.rst:43 +msgid "Problems with reverse proxies" +msgstr "" + +# 30ed7c0f41cd409f8af531e174fa75fd +#: ../../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 "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/index.po b/docs/_locale/pt_BR/LC_MESSAGES/index.po new file mode 100644 index 0000000..1bf500e --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/index.po @@ -0,0 +1,150 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:16+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# 0f11496cf2684a9681ca0cbf4350d549 +#: ../../index.rst:21 +msgid "Bottle: Python Web Framework" +msgstr "" + +# 7bf7f3fa178745dab72954552fcfb104 +#: ../../index.rst:23 +msgid "" +"Bottle is a fast, simple and lightweight WSGI_ micro web-framework for " +"Python_. It is distributed as a single file module and has no dependencies " +"other than the `Python Standard Library <http://docs.python.org/library/>`_." +msgstr "" + +# b6844ef5791d4078aa0cf29cb8bb61f1 +#: ../../index.rst:26 +msgid "" +"**Routing:** Requests to function-call mapping with support for clean and " +"dynamic URLs." +msgstr "" + +# a9d6920f0aa84da4aebfa670d7866148 +#: ../../index.rst:27 +msgid "" +"**Templates:** Fast and pythonic :ref:`built-in template engine <tutorial-" +"templates>` and support for mako_, jinja2_ and cheetah_ templates." +msgstr "" + +# 423eb0affb034262807cb405a4c71eed +#: ../../index.rst:28 +msgid "" +"**Utilities:** Convenient access to form data, file uploads, cookies, " +"headers and other HTTP-related metadata." +msgstr "" + +# c41e00ea23f6494c8dc7d19fba421e3e +#: ../../index.rst:29 +msgid "" +"**Server:** Built-in HTTP development server and support for paste_, " +"fapws3_, bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server." +msgstr "" + +# 8610ec4b00334540a0532ca71e75b798 +#: ../../index.rst:32 +msgid "Example: \"Hello World\" in a bottle" +msgstr "" + +# 9d6278b0968e45268b09016c09e30017 +#: ../../index.rst:43 +msgid "" +"Run this script or paste it into a Python console, then point your browser " +"to `<http://localhost:8080/hello/world>`_. That's it." +msgstr "" + +# 94e31bb38fa0488db628ff6917e262d1 +#: ../../index.rst:46 +msgid "Download and Install" +msgstr "" + +# 6f0fb8d8aa4149cf8266564d1e5a726c +#: ../../index.rst:49 +msgid "" +"Install the latest stable release with ``pip install bottle``, " +"``easy_install -U bottle`` or download `bottle.py`__ (unstable) into your " +"project directory. There are no hard [1]_ dependencies other than the Python" +" standard library. Bottle runs with **Python 2.5+ and 3.x**." +msgstr "" + +# 2715c1f5010a422491b756c32f592151 +#: ../../index.rst:52 +msgid "User's Guide" +msgstr "" + +# 3753d6542591467a9bb9b2a413004d3c +#: ../../index.rst:53 +msgid "" +"Start here if you want to learn how to use the bottle framework for web " +"development. If you have any questions not answered here, feel free to ask " +"the `mailing list <mailto:bottlepy@googlegroups.com>`_." +msgstr "" + +# 698edeb049d247fdad38d28979c62337 +#: ../../index.rst:68 +msgid "Knowledge Base" +msgstr "" + +# 179e50d3ef98442e845b4fe09ef24f4f +#: ../../index.rst:69 +msgid "A collection of articles, guides and HOWTOs." +msgstr "" + +# d2fcf61e7b9249a5a35d15b82d5ce8e6 +#: ../../index.rst:81 +msgid "Development and Contribution" +msgstr "" + +# 5ff998754df04d3eb530cea87763c227 +#: ../../index.rst:83 +msgid "" +"These chapters are intended for developers interested in the bottle " +"development and release workflow." +msgstr "" + +# ca23960c01034976b70fd71c71973820 +#: ../../index.rst:100 +msgid "License" +msgstr "" + +# 6648c7a49de3426cbb0ed4e868baadc7 +#: ../../index.rst:102 +msgid "Code and documentation are available according to the MIT License:" +msgstr "" + +# 9de55bd420b1476b936122a499bc238e +#: ../../index.rst:107 +msgid "" +"The Bottle logo however is *NOT* covered by that license. It is allowed to " +"use the logo as a link to the bottle homepage or in direct context with the " +"unmodified library. In all other cases please ask first." +msgstr "" + +# a44f6cf5314649f783ad42251830b7ff +#: ../../index.rst:112 +msgid "Footnotes" +msgstr "" + +# 80dde7a59606456fa33a3eba8bc0af2e +#: ../../index.rst:113 +msgid "" +"Usage of the template or server adapter classes of course requires the " +"corresponding template or server modules." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/plugindev.po b/docs/_locale/pt_BR/LC_MESSAGES/plugindev.po new file mode 100644 index 0000000..a97bd2c --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/plugindev.po @@ -0,0 +1,456 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:19+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# 724a888f6f244bedbdf2cd290e209c7e +#: ../../plugindev.rst:6 +msgid "Plugin Development Guide" +msgstr "" + +# 368be250f7074fdc8b4049c522a715ed +#: ../../plugindev.rst:8 +msgid "" +"This guide explains the plugin API and how to write custom plugins. I " +"suggest reading :ref:`plugins` first if you have not done that already. You " +"might also want to have a look at the :doc:`/plugins/index` for some " +"practical examples." +msgstr "" + +# a51e6b69ef714b7fbe9ac5135eb0b436 +#: ../../plugindev.rst:12 +msgid "" +"This is a draft. If you see any errors or find that a specific part is not " +"explained clear enough, please tell the `mailing-list " +"<mailto:bottlepy@googlegroups.com>`_ or file a `bug report " +"<https://github.com/bottlepy/bottle/issues>`_." +msgstr "" + +# 61248acd95e14614ac7ebddc2df94535 +#: ../../plugindev.rst:16 +msgid "How Plugins Work: The Basics" +msgstr "" + +# 3cd1f808667d4b539d26d4b5d8c51b55 +#: ../../plugindev.rst:18 +msgid "" +"The plugin API builds on the concept of `decorators " +"<http://docs.python.org/glossary.html#term-decorator>`_. To put it briefly, " +"a plugin is a decorator applied to every single route callback of an " +"application." +msgstr "" + +# 25cfdadfbfc54e47ae7b2f75ce1aeaf9 +#: ../../plugindev.rst:20 +msgid "" +"Of course, this is just a simplification. Plugins can do a lot more than " +"just decorating route callbacks, but it is a good starting point. Lets have " +"a look at some code::" +msgstr "" + +# 27708e12ba14412cb4719108df66afa9 +#: ../../plugindev.rst:36 +msgid "" +"This plugin measures the execution time for each request and adds an " +"appropriate ``X-Exec-Time`` header to the response. As you can see, the " +"plugin returns a wrapper and the wrapper calls the original callback " +"recursively. This is how decorators usually work." +msgstr "" + +# 2445317c24d34ee498ff8950f8dc380a +#: ../../plugindev.rst:38 +msgid "" +"The last line tells Bottle to install the plugin to the default application." +" This causes the plugin to be automatically applied to all routes of that " +"application. In other words, ``stopwatch()`` is called once for each route " +"callback and the return value is used as a replacement for the original " +"callback." +msgstr "" + +# 7249d9edc92a423b946dd8e6cfad2e1c +#: ../../plugindev.rst:40 +msgid "" +"Plugins are applied on demand, that is, as soon as a route is requested for " +"the first time. For this to work properly in multi-threaded environments, " +"the plugin should be thread-safe. This is not a problem most of the time, " +"but keep it in mind." +msgstr "" + +# 6eb5cb31ccde494c8d52e33ee8cc2dfd +#: ../../plugindev.rst:42 +msgid "" +"Once all plugins are applied to a route, the wrapped callback is cached and " +"subsequent requests are handled by the cached version directly. This means " +"that a plugin is usually applied only once to a specific route. That cache, " +"however, is cleared every time the list of installed plugins changes. Your " +"plugin should be able to decorate the same route more than once." +msgstr "" + +# f851c3ad8ab640e588dcff205f111fd5 +#: ../../plugindev.rst:44 +msgid "" +"The decorator API is quite limited, though. You don't know anything about " +"the route being decorated or the associated application object and have no " +"way to efficiently store data that is shared among all routes. But fear not!" +" Plugins are not limited to just decorator functions. Bottle accepts " +"anything as a plugin as long as it is callable or implements an extended " +"API. This API is described below and gives you a lot of control over the " +"whole process." +msgstr "" + +# 675ae743064a4bfbbf9b350578a01ca1 +#: ../../plugindev.rst:48 +msgid "Plugin API" +msgstr "" + +# a11416c086c843dd99a5223cc9030ad5 +#: ../../plugindev.rst:50 +msgid "" +":class:`Plugin` is not a real class (you cannot import it from " +":mod:`bottle`) but an interface that plugins are expected to implement. " +"Bottle accepts any object of any type as a plugin, as long as it conforms to" +" the following API." +msgstr "" + +# 5e8053c9384e4736912abd7f32fcb7b6 +#: ../../plugindev.rst:54 +msgid "" +"Plugins must be callable or implement :meth:`apply`. If :meth:`apply` is " +"defined, it is always preferred over calling the plugin directly. All other " +"methods and attributes are optional." +msgstr "" + +# 3897d70201c747b1a41453e52423bc5b +#: ../../plugindev.rst:58 +msgid "" +"Both :meth:`Bottle.uninstall` and the `skip` parameter of " +":meth:`Bottle.route()` accept a name string to refer to a plugin or plugin " +"type. This works only for plugins that have a name attribute." +msgstr "" + +# be2dc4e40e084ddc9f07393b6efce35b +#: ../../plugindev.rst:62 +msgid "" +"The Plugin API is still evolving. This integer attribute tells bottle which " +"version to use. If it is missing, bottle defaults to the first version. The " +"current version is ``2``. See :ref:`plugin-changelog` for details." +msgstr "" + +# 9ba2ab15ab7d4b049b311debeb23f5fe +#: ../../plugindev.rst:66 +msgid "" +"Called as soon as the plugin is installed to an application (see " +":meth:`Bottle.install`). The only parameter is the associated application " +"object." +msgstr "" + +# c8cc76d4706946d6b5493bc77cfb1e84 +#: ../../plugindev.rst:70 +msgid "" +"As long as :meth:`apply` is not defined, the plugin itself is used as a " +"decorator and applied directly to each route callback. The only parameter is" +" the callback to decorate. Whatever is returned by this method replaces the " +"original callback. If there is no need to wrap or replace a given callback, " +"just return the unmodified callback parameter." +msgstr "" + +# ec160c1de06842a6a0faab401eeba95d +#: ../../plugindev.rst:74 +msgid "" +"If defined, this method is used in favor of :meth:`__call__` to decorate " +"route callbacks. The additional `route` parameter is an instance of " +":class:`Route` and provides a lot of meta-information and context for that " +"route. See :ref:`route-context` for details." +msgstr "" + +# e8fe78bcc7184c3d8944b63c3e6b90fc +#: ../../plugindev.rst:78 +msgid "" +"Called immediately before the plugin is uninstalled or the application is " +"closed (see :meth:`Bottle.uninstall` or :meth:`Bottle.close`)." +msgstr "" + +# 1442674b5fd94afaa32a5e5ba458d35f +#: ../../plugindev.rst:81 +msgid "" +"Both :meth:`Plugin.setup` and :meth:`Plugin.close` are *not* called for " +"plugins that are applied directly to a route via the :meth:`Bottle.route()` " +"decorator, but only for plugins installed to an application." +msgstr "" + +# 39afd073632e422983679d667f611f45 +#: ../../plugindev.rst:87 +msgid "Plugin API changes" +msgstr "" + +# 5a2e3821b7c04d8594b74e84f3a192c0 +#: ../../plugindev.rst:89 +msgid "" +"The Plugin API is still evolving and changed with Bottle 0.10 to address " +"certain issues with the route context dictionary. To ensure backwards " +"compatibility with 0.9 Plugins, we added an optional :attr:`Plugin.api` " +"attribute to tell bottle which API to use. The API differences are " +"summarized here." +msgstr "" + +# b7ec3312da3f4c62a49576b28a0eccbf +#: ../../plugindev.rst:91 +msgid "**Bottle 0.9 API 1** (:attr:`Plugin.api` not present)" +msgstr "" + +# 7cd904121cfc4bb4923895e987c3df84 +#: ../../plugindev.rst:93 +msgid "Original Plugin API as described in the 0.9 docs." +msgstr "" + +# d76036131f584da5b65a7bee4c6d660a +#: ../../plugindev.rst:95 +msgid "**Bottle 0.10 API 2** (:attr:`Plugin.api` equals 2)" +msgstr "" + +# 0adf5a88853749f0b2ada4418a806c1c +#: ../../plugindev.rst:97 +msgid "" +"The `context` parameter of the :meth:`Plugin.apply` method is now an " +"instance of :class:`Route` instead of a context dictionary." +msgstr "" + +# bb971ae0699a41a7a4976966bb84851c +#: ../../plugindev.rst:103 +msgid "The Route Context" +msgstr "" + +# 62a7c4cdc97a4573afb6d9a15fea2ae8 +#: ../../plugindev.rst:105 +msgid "" +"The :class:`Route` instance passed to :meth:`Plugin.apply` provides detailed" +" informations about the associated route. The most important attributes are " +"summarized here:" +msgstr "" + +# 9120916c00ef434f931ff790db9af633 +#: ../../plugindev.rst:108 +msgid "Attribute" +msgstr "" + +# 9f23c4f00c904466ac8f3ad91819a22e +#: ../../plugindev.rst:108 +msgid "Description" +msgstr "" + +# 6cb6502e58644c3fa48da03a3258f5d7 +#: ../../plugindev.rst:110 +msgid "app" +msgstr "" + +# 0d0ada7cdffc4fb9af29ecb70045c27d +#: ../../plugindev.rst:110 +msgid "The application object this route is installed to." +msgstr "" + +# 07a99e475539489ba5ed1fd1cc5d7256 +#: ../../plugindev.rst:111 +msgid "rule" +msgstr "" + +# 2b6d874caf2d4b59bd3db8bc7240efe6 +#: ../../plugindev.rst:111 +msgid "The rule string (e.g. ``/wiki/:page``)." +msgstr "" + +# 43ce181e578244068ca12ecea59250f8 +#: ../../plugindev.rst:112 +msgid "method" +msgstr "" + +# e136d218597c4262a36140db15463f1b +#: ../../plugindev.rst:112 +msgid "The HTTP method as a string (e.g. ``GET``)." +msgstr "" + +# 071d4f857e2c4308aab4c36249498723 +#: ../../plugindev.rst:113 +msgid "callback" +msgstr "" + +# 14d338299dd04c42b6bfebcdb3915f0b +#: ../../plugindev.rst:113 +msgid "" +"The original callback with no plugins applied. Useful for introspection." +msgstr "" + +# 73abe7abd0d14590bda472492af54ac5 +#: ../../plugindev.rst:115 +msgid "name" +msgstr "" + +# 0a3c0091101e4c8e800bfcd723092364 +#: ../../plugindev.rst:115 +msgid "The name of the route (if specified) or ``None``." +msgstr "" + +# 8d6220105696488bb5c740f0b72951a3 +#: ../../plugindev.rst:116 +msgid "plugins" +msgstr "" + +# 357aa236af1d4a3eac2c962a48838cb7 +#: ../../plugindev.rst:116 +msgid "" +"A list of route-specific plugins. These are applied in addition to " +"application-wide plugins. (see :meth:`Bottle.route`)." +msgstr "" + +# f227ac40108a400fb9c0d18d19b65e7a +#: ../../plugindev.rst:118 +msgid "skiplist" +msgstr "" + +# 4dceff0754b74941be7203f950e05c3a +#: ../../plugindev.rst:118 +msgid "" +"A list of plugins to not apply to this route (again, see " +":meth:`Bottle.route`)." +msgstr "" + +# b3507e808f81481a93fb3b91dabdb63f +#: ../../plugindev.rst:120 +msgid "config" +msgstr "" + +# 7f63f4ef70184b89bd324563d4f1aeb1 +#: ../../plugindev.rst:120 +msgid "" +"Additional keyword arguments passed to the :meth:`Bottle.route` decorator " +"are stored in this dictionary. Used for route-specific configuration and " +"meta-data." +msgstr "" + +# 5ce566ef96844f02be60f6eec84db4c2 +#: ../../plugindev.rst:125 +msgid "" +"For your plugin, :attr:`Route.config` is probably the most important " +"attribute. Keep in mind that this dictionary is local to the route, but " +"shared between all plugins. It is always a good idea to add a unique prefix " +"or, if your plugin needs a lot of configuration, store it in a separate " +"namespace within the `config` dictionary. This helps to avoid naming " +"collisions between plugins." +msgstr "" + +# ce4922e879da46c7921c2e0d5dbe1519 +#: ../../plugindev.rst:129 +msgid "Changing the :class:`Route` object" +msgstr "" + +# 39add98f24e746649d7e15b1cf0eb1a9 +#: ../../plugindev.rst:131 +msgid "" +"While some :class:`Route` attributes are mutable, changes may have unwanted " +"effects on other plugins. It is most likely a bad idea to monkey-patch a " +"broken route instead of providing a helpful error message and let the user " +"fix the problem." +msgstr "" + +# 2c39ccee7ced450681e18408b6c85dc2 +#: ../../plugindev.rst:133 +msgid "" +"In some rare cases, however, it might be justifiable to break this rule. " +"After you made your changes to the :class:`Route` instance, raise " +":exc:`RouteReset` as an exception. This removes the current route from the " +"cache and causes all plugins to be re-applied. The router is not updated, " +"however. Changes to `rule` or `method` values have no effect on the router, " +"but only on plugins. This may change in the future, though." +msgstr "" + +# 0d5b5161e94f4362908702e7b4bb9226 +#: ../../plugindev.rst:137 +msgid "Runtime optimizations" +msgstr "" + +# 9017f3ac343c4e55ac0b3f915b72efc5 +#: ../../plugindev.rst:139 +msgid "" +"Once all plugins are applied to a route, the wrapped route callback is " +"cached to speed up subsequent requests. If the behavior of your plugin " +"depends on configuration, and you want to be able to change that " +"configuration at runtime, you need to read the configuration on each " +"request. Easy enough." +msgstr "" + +# 2de28ae6ea5c4e58b47324c93e77735d +#: ../../plugindev.rst:141 +msgid "" +"For performance reasons, however, it might be worthwhile to choose a " +"different wrapper based on current needs, work with closures, or enable or " +"disable a plugin at runtime. Let's take the built-in HooksPlugin as an " +"example: If no hooks are installed, the plugin removes itself from all " +"affected routes and has virtaully no overhead. As soon as you install the " +"first hook, the plugin activates itself and takes effect again." +msgstr "" + +# 1da8899f11364d79abb27fcf92dfe55d +#: ../../plugindev.rst:143 +msgid "" +"To achieve this, you need control over the callback cache: " +":meth:`Route.reset` clears the cache for a single route and " +":meth:`Bottle.reset` clears all caches for all routes of an application at " +"once. On the next request, all plugins are re-applied to the route as if it " +"were requested for the first time." +msgstr "" + +# a2b0779b12b74953a7067967ed792e54 +#: ../../plugindev.rst:145 +msgid "" +"Both methods won't affect the current request if called from within a route " +"callback, of cause. To force a restart of the current request, raise " +":exc:`RouteReset` as an exception." +msgstr "" + +# 5715121898c2453abe02ed12eab1786c +#: ../../plugindev.rst:149 +msgid "Plugin Example: SQLitePlugin" +msgstr "" + +# 97965f4bc9be4ebc86bb2803b9473a20 +#: ../../plugindev.rst:151 +msgid "" +"This plugin provides an sqlite3 database connection handle as an additional " +"keyword argument to wrapped callbacks, but only if the callback expects it. " +"If not, the route is ignored and no overhead is added. The wrapper does not " +"affect the return value, but handles plugin-related exceptions properly. " +":meth:`Plugin.setup` is used to inspect the application and search for " +"conflicting plugins." +msgstr "" + +# db14b5dc1ac944a4a81732940e845dd2 +#: ../../plugindev.rst:218 +msgid "" +"This plugin is actually useful and very similar to the version bundled with " +"Bottle. Not bad for less than 60 lines of code, don't you think? Here is a " +"usage example::" +msgstr "" + +# 4345acc2cc734179a0e326180ab1c6e5 +#: ../../plugindev.rst:239 +msgid "" +"The first route needs a database connection and tells the plugin to create a" +" handle by requesting a ``db`` keyword argument. The second route does not " +"need a database and is therefore ignored by the plugin. The third route does" +" expect a 'db' keyword argument, but explicitly skips the sqlite plugin. " +"This way the argument is not overruled by the plugin and still contains the " +"value of the same-named url argument." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/plugins/index.po b/docs/_locale/pt_BR/LC_MESSAGES/plugins/index.po new file mode 100644 index 0000000..f33b82c --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/plugins/index.po @@ -0,0 +1,199 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:23+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# 9462ae2d01ff49aa9eff0e6d044af389 +#: ../../plugins/index.rst:5 +msgid "List of available Plugins" +msgstr "" + +# eb0fdc5fcbac4501b5567ea6b2bcfb78 +#: ../../plugins/index.rst:7 +msgid "" +"This is a list of third-party plugins that add extend Bottles core " +"functionality or integrate other libraries with the Bottle framework." +msgstr "" + +# 945b70702a344ab695e6134c51b71e57 +#: ../../plugins/index.rst:9 +msgid "" +"Have a look at :ref:`plugins` for general questions about plugins " +"(installation, usage). If you plan to develop a new plugin, the " +":doc:`/plugindev` may help you." +msgstr "" + +# 310905cd02d1454c93b15ebfa6162f05 +#: ../../plugins/index.rst:12 +msgid "`Bottle-Beaker <http://pypi.python.org/pypi/bottle-beaker/>`_" +msgstr "" + +# d8ed078cbb8142db8027885e6c8e5644 +#: ../../plugins/index.rst:12 +msgid "Beaker to session and caching library with WSGI Middleware" +msgstr "" + +# 401c231e9f07456796d74d968e70ea93 +#: ../../plugins/index.rst:15 +msgid "`Bottle-Cork <http://cork.firelet.net/>`_" +msgstr "" + +# 023e0b7bc19e4494ac819b5cf344b9fd +#: ../../plugins/index.rst:15 +msgid "" +"Cork provides a simple set of methods to implement Authentication and " +"Authorization in web applications based on Bottle." +msgstr "" + +# 7c88efc9de61464da5adcfd9c2e80ec4 +#: ../../plugins/index.rst:18 +msgid "`Bottle-Extras <http://pypi.python.org/pypi/bottle-extras/>`_" +msgstr "" + +# a5735468ec8b4c89a8a99f3e014f3c9b +#: ../../plugins/index.rst:18 +msgid "Meta package to install the bottle plugin collection." +msgstr "" + +# 5923bcda580f4c769d070b6d0f27641f +#: ../../plugins/index.rst:21 +msgid "`Bottle-Flash <http://pypi.python.org/pypi/bottle-flash/>`_" +msgstr "" + +# 792df86f7f0440a0b9200ad73331a703 +#: ../../plugins/index.rst:21 +msgid "flash plugin for bottle" +msgstr "" + +# 9e61cdc471f24b8d996952f68b8c8878 +#: ../../plugins/index.rst:24 +msgid "`Bottle-Hotqueue <http://pypi.python.org/pypi/bottle-hotqueue/>`_" +msgstr "" + +# 1af2300151374bc2a018ac9cbb3689cf +#: ../../plugins/index.rst:24 +msgid "FIFO Queue for Bottle built upon redis" +msgstr "" + +# 46b0947914b843e6b2ec818cdfd8194c +#: ../../plugins/index.rst:27 +msgid "`Macaron <http://nobrin.github.com/macaron/webapp.html>`_" +msgstr "" + +# 86615d4370cb40eba2baae5c07c7cf90 +#: ../../plugins/index.rst:27 +msgid "Macaron is an object-relational mapper (ORM) for SQLite." +msgstr "" + +# 9068f5374d88411080ee26f46af5309e +#: ../../plugins/index.rst:30 +msgid "`Bottle-Memcache <http://pypi.python.org/pypi/bottle-memcache/>`_" +msgstr "" + +# 644b19d66de8490aa581c3341c085be8 +#: ../../plugins/index.rst:30 +msgid "Memcache integration for Bottle." +msgstr "" + +# deb110a275ef414bae145d9f2a63cc52 +#: ../../plugins/index.rst:33 +msgid "`Bottle-Mongo <http://pypi.python.org/pypi/bottle-mongo/>`_" +msgstr "" + +# 9e0f2c737eb14c13869d9769248261f4 +#: ../../plugins/index.rst:33 +msgid "MongoDB integration for Bottle" +msgstr "" + +# 888f294e997246208ae964ed00a913e7 +#: ../../plugins/index.rst:36 +msgid "`Bottle-Redis <http://pypi.python.org/pypi/bottle-redis/>`_" +msgstr "" + +# f56c13b1ef4441778ed6e5cbed43ee93 +#: ../../plugins/index.rst:36 +msgid "Redis integration for Bottle." +msgstr "" + +# 38ddf6190b4d44e08fbd0e44cfcd3807 +#: ../../plugins/index.rst:39 +msgid "`Bottle-Renderer <http://pypi.python.org/pypi/bottle-renderer/>`_" +msgstr "" + +# a0e8210860a14abaa36d1fd06b2dd85f +#: ../../plugins/index.rst:39 +msgid "Renderer plugin for bottle" +msgstr "" + +# 8066c6cfc6d44356a120e878f5dc22dd +#: ../../plugins/index.rst:42 +msgid "`Bottle-Servefiles <http://pypi.python.org/pypi/bottle-servefiles/>`_" +msgstr "" + +# cef5eeed3b86452faa0e502e525957b5 +#: ../../plugins/index.rst:42 +msgid "A reusable app that serves static files for bottle apps" +msgstr "" + +# b075ceee7eac47eeb8cc5432277a74a3 +#: ../../plugins/index.rst:45 +msgid "`Bottle-Sqlalchemy <http://pypi.python.org/pypi/bottle-sqlalchemy/>`_" +msgstr "" + +# 912c1aaa7cb049e39b6fc132d9514e34 +#: ../../plugins/index.rst:45 +msgid "SQLAlchemy integration for Bottle." +msgstr "" + +# f926fab7bceb444ea42fb3f8a2e524c8 +#: ../../plugins/index.rst:48 +msgid "`Bottle-Sqlite <http://pypi.python.org/pypi/bottle-sqlite/>`_" +msgstr "" + +# 7404a2a0a17d4717bb8758e0c9b79420 +#: ../../plugins/index.rst:48 +msgid "SQLite3 database integration for Bottle." +msgstr "" + +# 62faa0679f43409e82791f3d3816ee54 +#: ../../plugins/index.rst:51 +msgid "`Bottle-Web2pydal <http://pypi.python.org/pypi/bottle-web2pydal/>`_" +msgstr "" + +# 1f0769e936d54ddab43ed553b5cf4b7f +#: ../../plugins/index.rst:51 +msgid "Web2py Dal integration for Bottle." +msgstr "" + +# bbad81741d54479aaa2bfbd9aa4f4055 +#: ../../plugins/index.rst:54 +msgid "`Bottle-Werkzeug <http://pypi.python.org/pypi/bottle-werkzeug/>`_" +msgstr "" + +# 43cd0c19d20b4ed09758a6514026e54b +#: ../../plugins/index.rst:54 +msgid "" +"Integrates the `werkzeug` library (alternative request and response objects," +" advanced debugging middleware and more)." +msgstr "" + +# 47d761a823a042faa2e4a5f5e42bcb85 +#: ../../plugins/index.rst:56 +msgid "" +"Plugins listed here are not part of Bottle or the Bottle project, but " +"developed and maintained by third parties." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/recipes.po b/docs/_locale/pt_BR/LC_MESSAGES/recipes.po new file mode 100644 index 0000000..38e64ba --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/recipes.po @@ -0,0 +1,336 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:19+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# 09674aa31ab3451f82cc52710d36a843 +#: ../../recipes.rst:16 +msgid "Recipes" +msgstr "" + +# f750e8d989494ff28ac31298bd69d391 +#: ../../recipes.rst:18 +msgid "" +"This is a collection of code snippets and examples for common use cases." +msgstr "" + +# e52061e39f3943d6a559287b1b8b8727 +#: ../../recipes.rst:21 +msgid "Keeping track of Sessions" +msgstr "" + +# 9317f423607d409ea17631c7c49941de +#: ../../recipes.rst:23 +msgid "" +"There is no built-in support for sessions because there is no *right* way to" +" do it (in a micro framework). Depending on requirements and environment you" +" could use beaker_ middleware with a fitting backend or implement it " +"yourself. Here is an example for beaker sessions with a file-based backend::" +msgstr "" + +# 3d1ec9502b1241d8975d8fbdd8ce8265 +#: ../../recipes.rst:46 +msgid "Debugging with Style: Debugging Middleware" +msgstr "" + +# ac247bbae1e8412c9f9d5b786073ecd5 +#: ../../recipes.rst:48 +msgid "" +"Bottle catches all Exceptions raised in your app code to prevent your WSGI " +"server from crashing. If the built-in :func:`debug` mode is not enough and " +"you need exceptions to propagate to a debugging middleware, you can turn off" +" this behaviour::" +msgstr "" + +# b9b8be146f7744a19c14a1462bc712ac +#: ../../recipes.rst:56 +msgid "" +"Now, bottle only catches its own exceptions (:exc:`HTTPError`, " +":exc:`HTTPResponse` and :exc:`BottleException`) and your middleware can " +"handle the rest." +msgstr "" + +# bb6dca79ccf645fdb9f2cc5c14e607f4 +#: ../../recipes.rst:58 +msgid "" +"The werkzeug_ and paste_ libraries both ship with very powerful debugging " +"WSGI middleware. Look at :class:`werkzeug.debug.DebuggedApplication` for " +"werkzeug_ and :class:`paste.evalexception.middleware.EvalException` for " +"paste_. They both allow you do inspect the stack and even execute python " +"code within the stack context, so **do not use them in production**." +msgstr "" + +# 516604814f5647d7b25e61c8a6a9fec4 +#: ../../recipes.rst:62 +msgid "Unit-Testing Bottle Applications" +msgstr "" + +# 2ad2e602b9f443fa94137b6bbf0be3e3 +#: ../../recipes.rst:64 +msgid "" +"Unit-testing is usually performed against methods defined in your web " +"application without running a WSGI environment." +msgstr "" + +# 4c22dca2875f4b9ba1e731c6f4e65113 +#: ../../recipes.rst:66 +msgid "A simple example using `Nose <http://readthedocs.org/docs/nose>`_::" +msgstr "" + +# 6d035fdeae4a409ebfc710a5fd82236b +#: ../../recipes.rst:77 +msgid "Test script::" +msgstr "" + +# 0d18b02ae5304507ae782b2703d32db0 +#: ../../recipes.rst:84 +msgid "" +"In the example the Bottle route() method is never executed - only index() is" +" tested." +msgstr "" + +# 4863b88863224a4bbe611e868f783b0b +#: ../../recipes.rst:88 +msgid "Functional Testing Bottle Applications" +msgstr "" + +# 89313bab540445ed9ad528f1800265ac +#: ../../recipes.rst:90 +msgid "" +"Any HTTP-based testing system can be used with a running WSGI server, but " +"some testing frameworks work more intimately with WSGI, and provide the " +"ability the call WSGI applications in a controlled environment, with " +"tracebacks and full use of debugging tools. `Testing tools for WSGI " +"<http://www.wsgi.org/en/latest/testing.html>`_ is a good starting point." +msgstr "" + +# f0578d003384429983afd879f5be1319 +#: ../../recipes.rst:92 +msgid "" +"Example using `WebTest <http://webtest.pythonpaste.org/>`_ and `Nose " +"<http://readthedocs.org/docs/nose>`_::" +msgstr "" + +# bd774a007e1c44ebbc5f2b79a3ea1238 +#: ../../recipes.rst:112 +msgid "Embedding other WSGI Apps" +msgstr "" + +# 192cf12c3b9944509a0715ae0dfeb3a6 +#: ../../recipes.rst:114 +msgid "" +"This is not the recommend way (you should use a middleware in front of " +"bottle to do this) but you can call other WSGI applications from within your" +" bottle app and let bottle act as a pseudo-middleware. Here is an example::" +msgstr "" + +# 8f9c30f08a6645e1b7bed4a39401b44b +#: ../../recipes.rst:130 +msgid "" +"Again, this is not the recommend way to implement subprojects. It is only " +"here because many people asked for this and to show how bottle maps to WSGI." +msgstr "" + +# af81fbf808254eb8875e28e17eca5f88 +#: ../../recipes.rst:134 +msgid "Ignore trailing slashes" +msgstr "" + +# be436fa9f1f54fe4b306ca030a86094b +#: ../../recipes.rst:136 +msgid "" +"For Bottle, ``/example`` and ``/example/`` are two different routes [1]_. To" +" treat both URLs the same you can add two ``@route`` decorators::" +msgstr "" + +# e4f054d6e05148adb27c54ddcef61aa7 +#: ../../recipes.rst:142 +msgid "or add a WSGI middleware that strips trailing slashes from all URLs::" +msgstr "" + +# 1ed4f054f22a4ac79ec3d47ad65a1708 +#: ../../recipes.rst:156 +msgid "Footnotes" +msgstr "" + +# 62e7f6b0c3434eb89f130688da977f15 +#: ../../recipes.rst:157 +msgid "Because they are. See <http://www.ietf.org/rfc/rfc3986.txt>" +msgstr "" + +# 41064858a8dc49c68eb43fa917bddd43 +#: ../../recipes.rst:161 +msgid "Keep-alive requests" +msgstr "" + +# 952f277371514a0c989a7301e0f96c12 +#: ../../recipes.rst:165 +msgid "For a more detailed explanation, see :doc:`async`." +msgstr "" + +# da9e6dddd8b543799423af1561cab613 +#: ../../recipes.rst:167 +msgid "" +"Several \"push\" mechanisms like XHR multipart need the ability to write " +"response data without closing the connection in conjunction with the " +"response header \"Connection: keep-alive\". WSGI does not easily lend itself" +" to this behavior, but it is still possible to do so in Bottle by using the " +"gevent_ async framework. Here is a sample that works with either the gevent_" +" HTTP server or the paste_ HTTP server (it may work with others, but I have " +"not tried). Just change ``server='gevent'`` to ``server='paste'`` to use the" +" paste_ server::" +msgstr "" + +# 48e6abce73f34c21bae196f63ec86a4a +#: ../../recipes.rst:184 +msgid "" +"If you browse to ``http://localhost:8080/stream``, you should see 'START', " +"'MIDDLE', and 'END' show up one at a time (rather than waiting 8 seconds to " +"see them all at once)." +msgstr "" + +# e0a4b2c194754d18b665c49f859caf4f +#: ../../recipes.rst:187 +msgid "Gzip Compression in Bottle" +msgstr "" + +# 49f80fef30d9495ba02ec60f7d417821 +#: ../../recipes.rst:190 +msgid "For a detailed discussion, see compression_" +msgstr "" + +# ab6e0ad26e0e43248ecf6bf63a09ac37 +#: ../../recipes.rst:192 +msgid "" +"A common feature request is for Bottle to support Gzip compression, which " +"speeds up sites by compressing static resources (like CSS and JS files) " +"during a request." +msgstr "" + +# ea4b850a16d845c9b35384770c7f7c03 +#: ../../recipes.rst:194 +msgid "" +"Supporting Gzip compression is not a straightforward proposition, due to a " +"number of corner cases that crop up frequently. A proper Gzip implementation" +" must:" +msgstr "" + +# 7b6cbef81a9f413089f7025fd2c2779f +#: ../../recipes.rst:196 +msgid "Compress on the fly and be fast doing so." +msgstr "" + +# d9a5a2336fb34d0fa4e68c2a3bb26eac +#: ../../recipes.rst:197 +msgid "Do not compress for browsers that don't support it." +msgstr "" + +# 65d79afcf2d248a4b048060302b593e4 +#: ../../recipes.rst:198 +msgid "Do not compress files that are compressed already (images, videos)." +msgstr "" + +# 103aa5633aab49c98defd178f3b8419a +#: ../../recipes.rst:199 +msgid "Do not compress dynamic files." +msgstr "" + +# 5df651510f31452ba7bb46f2cacb08b5 +#: ../../recipes.rst:200 +msgid "Support two differed compression algorithms (gzip and deflate)." +msgstr "" + +# 8828f21fbd9749868425dd18767e03a4 +#: ../../recipes.rst:201 +msgid "Cache compressed files that don't change often." +msgstr "" + +# 14590c3194a4466ea72e1d4a54622164 +#: ../../recipes.rst:202 +msgid "De-validate the cache if one of the files changed anyway." +msgstr "" + +# c86800c8df5341bfa2f6031182597bcb +#: ../../recipes.rst:203 +msgid "Make sure the cache does not get to big." +msgstr "" + +# e083757d1ff74523985760815f6ce4c0 +#: ../../recipes.rst:204 +msgid "" +"Do not cache small files because a disk seek would take longer than on-the-" +"fly compression." +msgstr "" + +# 20f755960a744915995b2b163f42f4c9 +#: ../../recipes.rst:206 +msgid "" +"Because of these requirements, it is the recommendation of the Bottle " +"project that Gzip compression is best handled by the WSGI server Bottle runs" +" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware " +"that can be used to accomplish this." +msgstr "" + +# fe52ccf19e01458ba2c987709dd29eda +#: ../../recipes.rst:210 +msgid "Using the hooks plugin" +msgstr "" + +# 08bc14b1cfc3417fa218d3b26dcfac52 +#: ../../recipes.rst:212 +msgid "" +"For example, if you want to allow Cross-Origin Resource Sharing for the " +"content returned by all of your URL, you can use the hook decorator and " +"setup a callback function::" +msgstr "" + +# 899b3bcef9bc422a8c305d51e4a58c90 +#: ../../recipes.rst:230 +msgid "" +"You can also use the ``before_request`` to take an action before every " +"function gets called." +msgstr "" + +# b08bf3a9f25646cc9324f70239238d88 +#: ../../recipes.rst:235 +msgid "Using Bottle with Heroku" +msgstr "" + +# a06da0ff39b64d37bc06d241c0b78f5d +#: ../../recipes.rst:237 +msgid "" +"Heroku_, a popular cloud application platform now provides support for " +"running Python applications on their infastructure." +msgstr "" + +# c34c5372a3a44a0198b3cf71432daf9c +#: ../../recipes.rst:240 +msgid "" +"This recipe is based upon the `Heroku Quickstart " +"<http://devcenter.heroku.com/articles/quickstart>`_, with Bottle specific " +"code replacing the `Write Your App " +"<http://devcenter.heroku.com/articles/python#write_your_app>`_ section of " +"the `Getting Started with Python on Heroku/Cedar " +"<http://devcenter.heroku.com/articles/python>`_ guide::" +msgstr "" + +# afba5ebd9fd34dc2864557520d73a4a1 +#: ../../recipes.rst:256 +msgid "" +"Heroku's app stack passes the port that the application needs to listen on " +"for requests, using the `os.environ` dictionary." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/routing.po b/docs/_locale/pt_BR/LC_MESSAGES/routing.po new file mode 100644 index 0000000..5d62668 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/routing.po @@ -0,0 +1,267 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:20+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# 947e5bcaff794f2cb8eea9913f7bb48e +#: ../../routing.rst:3 +msgid "Request Routing" +msgstr "" + +# ff0d4148065c40fb99f9f70c0b6d4bd8 +#: ../../routing.rst:5 +msgid "" +"Bottle uses a powerful routing engine to find the right callback for each " +"request. The :ref:`tutorial <tutorial-routing>` shows you the basics. This " +"document covers advanced techniques and rule mechanics in detail." +msgstr "" + +# 8e84d86f1f314a18bcad6041ea2bfee3 +#: ../../routing.rst:8 +msgid "Rule Syntax" +msgstr "" + +# ea073c3cc19544a7aad8d539584320bf +#: ../../routing.rst:10 +msgid "" +"The :class:`Router` distinguishes between two basic types of routes: " +"**static routes** (e.g. ``/contact``) and **dynamic routes** (e.g. " +"``/hello/<name>``). A route that contains one or more *wildcards* it is " +"considered dynamic. All other routes are static." +msgstr "" + +# df980c1ca3c44792b9419454610f9fff +#: ../../routing.rst:14 +msgid "" +"The simplest form of a wildcard consists of a name enclosed in angle " +"brackets (e.g. ``<name>``). The name should be unique for a given route and " +"form a valid python identifier (alphanumeric, starting with a letter). This " +"is because wildcards are used as keyword arguments for the request callback " +"later." +msgstr "" + +# 827ee55a8cf844f2a870edd4ceef3fd9 +#: ../../routing.rst:16 +msgid "" +"Each wildcard matches one or more characters, but stops at the first slash " +"(``/``). This equals a regular expression of ``[^/]+`` and ensures that only" +" one path segment is matched and routes with more than one wildcard stay " +"unambiguous." +msgstr "" + +# 97db942e0a614a428ea76dad9adbf814 +#: ../../routing.rst:18 +msgid "The rule ``/<action>/<item>`` matches as follows:" +msgstr "" + +# 92f3296dbf444e59b4dd678a6ef1eca8 +#: ../../routing.rst:21 +msgid "Path" +msgstr "" + +# b2b90f53658547fc97ace78a82d486bb +#: ../../routing.rst:21 +msgid "Result" +msgstr "" + +# b9075ae91346426f95a35a4571ac68df +#: ../../routing.rst:23 +msgid "/save/123" +msgstr "" + +# ed768322a1c14faa9e48ab8776d86e69 +#: ../../routing.rst:23 +msgid "``{'action': 'save', 'item': '123'}``" +msgstr "" + +# 7449f8e375214d1abc73474d77468f1d +#: ../../routing.rst:24 +msgid "/save/123/" +msgstr "" + +# 78f9c453ab714f989543908a4131f60b +# 584b0ea8c06e4ac7b58399e2e41aa976 +# ed38019c27634f618a3da11c2ad5c5ce +#: ../../routing.rst:24 ../../routing.rst:25 ../../routing.rst:26 +msgid "`No Match`" +msgstr "" + +# 69b026e714eb4cfcaa47555b70ef5978 +#: ../../routing.rst:25 +msgid "/save/" +msgstr "" + +# 796993a4ecdb457d86998c53214ee7ab +#: ../../routing.rst:26 +msgid "//123" +msgstr "" + +# f1afc9cbf8b342edbe02c974ed3e4097 +#: ../../routing.rst:29 +msgid "" +"You can change the exact behaviour in many ways using filters. This is " +"described in the next section." +msgstr "" + +# c4ff5cf44f36458aa0e2d491542c1ad6 +#: ../../routing.rst:32 +msgid "Wildcard Filters" +msgstr "" + +# 2062188b17174a76903f8b88893999b7 +#: ../../routing.rst:36 +msgid "" +"Filters are used to define more specific wildcards, and/or transform the " +"matched part of the URL before it is passed to the callback. A filtered " +"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The " +"syntax for the optional config part depends on the filter used." +msgstr "" + +# 13c4dde0508148e2aff1e06b840587a3 +#: ../../routing.rst:38 +msgid "The following standard filters are implemented:" +msgstr "" + +# 3edaa6da891b4ae5889edf18e2e2964b +#: ../../routing.rst:40 +msgid "**:int** matches (signed) digits and converts the value to integer." +msgstr "" + +# 7383bdbbc9e347cc9c7c427fef9c3dc8 +#: ../../routing.rst:41 +msgid "**:float** similar to :int but for decimal numbers." +msgstr "" + +# 9fbf66cd7c344594bc1670e597d6c29a +#: ../../routing.rst:42 +msgid "" +"**:path** matches all characters including the slash character in a non-" +"greedy way and may be used to match more than one path segment." +msgstr "" + +# aae42b37183c4569aad53d5a327b4355 +#: ../../routing.rst:43 +msgid "" +"**:re[:exp]** allows you to specify a custom regular expression in the " +"config field. The matched value is not modified." +msgstr "" + +# 3c2029b7595b48f6b236d85575c35f6c +#: ../../routing.rst:45 +msgid "" +"You can add your own filters to the router. All you need is a function that " +"returns three elements: A regular expression string, a callable to convert " +"the URL fragment to a python value, and a callable that does the opposite. " +"The filter function is called with the configuration string as the only " +"parameter and may parse it as needed::" +msgstr "" + +# 1910ec9ae553427eb68682bc4f1adb79 +#: ../../routing.rst:71 +msgid "Legacy Syntax" +msgstr "" + +# a53374188849429f875c3d83f976139e +#: ../../routing.rst:75 +msgid "" +"The new rule syntax was introduce in **Bottle 0.10** to simplify some common" +" use cases, but the old syntax still works and you can find lot code " +"examples still using it. The differences are best described by example:" +msgstr "" + +# 4b05d35659594d039b9095a1c0edcb3a +#: ../../routing.rst:78 +msgid "Old Syntax" +msgstr "" + +# 3f3535af8cff41f18b6a5f9c1efd4770 +#: ../../routing.rst:78 +msgid "New Syntax" +msgstr "" + +# e17c2d410f9a4034ad1395a3dc59e297 +#: ../../routing.rst:80 +msgid "``:name``" +msgstr "" + +# 55d03e3b7f264ba8835959573fdea5f8 +#: ../../routing.rst:80 +msgid "``<name>``" +msgstr "" + +# 81d801b1278e41c08d9d80fe23ad87f9 +#: ../../routing.rst:81 +msgid "``:name#regexp#``" +msgstr "" + +# a5aabb65592147c3866d6b862ad95b33 +#: ../../routing.rst:81 +msgid "``<name:re:regexp>``" +msgstr "" + +# 6e8bd5bdb727473e95c87d72b776b407 +#: ../../routing.rst:82 +msgid "``:#regexp#``" +msgstr "" + +# ba33f5b4231044ea84180cd68368ec7d +#: ../../routing.rst:82 +msgid "``<:re:regexp>``" +msgstr "" + +# 92e0fe829c514e7e9268e991e7bdd8a2 +#: ../../routing.rst:83 +msgid "``:##``" +msgstr "" + +# e4ff281981d543ee8507f78835748c7d +#: ../../routing.rst:83 +msgid "``<:re>``" +msgstr "" + +# 4d44ae09e6fc44ce9d81e8ae6b4f297d +#: ../../routing.rst:86 +msgid "" +"Try to avoid the old syntax in future projects if you can. It is not " +"currently deprecated, but will be eventually." +msgstr "" + +# 781a03f253834a4ea70e589820ed6fcb +#: ../../routing.rst:91 +msgid "Explicit routing configuration" +msgstr "" + +# 8bd7c04b74ba436098d5825c1487fceb +#: ../../routing.rst:93 +msgid "" +"Route decorator can also be directly called as method. This way provides " +"flexibility in complex setups, allowing you to directly control, when and " +"how routing configuration done." +msgstr "" + +# 5d31646155bd44049560ec23ac4ca1a3 +#: ../../routing.rst:95 +msgid "" +"Here is a basic example of explicit routing configuration for default bottle" +" application::" +msgstr "" + +# 300cc65d0cad44a9b8d06227ff431489 +#: ../../routing.rst:101 +msgid "" +"In fact, any :class:`Bottle` instance routing can be configured same way::" +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/stpl.po b/docs/_locale/pt_BR/LC_MESSAGES/stpl.po new file mode 100644 index 0000000..68fc65e --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/stpl.po @@ -0,0 +1,296 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:20+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# e5c40772f91e46b490056ee3d352e7a0 +#: ../../stpl.rst:3 +msgid "SimpleTemplate Engine" +msgstr "" + +# 069d59f4cde84fec9ffab6f949ac79a9 +#: ../../stpl.rst:7 +msgid "" +"Bottle comes with a fast, powerful and easy to learn built-in template " +"engine called *SimpleTemplate* or *stpl* for short. It is the default engine" +" used by the :func:`view` and :func:`template` helpers but can be used as a " +"stand-alone general purpose template engine too. This document explains the " +"template syntax and shows examples for common use cases." +msgstr "" + +# 043167051da74bf091b4335265fdc480 +#: ../../stpl.rst:10 +msgid "Basic API Usage:" +msgstr "" + +# fc7000f3776346a4948c02a4a50fb56a +#: ../../stpl.rst:11 +msgid ":class:`SimpleTemplate` implements the :class:`BaseTemplate` API::" +msgstr "" + +# e25b50496020423f8954114f227e44a0 +#: ../../stpl.rst:18 +msgid "" +"In this document we use the :func:`template` helper in examples for the sake" +" of simplicity::" +msgstr "" + +# c4675dea5471473693f9de5fef540889 +#: ../../stpl.rst:24 +msgid "" +"You can also pass a dictionary into the template using keyword arguments::" +msgstr "" + +# 37da1d7286ba447eb2096bf24e409112 +#: ../../stpl.rst:31 +msgid "" +"Just keep in mind that compiling and rendering templates are two different " +"actions, even if the :func:`template` helper hides this fact. Templates are " +"usually compiled only once and cached internally, but rendered many times " +"with different keyword arguments." +msgstr "" + +# 73a50f2356454ce299b96556ee792c8d +#: ../../stpl.rst:34 +msgid ":class:`SimpleTemplate` Syntax" +msgstr "" + +# 7463828d16c54830a56b0270cfb3a6a5 +#: ../../stpl.rst:36 +msgid "" +"Python is a very powerful language but its whitespace-aware syntax makes it " +"difficult to use as a template language. SimpleTemplate removes some of " +"these restrictions and allows you to write clean, readable and maintainable " +"templates while preserving full access to the features, libraries and speed " +"of the Python language." +msgstr "" + +# d59894cc4ac74618954a352aa42645b1 +#: ../../stpl.rst:40 +msgid "" +"The :class:`SimpleTemplate` syntax compiles directly to python bytecode and " +"is executed on each :meth:`SimpleTemplate.render` call. Do not render " +"untrusted templates! They may contain and execute harmful python code." +msgstr "" + +# 9ead45a0161545fd920a2a758a0a8f8f +#: ../../stpl.rst:43 +msgid "Inline Expressions" +msgstr "" + +# 22ee7e4039f946a496b82a6661c4207f +#: ../../stpl.rst:45 +msgid "" +"You already learned the use of the ``{{...}}`` syntax from the \"Hello " +"World!\" example above, but there is more: any python expression is allowed " +"within the curly brackets as long as it evaluates to a string or something " +"that has a string representation::" +msgstr "" + +# 43c420ced9664f93bd4b6fb92e6f76bb +#: ../../stpl.rst:54 +msgid "" +"The contained python expression is executed at render-time and has access to" +" all keyword arguments passed to the :meth:`SimpleTemplate.render` method. " +"HTML special characters are escaped automatically to prevent `XSS " +"<http://en.wikipedia.org/wiki/Cross-Site_Scripting>`_ attacks. You can start" +" the expression with an exclamation mark to disable escaping for that " +"expression::" +msgstr "" + +# 0a028087d6554513bc1695948b55303a +#: ../../stpl.rst:62 +msgid "Embedded python code" +msgstr "" + +# 7b42a99984ab4953a5f6ddd8892126f3 +#: ../../stpl.rst:66 +msgid "" +"The template engine allows you to embed lines or blocks of python code " +"within your template. Code lines start with ``%`` and code blocks are " +"surrounded by ``<%`` and ``%>`` tokens::" +msgstr "" + +# 7c1bfb659c83406799985730ba1c5752 +#: ../../stpl.rst:76 +msgid "" +"Embedded python code follows regular python syntax, but with two additional " +"syntax rules:" +msgstr "" + +# 4afb96c91af74889b74bf122dbd3c19a +#: ../../stpl.rst:78 +msgid "" +"**Indentation is ignored.** You can put as much whitespace in front of " +"statements as you want. This allows you to align your code with the " +"surrounding markup and can greatly improve readability." +msgstr "" + +# a45db75ab9ed483d90355d9940c15327 +#: ../../stpl.rst:79 +msgid "" +"Blocks that are normally indented now have to be closed explicitly with an " +"``end`` keyword." +msgstr "" + +# 6bf2738f934c47278e86eef3a721b16a +#: ../../stpl.rst:89 +msgid "" +"Both the ``%`` and the ``<%`` tokens are only recognized if they are the " +"first non-whitespace characters in a line. You don't have to escape them if " +"they appear mid-text in your template markup. Only if a line of text starts " +"with one of these tokens, you have to escape it with a backslash. In the " +"rare case where the backslash + token combination appears in your markup at " +"the beginning of a line, you can always help yourself with a string literal " +"in an inline expression::" +msgstr "" + +# ea1cfdad0dc046cdaddfdeffdf1669d1 +#: ../../stpl.rst:96 +msgid "" +"If you find yourself to escape a lot, consider using :ref:`custom tokens " +"<stpl-custom-tokens>`." +msgstr "" + +# 24e526d936304c589e44352c662c184e +#: ../../stpl.rst:99 +msgid "Whitespace Control" +msgstr "" + +# ceb3b6a8301c4b06ab1236266e8b025b +#: ../../stpl.rst:101 +msgid "" +"Code blocks and code lines always span the whole line. Whitespace in front " +"of after a code segment is stripped away. You won't see empty lines or " +"dangling whitespace in your template because of embedded code::" +msgstr "" + +# 7b97b2993b6a4300b8cee886428b01fd +#: ../../stpl.rst:109 +msgid "This snippet renders to clean and compact html::" +msgstr "" + +# bb43847a10ef4479bdc55979716b9f9e +#: ../../stpl.rst:115 +msgid "" +"But embedding code still requires you to start a new line, which may not " +"what you want to see in your rendered template. To skip the newline in front" +" of a code segment, end the text line with a double-backslash::" +msgstr "" + +# 0a8c68359c0f46229baa5bf89cea417c +#: ../../stpl.rst:123 +msgid "THis time the rendered template looks like this::" +msgstr "" + +# 2a97642550b64e8298aeadbb2ee4030b +#: ../../stpl.rst:127 +msgid "" +"This only works directly in front of code segments. In all other places you " +"can control the whitespace yourself and don't need any special syntax." +msgstr "" + +# 853c44d3fb074abfa5b5515dfd3a6590 +#: ../../stpl.rst:130 +msgid "Template Functions" +msgstr "" + +# 8435a9fd969641519d01e84205d49152 +#: ../../stpl.rst:132 +msgid "" +"Each template is preloaded with a bunch of functions that help with the most" +" common use cases. These functions are always available. You don't have to " +"import or provide them yourself. For everything not covered here there are " +"probably good python libraries available. Remember that you can ``import`` " +"anything you want within your templates. They are python programs after all." +msgstr "" + +# c458a81dae52450eb81cc4950592d1ac +#: ../../stpl.rst:136 +msgid "" +"Prior to this release, :func:`include` and :func:`rebase` were syntax " +"keywords, not functions." +msgstr "" + +# ac75ab2b19f143cda945036c86cba4d4 +#: ../../stpl.rst:141 +msgid "" +"Render a sub-template with the specified variables and insert the resulting " +"text into the current template. The function returns a dictionary containing" +" the local variables passed to or defined within the sub-template::" +msgstr "" + +# aece402c1d1649b4b04cf1687a262af6 +#: ../../stpl.rst:149 +msgid "" +"Mark the current template to be later included into a different template. " +"After the current template is rendered, its resulting text is stored in a " +"variable named ``base`` and passed to the base-template, which is then " +"rendered. This can be used to `wrap` a template with surrounding text, or " +"simulate the inheritance feature found in other template engines::" +msgstr "" + +# 0cb7a5d100eb4b658580c4c80980321c +#: ../../stpl.rst:154 +msgid "This can be combined with the following ``base.tpl``::" +msgstr "" + +# f7a8fd39c4a149cb87c14b0dc94ca02e +#: ../../stpl.rst:166 +msgid "" +"Accessing undefined variables in a template raises :exc:`NameError` and " +"stops rendering immediately. This is standard python behavior and nothing " +"new, but vanilla python lacks an easy way to check the availability of a " +"variable. This quickly gets annoying if you want to support flexible inputs " +"or use the same template in different situations. These functions may help:" +msgstr "" + +# ddc1cb230c4b484ca4010e09ef5c01c2 +#: ../../stpl.rst:174 +msgid "" +"Return True if the variable is defined in the current template namespace, " +"False otherwise." +msgstr "" + +# 1fc0b1edb65b414daf4245dfc3098707 +#: ../../stpl.rst:179 +msgid "Return the variable, or a default value." +msgstr "" + +# 8aab0bb61e754f81bcc1b2afe11018a3 +#: ../../stpl.rst:183 +msgid "" +"If the variable is not defined, create it with the given default value. " +"Return the variable." +msgstr "" + +# 2285c559a3234f1fa946cbb4c0c41397 +#: ../../stpl.rst:186 +msgid "" +"Here is an example that uses all three functions to implement optional " +"template variables in different ways::" +msgstr "" + +# 651cc34084614960a201eeb40239f183 +#: ../../stpl.rst:200 +msgid ":class:`SimpleTemplate` API" +msgstr "" + +# 9b30ddc34ccc4129a1c16dcaedb69c3c +#: ../../../bottle.pydocstring of bottle.SimpleTemplate.render:1 +msgid "Render the template using keyword arguments as local variables." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/tutorial.po b/docs/_locale/pt_BR/LC_MESSAGES/tutorial.po new file mode 100644 index 0000000..9505d5c --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/tutorial.po @@ -0,0 +1,1762 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:20+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# 916ac7f3b8144f5098d68578868e93d3 +#: ../../tutorial.rst:24 +msgid "Tutorial" +msgstr "" + +# e41456f5f98149fbbced99bf6f3ad9a2 +#: ../../tutorial.rst:26 +msgid "" +"This tutorial introduces you to the concepts and features of the Bottle web " +"framework and covers basic and advanced topics alike. You can read it from " +"start to end, or use it as a reference later on. The automatically generated" +" :doc:`api` may be interesting for you, too. It covers more details, but " +"explains less than this tutorial. Solutions for the most common questions " +"can be found in our :doc:`recipes` collection or on the :doc:`faq` page. If " +"you need any help, join our `mailing list " +"<mailto:bottlepy@googlegroups.com>`_ or visit us in our `IRC channel " +"<http://webchat.freenode.net/?channels=bottlepy>`_." +msgstr "" + +# af7ea57ddc8648bf8148b2a520f009b0 +#: ../../tutorial.rst:31 +msgid "Installation" +msgstr "" + +# a3e393a63d73430f970beb1206e88eae +#: ../../tutorial.rst:33 +msgid "" +"Bottle does not depend on any external libraries. You can just download " +"`bottle.py </bottle.py>`_ into your project directory and start coding:" +msgstr "" + +# b22d1ab386ac41a0bb7a62049cd90685 +#: ../../tutorial.rst:39 +msgid "" +"This will get you the latest development snapshot that includes all the new " +"features. If you prefer a more stable environment, you should stick with the" +" stable releases. These are available on `PyPI " +"<http://pypi.python.org/pypi/bottle>`_ and can be installed via " +":command:`pip` (recommended), :command:`easy_install` or your package " +"manager:" +msgstr "" + +# 6370b74c81174ef7b73564ca52e77f30 +#: ../../tutorial.rst:47 +msgid "" +"Either way, you'll need Python 2.5 or newer (including 3.x) to run bottle " +"applications. If you do not have permissions to install packages system-wide" +" or simply don't want to, create a `virtualenv " +"<http://pypi.python.org/pypi/virtualenv>`_ first:" +msgstr "" + +# 231776fdacc64529a13944d3994fe4c4 +#: ../../tutorial.rst:55 +msgid "Or, if virtualenv is not installed on your system:" +msgstr "" + +# b05bd61e6a17484ea34fa6b69cf8a627 +#: ../../tutorial.rst:67 +msgid "Quickstart: \"Hello World\"" +msgstr "" + +# 25c51a08cddf4d4fad50ad205234cb72 +#: ../../tutorial.rst:69 +msgid "" +"This tutorial assumes you have Bottle either :ref:`installed <installation>`" +" or copied into your project directory. Let's start with a very basic " +"\"Hello World\" example::" +msgstr "" + +# ecd1dd3fb42943d29e75552e60652099 +#: ../../tutorial.rst:79 +msgid "" +"This is it. Run this script, visit http://localhost:8080/hello and you will " +"see \"Hello World!\" in your browser. Here is how it works:" +msgstr "" + +# cf840688614b4d5c9adef7a962b8bcb8 +#: ../../tutorial.rst:81 +msgid "" +"The :func:`route` decorator binds a piece of code to an URL path. In this " +"case, we link the ``/hello`` path to the ``hello()`` function. This is " +"called a `route` (hence the decorator name) and is the most important " +"concept of this framework. You can define as many routes as you want. " +"Whenever a browser requests a URL, the associated function is called and the" +" return value is sent back to the browser. It's as simple as that." +msgstr "" + +# 528edb20b41743459e90d06fd9750c7c +#: ../../tutorial.rst:83 +msgid "" +"The :func:`run` call in the last line starts a built-in development server. " +"It runs on ``localhost`` port ``8080`` and serves requests until you hit " +":kbd:`Control-c`. You can switch the server backend later, but for now a " +"development server is all we need. It requires no setup at all and is an " +"incredibly painless way to get your application up and running for local " +"tests." +msgstr "" + +# 3172226b91454392a5deb3bc643ed166 +#: ../../tutorial.rst:85 +msgid "" +"The :ref:`tutorial-debugging` is very helpful during early development, but " +"should be switched off for public applications. Keep that in mind." +msgstr "" + +# a5019875879b47689a401f7267240e8c +#: ../../tutorial.rst:87 +msgid "" +"Of course this is a very simple example, but it shows the basic concept of " +"how applications are built with Bottle. Continue reading and you'll see what" +" else is possible." +msgstr "" + +# e837dae88a164a05bc74f0601c582444 +#: ../../tutorial.rst:92 +msgid "The Default Application" +msgstr "" + +# 806b156066ff4cd29e6f56b97e6c45e3 +#: ../../tutorial.rst:94 +msgid "" +"For the sake of simplicity, most examples in this tutorial use a module-" +"level :func:`route` decorator to define routes. This adds routes to a global" +" \"default application\", an instance of :class:`Bottle` that is " +"automatically created the first time you call :func:`route`. Several other " +"module-level decorators and functions relate to this default application, " +"but if you prefer a more object oriented approach and don't mind the extra " +"typing, you can create a separate application object and use that instead of" +" the global one::" +msgstr "" + +# 2df3acc8f64f433b95d45e91d94e00e8 +#: ../../tutorial.rst:106 +msgid "" +"The object-oriented approach is further described in the :ref:`default-app` " +"section. Just keep in mind that you have a choice." +msgstr "" + +# 5922fca14a164fcda76b0a6a56f4ec70 +#: ../../tutorial.rst:114 +msgid "Request Routing" +msgstr "" + +# 8c34fd27ba1e4c0088ceab4bd99826fa +#: ../../tutorial.rst:116 +msgid "" +"In the last chapter we built a very simple web application with only a " +"single route. Here is the routing part of the \"Hello World\" example " +"again::" +msgstr "" + +# 8b418053759e4a729ebaefa794f9b5b7 +#: ../../tutorial.rst:122 +msgid "" +"The :func:`route` decorator links an URL path to a callback function, and " +"adds a new route to the :ref:`default application <tutorial-default>`. An " +"application with just one route is kind of boring, though. Let's add some " +"more (don't forget ``from bottle import template``)::" +msgstr "" + +# 0d5c38469b44413d9754d4e77a28cb8d +#: ../../tutorial.rst:129 +msgid "" +"This example demonstrates two things: You can bind more than one route to a " +"single callback, and you can add wildcards to URLs and access them via " +"keyword arguments." +msgstr "" + +# bf73f39f2c9344819c3cf0a0ce4987a9 +#: ../../tutorial.rst:136 +msgid "Dynamic Routes" +msgstr "" + +# 0181039f5b65482495809c4101fe74b9 +#: ../../tutorial.rst:138 +msgid "" +"Routes that contain wildcards are called `dynamic routes` (as opposed to " +"`static routes`) and match more than one URL at the same time. A simple " +"wildcard consists of a name enclosed in angle brackets (e.g. ``<name>``) and" +" accepts one or more characters up to the next slash (``/``). For example, " +"the route ``/hello/<name>`` accepts requests for ``/hello/alice`` as well as" +" ``/hello/bob``, but not for ``/hello``, ``/hello/`` or ``/hello/mr/smith``." +msgstr "" + +# 9ea21ed0ef2c4c2ab84d14a522c987de +#: ../../tutorial.rst:140 +msgid "" +"Each wildcard passes the covered part of the URL as a keyword argument to " +"the request callback. You can use them right away and implement RESTful, " +"nice-looking and meaningful URLs with ease. Here are some other examples " +"along with the URLs they'd match::" +msgstr "" + +# a5c653d0a2584d829ca0b004a096659d +#: ../../tutorial.rst:152 +msgid "" +"Filters are used to define more specific wildcards, and/or transform the " +"covered part of the URL before it is passed to the callback. A filtered " +"wildcard is declared as ``<name:filter>`` or ``<name:filter:config>``. The " +"syntax for the optional config part depends on the filter used." +msgstr "" + +# e9b34bc84c024ac284534285631c6310 +#: ../../tutorial.rst:154 +msgid "" +"The following filters are implemented by default and more may be added:" +msgstr "" + +# bf08294f4c7c4bd1908c4c376f9aada9 +#: ../../tutorial.rst:156 +msgid "" +"**:int** matches (signed) digits only and converts the value to integer." +msgstr "" + +# 74e3fee4663b41599cd01c95499c7f0f +#: ../../tutorial.rst:157 +msgid "**:float** similar to :int but for decimal numbers." +msgstr "" + +# 9968ec2829bc43e9a604f8dd2775e82d +#: ../../tutorial.rst:158 +msgid "" +"**:path** matches all characters including the slash character in a non-" +"greedy way and can be used to match more than one path segment." +msgstr "" + +# c7c58c9cd1804ef19f7fb4e6909d5314 +#: ../../tutorial.rst:159 +msgid "" +"**:re** allows you to specify a custom regular expression in the config " +"field. The matched value is not modified." +msgstr "" + +# d1664b21f95640b9b7848224150a1c2a +#: ../../tutorial.rst:161 +msgid "Let's have a look at some practical examples::" +msgstr "" + +# e2c015426d62427b8baf07a6dca84c98 +#: ../../tutorial.rst:175 +msgid "You can add your own filters as well. See :doc:`routing` for details." +msgstr "" + +# dce499c468e547689f8f1f76fa72fb79 +#: ../../tutorial.rst:179 +msgid "" +"The new rule syntax was introduced in **Bottle 0.10** to simplify some " +"common use cases, but the old syntax still works and you can find a lot of " +"code examples still using it. The differences are best described by example:" +msgstr "" + +# 4fdcb0127e6743288e7c1d6b6165107d +#: ../../tutorial.rst:182 +msgid "Old Syntax" +msgstr "" + +# bb8641cc26f2463f8c616a4b7642c861 +#: ../../tutorial.rst:182 +msgid "New Syntax" +msgstr "" + +# 7c941561a45c4970b776e5f84f5a366e +#: ../../tutorial.rst:184 +msgid "``:name``" +msgstr "" + +# 0627940e3f3242afa41e781fa4713a85 +#: ../../tutorial.rst:184 +msgid "``<name>``" +msgstr "" + +# d6e36ed6f0004129b81ec00a06259588 +#: ../../tutorial.rst:185 +msgid "``:name#regexp#``" +msgstr "" + +# f141cc72cbaa4d3289dcde6e261fd516 +#: ../../tutorial.rst:185 +msgid "``<name:re:regexp>``" +msgstr "" + +# dd11228910bb40bb800f000ab651c362 +#: ../../tutorial.rst:186 +msgid "``:#regexp#``" +msgstr "" + +# 6856882d9711448e8a8b209229571aef +#: ../../tutorial.rst:186 +msgid "``<:re:regexp>``" +msgstr "" + +# 743f807f038d405ebd72fafc986ea77a +#: ../../tutorial.rst:187 +msgid "``:##``" +msgstr "" + +# 696dc779cccf40deb80bb15f28de0847 +#: ../../tutorial.rst:187 +msgid "``<:re>``" +msgstr "" + +# 130a34b229ec4ad2b259dea070431d03 +#: ../../tutorial.rst:190 +msgid "" +"Try to avoid the old syntax in future projects if you can. It is not " +"currently deprecated, but will be eventually." +msgstr "" + +# 864af2a245c54a00a3e1427f7a2d0727 +#: ../../tutorial.rst:194 +msgid "HTTP Request Methods" +msgstr "" + +# 395fb41a1c104235a5aa04013b4b3a2f +#: ../../tutorial.rst:198 +msgid "" +"The HTTP protocol defines several `request methods`__ (sometimes referred to" +" as \"verbs\") for different tasks. GET is the default for all routes with " +"no other method specified. These routes will match GET requests only. To " +"handle other methods such as POST, PUT, DELETE or PATCH, add a ``method`` " +"keyword argument to the :func:`route` decorator or use one of the four " +"alternative decorators: :func:`get`, :func:`post`, :func:`put`, " +":func:`delete` or :func:`patch`." +msgstr "" + +# 38ed35133fb44f9a9bf5d2c9a6be2f32 +#: ../../tutorial.rst:200 +msgid "" +"The POST method is commonly used for HTML form submission. This example " +"shows how to handle a login form using POST::" +msgstr "" + +# d17059ed777642ab94f518b284840688 +#: ../../tutorial.rst:223 +msgid "" +"In this example the ``/login`` URL is linked to two distinct callbacks, one " +"for GET requests and another for POST requests. The first one displays a " +"HTML form to the user. The second callback is invoked on a form submission " +"and checks the login credentials the user entered into the form. The use of " +":attr:`Request.forms` is further described in the :ref:`tutorial-request` " +"section." +msgstr "" + +# e32d9ac6f2ee43dcb1398f0b9a0211bb +#: ../../tutorial.rst:226 +msgid "Special Methods: HEAD and ANY" +msgstr "" + +# 8a4bd657eb1444fca9f73e476ce83add +#: ../../tutorial.rst:227 +msgid "" +"The HEAD method is used to ask for the response identical to the one that " +"would correspond to a GET request, but without the response body. This is " +"useful for retrieving meta-information about a resource without having to " +"download the entire document. Bottle handles these requests automatically by" +" falling back to the corresponding GET route and cutting off the request " +"body, if present. You don't have to specify any HEAD routes yourself." +msgstr "" + +# 13d5ec233f9142a0a72d7c51d5b81aaf +#: ../../tutorial.rst:229 +msgid "" +"Additionally, the non-standard ANY method works as a low priority fallback: " +"Routes that listen to ANY will match requests regardless of their HTTP " +"method but only if no other more specific route is defined. This is helpful " +"for *proxy-routes* that redirect requests to more specific sub-applications." +msgstr "" + +# 2f5973de9de64648aed357b34a9bdb7f +#: ../../tutorial.rst:231 +msgid "" +"To sum it up: HEAD requests fall back to GET routes and all requests fall " +"back to ANY routes, but only if there is no matching route for the original " +"request method. It's as simple as that." +msgstr "" + +# ad164662e90f4041a85a2a11db1ee0c0 +#: ../../tutorial.rst:236 +msgid "Routing Static Files" +msgstr "" + +# cd0e402ae2e540ec97c12063e42d6126 +#: ../../tutorial.rst:238 +msgid "" +"Static files such as images or CSS files are not served automatically. You " +"have to add a route and a callback to control which files get served and " +"where to find them::" +msgstr "" + +# 3a2559a5b63d4ee9acb4440e8fe1a96b +#: ../../tutorial.rst:245 +msgid "" +"The :func:`static_file` function is a helper to serve files in a safe and " +"convenient way (see :ref:`tutorial-static-files`). This example is limited " +"to files directly within the ``/path/to/your/static/files`` directory " +"because the ``<filename>`` wildcard won't match a path with a slash in it. " +"To serve files in subdirectories, change the wildcard to use the `path` " +"filter::" +msgstr "" + +# f94439ce4dd24a4686de019b5220de9f +#: ../../tutorial.rst:251 +msgid "" +"Be careful when specifying a relative root-path such as " +"``root='./static/files'``. The working directory (``./``) and the project " +"directory are not always the same." +msgstr "" + +# 7190cf7dbf864ebd8b6c170aabbd3cd4 +#: ../../tutorial.rst:259 +msgid "Error Pages" +msgstr "" + +# 5952f6f875ba4e9680b422c6eaf3433f +#: ../../tutorial.rst:261 +msgid "" +"If anything goes wrong, Bottle displays an informative but fairly plain " +"error page. You can override the default for a specific HTTP status code " +"with the :func:`error` decorator::" +msgstr "" + +# 426ced6e32c64e6dbe403e8d78fcc294 +#: ../../tutorial.rst:268 +msgid "" +"From now on, `404 File not Found` errors will display a custom error page to" +" the user. The only parameter passed to the error-handler is an instance of " +":exc:`HTTPError`. Apart from that, an error-handler is quite similar to a " +"regular request callback. You can read from :data:`request`, write to " +":data:`response` and return any supported data-type except for " +":exc:`HTTPError` instances." +msgstr "" + +# 9a3f76d9b41c4aac95bf8f66199040f8 +#: ../../tutorial.rst:270 +msgid "" +"Error handlers are used only if your application returns or raises an " +":exc:`HTTPError` exception (:func:`abort` does just that). Changing " +":attr:`Request.status` or returning :exc:`HTTPResponse` won't trigger the " +"error handler." +msgstr "" + +# f1092bc764cc43eb8282b79e64fdd6b1 +#: ../../tutorial.rst:280 +msgid "Generating content" +msgstr "" + +# 56668c66a418409daf59198d87bddcd7 +#: ../../tutorial.rst:282 +msgid "" +"In pure WSGI, the range of types you may return from your application is " +"very limited. Applications must return an iterable yielding byte strings. " +"You may return a string (because strings are iterable) but this causes most " +"servers to transmit your content char by char. Unicode strings are not " +"allowed at all. This is not very practical." +msgstr "" + +# f83bbefffadd44088cae7bad2965ef44 +#: ../../tutorial.rst:284 +msgid "" +"Bottle is much more flexible and supports a wide range of types. It even " +"adds a ``Content-Length`` header if possible and encodes unicode " +"automatically, so you don't have to. What follows is a list of data types " +"you may return from your application callbacks and a short description of " +"how these are handled by the framework:" +msgstr "" + +# 5582a4ab861b4a0e95d77f4cc88d656b +#: ../../tutorial.rst:287 +msgid "Dictionaries" +msgstr "" + +# 0af07cab0f9c480190e8a9be3918e772 +#: ../../tutorial.rst:287 +msgid "" +"As mentioned above, Python dictionaries (or subclasses thereof) are " +"automatically transformed into JSON strings and returned to the browser with" +" the ``Content-Type`` header set to ``application/json``. This makes it easy" +" to implement json-based APIs. Data formats other than json are supported " +"too. See the :ref:`tutorial-output-filter` to learn more." +msgstr "" + +# b20177cad06a4b3b90c53a2f8f58b81c +#: ../../tutorial.rst:290 +msgid "Empty Strings, ``False``, ``None`` or other non-true values:" +msgstr "" + +# cb9f588a721642e58e31a5528cf0aa4c +#: ../../tutorial.rst:290 +msgid "" +"These produce an empty output with the ``Content-Length`` header set to 0." +msgstr "" + +# 28cba6ed4b7b4957b430bb232ee63da1 +#: ../../tutorial.rst:293 +msgid "Unicode strings" +msgstr "" + +# 9c2199e8fa46413bab1ea8298b4ee004 +#: ../../tutorial.rst:293 +msgid "" +"Unicode strings (or iterables yielding unicode strings) are automatically " +"encoded with the codec specified in the ``Content-Type`` header (utf8 by " +"default) and then treated as normal byte strings (see below)." +msgstr "" + +# a698affc9a2c42339ec92d0731899f6f +#: ../../tutorial.rst:296 +msgid "Byte strings" +msgstr "" + +# d262affdb36c451a8019b09562c8256a +#: ../../tutorial.rst:296 +msgid "" +"Bottle returns strings as a whole (instead of iterating over each char) and " +"adds a ``Content-Length`` header based on the string length. Lists of byte " +"strings are joined first. Other iterables yielding byte strings are not " +"joined because they may grow too big to fit into memory. The ``Content-" +"Length`` header is not set in this case." +msgstr "" + +# 59157588717e485aabb23d0f768e5ced +#: ../../tutorial.rst:299 +msgid "Instances of :exc:`HTTPError` or :exc:`HTTPResponse`" +msgstr "" + +# 9d8efc187aec4989be3e1288c4c026fc +#: ../../tutorial.rst:299 +msgid "" +"Returning these has the same effect as when raising them as an exception. In" +" case of an :exc:`HTTPError`, the error handler is applied. See :ref" +":`tutorial-errorhandling` for details." +msgstr "" + +# 4c3d3fba4cc2450892b64b0a9223c274 +#: ../../tutorial.rst:302 +msgid "File objects" +msgstr "" + +# 3574557ba4ac4fb386adcd8624e4b9be +#: ../../tutorial.rst:302 +msgid "" +"Everything that has a ``.read()`` method is treated as a file or file-like " +"object and passed to the ``wsgi.file_wrapper`` callable defined by the WSGI " +"server framework. Some WSGI server implementations can make use of optimized" +" system calls (sendfile) to transmit files more efficiently. In other cases " +"this just iterates over chunks that fit into memory. Optional headers such " +"as ``Content-Length`` or ``Content-Type`` are *not* set automatically. Use " +":func:`send_file` if possible. See :ref:`tutorial-static-files` for details." +msgstr "" + +# 7be34241e15f4b699d4540bee296437a +#: ../../tutorial.rst:305 +msgid "Iterables and generators" +msgstr "" + +# ac0488d7101847eeb1a33474a2bec821 +#: ../../tutorial.rst:305 +msgid "" +"You are allowed to use ``yield`` within your callbacks or return an " +"iterable, as long as the iterable yields byte strings, unicode strings, " +":exc:`HTTPError` or :exc:`HTTPResponse` instances. Nested iterables are not " +"supported, sorry. Please note that the HTTP status code and the headers are " +"sent to the browser as soon as the iterable yields its first non-empty " +"value. Changing these later has no effect." +msgstr "" + +# 4904796ade9540ed9abbd72f956d39b0 +#: ../../tutorial.rst:307 +msgid "" +"The ordering of this list is significant. You may for example return a " +"subclass of :class:`str` with a ``read()`` method. It is still treated as a " +"string instead of a file, because strings are handled first." +msgstr "" + +# 22fd5efc83884c8aade1ae0816f3382a +#: ../../tutorial.rst:310 +msgid "Changing the Default Encoding" +msgstr "" + +# b886ac8e69f7421ea52d0aac4e02eb7b +#: ../../tutorial.rst:311 +msgid "" +"Bottle uses the `charset` parameter of the ``Content-Type`` header to decide" +" how to encode unicode strings. This header defaults to ``text/html; " +"charset=UTF8`` and can be changed using the :attr:`Response.content_type` " +"attribute or by setting the :attr:`Response.charset` attribute directly. " +"(The :class:`Response` object is described in the section :ref:`tutorial-" +"response`.)" +msgstr "" + +# 9fb228f33a6b4d36bad93c056e913d85 +#: ../../tutorial.rst:326 +msgid "" +"In some rare cases the Python encoding names differ from the names supported" +" by the HTTP specification. Then, you have to do both: first set the " +":attr:`Response.content_type` header (which is sent to the client unchanged)" +" and then set the :attr:`Response.charset` attribute (which is used to " +"encode unicode)." +msgstr "" + +# 6246a9980df8482a9d21b476e860e934 +#: ../../tutorial.rst:331 +msgid "Static Files" +msgstr "" + +# 6577ce77ebce4154bea308e783a8f2c4 +#: ../../tutorial.rst:333 +msgid "" +"You can directly return file objects, but :func:`static_file` is the " +"recommended way to serve static files. It automatically guesses a mime-type," +" adds a ``Last-Modified`` header, restricts paths to a ``root`` directory " +"for security reasons and generates appropriate error responses (403 on " +"permission errors, 404 on missing files). It even supports the ``If-" +"Modified-Since`` header and eventually generates a ``304 Not Modified`` " +"response. You can pass a custom MIME type to disable guessing." +msgstr "" + +# d16e71e083184059bbf08afc0fb9a57d +#: ../../tutorial.rst:346 +msgid "" +"You can raise the return value of :func:`static_file` as an exception if you" +" really need to." +msgstr "" + +# c6a61579847e4979b39844da1c7c1437 +#: ../../tutorial.rst:349 +msgid "Forced Download" +msgstr "" + +# 92e3e880d653496584a1fedb1c450809 +#: ../../tutorial.rst:350 +msgid "" +"Most browsers try to open downloaded files if the MIME type is known and " +"assigned to an application (e.g. PDF files). If this is not what you want, " +"you can force a download dialog and even suggest a filename to the user::" +msgstr "" + +# 868eadb6b675438bbd4e4e00e77ea5dc +#: ../../tutorial.rst:356 +msgid "" +"If the ``download`` parameter is just ``True``, the original filename is " +"used." +msgstr "" + +# 5170980d61fa48c3a798819613bd979a +#: ../../tutorial.rst:361 +msgid "HTTP Errors and Redirects" +msgstr "" + +# 39600d8c864a413e8f0b91d7115903d9 +#: ../../tutorial.rst:363 +msgid "" +"The :func:`abort` function is a shortcut for generating HTTP error pages." +msgstr "" + +# 89afe97f71a74600b0a92866b55c208c +#: ../../tutorial.rst:372 +msgid "" +"To redirect a client to a different URL, you can send a ``303 See Other`` " +"response with the ``Location`` header set to the new URL. :func:`redirect` " +"does that for you::" +msgstr "" + +# 2c6d6522d36f472baae5da4acd70dcad +#: ../../tutorial.rst:379 +msgid "You may provide a different HTTP status code as a second parameter." +msgstr "" + +# 8261a4a6a4db4182bcbfec5411cc864c +#: ../../tutorial.rst:382 +msgid "" +"Both functions will interrupt your callback code by raising an " +":exc:`HTTPError` exception." +msgstr "" + +# 7af63c8946c94640a29ea3c200e0cbfa +#: ../../tutorial.rst:385 +msgid "Other Exceptions" +msgstr "" + +# 38f50e2703a94839ad3744a16099dd0b +#: ../../tutorial.rst:386 +msgid "" +"All exceptions other than :exc:`HTTPResponse` or :exc:`HTTPError` will " +"result in a ``500 Internal Server Error`` response, so they won't crash your" +" WSGI server. You can turn off this behavior to handle exceptions in your " +"middleware by setting ``bottle.app().catchall`` to ``False``." +msgstr "" + +# 5b1413110d4b4fde8dbeac4ba1ac21d5 +#: ../../tutorial.rst:392 +msgid "The :class:`Response` Object" +msgstr "" + +# f13e21c89da34f2a97acd3e1b95d2533 +#: ../../tutorial.rst:394 +msgid "" +"Response metadata such as the HTTP status code, response headers and cookies" +" are stored in an object called :data:`response` up to the point where they " +"are transmitted to the browser. You can manipulate these metadata directly " +"or use the predefined helper methods to do so. The full API and feature list" +" is described in the API section (see :class:`Response`), but the most " +"common use cases and features are covered here, too." +msgstr "" + +# 38f06fec96ec47b29c0cbfc22de8dd25 +#: ../../tutorial.rst:397 +msgid "Status Code" +msgstr "" + +# 5c082752523046a5803db071bd295050 +#: ../../tutorial.rst:398 +msgid "" +"The `HTTP status code <http_code>`_ controls the behavior of the browser and" +" defaults to ``200 OK``. In most scenarios you won't need to set the " +":attr:`Response.status` attribute manually, but use the :func:`abort` helper" +" or return an :exc:`HTTPResponse` instance with the appropriate status code." +" Any integer is allowed, but codes other than the ones defined by the `HTTP " +"specification <http_code>`_ will only confuse the browser and break " +"standards." +msgstr "" + +# e58a3f9b92b845858b168ed8e7fd897c +#: ../../tutorial.rst:401 +msgid "Response Header" +msgstr "" + +# fe192653eed74523ab0c6ea7269aa31f +#: ../../tutorial.rst:402 +msgid "" +"Response headers such as ``Cache-Control`` or ``Location`` are defined via " +":meth:`Response.set_header`. This method takes two parameters, a header name" +" and a value. The name part is case-insensitive::" +msgstr "" + +# f0fe9d7d598146ff9d7f6b609556afbb +#: ../../tutorial.rst:409 +msgid "" +"Most headers are unique, meaning that only one header per name is send to " +"the client. Some special headers however are allowed to appear more than " +"once in a response. To add an additional header, use " +":meth:`Response.add_header` instead of :meth:`Response.set_header`::" +msgstr "" + +# cc53dfe73b784f368f983b0ab35b6590 +#: ../../tutorial.rst:414 +msgid "" +"Please note that this is just an example. If you want to work with cookies, " +"read :ref:`ahead <tutorial-cookies>`." +msgstr "" + +# bff754a4f00341f7b58c157f392ed5e2 +# d78c58fe2515483c9191fb1e9c0aa9dc +#: ../../tutorial.rst:420 ../../tutorial.rst:549 +msgid "Cookies" +msgstr "" + +# 2ce5fe9ac949486a90e4b6979ad388cb +#: ../../tutorial.rst:422 +msgid "" +"A cookie is a named piece of text stored in the user's browser profile. You " +"can access previously defined cookies via :meth:`Request.get_cookie` and set" +" new cookies with :meth:`Response.set_cookie`::" +msgstr "" + +# 073cba4dac4a4ba7ba7f084fe9e40c2a +#: ../../tutorial.rst:432 +msgid "" +"The :meth:`Response.set_cookie` method accepts a number of additional " +"keyword arguments that control the cookies lifetime and behavior. Some of " +"the most common settings are described here:" +msgstr "" + +# eeba19ba3d9249df9fc326022429b2c8 +#: ../../tutorial.rst:434 +msgid "**max_age:** Maximum age in seconds. (default: ``None``)" +msgstr "" + +# c62fb8cd2b7e41f589a2e88705ee9924 +#: ../../tutorial.rst:435 +msgid "" +"**expires:** A datetime object or UNIX timestamp. (default: ``None``)" +msgstr "" + +# c8c5c5f6eb5448539c5b91515609dec9 +#: ../../tutorial.rst:436 +msgid "" +"**domain:** The domain that is allowed to read the cookie. (default: " +"current domain)" +msgstr "" + +# 6d0ae30c2bdb4082924490a3581927f6 +#: ../../tutorial.rst:437 +msgid "**path:** Limit the cookie to a given path (default: ``/``)" +msgstr "" + +# 89af9a7789814bf3a3d39831ee47d339 +#: ../../tutorial.rst:438 +msgid "**secure:** Limit the cookie to HTTPS connections (default: off)." +msgstr "" + +# ef929e1f89ea47b490f269945058f447 +#: ../../tutorial.rst:439 +msgid "" +"**httponly:** Prevent client-side javascript to read this cookie (default:" +" off, requires Python 2.6 or newer)." +msgstr "" + +# c44dea99790347c3b1411561849c89dd +#: ../../tutorial.rst:441 +msgid "" +"If neither `expires` nor `max_age` is set, the cookie expires at the end of " +"the browser session or as soon as the browser window is closed. There are " +"some other gotchas you should consider when using cookies:" +msgstr "" + +# 5802e77b9bc94dbe910071affe4e2d2b +#: ../../tutorial.rst:443 +msgid "Cookies are limited to 4 KB of text in most browsers." +msgstr "" + +# 078f11701bd1466ca37e2bff02db03d2 +#: ../../tutorial.rst:444 +msgid "" +"Some users configure their browsers to not accept cookies at all. Most " +"search engines ignore cookies too. Make sure that your application still " +"works without cookies." +msgstr "" + +# 3e129493ead74cf2adb246bd3f35b3c7 +#: ../../tutorial.rst:445 +msgid "" +"Cookies are stored at client side and are not encrypted in any way. Whatever" +" you store in a cookie, the user can read it. Worse than that, an attacker " +"might be able to steal a user's cookies through `XSS " +"<http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_theft_and_session_hijacking>`_" +" vulnerabilities on your side. Some viruses are known to read the browser " +"cookies, too. Thus, never store confidential information in cookies." +msgstr "" + +# 2d2b28d364fe43f68e5455243f4d6bd9 +#: ../../tutorial.rst:446 +msgid "Cookies are easily forged by malicious clients. Do not trust cookies." +msgstr "" + +# 57e3df9c7fbb4307918abf135b1b408d +#: ../../tutorial.rst:451 +msgid "Signed Cookies" +msgstr "" + +# 92a3f73e4b3c4de8a7ed7941b2ce366c +#: ../../tutorial.rst:452 +msgid "" +"As mentioned above, cookies are easily forged by malicious clients. Bottle " +"can cryptographically sign your cookies to prevent this kind of " +"manipulation. All you have to do is to provide a signature key via the " +"`secret` keyword argument whenever you read or set a cookie and keep that " +"key a secret. As a result, :meth:`Request.get_cookie` will return ``None`` " +"if the cookie is not signed or the signature keys don't match::" +msgstr "" + +# e4e66538b103446eaaa6be8545814503 +#: ../../tutorial.rst:472 +msgid "" +"In addition, Bottle automatically pickles and unpickles any data stored to " +"signed cookies. This allows you to store any pickle-able object (not only " +"strings) to cookies, as long as the pickled data does not exceed the 4 KB " +"limit." +msgstr "" + +# beb5c580407247ec9519564408987b5b +#: ../../tutorial.rst:474 +msgid "" +"Signed cookies are not encrypted (the client can still see the content) and " +"not copy-protected (the client can restore an old cookie). The main " +"intention is to make pickling and unpickling safe and prevent manipulation, " +"not to store secret information at client side." +msgstr "" + +# f81616266e524317b7881b24d9b0b913 +#: ../../tutorial.rst:487 +msgid "Request Data" +msgstr "" + +# f5735cfa714e43e6971a618eb223525f +#: ../../tutorial.rst:489 +msgid "" +"Cookies, HTTP header, HTML ``<form>`` fields and other request data is " +"available through the global :data:`request` object. This special object " +"always refers to the *current* request, even in multi-threaded environments " +"where multiple client connections are handled at the same time::" +msgstr "" + +# 89159d8092db437ba581dfabbd9373dd +#: ../../tutorial.rst:498 +msgid "" +"The :data:`request` object is a subclass of :class:`BaseRequest` and has a " +"very rich API to access data. We only cover the most commonly used features " +"here, but it should be enough to get started." +msgstr "" + +# df4a93a9d7534ca1a59cf027011e3090 +#: ../../tutorial.rst:503 +msgid "Introducing :class:`FormsDict`" +msgstr "" + +# 431fe46c72de430a81a899114cbd7b5d +#: ../../tutorial.rst:505 +msgid "" +"Bottle uses a special type of dictionary to store form data and cookies. " +":class:`FormsDict` behaves like a normal dictionary, but has some additional" +" features to make your life easier." +msgstr "" + +# 398ec974232a4add91ded25202d804fa +#: ../../tutorial.rst:507 +msgid "" +"**Attribute access**: All values in the dictionary are also accessible as " +"attributes. These virtual attributes return unicode strings, even if the " +"value is missing or unicode decoding fails. In that case, the string is " +"empty, but still present::" +msgstr "" + +# 31053961417647c1999307641ac677b2 +#: ../../tutorial.rst:522 +msgid "" +"**Multiple values per key:** :class:`FormsDict` is a subclass of " +":class:`MultiDict` and can store more than one value per key. The standard " +"dictionary access methods will only return a single value, but the " +":meth:`~MultiDict.getall` method returns a (possibly empty) list of all " +"values for a specific key::" +msgstr "" + +# 63ef53e5110b48f3b386e4817dd43ae1 +#: ../../tutorial.rst:527 +msgid "" +"**WTForms support:** Some libraries (e.g. `WTForms " +"<http://wtforms.simplecodes.com/>`_) want all-unicode dictionaries as input." +" :meth:`FormsDict.decode` does that for you. It decodes all values and " +"returns a copy of itself, while preserving multiple values per key and all " +"the other features." +msgstr "" + +# cae78dee769745038d0e99d7f1962e92 +#: ../../tutorial.rst:531 +msgid "" +"In **Python 2** all keys and values are byte-strings. If you need unicode, " +"you can call :meth:`FormsDict.getunicode` or fetch values via attribute " +"access. Both methods try to decode the string (default: utf8) and return an " +"empty string if that fails. No need to catch :exc:`UnicodeError`::" +msgstr "" + +# 860bf56342f9464cb363e7ceb8d8f191 +#: ../../tutorial.rst:538 +msgid "" +"In **Python 3** all strings are unicode, but HTTP is a byte-based wire " +"protocol. The server has to decode the byte strings somehow before they are " +"passed to the application. To be on the safe side, WSGI suggests ISO-8859-1 " +"(aka latin1), a reversible single-byte codec that can be re-encoded with a " +"different encoding later. Bottle does that for :meth:`FormsDict.getunicode` " +"and attribute access, but not for the dict-access methods. These return the " +"unchanged values as provided by the server implementation, which is probably" +" not what you want." +msgstr "" + +# d1d25ef91b1149e08b56d7eec46bc3b6 +#: ../../tutorial.rst:545 +msgid "" +"If you need the whole dictionary with correctly decoded values (e.g. for " +"WTForms), you can call :meth:`FormsDict.decode` to get a re-encoded copy." +msgstr "" + +# 1f41cf2d2cdd4445873e264035b1442b +#: ../../tutorial.rst:551 +msgid "" +"Cookies are small pieces of text stored in the clients browser and sent back" +" to the server with each request. They are useful to keep some state around " +"for more than one request (HTTP itself is stateless), but should not be used" +" for security related stuff. They can be easily forged by the client." +msgstr "" + +# e24f4025a9484c5e8029385b83a05f53 +#: ../../tutorial.rst:553 +msgid "" +"All cookies sent by the client are available through " +":attr:`BaseRequest.cookies` (a :class:`FormsDict`). This example shows a " +"simple cookie-based view counter::" +msgstr "" + +# 3a28598cdb314053b4534f8bb55582cb +#: ../../tutorial.rst:563 +msgid "" +"The :meth:`BaseRequest.get_cookie` method is a different way do access " +"cookies. It supports decoding :ref:`signed cookies <tutorial-signed-" +"cookies>` as described in a separate section." +msgstr "" + +# f213ece9c0d84067854f53077a331dba +#: ../../tutorial.rst:566 +msgid "HTTP Headers" +msgstr "" + +# 8a8fc6a8d22c4efbaa818329a0cdc607 +#: ../../tutorial.rst:568 +msgid "" +"All HTTP headers sent by the client (e.g. ``Referer``, ``Agent`` or " +"``Accept-Language``) are stored in a :class:`WSGIHeaderDict` and accessible " +"through the :attr:`BaseRequest.headers` attribute. A :class:`WSGIHeaderDict`" +" is basically a dictionary with case-insensitive keys::" +msgstr "" + +# d28b3873034d468d905e90b0405c8f25 +#: ../../tutorial.rst:580 +msgid "Query Variables" +msgstr "" + +# 15eaede90aa64490b333ee269b97e6c7 +#: ../../tutorial.rst:582 +msgid "" +"The query string (as in ``/forum?id=1&page=5``) is commonly used to transmit" +" a small number of key/value pairs to the server. You can use the " +":attr:`BaseRequest.query` attribute (a :class:`FormsDict`) to access these " +"values and the :attr:`BaseRequest.query_string` attribute to get the whole " +"string." +msgstr "" + +# 8afda217e0c1411c93dfb29d25e7b68b +#: ../../tutorial.rst:595 +msgid "HTML `<form>` Handling" +msgstr "" + +# 47bccfd4c83b4534813d04312a8f44d8 +#: ../../tutorial.rst:597 +msgid "" +"Let us start from the beginning. In HTML, a typical ``<form>`` looks " +"something like this:" +msgstr "" + +# 64d8978da120454982ea5a701336edd4 +#: ../../tutorial.rst:607 +msgid "" +"The ``action`` attribute specifies the URL that will receive the form data. " +"``method`` defines the HTTP method to use (``GET`` or ``POST``). With " +"``method=\"get\"`` the form values are appended to the URL and available " +"through :attr:`BaseRequest.query` as described above. This is considered " +"insecure and has other limitations, so we use ``method=\"post\"`` here. If " +"in doubt, use ``POST`` forms." +msgstr "" + +# f991d9afa38b458e9c90c2ff47e789f4 +#: ../../tutorial.rst:609 +msgid "" +"Form fields transmitted via ``POST`` are stored in :attr:`BaseRequest.forms`" +" as a :class:`FormsDict`. The server side code may look like this::" +msgstr "" + +# 81cff7f4af934d6fa9360ab54da95cb6 +#: ../../tutorial.rst:632 +msgid "" +"There are several other attributes used to access form data. Some of them " +"combine values from different sources for easier access. The following table" +" should give you a decent overview." +msgstr "" + +# 6702069df9974731a7ea60ca75cab0f9 +#: ../../tutorial.rst:635 +msgid "Attribute" +msgstr "" + +# d244efbdf14047919a287b05efa14f67 +#: ../../tutorial.rst:635 +msgid "GET Form fields" +msgstr "" + +# dfc1e30176c84efcb0ae93db03175783 +#: ../../tutorial.rst:635 +msgid "POST Form fields" +msgstr "" + +# 0f1381b897e7406f8b7c9fd4968e52da +#: ../../tutorial.rst:635 +msgid "File Uploads" +msgstr "" + +# 0ce02ef13e8f46b19a80f42290c2c442 +#: ../../tutorial.rst:637 +msgid ":attr:`BaseRequest.query`" +msgstr "" + +# 7ea570eed5714a27842397402919a1b8 +# f866fe599a37442ca560b4f9f52af0dc +# a6d6e8e46e7d478c8a6ad58ac4fd7056 +# 1bb36453a3ce4fe49c3f4a77fa7e5bfd +# 2fcf1f61fc1c47a2829eee6461b2c9b7 +# 259a134887df4aefa37e401e1f74fcf3 +# 5d9e107544124f1189df3569c785a4f9 +# be692b7f81ad4459906b76b89aa77cb0 +#: ../../tutorial.rst:637 ../../tutorial.rst:638 ../../tutorial.rst:639 +#: ../../tutorial.rst:640 ../../tutorial.rst:640 ../../tutorial.rst:641 +#: ../../tutorial.rst:642 ../../tutorial.rst:642 +msgid "yes" +msgstr "" + +# 41fb61904c1c48b49f5d4eb6e5a4317d +# 20d5592e036c4bd2b00bc328ae7ca487 +# ba20bb316e5b42c5b1fdd5b30427e8cf +# bd6e97ab7e52496d90715378b0268e1c +# acebe8690063405d8865f974bd2b7189 +# 2c649fa972a64390a4b662f23be351d4 +# 8af044d64b4a481482686774e23a256a +# 4032074c7e0748528569b583e2e5286b +# 797c2c93982040d7913ec152eaa6349a +# bef53fde1b334d9ab5d5571f37e3f53f +#: ../../tutorial.rst:637 ../../tutorial.rst:637 ../../tutorial.rst:638 +#: ../../tutorial.rst:638 ../../tutorial.rst:639 ../../tutorial.rst:639 +#: ../../tutorial.rst:640 ../../tutorial.rst:641 ../../tutorial.rst:641 +#: ../../tutorial.rst:642 +msgid "no" +msgstr "" + +# 774116fa45d944548da6b38a82256693 +#: ../../tutorial.rst:638 +msgid ":attr:`BaseRequest.forms`" +msgstr "" + +# 1af3b00479c946e68e966f8e00c2d9fa +#: ../../tutorial.rst:639 +msgid ":attr:`BaseRequest.files`" +msgstr "" + +# 713441a08c9b42359dd5e70eea1dfb2c +#: ../../tutorial.rst:640 +msgid ":attr:`BaseRequest.params`" +msgstr "" + +# 210cda782b0c4601b2b1b3e793621ace +#: ../../tutorial.rst:641 +msgid ":attr:`BaseRequest.GET`" +msgstr "" + +# bb796720e91d48c7a8817cff648e154b +#: ../../tutorial.rst:642 +msgid ":attr:`BaseRequest.POST`" +msgstr "" + +# c713689f0f9649adbdaed97afc4fc888 +#: ../../tutorial.rst:647 +msgid "File uploads" +msgstr "" + +# f09f90f8cd8a426dbae4c7fb4a8a1544 +#: ../../tutorial.rst:649 +msgid "" +"To support file uploads, we have to change the ``<form>`` tag a bit. First, " +"we tell the browser to encode the form data in a different way by adding an " +"``enctype=\"multipart/form-data\"`` attribute to the ``<form>`` tag. Then, " +"we add ``<input type=\"file\" />`` tags to allow the user to select a file. " +"Here is an example:" +msgstr "" + +# 5621abf2254141d59a63e48e0ff8f2a0 +#: ../../tutorial.rst:659 +msgid "" +"Bottle stores file uploads in :attr:`BaseRequest.files` as " +":class:`FileUpload` instances, along with some metadata about the upload. " +"Let us assume you just want to save the file to disk::" +msgstr "" + +# afd75710819b4c39a70d77987aa39395 +#: ../../tutorial.rst:673 +msgid "" +":attr:`FileUpload.filename` contains the name of the file on the clients " +"file system, but is cleaned up and normalized to prevent bugs caused by " +"unsupported characters or path segments in the filename. If you need the " +"unmodified name as sent by the client, have a look at " +":attr:`FileUpload.raw_filename`." +msgstr "" + +# c413b885489c4cb28d0213b211c9083b +#: ../../tutorial.rst:675 +msgid "" +"The :attr:`FileUpload.save` method is highly recommended if you want to " +"store the file to disk. It prevents some common errors (e.g. it does not " +"overwrite existing files unless you tell it to) and stores the file in a " +"memory efficient way. You can access the file object directly via " +":attr:`FileUpload.file`. Just be careful." +msgstr "" + +# 7c1b1718d1cb4ac0bedcad349b6e7e9f +#: ../../tutorial.rst:679 +msgid "JSON Content" +msgstr "" + +# 94dca01a171e406cb291c5f40a246907 +#: ../../tutorial.rst:681 +msgid "" +"Some JavaScript or REST clients send ``application/json`` content to the " +"server. The :attr:`BaseRequest.json` attribute contains the parsed data " +"structure, if available." +msgstr "" + +# b18fe51c7d944a35ac322ca51d760407 +#: ../../tutorial.rst:685 +msgid "The raw request body" +msgstr "" + +# 3c02f3635cd4412e88370791707f1307 +#: ../../tutorial.rst:687 +msgid "" +"You can access the raw body data as a file-like object via " +":attr:`BaseRequest.body`. This is a :class:`BytesIO` buffer or a temporary " +"file depending on the content length and :attr:`BaseRequest.MEMFILE_MAX` " +"setting. In both cases the body is completely buffered before you can access" +" the attribute. If you expect huge amounts of data and want to get direct " +"unbuffered access to the stream, have a look at ``request['wsgi.input']``." +msgstr "" + +# 31e459b302f947c3a11bc4bd8c3130c2 +#: ../../tutorial.rst:692 +msgid "WSGI Environment" +msgstr "" + +# 277b90d681814132b180f82d12dbedea +#: ../../tutorial.rst:694 +msgid "" +"Each :class:`BaseRequest` instance wraps a WSGI environment dictionary. The " +"original is stored in :attr:`BaseRequest.environ`, but the request object " +"itself behaves like a dictionary, too. Most of the interesting data is " +"exposed through special methods or attributes, but if you want to access " +"`WSGI environ variables <WSGI specification>`_ directly, you can do so::" +msgstr "" + +# cbc4820353de4a8fa7d8093817f8cb58 +#: ../../tutorial.rst:712 +msgid "Templates" +msgstr "" + +# 7f54e3b252594f1296fd078b53278355 +#: ../../tutorial.rst:714 +msgid "" +"Bottle comes with a fast and powerful built-in template engine called " +":doc:`stpl`. To render a template you can use the :func:`template` function " +"or the :func:`view` decorator. All you have to do is to provide the name of " +"the template and the variables you want to pass to the template as keyword " +"arguments. Here’s a simple example of how to render a template::" +msgstr "" + +# 9c995ce0ba9247d998d1daf11889c3d4 +#: ../../tutorial.rst:721 +msgid "" +"This will load the template file ``hello_template.tpl`` and render it with " +"the ``name`` variable set. Bottle will look for templates in the " +"``./views/`` folder or any folder specified in the ``bottle.TEMPLATE_PATH`` " +"list." +msgstr "" + +# 3fb064d060e74fa9b91c7e9019037bcb +#: ../../tutorial.rst:723 +msgid "" +"The :func:`view` decorator allows you to return a dictionary with the " +"template variables instead of calling :func:`template`::" +msgstr "" + +# 793d0013d90b46688230efac332591c6 +#: ../../tutorial.rst:732 +msgid "Syntax" +msgstr "" + +# 276911f834024512812f74daa82b7b9a +#: ../../tutorial.rst:735 +msgid "" +"The template syntax is a very thin layer around the Python language. Its " +"main purpose is to ensure correct indentation of blocks, so you can format " +"your template without worrying about indentation. Follow the link for a full" +" syntax description: :doc:`stpl`" +msgstr "" + +# 8b3dfbc242614a39bbbcbd2c7b480650 +#: ../../tutorial.rst:737 +msgid "Here is an example template::" +msgstr "" + +# 9fb13a88ef1e48dabfb9003411f0da05 +#: ../../tutorial.rst:748 +msgid "Caching" +msgstr "" + +# 014c2131d61848819bd5efafc48a7c23 +#: ../../tutorial.rst:749 +msgid "" +"Templates are cached in memory after compilation. Modifications made to the " +"template files will have no affect until you clear the template cache. Call " +"``bottle.TEMPLATES.clear()`` to do so. Caching is disabled in debug mode." +msgstr "" + +# bca0ac7a52cf4ad2be2fd039a319376f +#: ../../tutorial.rst:759 +msgid "Plugins" +msgstr "" + +# 25be41e29e994bb39b03cca0274c82c4 +#: ../../tutorial.rst:763 +msgid "" +"Bottle's core features cover most common use-cases, but as a micro-framework" +" it has its limits. This is where \"Plugins\" come into play. Plugins add " +"missing functionality to the framework, integrate third party libraries, or " +"just automate some repetitive work." +msgstr "" + +# 8f13e7d3d6ce4e76a84a4960b1cb4d16 +#: ../../tutorial.rst:765 +msgid "" +"We have a growing :doc:`/plugins/index` and most plugins are designed to be " +"portable and re-usable across applications. The chances are high that your " +"problem has already been solved and a ready-to-use plugin exists. If not, " +"the :doc:`/plugindev` may help you." +msgstr "" + +# 0594cbaaa49844da81038387ed1bfa0f +#: ../../tutorial.rst:767 +msgid "" +"The effects and APIs of plugins are manifold and depend on the specific " +"plugin. The ``SQLitePlugin`` plugin for example detects callbacks that " +"require a ``db`` keyword argument and creates a fresh database connection " +"object every time the callback is called. This makes it very convenient to " +"use a database::" +msgstr "" + +# a54a3ff608494fc4a8746922337e3dbc +#: ../../tutorial.rst:787 +msgid "" +"Other plugin may populate the thread-safe :data:`local` object, change " +"details of the :data:`request` object, filter the data returned by the " +"callback or bypass the callback completely. An \"auth\" plugin for example " +"could check for a valid session and return a login page instead of calling " +"the original callback. What happens exactly depends on the plugin." +msgstr "" + +# 85df0eb6da384cc69f757bc3bb5e462d +#: ../../tutorial.rst:791 +msgid "Application-wide Installation" +msgstr "" + +# d0222cf4aa4c4835af86c94d7c0c0589 +#: ../../tutorial.rst:793 +msgid "" +"Plugins can be installed application-wide or just to some specific routes " +"that need additional functionality. Most plugins can safely be installed to " +"all routes and are smart enough to not add overhead to callbacks that do not" +" need their functionality." +msgstr "" + +# 57e02045eb6945f69f6f863fe0953064 +#: ../../tutorial.rst:795 +msgid "" +"Let us take the ``SQLitePlugin`` plugin for example. It only affects route " +"callbacks that need a database connection. Other routes are left alone. " +"Because of this, we can install the plugin application-wide with no " +"additional overhead." +msgstr "" + +# 7195c359c8f94d89b1d0fd93875173b7 +#: ../../tutorial.rst:797 +msgid "" +"To install a plugin, just call :func:`install` with the plugin as first " +"argument::" +msgstr "" + +# 79c5ac9cbe514621842159896ee0ae5d +#: ../../tutorial.rst:802 +msgid "" +"The plugin is not applied to the route callbacks yet. This is delayed to " +"make sure no routes are missed. You can install plugins first and add routes" +" later, if you want to. The order of installed plugins is significant, " +"though. If a plugin requires a database connection, you need to install the " +"database plugin first." +msgstr "" + +# 76f0442c3c9f48d596a3612707f2b4f1 +#: ../../tutorial.rst:806 +msgid "Uninstall Plugins" +msgstr "" + +# 9e704003eec5447b87efbfdbeb2bde74 +#: ../../tutorial.rst:807 +msgid "" +"You can use a name, class or instance to :func:`uninstall` a previously " +"installed plugin::" +msgstr "" + +# 4f74d521e0c84a759bf77d9eb22a485b +#: ../../tutorial.rst:817 +msgid "" +"Plugins can be installed and removed at any time, even at runtime while " +"serving requests. This enables some neat tricks (installing slow debugging " +"or profiling plugins only when needed) but should not be overused. Each time" +" the list of plugins changes, the route cache is flushed and all plugins are" +" re-applied." +msgstr "" + +# 40927582b3c84e00bbc2191d16078246 +#: ../../tutorial.rst:820 +msgid "" +"The module-level :func:`install` and :func:`uninstall` functions affect the " +":ref:`default-app`. To manage plugins for a specific application, use the " +"corresponding methods on the :class:`Bottle` application object." +msgstr "" + +# 58c602357cdf4076a0038b3d440bd688 +#: ../../tutorial.rst:824 +msgid "Route-specific Installation" +msgstr "" + +# 8f59747bb8e648fdba1d771c2939cad8 +#: ../../tutorial.rst:826 +msgid "" +"The ``apply`` parameter of the :func:`route` decorator comes in handy if you" +" want to install plugins to only a small number of routes::" +msgstr "" + +# abcb2ceeb0054dc58ef4237a350faf34 +#: ../../tutorial.rst:836 +msgid "Blacklisting Plugins" +msgstr "" + +# b731ed592be14b0d9c004e4a214e3489 +#: ../../tutorial.rst:838 +msgid "" +"You may want to explicitly disable a plugin for a number of routes. The " +":func:`route` decorator has a ``skip`` parameter for this purpose::" +msgstr "" + +# d85ad26d6e3a46d5818f416319d0c5a3 +#: ../../tutorial.rst:860 +msgid "" +"The ``skip`` parameter accepts a single value or a list of values. You can " +"use a name, class or instance to identify the plugin that is to be skipped. " +"Set ``skip=True`` to skip all plugins at once." +msgstr "" + +# b0e92a806c1540a8b226edd15c74a341 +#: ../../tutorial.rst:863 +msgid "Plugins and Sub-Applications" +msgstr "" + +# d94f16ee803544499b013738990cfeb7 +#: ../../tutorial.rst:865 +msgid "" +"Most plugins are specific to the application they were installed to. " +"Consequently, they should not affect sub-applications mounted with " +":meth:`Bottle.mount`. Here is an example::" +msgstr "" + +# 40b102855d834ae1a674b32c75aa31d5 +#: ../../tutorial.rst:876 +msgid "" +"Whenever you mount an application, Bottle creates a proxy-route on the main-" +"application that forwards all requests to the sub-application. Plugins are " +"disabled for this kind of proxy-route by default. As a result, our " +"(fictional) `WTForms` plugin affects the ``/contact`` route, but does not " +"affect the routes of the ``/blog`` sub-application." +msgstr "" + +# 4ae87ecf90a048f990df1510667100b3 +#: ../../tutorial.rst:878 +msgid "" +"This behavior is intended as a sane default, but can be overridden. The " +"following example re-activates all plugins for a specific proxy-route::" +msgstr "" + +# a24c569c2903469eab34c396c43e83e9 +#: ../../tutorial.rst:882 +msgid "" +"But there is a snag: The plugin sees the whole sub-application as a single " +"route, namely the proxy-route mentioned above. In order to affect each " +"individual route of the sub-application, you have to install the plugin to " +"the mounted application explicitly." +msgstr "" + +# 8dbf1a52f32d451784ef4d67fc179b0a +#: ../../tutorial.rst:887 +msgid "Development" +msgstr "" + +# 8f36ef7efc4246bf9a542080c79eeede +#: ../../tutorial.rst:889 +msgid "" +"So you have learned the basics and want to write your own application? Here " +"are some tips that might help you beeing more productive." +msgstr "" + +# dd29da73ce5c432d8228bfa0d0d81099 +#: ../../tutorial.rst:895 +msgid "Default Application" +msgstr "" + +# 544a987ceb96442c9ccff5f1e2fe2e4b +#: ../../tutorial.rst:897 +msgid "" +"Bottle maintains a global stack of :class:`Bottle` instances and uses the " +"top of the stack as a default for some of the module-level functions and " +"decorators. The :func:`route` decorator, for example, is a shortcut for " +"calling :meth:`Bottle.route` on the default application::" +msgstr "" + +# 4e0ba4ae441f4e0281a706abb654d18d +#: ../../tutorial.rst:905 +msgid "" +"This is very convenient for small applications and saves you some typing, " +"but also means that, as soon as your module is imported, routes are " +"installed to the global default application. To avoid this kind of import " +"side-effects, Bottle offers a second, more explicit way to build " +"applications::" +msgstr "" + +# 9714994da3d94f458ab6ee594a764f3d +#: ../../tutorial.rst:915 +msgid "" +"Separating the application object improves re-usability a lot, too. Other " +"developers can safely import the ``app`` object from your module and use " +":meth:`Bottle.mount` to merge applications together." +msgstr "" + +# 315dc7ab16da4382841a5dd90d0c731a +#: ../../tutorial.rst:920 +msgid "" +"Starting with bottle-0.13 you can use :class:`Bottle` instances as context " +"managers::" +msgstr "" + +# e816f442ee374317a4db0354035a741f +#: ../../tutorial.rst:945 +msgid "Debug Mode" +msgstr "" + +# 1841835c41ef4ab3b775053b920435f0 +#: ../../tutorial.rst:947 +msgid "During early development, the debug mode can be very helpful." +msgstr "" + +# 1e3210c116344bfcb3ecdad6b4df771e +#: ../../tutorial.rst:955 +msgid "" +"In this mode, Bottle is much more verbose and provides helpful debugging " +"information whenever an error occurs. It also disables some optimisations " +"that might get in your way and adds some checks that warn you about possible" +" misconfiguration." +msgstr "" + +# c024d64f3e44433380ea258a1e92dd53 +#: ../../tutorial.rst:957 +msgid "Here is an incomplete list of things that change in debug mode:" +msgstr "" + +# d51ba513873c4172ad91bfd90ccb2bd4 +#: ../../tutorial.rst:959 +msgid "The default error page shows a traceback." +msgstr "" + +# e6e131c916ed4f609f2da4fee618c82c +#: ../../tutorial.rst:960 +msgid "Templates are not cached." +msgstr "" + +# 871d27067f994ad8a39c1ca49544ee68 +#: ../../tutorial.rst:961 +msgid "Plugins are applied immediately." +msgstr "" + +# b7d8c5b7008f45c0a038f83728a08df4 +#: ../../tutorial.rst:963 +msgid "Just make sure not to use the debug mode on a production server." +msgstr "" + +# 230a80d407214760b0f52d315277db98 +#: ../../tutorial.rst:966 +msgid "Auto Reloading" +msgstr "" + +# 5490d728bb6146a8935d3472247f547f +#: ../../tutorial.rst:968 +msgid "" +"During development, you have to restart the server a lot to test your recent" +" changes. The auto reloader can do this for you. Every time you edit a " +"module file, the reloader restarts the server process and loads the newest " +"version of your code." +msgstr "" + +# 70c64c23129b44948cff310d97af3f06 +#: ../../tutorial.rst:978 +msgid "" +"How it works: the main process will not start a server, but spawn a new " +"child process using the same command line arguments used to start the main " +"process. All module-level code is executed at least twice! Be careful." +msgstr "" + +# ec521c28413244ef883d0d26e2689e35 +#: ../../tutorial.rst:983 +msgid "" +"The child process will have ``os.environ['BOTTLE_CHILD']`` set to ``True`` " +"and start as a normal non-reloading app server. As soon as any of the loaded" +" modules changes, the child process is terminated and re-spawned by the main" +" process. Changes in template files will not trigger a reload. Please use " +"debug mode to deactivate template caching." +msgstr "" + +# 090016314dc74f0d9d5c06c11f77f1b4 +#: ../../tutorial.rst:989 +msgid "" +"The reloading depends on the ability to stop the child process. If you are " +"running on Windows or any other operating system not supporting " +"``signal.SIGINT`` (which raises ``KeyboardInterrupt`` in Python), " +"``signal.SIGTERM`` is used to kill the child. Note that exit handlers and " +"finally clauses, etc., are not executed after a ``SIGTERM``." +msgstr "" + +# e9af1d45586f47678186c5e456d8cbd6 +#: ../../tutorial.rst:997 +msgid "Command Line Interface" +msgstr "" + +# b7bb238a6c4940c6ad67a8522e5b64ad +#: ../../tutorial.rst:1001 +msgid "Starting with version 0.10 you can use bottle as a command-line tool:" +msgstr "" + +# b069a1c2ef7c40d080c59f668bd47ed6 +#: ../../tutorial.rst:1021 +msgid "" +"The `ADDRESS` field takes an IP address or an IP:PORT pair and defaults to " +"``localhost:8080``. The other parameters should be self-explanatory." +msgstr "" + +# df531b1dbca34c6db295549ebe781feb +#: ../../tutorial.rst:1023 +msgid "" +"Both plugins and applications are specified via import expressions. These " +"consist of an import path (e.g. ``package.module``) and an expression to be " +"evaluated in the namespace of that module, separated by a colon. See " +":func:`load` for details. Here are some examples:" +msgstr "" + +# 2ff1ba34045444f296682d99266c76fc +#: ../../tutorial.rst:1044 +msgid "Deployment" +msgstr "" + +# 17875cb062b0410295d0c2070a303b46 +#: ../../tutorial.rst:1046 +msgid "" +"Bottle runs on the built-in `wsgiref WSGIServer " +"<http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_" +" by default. This non-threading HTTP server is perfectly fine for " +"development and early production, but may become a performance bottleneck " +"when server load increases." +msgstr "" + +# 4c8326eabfd34669bce8c85bd409e9a5 +#: ../../tutorial.rst:1048 +msgid "" +"The easiest way to increase performance is to install a multi-threaded " +"server library like paste_ or cherrypy_ and tell Bottle to use that instead " +"of the single-threaded server::" +msgstr "" + +# 211f847f902344269c0f7414d7944b82 +#: ../../tutorial.rst:1052 +msgid "" +"This, and many other deployment options are described in a separate article:" +" :doc:`deployment`" +msgstr "" + +# 81519fb5f1d7406cb9b6494174640cd1 +#: ../../tutorial.rst:1060 +msgid "Glossary" +msgstr "" + +# 4ae50891b37244f6b923ca21c801242a +#: ../../tutorial.rst:1063 +msgid "callback" +msgstr "" + +# 76835012ccdd431ab1b60af7cff4e7da +#: ../../tutorial.rst:1065 +msgid "" +"Programmer code that is to be called when some external action happens. In " +"the context of web frameworks, the mapping between URL paths and application" +" code is often achieved by specifying a callback function for each URL." +msgstr "" + +# f565b2272291413296e44576e5844363 +#: ../../tutorial.rst:1069 +msgid "decorator" +msgstr "" + +# 36051db8397e42e1ab2f41ae9b5cb8f9 +#: ../../tutorial.rst:1071 +msgid "" +"A function returning another function, usually applied as a function " +"transformation using the ``@decorator`` syntax. See `python documentation " +"for function definition " +"<http://docs.python.org/reference/compound_stmts.html#function>`_ for more " +"about decorators." +msgstr "" + +# 78b63b0f25fa48fdadbc39087d8e88cb +#: ../../tutorial.rst:1072 +msgid "environ" +msgstr "" + +# abf5b7541b9e44b995bc839d58f02441 +#: ../../tutorial.rst:1074 +msgid "" +"A structure where information about all documents under the root is saved, " +"and used for cross-referencing. The environment is pickled after the " +"parsing stage, so that successive runs only need to read and parse new and " +"changed documents." +msgstr "" + +# f0ccedaa7176499786f45fd4103a3332 +#: ../../tutorial.rst:1078 +msgid "handler function" +msgstr "" + +# 6a5c6163ec6347f2924b22eba8f34302 +#: ../../tutorial.rst:1080 +msgid "" +"A function to handle some specific event or situation. In a web framework, " +"the application is developed by attaching a handler function as callback for" +" each specific URL comprising the application." +msgstr "" + +# 90e647e99d59401f9213900ed9c012d8 +#: ../../tutorial.rst:1083 +msgid "source directory" +msgstr "" + +# 139a4e596dde491593d07ee7d082143e +#: ../../tutorial.rst:1085 +msgid "" +"The directory which, including its subdirectories, contains all source files" +" for one Sphinx project." +msgstr "" diff --git a/docs/_locale/pt_BR/LC_MESSAGES/tutorial_app.po b/docs/_locale/pt_BR/LC_MESSAGES/tutorial_app.po new file mode 100644 index 0000000..183f223 --- /dev/null +++ b/docs/_locale/pt_BR/LC_MESSAGES/tutorial_app.po @@ -0,0 +1,1069 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2009-2015, 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: 2015-01-22 16:45-0200\n" +"PO-Revision-Date: 2015-01-22 19:20+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/bottle/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# 3e7fd1a50a08422dba08883c3dcceaf5 +#: ../../tutorial_app.rst:20 +msgid "Tutorial: Todo-List Application" +msgstr "" + +# 700999e7901f4c6fa2ce68d673ea74fb +#: ../../tutorial_app.rst:24 +msgid "" +"This tutorial is a work in progess and written by `noisefloor " +"<http://github.com/noisefloor>`_." +msgstr "" + +# 05968adb4be941459fedf22c7d190b52 +#: ../../tutorial_app.rst:27 +msgid "" +"This tutorial should give a brief introduction to the Bottle_ WSGI " +"Framework. The main goal is to be able, after reading through this tutorial," +" to create a project using Bottle. Within this document, not all abilities " +"will be shown, but at least the main and important ones like routing, " +"utilizing the Bottle template abilities to format output and handling GET / " +"POST parameters." +msgstr "" + +# 7611a157bd764a558a3bce01985e0f6d +#: ../../tutorial_app.rst:29 +msgid "" +"To understand the content here, it is not necessary to have a basic " +"knowledge of WSGI, as Bottle tries to keep WSGI away from the user anyway. " +"You should have a fair understanding of the Python_ programming language. " +"Furthermore, the example used in the tutorial retrieves and stores data in a" +" SQL databse, so a basic idea about SQL helps, but is not a must to " +"understand the concepts of Bottle. Right here, SQLite_ is used. The output " +"of Bottle sent to the browser is formatted in some examples by the help of " +"HTML. Thus, a basic idea about the common HTML tags does help as well." +msgstr "" + +# 5ac69ff1b435403788f338418b9acdb0 +#: ../../tutorial_app.rst:31 +msgid "" +"For the sake of introducing Bottle, the Python code \"in between\" is kept " +"short, in order to keep the focus. Also all code within the tutorial is " +"working fine, but you may not necessarily use it \"in the wild\", e.g. on a " +"public web server. In order to do so, you may add e.g. more error handling, " +"protect the database with a password, test and escape the input etc." +msgstr "" + +# 6f1e42fe8e0e4f8384b38569545d35c0 +#: ../../tutorial_app.rst:0 +msgid "Table of Contents" +msgstr "" + +# df0ee6d249db4e9fb8eff8d08519d9b2 +#: ../../tutorial_app.rst:36 +msgid "Goals" +msgstr "" + +# a77a1ce55cd8465fa877867b04ff5b64 +#: ../../tutorial_app.rst:38 +msgid "" +"At the end of this tutorial, we will have a simple, web-based ToDo list. The" +" list contains a text (with max 100 characters) and a status (0 for closed, " +"1 for open) for each item. Through the web-based user interface, open items " +"can be view and edited and new items can be added." +msgstr "" + +# c87fe64f98224272ba03f78f0cc2b7c6 +#: ../../tutorial_app.rst:40 +msgid "" +"During development, all pages will be available on ``localhost`` only, but " +"later on it will be shown how to adapt the application for a \"real\" " +"server, including how to use with Apache's mod_wsgi." +msgstr "" + +# 54e98eef85364f3aa5adcf474cb5a7e7 +#: ../../tutorial_app.rst:42 +msgid "" +"Bottle will do the routing and format the output, with the help of " +"templates. The items of the list will be stored inside a SQLite database. " +"Reading and writing the database will be done by Python code." +msgstr "" + +# edeee01b85ea4096985705380ec1c0ff +#: ../../tutorial_app.rst:44 +msgid "" +"We will end up with an application with the following pages and " +"functionality:" +msgstr "" + +# 81be0aaa9b8c48539c8b05946f599d5f +#: ../../tutorial_app.rst:46 +msgid "start page ``http://localhost:8080/todo``" +msgstr "" + +# f81865f069dd43cfb1670d0b7613cf70 +#: ../../tutorial_app.rst:47 +msgid "adding new items to the list: ``http://localhost:8080/new``" +msgstr "" + +# 116e2fbb06854c79b691237133b50a90 +#: ../../tutorial_app.rst:48 +msgid "page for editing items: ``http://localhost:8080/edit/:no``" +msgstr "" + +# dc255b22bb66487595d4ca7dfb56e5c1 +#: ../../tutorial_app.rst:49 +msgid "" +"validating data assigned by dynamic routes with the @validate decorator" +msgstr "" + +# c5dfa85c8f7f4d47a5d899421c0c9884 +#: ../../tutorial_app.rst:50 +msgid "catching errors" +msgstr "" + +# bb42d53d10e04820bb8f9747cd6c53a4 +#: ../../tutorial_app.rst:53 +msgid "Before We Start..." +msgstr "" + +# bc6949274c9a40269f35abc838b0c783 +#: ../../tutorial_app.rst:57 +msgid "Install Bottle" +msgstr "" + +# 323c7573c5cf4e96b73bfe992fe3bdd5 +#: ../../tutorial_app.rst:58 +msgid "" +"Assuming that you have a fairly new installation of Python (version 2.5 or " +"higher), you only need to install Bottle in addition to that. Bottle has no " +"other dependencies than Python itself." +msgstr "" + +# 38fd6a2012d04c1b9be6bdd68f34cf31 +#: ../../tutorial_app.rst:60 +msgid "" +"You can either manually install Bottle or use Python's easy_install: " +"``easy_install bottle``" +msgstr "" + +# 3162870d3c224e6395b2064677707e29 +#: ../../tutorial_app.rst:64 +msgid "Further Software Necessities" +msgstr "" + +# a8acdab527874172b66f97e978090452 +#: ../../tutorial_app.rst:65 +msgid "" +"As we use SQLite3 as a database, make sure it is installed. On Linux " +"systems, most distributions have SQLite3 installed by default. SQLite is " +"available for Windows and MacOS X as well and the `sqlite3` module is part " +"of the python standard library." +msgstr "" + +# 5ebf50e8b9e343149a7cae5df8a5b8a9 +#: ../../tutorial_app.rst:68 +msgid "Create An SQL Database" +msgstr "" + +# d2fd8bce01ff4b49b072742bc8bf4efd +#: ../../tutorial_app.rst:69 +msgid "" +"First, we need to create the database we use later on. To do so, save the " +"following script in your project directory and run it with python. You can " +"use the interactive interpreter too::" +msgstr "" + +# 80e3dd4603d64d20936897ca27e64079 +#: ../../tutorial_app.rst:80 +msgid "" +"This generates a database-file `todo.db` with tables called ``todo`` and " +"three columns ``id``, ``task``, and ``status``. ``id`` is a unique id for " +"each row, which is used later on to reference the rows. The column ``task`` " +"holds the text which describes the task, it can be max 100 characters long. " +"Finally, the column ``status`` is used to mark a task as open (value 1) or " +"closed (value 0)." +msgstr "" + +# d159048bac854baa8f2e2d8fb514101f +#: ../../tutorial_app.rst:83 +msgid "Using Bottle for a Web-Based ToDo List" +msgstr "" + +# c0c75d7116c046d19c8cf655cf8649ef +#: ../../tutorial_app.rst:85 +msgid "" +"Now it is time to introduce Bottle in order to create a web-based " +"application. But first, we need to look into a basic concept of Bottle: " +"routes." +msgstr "" + +# cfc50ffc90be450d9c2dfbcf26638d44 +#: ../../tutorial_app.rst:89 +msgid "Understanding routes" +msgstr "" + +# 2133263cafaa4e5bbc03445617f894e4 +#: ../../tutorial_app.rst:90 +msgid "" +"Basically, each page visible in the browser is dynamically generated when " +"the page address is called. Thus, there is no static content. That is " +"exactly what is called a \"route\" within Bottle: a certain address on the " +"server. So, for example, when the page ``http://localhost:8080/todo`` is " +"called from the browser, Bottle \"grabs\" the call and checks if there is " +"any (Python) function defined for the route \"todo\". If so, Bottle will " +"execute the corresponding Python code and return its result." +msgstr "" + +# 09a67a89134847e7bc1a568f2689d98c +#: ../../tutorial_app.rst:94 +msgid "First Step - Showing All Open Items" +msgstr "" + +# f8998829a783402aba5dcbc0db9f036d +#: ../../tutorial_app.rst:95 +msgid "" +"So, after understanding the concept of routes, let's create the first one. " +"The goal is to see all open items from the ToDo list::" +msgstr "" + +# 250dcd12f8144521a013bb8ce3a9e66d +#: ../../tutorial_app.rst:110 +msgid "" +"Save the code a ``todo.py``, preferably in the same directory as the file " +"``todo.db``. Otherwise, you need to add the path to ``todo.db`` in the " +"``sqlite3.connect()`` statement." +msgstr "" + +# 80e4f2e371164060af1fc52879714e0d +#: ../../tutorial_app.rst:112 +msgid "" +"Let's have a look what we just did: We imported the necessary module " +"``sqlite3`` to access to SQLite database and from Bottle we imported " +"``route`` and ``run``. The ``run()`` statement simply starts the web server " +"included in Bottle. By default, the web server serves the pages on localhost" +" and port 8080. Furthermore, we imported ``route``, which is the function " +"responsible for Bottle's routing. As you can see, we defined one function, " +"``todo_list()``, with a few lines of code reading from the database. The " +"important point is the `decorator statement`_ ``@route('/todo')`` right " +"before the ``def todo_list()`` statement. By doing this, we bind this " +"function to the route ``/todo``, so every time the browsers calls " +"``http://localhost:8080/todo``, Bottle returns the result of the function " +"``todo_list()``. That is how routing within bottle works." +msgstr "" + +# 949260525cbb4b22ae9bd78ef51dc769 +#: ../../tutorial_app.rst:114 +msgid "" +"Actually you can bind more than one route to a function. So the following " +"code::" +msgstr "" + +# 37635b93f1b24a1eb0de5d0cd716c8ef +#: ../../tutorial_app.rst:121 +msgid "" +"will work fine, too. What will not work is to bind one route to more than " +"one function." +msgstr "" + +# 8dd9510ab58743608f1476fa18c00e3a +#: ../../tutorial_app.rst:123 +msgid "" +"What you will see in the browser is what is returned, thus the value given " +"by the ``return`` statement. In this example, we need to convert ``result`` " +"in to a string by ``str()``, as Bottle expects a string or a list of strings" +" from the return statement. But here, the result of the database query is a " +"list of tuples, which is the standard defined by the `Python DB API`_." +msgstr "" + +# 1c6f2badbbaa4a889f92abadb1e867f8 +#: ../../tutorial_app.rst:125 +msgid "" +"Now, after understanding the little script above, it is time to execute it " +"and watch the result yourself. Remember that on Linux- / Unix-based systems " +"the file ``todo.py`` needs to be executable first. Then, just run ``python " +"todo.py`` and call the page ``http://localhost:8080/todo`` in your browser. " +"In case you made no mistake writing the script, the output should look like " +"this::" +msgstr "" + +# a9672e081d5a48399fed00c5255c1a72 +#: ../../tutorial_app.rst:129 +msgid "" +"If so - congratulations! You are now a successful user of Bottle. In case it" +" did not work and you need to make some changes to the script, remember to " +"stop Bottle serving the page, otherwise the revised version will not be " +"loaded." +msgstr "" + +# 608cf6d9a1654fe5a6fab91b23fd2cfd +#: ../../tutorial_app.rst:131 +msgid "" +"Actually, the output is not really exciting nor nice to read. It is the raw " +"result returned from the SQL query." +msgstr "" + +# 2da4a4e356b947228db82346f61d8513 +#: ../../tutorial_app.rst:133 +msgid "" +"So, in the next step we format the output in a nicer way. But before we do " +"that, we make our life easier." +msgstr "" + +# c878cf980fd041838afa5b163043d70d +#: ../../tutorial_app.rst:137 +msgid "Debugging and Auto-Reload" +msgstr "" + +# 7f189493f07e49ebbd3cb1272f5af802 +#: ../../tutorial_app.rst:138 +msgid "" +"Maybe you already noticed that Bottle sends a short error message to the " +"browser in case something within the script is wrong, e.g. the connection to" +" the database is not working. For debugging purposes it is quite helpful to " +"get more details. This can be easily achieved by adding the following " +"statement to the script::" +msgstr "" + +# f48dc1811ede406bbe01e24d8c11b3dc +#: ../../tutorial_app.rst:146 +msgid "" +"By enabling \"debug\", you will get a full stacktrace of the Python " +"interpreter, which usually contains useful information for finding bugs. " +"Furthermore, templates (see below) are not cached, thus changes to templates" +" will take effect without stopping the server." +msgstr "" + +# c2e8212bf85b4c93a89c6aa66e90fd33 +#: ../../tutorial_app.rst:150 +msgid "" +"That ``debug(True)`` is supposed to be used for development only, it should " +"*not* be used in production environments." +msgstr "" + +# 4debc3d4feac40c0ad02ce912e8025f6 +#: ../../tutorial_app.rst:154 +msgid "" +"Another quite nice feature is auto-reloading, which is enabled by modifying " +"the ``run()`` statement to" +msgstr "" + +# 9d83b38b4ce641208e4bfad71d820297 +#: ../../tutorial_app.rst:160 +msgid "" +"This will automatically detect changes to the script and reload the new " +"version once it is called again, without the need to stop and start the " +"server." +msgstr "" + +# 04174caac60d412e9a935ca50ea3e4f2 +#: ../../tutorial_app.rst:162 +msgid "" +"Again, the feature is mainly supposed to be used while developing, not on " +"production systems." +msgstr "" + +# f83ff4d20ae94e079ed0f6b3922bdecf +#: ../../tutorial_app.rst:166 +msgid "Bottle Template To Format The Output" +msgstr "" + +# 5e38d2a99bbe4727bbd64ee36e50cb21 +#: ../../tutorial_app.rst:167 +msgid "" +"Now let's have a look at casting the output of the script into a proper " +"format." +msgstr "" + +# f18d21572ffe4b1c80de83baa551f9a1 +#: ../../tutorial_app.rst:169 +msgid "" +"Actually Bottle expects to receive a string or a list of strings from a " +"function and returns them by the help of the built-in server to the browser." +" Bottle does not bother about the content of the string itself, so it can be" +" text formatted with HTML markup, too." +msgstr "" + +# 9bdd3397438a45d6af4bf77d7e3ef7bb +#: ../../tutorial_app.rst:171 +msgid "" +"Bottle brings its own easy-to-use template engine with it. Templates are " +"stored as separate files having a ``.tpl`` extension. The template can be " +"called then from within a function. Templates can contain any type of text " +"(which will be most likely HTML-markup mixed with Python statements). " +"Furthermore, templates can take arguments, e.g. the result set of a database" +" query, which will be then formatted nicely within the template." +msgstr "" + +# 1da6791dbbfb47c8ba8900963278c68c +#: ../../tutorial_app.rst:173 +msgid "" +"Right here, we are going to cast the result of our query showing the open " +"ToDo items into a simple table with two columns: the first column will " +"contain the ID of the item, the second column the text. The result set is, " +"as seen above, a list of tuples, each tuple contains one set of results." +msgstr "" + +# 69b9599726f948f28281362d45b0b5ab +#: ../../tutorial_app.rst:175 +msgid "To include the template in our example, just add the following lines::" +msgstr "" + +# 83727486f55e486580ef67ac84326ba1 +#: ../../tutorial_app.rst:185 +msgid "" +"So we do here two things: first, we import ``template`` from Bottle in order" +" to be able to use templates. Second, we assign the output of the template " +"``make_table`` to the variable ``output``, which is then returned. In " +"addition to calling the template, we assign ``result``, which we received " +"from the database query, to the variable ``rows``, which is later on used " +"within the template. If necessary, you can assign more than one variable / " +"value to a template." +msgstr "" + +# ddd2dc9245cd4382bdba83c160d67f50 +#: ../../tutorial_app.rst:187 +msgid "" +"Templates always return a list of strings, thus there is no need to convert " +"anything. Of course, we can save one line of code by writing ``return " +"template('make_table', rows=result)``, which gives exactly the same result " +"as above." +msgstr "" + +# 245e095b39624770bff7a1804d4aeef5 +#: ../../tutorial_app.rst:189 +msgid "" +"Now it is time to write the corresponding template, which looks like this::" +msgstr "" + +# 344d4a02795f45448e56957a65be68a7 +#: ../../tutorial_app.rst:203 +msgid "" +"Save the code as ``make_table.tpl`` in the same directory where ``todo.py`` " +"is stored." +msgstr "" + +# 132c593d2a7e47a79f5b442f0c279048 +#: ../../tutorial_app.rst:205 +msgid "" +"Let's have a look at the code: every line starting with % is interpreted as " +"Python code. Please note that, of course, only valid Python statements are " +"allowed, otherwise the template will raise an exception, just as any other " +"Python code. The other lines are plain HTML markup." +msgstr "" + +# 65600aefddd6457e9ac6a0f45378b8dd +#: ../../tutorial_app.rst:207 +msgid "" +"As you can see, we use Python's ``for`` statement two times, in order to go " +"through ``rows``. As seen above, ``rows`` is a variable which holds the " +"result of the database query, so it is a list of tuples. The first ``for`` " +"statement accesses the tuples within the list, the second one the items " +"within the tuple, which are put each into a cell of the table. It is " +"important that you close all ``for``, ``if``, ``while`` etc. statements with" +" ``%end``, otherwise the output may not be what you expect." +msgstr "" + +# 4f0d03650e8940b0a8073235a7e128e0 +#: ../../tutorial_app.rst:209 +msgid "" +"If you need to access a variable within a non-Python code line inside the " +"template, you need to put it into double curly braces. This tells the " +"template to insert the actual value of the variable right in place." +msgstr "" + +# ac6e87ac4ddc44e9a485333a01301d4c +#: ../../tutorial_app.rst:211 +msgid "" +"Run the script again and look at the output. Still not really nice, but at " +"least more readable than the list of tuples. Of course, you can spice-up the" +" very simple HTML markup above, e.g. by using in-line styles to get a better" +" looking output." +msgstr "" + +# a5c6f7451873476e89fd19086344c528 +#: ../../tutorial_app.rst:215 +msgid "Using GET and POST Values" +msgstr "" + +# 3faa535f68984a81974791acafc48337 +#: ../../tutorial_app.rst:216 +msgid "" +"As we can review all open items properly, we move to the next step, which is" +" adding new items to the ToDo list. The new item should be received from a " +"regular HTML-based form, which sends its data by the GET method." +msgstr "" + +# fedb9e616f9948559641cf9657d62ee4 +#: ../../tutorial_app.rst:218 +msgid "" +"To do so, we first add a new route to our script and tell the route that it " +"should get GET data::" +msgstr "" + +# 58b6c44dac2845df8ac56bebd2b1cd57 +#: ../../tutorial_app.rst:241 +msgid "" +"To access GET (or POST) data, we need to import ``request`` from Bottle. To " +"assign the actual data to a variable, we use the statement " +"``request.GET.get('task','').strip()`` statement, where ``task`` is the name" +" of the GET data we want to access. That's all. If your GET data has more " +"than one variable, multiple ``request.GET.get()`` statements can be used and" +" assigned to other variables." +msgstr "" + +# 801e074e30db4dc4bc349513a61f5077 +#: ../../tutorial_app.rst:243 +msgid "" +"The rest of this piece of code is just processing of the gained data: " +"writing to the database, retrieve the corresponding id from the database and" +" generate the output." +msgstr "" + +# b76690258b9b444a8d0902d3bdf18b32 +#: ../../tutorial_app.rst:245 +msgid "" +"But where do we get the GET data from? Well, we can use a static HTML page " +"holding the form. Or, what we do right now, is to use a template which is " +"output when the route ``/new`` is called without GET data." +msgstr "" + +# 6ba4d2f7081c4d04aadfddc60775a132 +#: ../../tutorial_app.rst:247 +msgid "The code needs to be extended to::" +msgstr "" + +# 378a91f2a7ec4a9d84e2a863a97f291b +#: ../../tutorial_app.rst:270 +msgid "``new_task.tpl`` looks like this::" +msgstr "" + +# 458d5b70f1384674b50b96da7a1bd566 +#: ../../tutorial_app.rst:278 +msgid "That's all. As you can see, the template is plain HTML this time." +msgstr "" + +# e29cae60fbb04718a19f8e2b051825be +#: ../../tutorial_app.rst:280 +msgid "Now we are able to extend our to do list." +msgstr "" + +# 4c92aff6f1bf4a838d143c3f205048cd +#: ../../tutorial_app.rst:282 +msgid "" +"By the way, if you prefer to use POST data: this works exactly the same way," +" just use ``request.POST.get()`` instead." +msgstr "" + +# bf6d213fabb44ab6b49ac4cef46f68bc +#: ../../tutorial_app.rst:286 +msgid "Editing Existing Items" +msgstr "" + +# 53ba07091c2b4c9fbe6050866bca3477 +#: ../../tutorial_app.rst:287 +msgid "The last point to do is to enable editing of existing items." +msgstr "" + +# 6e63b1fd2fae40e2a478898254a82e0e +#: ../../tutorial_app.rst:289 +msgid "" +"By using only the routes we know so far it is possible, but may be quite " +"tricky. But Bottle knows something called \"dynamic routes\", which makes " +"this task quite easy." +msgstr "" + +# 7c5962f652414c69b78b1b5433bb6aa1 +#: ../../tutorial_app.rst:291 +msgid "The basic statement for a dynamic route looks like this::" +msgstr "" + +# 563726379580431a958cf4aeefccda02 +#: ../../tutorial_app.rst:295 +msgid "" +"The key point here is the colon. This tells Bottle to accept for " +"``:something`` any string up to the next slash. Furthermore, the value of " +"``something`` will be passed to the function assigned to that route, so the " +"data can be processed within the function." +msgstr "" + +# f4ed2ede06f84dcaac73e32a2213cd23 +#: ../../tutorial_app.rst:297 +msgid "" +"For our ToDo list, we will create a route ``@route('/edit/:no)``, where " +"``no`` is the id of the item to edit." +msgstr "" + +# 7a548d38deff451b80addadf1d9e4689 +#: ../../tutorial_app.rst:299 +msgid "The code looks like this::" +msgstr "" + +# 6079f47bddf841ea8670552d67099ffc +#: ../../tutorial_app.rst:327 +msgid "" +"It is basically pretty much the same what we already did above when adding " +"new items, like using ``GET`` data etc. The main addition here is using the " +"dynamic route ``:no``, which here passes the number to the corresponding " +"function. As you can see, ``no`` is used within the function to access the " +"right row of data within the database." +msgstr "" + +# 2436e79948284ae68febf16bef7d035c +#: ../../tutorial_app.rst:329 +msgid "" +"The template ``edit_task.tpl`` called within the function looks like this::" +msgstr "" + +# e2da6846d9b24152887b4cf31824d068 +#: ../../tutorial_app.rst:344 +msgid "" +"Again, this template is a mix of Python statements and HTML, as already " +"explained above." +msgstr "" + +# a04a1bb33dd842e8891a9077dba29ab5 +#: ../../tutorial_app.rst:346 +msgid "" +"A last word on dynamic routes: you can even use a regular expression for a " +"dynamic route, as demonstrated later." +msgstr "" + +# c192f12671d544f0bb801c43059bf3f4 +#: ../../tutorial_app.rst:350 +msgid "Validating Dynamic Routes" +msgstr "" + +# 26b2d47fe2924821a270ebf6647c8eaa +#: ../../tutorial_app.rst:351 +msgid "" +"Using dynamic routes is fine, but for many cases it makes sense to validate " +"the dynamic part of the route. For example, we expect an integer number in " +"our route for editing above. But if a float, characters or so are received, " +"the Python interpreter throws an exception, which is not what we want." +msgstr "" + +# 906ad824bd914a7190e3b28d3252bdf8 +#: ../../tutorial_app.rst:353 +msgid "" +"For those cases, Bottle offers the ``@validate`` decorator, which validates " +"the \"input\" prior to passing it to the function. In order to apply the " +"validator, extend the code as follows::" +msgstr "" + +# 338847d5600241309dc930fe7a52ef38 +#: ../../tutorial_app.rst:362 +msgid "" +"At first, we imported ``validate`` from the Bottle framework, than we apply " +"the @validate-decorator. Right here, we validate if ``no`` is an integer. " +"Basically, the validation works with all types of data like floats, lists " +"etc." +msgstr "" + +# 2529e4f60ecd4b4e97901225a54873e6 +#: ../../tutorial_app.rst:364 +msgid "" +"Save the code and call the page again using a \"403 forbidden\" value for " +"``:no``, e.g. a float. You will receive not an exception, but a \"403 - " +"Forbidden\" error, saying that an integer was expected." +msgstr "" + +# 20e213be407a4e1aa2e1f25370925935 +#: ../../tutorial_app.rst:367 +msgid "Dynamic Routes Using Regular Expressions" +msgstr "" + +# 83e84f03b20442b1b29b4306c9e7bb4d +#: ../../tutorial_app.rst:368 +msgid "" +"Bottle can also handle dynamic routes, where the \"dynamic part\" of the " +"route can be a regular expression." +msgstr "" + +# 1508b1d60d23479b850240488510c320 +#: ../../tutorial_app.rst:370 +msgid "" +"So, just to demonstrate that, let's assume that all single items in our ToDo" +" list should be accessible by their plain number, by a term like e.g. " +"\"item1\". For obvious reasons, you do not want to create a route for every " +"item. Furthermore, the simple dynamic routes do not work either, as part of " +"the route, the term \"item\" is static." +msgstr "" + +# 4e7c0accdce6407397dc719065fdc4b7 +#: ../../tutorial_app.rst:372 +msgid "As said above, the solution is a regular expression::" +msgstr "" + +# be69ea5d4807493fa1df30dffaeb51c8 +#: ../../tutorial_app.rst:386 +msgid "" +"Of course, this example is somehow artificially constructed - it would be " +"easier to use a plain dynamic route only combined with a validation. " +"Nevertheless, we want to see how regular expression routes work: the line " +"``@route(/item:item_#[0-9]+#)`` starts like a normal route, but the part " +"surrounded by # is interpreted as a regular expression, which is the dynamic" +" part of the route. So in this case, we want to match any digit between 0 " +"and 9. The following function \"show_item\" just checks whether the given " +"item is present in the database or not. In case it is present, the " +"corresponding text of the task is returned. As you can see, only the regular" +" expression part of the route is passed forward. Furthermore, it is always " +"forwarded as a string, even if it is a plain integer number, like in this " +"case." +msgstr "" + +# c272a28cca8a4a7b951d587bb10c0d6d +#: ../../tutorial_app.rst:390 +msgid "Returning Static Files" +msgstr "" + +# d694d1614af6452db45b5c0afc419320 +#: ../../tutorial_app.rst:391 +msgid "" +"Sometimes it may become necessary to associate a route not to a Python " +"function, but just return a static file. So if you have for example a help " +"page for your application, you may want to return this page as plain HTML. " +"This works as follows::" +msgstr "" + +# 9f2ab790ac7847ecb7498c3e33a80d5b +#: ../../tutorial_app.rst:399 +msgid "" +"At first, we need to import the ``static_file`` function from Bottle. As you" +" can see, the ``return static_file`` statement replaces the ``return`` " +"statement. It takes at least two arguments: the name of the file to be " +"returned and the path to the file. Even if the file is in the same directory" +" as your application, the path needs to be stated. But in this case, you can" +" use ``'.'`` as a path, too. Bottle guesses the MIME-type of the file " +"automatically, but in case you like to state it explicitly, add a third " +"argument to ``static_file``, which would be here ``mimetype='text/html'``. " +"``static_file`` works with any type of route, including the dynamic ones." +msgstr "" + +# f8401fbf345741f58fb7062d0ca848fb +#: ../../tutorial_app.rst:403 +msgid "Returning JSON Data" +msgstr "" + +# c461bd6b460249fbba4fd338a7424687 +#: ../../tutorial_app.rst:404 +msgid "" +"There may be cases where you do not want your application to generate the " +"output directly, but return data to be processed further on, e.g. by " +"JavaScript. For those cases, Bottle offers the possibility to return JSON " +"objects, which is sort of standard for exchanging data between web " +"applications. Furthermore, JSON can be processed by many programming " +"languages, including Python" +msgstr "" + +# b2108643c96346f9a7379e079d2227eb +#: ../../tutorial_app.rst:406 +msgid "" +"So, let's assume we want to return the data generated in the regular " +"expression route example as a JSON object. The code looks like this::" +msgstr "" + +# 3401f22d517e44858dcde5e280fc5f3d +#: ../../tutorial_app.rst:421 +msgid "" +"As you can, that is fairly simple: just return a regular Python dictionary " +"and Bottle will convert it automatically into a JSON object prior to " +"sending. So if you e.g. call \"http://localhost/json1\" Bottle should in " +"this case return the JSON object ``{\"Task\": [\"Read A-byte-of-python to " +"get a good introduction into Python\"]}``." +msgstr "" + +# f1779714263f42f4a2b5c649435a384f +#: ../../tutorial_app.rst:426 +msgid "Catching Errors" +msgstr "" + +# d7605a6e415c4e7084b50a9204a0c21b +#: ../../tutorial_app.rst:427 +msgid "" +"The next step may is to catch the error with Bottle itself, to keep away any" +" type of error message from the user of your application. To do that, Bottle" +" has an \"error-route\", which can be a assigned to a HTML-error." +msgstr "" + +# a1d9e364842042dc9725eb50ee3a2050 +#: ../../tutorial_app.rst:429 +msgid "In our case, we want to catch a 403 error. The code is as follows::" +msgstr "" + +# 39fb208b57d74801bb571819763267ae +#: ../../tutorial_app.rst:437 +msgid "" +"So, at first we need to import ``error`` from Bottle and define a route by " +"``error(403)``, which catches all \"403 forbidden\" errors. The function " +"\"mistake\" is assigned to that. Please note that ``error()`` always passes " +"the error-code to the function - even if you do not need it. Thus, the " +"function always needs to accept one argument, otherwise it will not work." +msgstr "" + +# ef35bafad5f049c98b3a121d0f2cff93 +#: ../../tutorial_app.rst:439 +msgid "" +"Again, you can assign more than one error-route to a function, or catch " +"various errors with one function each. So this code::" +msgstr "" + +# b1f1f0e41e5e40e6b56144463f58b712 +#: ../../tutorial_app.rst:446 +msgid "works fine, the following one as well::" +msgstr "" + +# a921f886d17e4fb5a4a66650ffb5cbfb +#: ../../tutorial_app.rst:458 +msgid "Summary" +msgstr "" + +# 19937842ce9e4b669bee2242caaa8ac8 +#: ../../tutorial_app.rst:459 +msgid "" +"After going through all the sections above, you should have a brief " +"understanding how the Bottle WSGI framework works. Furthermore you have all " +"the knowledge necessary to use Bottle for your applications." +msgstr "" + +# b4a13e69fb084d6bb29fdece9348c900 +#: ../../tutorial_app.rst:461 +msgid "" +"The following chapter give a short introduction how to adapt Bottle for " +"larger projects. Furthermore, we will show how to operate Bottle with web " +"servers which perform better on a higher load / more web traffic than the " +"one we used so far." +msgstr "" + +# 6bcd3a571517430d9bfc428f1ec04d95 +#: ../../tutorial_app.rst:464 +msgid "Server Setup" +msgstr "" + +# 600b07088f124c3ab26d497d06d3abd9 +#: ../../tutorial_app.rst:466 +msgid "" +"So far, we used the standard server used by Bottle, which is the `WSGI " +"reference Server`_ shipped along with Python. Although this server is " +"perfectly suitable for development purposes, it is not really suitable for " +"larger applications. But before we have a look at the alternatives, let's " +"have a look how to tweak the settings of the standard server first." +msgstr "" + +# c732e3117973498aae3204f8a3906e90 +#: ../../tutorial_app.rst:470 +msgid "Running Bottle on a different port and IP" +msgstr "" + +# 9d334b071d5140c2bb8f841b9fdc6e33 +#: ../../tutorial_app.rst:471 +msgid "" +"As standard, Bottle serves the pages on the IP adress 127.0.0.1, also known " +"as ``localhost``, and on port ``8080``. To modify the setting is pretty " +"simple, as additional parameters can be passed to Bottle's ``run()`` " +"function to change the port and the address." +msgstr "" + +# e191772efca94637bfcb772084e5da2d +#: ../../tutorial_app.rst:473 +msgid "" +"To change the port, just add ``port=portnumber`` to the run command. So, for" +" example::" +msgstr "" + +# afaf7cae0c8641e2adc3aa59c2ca5d31 +#: ../../tutorial_app.rst:477 +msgid "would make Bottle listen to port 80." +msgstr "" + +# 43a7a438c79e4b60b93641051842774c +#: ../../tutorial_app.rst:479 +msgid "To change the IP address where Bottle is listening::" +msgstr "" + +# ce04b54f665a43cba5c7366edbc705e6 +#: ../../tutorial_app.rst:483 +msgid "Of course, both parameters can be combined, like::" +msgstr "" + +# a7125b0e1b884a698f70b56353070f7f +#: ../../tutorial_app.rst:487 +msgid "" +"The ``port`` and ``host`` parameter can also be applied when Bottle is " +"running with a different server, as shown in the following section." +msgstr "" + +# d5ca3b4bd6f94ed0af1b7a1798196b75 +#: ../../tutorial_app.rst:491 +msgid "Running Bottle with a different server" +msgstr "" + +# 2407e60d084b42d1ae196d8cb5fdad17 +#: ../../tutorial_app.rst:492 +msgid "" +"As said above, the standard server is perfectly suitable for development, " +"personal use or a small group of people only using your application based on" +" Bottle. For larger tasks, the standard server may become a bottleneck, as " +"it is single-threaded, thus it can only serve one request at a time." +msgstr "" + +# 20a0554dffb84078bcf589deecc0e74f +#: ../../tutorial_app.rst:494 +msgid "" +"But Bottle has already various adapters to multi-threaded servers on board, " +"which perform better on higher load. Bottle supports Cherrypy_, Fapws3_, " +"Flup_ and Paste_." +msgstr "" + +# 44e8f4dde7b142188f8de625e3275dca +#: ../../tutorial_app.rst:496 +msgid "" +"If you want to run for example Bottle with the Paste server, use the " +"following code::" +msgstr "" + +# 39e2e4ef1dfd4210a1b4ee13640c663d +#: ../../tutorial_app.rst:502 +msgid "" +"This works exactly the same way with ``FlupServer``, ``CherryPyServer`` and " +"``FapwsServer``." +msgstr "" + +# 10e51eb76e96487680966b34b3d78925 +#: ../../tutorial_app.rst:506 +msgid "Running Bottle on Apache with mod_wsgi" +msgstr "" + +# 1b35a4275d4d498eaa2c007ada3f6447 +#: ../../tutorial_app.rst:507 +msgid "" +"Maybe you already have an Apache_ or you want to run a Bottle-based " +"application large scale - then it is time to think about Apache with " +"mod_wsgi_." +msgstr "" + +# 3098e37da6c34962a7501188872d2c71 +#: ../../tutorial_app.rst:509 +msgid "" +"We assume that your Apache server is up and running and mod_wsgi is working " +"fine as well. On a lot of Linux distributions, mod_wsgi can be easily " +"installed via whatever package management system is in use." +msgstr "" + +# ff893b856d3240eb904a84ce1234f31d +#: ../../tutorial_app.rst:511 +msgid "" +"Bottle brings an adapter for mod_wsgi with it, so serving your application " +"is an easy task." +msgstr "" + +# e109dc5e96a940a1bc487b8b3c403df1 +#: ../../tutorial_app.rst:513 +msgid "" +"In the following example, we assume that you want to make your application " +"\"ToDo list\" accessible through ``http://www.mypage.com/todo`` and your " +"code, templates and SQLite database are stored in the path " +"``/var/www/todo``." +msgstr "" + +# e354eece29b047808c6ed1dfca466c06 +#: ../../tutorial_app.rst:515 +msgid "" +"When you run your application via mod_wsgi, it is imperative to remove the " +"``run()`` statement from your code, otherwise it won't work here." +msgstr "" + +# e63a26965a8540c6b4b0cabca8a57f85 +#: ../../tutorial_app.rst:517 +msgid "" +"After that, create a file called ``adapter.wsgi`` with the following " +"content::" +msgstr "" + +# 598ec5a995f34e5ea35b5bec5856f266 +#: ../../tutorial_app.rst:528 +msgid "" +"and save it in the same path, ``/var/www/todo``. Actually the name of the " +"file can be anything, as long as the extension is ``.wsgi``. The name is " +"only used to reference the file from your virtual host." +msgstr "" + +# 531c54d24671405e9c5d8b6ae03b8914 +#: ../../tutorial_app.rst:530 +msgid "" +"Finally, we need to add a virtual host to the Apache configuration, which " +"looks like this::" +msgstr "" + +# 79a25cc3591d44789ca5ed568ec8a6f7 +#: ../../tutorial_app.rst:546 +msgid "" +"After restarting the server, your ToDo list should be accessible at " +"``http://www.mypage.com/todo``" +msgstr "" + +# 0ba5365842bd459db8a68dcf99d93ea7 +#: ../../tutorial_app.rst:549 +msgid "Final Words" +msgstr "" + +# 469906452f3840e7a3a147819407289d +#: ../../tutorial_app.rst:551 +msgid "" +"Now we are at the end of this introduction and tutorial to Bottle. We " +"learned about the basic concepts of Bottle and wrote a first application " +"using the Bottle framework. In addition to that, we saw how to adapt Bottle " +"for large tasks and serve Bottle through an Apache web server with mod_wsgi." +msgstr "" + +# 804e87d1839843c3935a81af70f5f73a +#: ../../tutorial_app.rst:553 +msgid "" +"As said in the introduction, this tutorial is not showing all shades and " +"possibilities of Bottle. What we skipped here is e.g. receiving file objects" +" and streams and how to handle authentication data. Furthermore, we did not " +"show how templates can be called from within another template. For an " +"introduction into those points, please refer to the full `Bottle " +"documentation`_ ." +msgstr "" + +# 12c13b79a5b940778f41e60b0e2bd8a7 +#: ../../tutorial_app.rst:556 +msgid "Complete Example Listing" +msgstr "" + +# d6699331057b4aaaa8602a240b545cfe +#: ../../tutorial_app.rst:558 +msgid "" +"As the ToDo list example was developed piece by piece, here is the complete " +"listing:" +msgstr "" + +# 7ed6fe170aab4951bbe7f77b27fbd4a9 +#: ../../tutorial_app.rst:560 +msgid "Main code for the application ``todo.py``::" +msgstr "" + +# 882748851951490399934b8bb9f8f899 +#: ../../tutorial_app.rst:675 +msgid "Template ``make_table.tpl``::" +msgstr "" + +# 029a4499993b44a5ad30ab5d599fae5c +#: ../../tutorial_app.rst:689 +msgid "Template ``edit_task.tpl``::" +msgstr "" + +# b9c632018a6d4a3d9ef7d266fb621925 +#: ../../tutorial_app.rst:704 +msgid "Template ``new_task.tpl``::" +msgstr "" |