mirror of
https://github.com/zulip/zulip.git
synced 2026-06-24 21:08:25 +08:00
This results in a substantial performance improvement for all of
Zulip's backend templates.
Changes in templates:
- Change `block.super` to `super()`.
- Remove `load` tag because Jinja2 doesn't support it.
- Use `minified_js()|safe` instead of `{% minified_js %}`.
- Use `compressed_css()|safe` instead of `{% compressed_css %}`.
- `forloop.first` -> `loop.first`.
- Use `{{ csrf_input }}` instead of `{% csrf_token %}`.
- Use `{# ... #}` instead of `{% comment %}`.
- Use `url()` instead of `{% url %}`.
- Use `_()` instead of `{% trans %}` because in Jinja `trans` is a block tag.
- Use `{% trans %}` instead of `{% blocktrans %}`.
- Use `{% raw %}` instead of `{% verbatim %}`.
Changes in tools:
- Check for `trans` block in `check-templates` instead of `blocktrans`
Changes in backend:
- Create custom `render_to_response` function which takes `request` objects
instead of `RequestContext` object. There are two reasons to do this:
1. `RequestContext` is not compatible with Jinja2
2. `RequestContext` in `render_to_response` is deprecated.
- Add Jinja2 related support files in zproject/jinja2 directory. It
includes a custom backend and a template renderer, compressors for js
and css and Jinja2 environment handler.
- Enable `slugify` and `pluralize` filters in Jinja2 environment.
Fixes #620.
16 lines
697 B
HTML
16 lines
697 B
HTML
<div class="modal hide" id="tutorial-finale" tabindex="-1" role="dialog"
|
|
aria-labelledby="tutorial-finale-label" aria-hidden="true">
|
|
<div class="modal-header">
|
|
<h3 id="tutorial-finale-label">{% trans %}Welcome to {{ product_name }}{% endtrans %}</h3>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p>{% trans %}Streams, topics, and narrowing make {{ product_name }} conversations
|
|
efficient and productive.{% endtrans %}</p>
|
|
|
|
<p>{% trans %}That's all there is to it, so let's get started!{% endtrans %}</p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn btn-primary" type="submit" id="tutorial-get-started">{% trans %}Get started{% endtrans %}</button>
|
|
</div>
|
|
</div>
|