Opened 12 years ago
Last modified 12 years ago
#10749 closed defect
`babel.Translations.load({...}).install()` from a plugin breaks the loaded translations catalog — at Version 1
Reported by: | Jun Omae | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.0 |
Component: | i18n | Version: | 0.12 |
Severity: | normal | Keywords: | |
Cc: | ryano@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
generate_messages_js
command of setuptools works for Trac and Trac plugins. The command generates "messages file for javascript" as the following;
// Generated messages javascript file from compiled MO file babel.Translations.load({"domain":"{plugin-name}-js",...}).install();
The babel.Translations.install()
installs _
, genetext
and ngettext
functions binded the loaded translations instance to window
instance.
When a plugin loads the messages catalog for javascript, Therefore, it overwrites the last installed functions (maybe from trac/htdocs/messages/*.js
) and messages for Trac will not be translated.
Related branches
Note:
See TracTickets
for help on using tickets.