Commit Graph

13 Commits

Author SHA1 Message Date
Steve Howell 48e68791e8 Fix duplicate HTML id: fmt_help_table.
We replace the id with a class called help-table.
2017-01-11 14:00:10 -08:00
Umair Khan 7787b780bc Period should be part of the translation. 2016-10-13 15:07:37 -07:00
Umair Khan ca0681a98b Use block translation tag where appropriate. 2016-10-13 15:07:37 -07:00
Tim Abbott 4aceb1cd6f search_operators: Document has: operators.
These useful operators for finding messages with
images/links/etc. have been available for a long time, but weren't
documented.
2016-09-27 20:27:54 -07:00
Umair Khan 5359e6b0d4 Convert Zulip to use Jinja2 templates.
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.
2016-05-09 09:55:18 -07:00
Ahmed Shibani 4f29cfee9e Mark strings for translation in templates/zerver
In order to enable internationalization support in Zulip, and to use
Django internationalization tools, all strings in Zulip frontend needs
to be marked for translation.
2015-11-03 23:06:31 -08:00
Steve Howell 58c44fee3e Document negated topic searches.
We don't have room in the dialog to show every variation of
the negated search syntax.  If we start by documenting negated
topic searches, we may get some discovery on the negated search
features without cluttering out the way more common search
options.

(imported from commit 3b2c2672d125788dc71a5eeb2b6f1e551380c62e)
2014-03-05 10:54:02 -05:00
Steve Howell da874f8ec6 Add is:alerted to search help.
(imported from commit 0c545fb35af0040047fcf53c560941feee2da9ad)
2014-02-19 13:16:00 -05:00
Steve Howell 5e4e8af0c4 Document sender:me syntax.
(imported from commit 7c32ddc70528f110ba7d2f64637da0cc8eb0a0a6)
2013-12-05 12:10:43 -05:00
Steve Howell ce57cbf22a Rename search-operators help to "Search help".
(imported from commit 29facc2965d975ae907d8d7f816f31e22ebd682b)
2013-12-05 12:08:16 -05:00
Steve Howell b612d0a53f Make search help more explicit for is:{mentioned,private,starred}.
(imported from commit 736228d483372a571e5e07b0764da521febcc970)
2013-12-05 11:52:15 -05:00
Steve Howell 424994ec9b Put sender: adjacent to pm-with in search help.
(imported from commit 580079ba941252df8e19165f613a30ee9597e4c1)
2013-12-05 11:47:28 -05:00
Tim Abbott d57404683f Add documentation on search operators.
(imported from commit 9ed5692685b52d6e4d4f1a59c1b4cc0fde252ff2)
2013-12-02 17:15:24 -05:00