Opened 4 years ago

Closed 4 years ago

#15832 closed New feature (fixed)

Use Babel instead of xgettext for handling .po files.

Reported by: lrekucki Owned by: nobody
Component: Internationalization Version:
Severity: Normal Keywords:
Cc: zuko Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX:

Description

Currently makemessages converts templates to pseudo-Python which is then passed to xgettext tool. Similar pattern is used for JavaScript files (using pseudo-Perl).

Babel instead provides an extensible API to define custom extractors. It also handles message catalogs without using xgettext, which removes a binary dependency from Django.

Change History (4)

comment:1 Changed 4 years ago by zuko

  • Cc zuko added

comment:2 Changed 4 years ago by jacob

  • Easy pickings unset
  • milestone 1.4 deleted
  • Triage Stage changed from Unreviewed to Accepted

This would also fix #14045.

Marking accepted somewhat optimistically, but I think the general consensus is that we should get there eventually. Jannis, feel free to override me if I'm wrong :)

comment:3 Changed 4 years ago by claudep

I must say that after reading the corresponding thread on django-developers list, I am seduced by Ned Batchelder approach with his jslex project. I'm a bit uncomfortable with ditching away the gettext infrastructure, but it may also be related with my unfamiliarity with babel.

comment:4 Changed 4 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

Closed in favor of using Ned's JsLex (r16333).

Note: See TracTickets for help on using tickets.
Back to Top