bugGNU gettext - Bugs: bug #49678, xgettext fails to extract strings...


You are not allowed to post comments on this tracker with your current authentication level.

bug #49678: xgettext fails to extract strings from Perl code

Submitter:  Philipp Thomas <phitho>
Submitted:  Wed 23 Nov 2016 10:14:51 AM UTC
Category:  Perl Severity:  3 - Normal
Item Group:  None Status:  Confirmed
Privacy:  Public Assigned to:  gflohr
Open/Closed:  Open

Sat 26 Nov 2016 09:32:39 AM UTC, comment #2: 

Philipp, I'm working on exactly that problem.  In the meantime, you can avoid the error with a simple workaround. Write


instead of


In other words: Whenever you run into the problem, please reformulate your code so that there is a closing parentheses immediately preceding the ternary operator.  Otherwise xgettext may misinterpret the question mark as a regex delimiter.

Guido Flohr <gflohr>
Group Member
Sat 26 Nov 2016 05:15:59 AM UTC, comment #1: 

Guido, could you take a look at this?

It might already have been fixed with your recent change.

Daiki Ueno <ueno>
Group administrator
Wed 23 Nov 2016 10:14:51 AM UTC, original submission:  

When running
xgettext --no-wrap --add-comments --add-location --keyword=_ --keyword=_:1,2 --keyword=__ --language=perl test.pm
No strings are extracted although it is valid perl code.

Philipp Thomas <phitho>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #39056:  test.pm added by phitho (699B - application/x-pagemaker)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by gflohr (Posted a comment)
  • -email is unavailable- added by ueno (Posted a comment)
  • -email is unavailable- added by phitho
  • -email is unavailable- added by phitho (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-27 haible CategoryNone Perl
    2016-11-26 gflohr StatusNone Confirmed
    2016-11-26 ueno Assigned toNone gflohr
    2016-11-23 phitho Carbon-Copy- Added josef reidinger <jreidinger@suse.com>
    2016-11-23 phitho Attached File- Added test.pm, #39056

    Back to the top

    Powered by Savane 3.13-ee12.
    Corresponding source code