| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 "%%".
|
|
|
|
| |
Thanks Bojan Mihelac for the initial patch.
|
|
|
|
| |
template tag/filter.
|
|
|
|
|
| |
There's absolutely no advantage [and a mild performance hit] to using six.iter*
in these cases.
|
|
|
|
| |
traditional parsing.
|
|
|
|
|
|
|
|
| |
rendering.
This opens more possibilities, like accessing context.template.origin.
It also follows the chain of objects instead of following a shortcut.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
generators and dict comprehension
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
blocktrans
Thanks keturn for the reporti, Chris Medrela for details and
Tim Graham for the review.
Refs #19915.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
violation still has many occurrences in the tests/ dir so it can't be removed from setup.cfg yet)
|
|
|
|
| |
We have always been at war with trailing backslashes.
|
|
|
|
|
|
|
| |
inside dict() and tuple()
Thanks jeroen.pulles at redslider.net for the suggestion and
helper script.
|
|
|
|
| |
Thanks jrothenbuhler for draft patch, Konark Modi for updates.
|
|
|
|
|
|
| |
TEMPLATE_STRING_IF_INVALID.
Thanks Natalia Bidart for the report and Matías Bordese for the fix.
|
|
|
|
|
|
|
|
| |
growed up now.
This function is now the de facto standard function for rendering values in a
template, and is imported by two other built-in template modules. It shouldn't
have a leading underscore.
|
|
|
|
|
|
| |
tags accepting variables.
Fixed #6271, #18260.
|
|
|
|
| |
Thanks vlinhart for the report and Łukasz Rekucki for the patch.
|
| |
|
| |
|
|
|
|
|
|
|
| |
compatibility.
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
|
|
|
|
| |
variable name is badly formatted.
|
|
|
|
|
|
| |
2.6. Refs #17965. Thanks jonash for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
translations to the `trans` and `blocktrans` template tags. Thanks to jtiai for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
handles percents (%), even in the plural block. Thanks for the initial patch, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16730 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
little by falling back to the default language if resolving one of the arguments fails, raising a KeyError. Thanks, Claude Paroz and Aymeric Augustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
template tag in context variable.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
to new language template tag. Thanks, Florian Apolloner.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
switches the activate language for the enclosed template section, e.g. to allow translation of URLs as added in r16405. Many thanks to Florian Apolloner and Orne Brocaar.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
| |
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
raising a KeyError if an included variable can't be found in the context. Thanks, melinath.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15709 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The include tag now has a 'with' option to include to provide extra context
vairables to the included template.
- The include tag now has an 'only' option to exclude the current context
when rendering the included template.
- The with tag now accepts multiple variable assignments.
- The with, include and blocktrans tags now use a new keyword argument format
for variable assignments (e.g. `{% with foo=1 bar=2 %}`).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
names. Thanks to Antti Kaihola and Ramiro Morales for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
out of __init__.py, to help with avoiding circular import dependencies. Thanks to Tom Tobin for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
blocktrans tag introduced in r13967 related to multiple plural forms. Thanks, mark0978, svetlyak40wt and Ramiro.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
KeyError if the number of variables in the singular and the plural block differ. Thanks, deloide.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
the trans tag. Thanks for the initial patch, Dmitri Fedortchenko.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12472 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
instances instead of old-style raising exception classes plus a comma. Good for the future Python 3 conversion
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
|
|
| |
"blocktrans" tags.
Patch from Andrew Badr.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
|
|
|
| |
the i18n template tag.
Excellent debugging from permonik@mesias.brnonet.cz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7261 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
|
| |
*sigh* As usual, the one case I forget to test turned out to be broken.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6689 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
|
|
|
| |
blocktrans tags. A couple of these were exposed by the auto-escaping changes, but I suspect the other one has been hiding in plain sight for a while.
Fixed #5952, #5953
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6682 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
|
|
|
| |
'blocktrans' blocks. Thanks,
permonik@mesias.brnonet.cz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
|
|
|
| |
resolution system by Brian Harring (thanks!). The upshot is that variable resolution is about 25% faster, and you should see a measurable performance increase any time you've got long or deeply nested loops.
Variable resolution has changed behind the scenes -- see the note in templates_python.txt -- but template.resolve_variable() still exists. This should be fully backwards-compatible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|