Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#27069 closed Cleanup/optimization (fixed)

Documentation for what's possible to import as _

Reported by: Mattias Loverot Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Had an issue where I attempted to import pgettext as _ which failed. Thought I could add some documentation which might be helpful for someone else.

Change History (6)

comment:1 by Mattias Loverot, 8 years ago

Version 0, edited 8 years ago by Mattias Loverot (next)

comment:2 by Claude Paroz, 8 years ago

Triage Stage: UnreviewedAccepted
Last edited 8 years ago by Tim Graham (previous) (diff)

comment:3 by Tim Graham, 8 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Claude Paroz, 8 years ago

Repeating what I wrote on the PR:
The underlying issue is that xgettext consider _ as a shortcut to a "simple" translation function. By simple, hear "one extractable string in the first parameter with no domain, context, plural, etc.". With a lexical analysis, it would not be possible to distinguish between different function signatures aliased to the same _ shortcut.

comment:5 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In 35ea6d8:

Fixed #27069 -- Doc'd which gettext functions may be aliased as _.

comment:6 by Tim Graham <timograham@…>, 8 years ago

In 04f0c2a:

[1.10.x] Fixed #27069 -- Doc'd which gettext functions may be aliased as _.

Backport of 35ea6d83c8ecea76f49da26d6646c8d21936500f from master

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