Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

docs: Document use of ugettext_lazy.

Tim Abbottb5ddf493d9d0
diff --git a/docs/translating/internationalization.md b/docs/translating/internationalization.md
index 1cd1055b454..6b3c5706d43 100644
--- a/docs/translating/internationalization.md
+++ b/docs/translating/internationalization.md
@@ -175,8 +175,12 @@ json_error(_('English Text'))
JsonableError(_('English Text'))
```
+If you're declaring a string at top level or in a class, you need to
+use `ugettext_lazy` instead, to ensure that the translation happens at
+request-processing time when Django knows what language to use.
+
To ensure we always internationalize our JSON errors messages, the
-Zulip linter (`tools/lint`) checks for correct usage.
+Zulip linter (`tools/lint`) attempts to verify correct usage.
## Frontend translations