Edgewall Software

Opened 8 years ago

Last modified 8 years ago

#10749 closed defect

`babel.Translations.load({...}).install()` from a plugin breaks the loaded translations catalog — at Initial Version

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

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.

Change History (0)

Note: See TracTickets for help on using tickets.