Commit Graph

13 Commits

Author SHA1 Message Date
Vector73 fef31614d3 zerver: Replace occurrences of uri with url in other templates.
This commit replaces occurrences of realm_uri with realm_url in
"context_processors.py" and related templates.

With by-hand translation updates for German (also updated in
Transifex) to avoid breaking the i18n system tests that use some
modified strings.

Co-authored-by: Junyao Chen <junyao.chen@socitydao.org>
2024-05-24 11:18:35 -07:00
Lauryn Menard 94837d56cf templates: Add `account-creation` class to `unsubscribe_success.html`.
Adds the `account-creation` class to `<div>` tag in template so that
the associated CSS styles for `white-box p:last-of-type` and the
font-weight are applied.
2023-04-25 08:56:30 -07:00
Lauryn Menard c8a4b401c7 unsubscribe-success: Update template for org name and welcome emails.
Because unsubscribing from welcome emails cannot be undone, it is
confusing that the unsubscribe success page suggests that the user
can. Makes the second sentence about undoing the unsubscribe action
conditional on the `subscription_type` not being "welcome".

Updates the first sentence to specifically note the Zulip realm
that has been updated for the unsubscribe action so that it is
clear for which Zulip organization the user's settings have been
updated/changed, since the user might have accounts with various
Zulip organizations (via Zulip Cloud or self-hosted servers) that
use the same email account.
2023-04-17 12:58:32 -07:00
Lauryn Menard 7a0d659f14 templates: Add HTML title element to templates that extend base/portico.
Adds HTML title elements to templates that extend either `base.html`,
`portico.html` or `portico_signup.html`, and that are not website
portico landing pages that will use the `PAGE_TITLE` variable to set
the HTML title element (see following commit in series).

Also, updates some templates for missing translation tags.

As a general rule, we want the title element (and page content)
translated. Exceptions that are updated in this commit are templates
used in the development environment, analytics templates that are used
by staff and templates related to Zephyr.
2022-09-19 20:17:17 -07:00
Tim Abbott b3dd6e7c4c unsubscribe: Fix styling of unsubscribe page.
This was apparently one of our few portico pages that never got the
white-box migration.

I did a bit of copyediting while looking at this page as well.
2021-04-27 21:36:09 -07:00
Tim Abbott 7e3c4deeac emails: Use direct links to notification settings.
Now that we support such direct links, we should be using them where
necessary in our emails.
2018-07-12 13:39:14 +05:30
Umair Khan b228cca377 linter: Fix periods in translatable strings. 2017-03-09 21:57:24 -08:00
Rishi Gupta 205fb996ec templates: Use realm_uri and server_uri settings for server URL.
The policy here is essentially:
* Pages on the central server (documentation, etc.) are server_uri.
* Pages associated with a user's realm server (anything logged-in, plus
  things like their login page) are realm_uri.
2016-08-13 16:37:45 -07:00
Rishi Gupta dff43fcc5e Change https:// to external_uri_scheme in templates.
Helps in case the development environment is not using https.
We get the value from zerver/context_processors.py (which is
ultimately reading it from settings)
2016-08-13 16:27:36 -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
Jessica McKellar 8e72084fcb Add one-click unsubscribe links to day 1 and day 2 emails.
(imported from commit 9396f96365430baf894c708f9eaea642fc648435)
2013-11-27 09:29:59 -05:00
Jessica McKellar dbc1b4b501 Add a one-click unsubscribe link to missed message e-mails.
(imported from commit 719eb61c9b7722eb1b0996b4d5f2f8f5929ad701)
2013-11-25 15:18:40 -05:00