Comments (4)
It looks like {% call %} is a custom template tag
from django-babel.
It's part of Jinja, yes. I don't think it has to do with that, but rather that it does work within block tags, but not within variable tags that has additional stuff (like a macro call).
Just after posting the issue here, we got it to work by reverting to our previous mapping file used by pybabel*:
-[django: templates/**.tmpl]
+[jinja2: templates/**.tmpl]
+extensions= jinja2.ext.i18n, jinja2.ext.with_
*To make that work we also added from django.conf import settings; settings.configure()
to the pybabel script or it would complain.
When upgrading, we thought these extension would be picked up from the Django 1.8 template settings, where these extension are also defined:
TEMPLATES = [
{
'BACKEND': 'django_jinja.backend.Jinja2',
'OPTIONS': {
'debug': DEBUG,
'match_extension': '.tmpl',
'extensions': [
'jinja2.ext.with_',
'jinja2.ext.i18n',
'django_jinja.builtins.extensions.UrlsExtension',
'django_jinja.builtins.extensions.CsrfExtension',
],
...
}
}
]
from django-babel.
@joeribekker can you create a PR with some tests that use Jinja2 in your usecase?
from django-babel.
You should use Jinja's Babel extractor with Jinja-based templates, not the Django one.
from django-babel.
Related Issues (15)
- Put documentation somewhere HOT 2
- Docs: module index link is broken HOT 6
- Deactivate travis push builds HOT 2
- Not detecting translations with context
- support "trimmed" in blocktrans HOT 3
- tox -e docs fails HOT 7
- Django 1.10 support HOT 3
- Release for compatibility support HOT 5
- New release on PyPI for Django 1.11 HOT 6
- percent signs escaping en trans/blocktrans templatetags
- Django 2.1.* support HOT 1
- No module named django_babeltest_mako
- ImportError when running the extraction process HOT 1
- Is this project still maintained? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-babel.