Opened 6 years ago

Closed 6 years ago

#29151 closed Bug (invalid)

Aliasing pgettext_lazy makes it work unexpected

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

Description

Aliasing pgettext_lazy, e.g. to "_" or "p_" makes it "forget" to create the msgctxt or to work at all

Change History (2)

comment:1 by Tim Graham, 6 years ago

I'm not sure how aliasing a function could change its behavior. Are you sure you haven't made a mistake in your project? Can you provide a failing test (tests/i18n/tests.py) or a sample project that demonstrates the issue?

comment:2 by Tim Graham, 6 years ago

Resolution: invalid
Status: newclosed

This is a limitation of xgettext,

Because of how xgettext (used by makemessages) works, only functions that take a single string argument can be imported as _:

  • gettext()
  • gettext_lazy()
Note: See TracTickets for help on using tickets.
Back to Top