mirror of
https://github.com/zulip/zulip.git
synced 2025-11-19 05:58:25 +00:00
Fix backend i18n bug.
`makemessages` escapes the `%` sign in `.po` files, but Jinja2 does not unescape it while replacing the tranlation strings. In Jinja2, there is an updated implementation of gettext available called new-style gettext which handles escaping better; this commit switches to using that. Fixes #906.
This commit is contained in:
@@ -26,7 +26,7 @@ def environment(**options):
|
|||||||
'minified_js': minified_js,
|
'minified_js': minified_js,
|
||||||
})
|
})
|
||||||
|
|
||||||
env.install_gettext_translations(translation)
|
env.install_gettext_translations(translation, True)
|
||||||
|
|
||||||
env.filters['slugify'] = slugify
|
env.filters['slugify'] = slugify
|
||||||
env.filters['pluralize'] = pluralize
|
env.filters['pluralize'] = pluralize
|
||||||
|
|||||||
Reference in New Issue
Block a user