mirror of https://github.com/zulip/zulip.git
i18n: Rename email subject files so i18n detects them.
Apparently, when we renamed these files to no longer have a .txt extension, we accidentally removed them from the set of strings for translation, because `manage.py makemessages` by default only processes .txt and .html files under the templates/ directory. Fix this by adding a .txt extension.
This commit is contained in:
parent
b2fc017671
commit
b29d66f34b
|
@ -12,7 +12,7 @@ On to the documentation. Zulip's email system is fairly straightforward,
|
|||
with only a few things you need to know to get started.
|
||||
|
||||
* All email templates are in `templates/zerver/emails/`. Each email has three
|
||||
template files: `<template_prefix>.subject`, `<template_prefix>.txt`, and
|
||||
template files: `<template_prefix>.subject.txt`, `<template_prefix>.txt`, and
|
||||
`<template_prefix>.source.html`. Email templates, along with all other templates
|
||||
in the `templates/` directory, are Jinja2 templates.
|
||||
* Most of the CSS and HTML layout for emails is in `email_base.html`. Note
|
||||
|
|
|
@ -57,7 +57,7 @@ def build_email(template_prefix: str, to_user_ids: Optional[List[int]]=None,
|
|||
})
|
||||
|
||||
def render_templates() -> Tuple[str, str, str]:
|
||||
subject = loader.render_to_string(template_prefix + '.subject',
|
||||
subject = loader.render_to_string(template_prefix + '.subject.txt',
|
||||
context=context,
|
||||
using='Jinja2_plaintext').strip().replace('\n', '')
|
||||
message = loader.render_to_string(template_prefix + '.txt',
|
||||
|
|
|
@ -83,18 +83,18 @@ class TemplateTestCase(ZulipTestCase):
|
|||
'zerver/delete_message.html',
|
||||
]
|
||||
unusual = [
|
||||
'zerver/emails/confirm_new_email.subject',
|
||||
'zerver/emails/confirm_new_email.subject.txt',
|
||||
'zerver/emails/compiled/confirm_new_email.html',
|
||||
'zerver/emails/confirm_new_email.txt',
|
||||
'zerver/emails/notify_change_in_email.subject',
|
||||
'zerver/emails/notify_change_in_email.subject.txt',
|
||||
'zerver/emails/compiled/notify_change_in_email.html',
|
||||
'zerver/emails/digest.subject',
|
||||
'zerver/emails/digest.subject.txt',
|
||||
'zerver/emails/digest.html',
|
||||
'zerver/emails/digest.txt',
|
||||
'zerver/emails/followup_day1.subject',
|
||||
'zerver/emails/followup_day1.subject.txt',
|
||||
'zerver/emails/compiled/followup_day1.html',
|
||||
'zerver/emails/followup_day1.txt',
|
||||
'zerver/emails/followup_day2.subject',
|
||||
'zerver/emails/followup_day2.subject.txt',
|
||||
'zerver/emails/followup_day2.txt',
|
||||
'zerver/emails/compiled/followup_day2.html',
|
||||
'zerver/emails/compiled/password_reset.html',
|
||||
|
|
Loading…
Reference in New Issue