Edgewall Software

Opened 10 years ago

Last modified 10 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 Jun Omae)

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

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

Change History (1)

comment:1 by Jun Omae, 10 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.