Edgewall Software
Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#12351 closed defect (fixed)

extract_message_js command extracts messages from jquery-ui.js

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.0.10
Component: i18n Version:
Severity: normal Keywords: babel
Cc: Branch:
Release Notes:

Prevent extraction from bundled javascript libraries and messages/*.js files.

API Changes:
Internal Changes:

Description

make extract with [14511] generates *.pot from jquery-ui.js like this.

#: trac/htdocs/js/jquery-ui.js:8
msgid "'"
msgstr ""

I think we should prevent extractions from bundled javascript files and messages/*.js files.

  • messages-js.cfg

    diff --git a/messages-js.cfg b/messages-js.cfg
    index b8d54c0a0..ce85ff361 100644
    a b  
    11# mapping file for extracting messages from javascript files into
    22# trac/locale/messages-js.pot (see setup.cfg)
    3 [javascript: **.js]
    4 
    53[extractors]
    64javascript_script = trac.dist:extract_javascript_script
     5ignore = babel.messages.extract:extract_nothing
    76
     7[ignore:            **/htdocs/js/jquery.js]
     8[ignore:            **/htdocs/js/jquery-ui.js]
     9[ignore:            **/htdocs/js/jquery-ui-addons.js]
     10[ignore:            **/htdocs/js/babel.js]
     11[ignore:            **/htdocs/js/excanvas.js]
     12[ignore:            **/htdocs/js/messages/*.js]
     13[javascript:        **.js]
    814[javascript_script: **.html]

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 5 years ago

Right, I also noticed recently that the generated htdocs/js/messages/*.js files were actually scanned!

comment:2 by Jun Omae, 5 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: newclosed

Thanks for the feedback. Committed in [14512] and merged to trunk in [14513].

comment:3 by Jun Omae, 5 years ago

Owner: set to Jun Omae

comment:4 by Ryan J Ollos, 5 years ago

Release Notes: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.