| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
trans %} tags that use template filters.
|
|
|
|
|
|
| |
language override
Thanks David Nelson Adamec for the report and Tim Graham for the review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactored tests to use a sample project.
Updated extraction:
* Removed special handling of single percent signs.
* When extracting messages from template text, doubled all percent signs
so they are not interpreted by gettext as string format flags. All
strings extracted by gettext, if containing a percent sign, will now
be labeled "#, python-format".
Updated translation:
* Used "%%" for "%" in template text before calling gettext.
* Updated {% trans %} rendering to restore "%" from "%%".
|
| |
|
|
|
|
| |
template tag/filter.
|
|
|
|
|
|
| |
gettext.
The locale code can contain a variant after @, so allowed that.
|
|
|
|
|
|
|
| |
None value
get_language() can return None when translations are deactivated.
Thanks Nicola Peduzzi for the reporti and Tim Graham for the review.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch does three major things:
* Merges the django.template.debug implementation into django.template.base.
* Simplifies the debug implementation.
The old implementation copied debug information to every token and node.
The django_template_source attribute was set in multiple places, some
quite hacky, like django.template.defaulttags.ForNode.
Debug information is now annotated in two high-level places:
* Template.compile_nodelist for errors during parsing
* Node.render_annotated for errors during rendering
These were chosen because they have access to the template and context
as well as to all exceptions that happen during either the parse or
render phase.
* Moves the contextual line traceback information creation from
django.views.debug into django.template.base.Template. The debug views now
only deal with the presentation of the debug information.
|
|
|
|
|
| |
Thanks Tomasz Kontusz for the report, Baptiste Mispelon for
analysis and Tim Graham for the review.
|
| |
|
| |
|
|
|
|
|
|
|
| |
translations are deactivated
This fixes a regression caused by f7c287fca9. Thanks Markus Holtermann
for identifying the regression.
|
|
|
|
|
|
|
|
|
| |
Since this package is going to hold both the implementation of the Django
Template Language and the infrastructure for Multiple Template Engines,
it should be untied from the DTL as much as possible within our
backwards-compatibility policy.
Only public APIs (i.e. APIs mentioned in the documentation) were left.
|
|
|
|
| |
trans_null.py
|
|
|
|
|
|
| |
django.core.signals.
This removes the need to load django.test when not testing.
|
| |
|
|
|
|
|
|
|
| |
Translating an empty string used to return the gettext catalog
metadata instead of the empty string.
Thanks Ned Batchelder for the suggestion, Tim Graham for the review
and Anton Berezin and Claude Paroz for contributions to the patch.
|
|
|
|
| |
refs #23395.
|
|
|
|
|
|
| |
lazy_number
Thanks kwist for the report and the initial patch.
|
|
|
|
| |
determined in __enter__
|
|
|
|
| |
usable as a decorator.
|
|
|
|
|
|
|
|
|
|
| |
languages
This fixes the Chinese language issues described in #23005 but
also provides for other fallback exceptions by updating the
LANG_INFO structure.
Thanks caxekis at gmail.com for the report and Tim Graham for the
review.
|
|
|
|
|
|
| |
translation setup
Thanks Tim Graham and Aymeric Augustin for the review.
|
| |
|
| |
|
| |
|
|
|
|
| |
This also fixes #22686 as some sort of side-effect.
|
|
|
|
| |
Thanks david.fischer.ch at gmail.com for the report.
|
|
|
|
|
|
| |
bytestring input
Thanks ygbo for the report.
|
| |
|
|
|
|
| |
Also fixes #18192 and #21055.
|
| |
|
|
|
|
|
|
|
| |
There may be more than 100 (default maxsize) commonly seen xx-yy values
on some sites. The additional memory consumption isn't significant.
Also added a comment explaining why this cache must have a maxsize.
|
|
|
|
|
|
| |
variable per deprecation timeline.
refs #5789.
|
|
|
|
| |
non-existent tuples.
|
|
|
|
|
|
|
| |
to-be-removed-in-django-XX warnings
Thanks Anssi Kääriäinen for the idea and Simon Charette for the
review.
|
|
|
|
|
|
|
|
|
|
|
|
| |
By removing the 'supported' keyword from the detection methods and only relying
on a cached settings.LANGUAGES, the speed of said methods has been improved;
around 4x raw performance. This allows us to stop checking Python's incomplete
list of locales, and rely on a less restrictive regular expression for
accepting certain locales.
HTTP Accept-Language is defined as being case-insensitive, based on this fact
extra performance improvements have been made; it wouldn't make sense to
check for case differences.
|
| |
|
|
|
|
| |
languages and cleaned up language session key use
|
|
|
|
|
|
| |
Also renamed app_cache to apps and "app cache" to "app registry".
Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
|
|
|
|
| |
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
|
|
|
|
| |
Used the app cache's get_app_configs() method instead.
|
|
|
|
|
|
| |
line numbers.
Thanks Bouke Haarsma for report, fix and initial patch.
|
|
|
|
|
|
| |
to malformed input.
Thanks to Sergey Sorokin for the report and to Bouke Haarsma for the review.
|
|
|
|
|
|
|
|
|
|
| |
Replaced the custom, untested memoize with a similar decorator from Python's
3.2 stdlib. Although some minor performance degradation (see ticket), it is
expected that in the long run lru_cache will outperform memoize once it is
implemented in C.
Thanks to EvilDMP for the report and Baptiste Mispelon for the idea of
replacing memoize with lru_cache.
|
|
|
|
|
|
|
|
|
|
|
| |
Add the trimmed option to the blocktrans tag to trim any newlines and
whitespace from its content.
This allows the developer to indent the blocktrans tag without adding
new lines and whitespace to the msgid in the PO file.
Thanks to mpessas for the initial patch and Dmitri Fedortchenko for the
report.
|
| |
|
|
|
|
|
|
|
|
| |
internally
deprecated ones.
Thanks to bouke for pointing this out.
|