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

Submitted by:  Philipp Thomas <phitho>
Submitted on:  Wed 23 Nov 2016 10:14:51 AM UTC  
 
Category: PerlSeverity: 3 - Normal
Item Group: NoneStatus: Confirmed
Privacy: PublicAssigned to: Guido Flohr <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

($dbDefaults{'serviceEnabled'}->value)?_("Yes"):_("No")

instead of

$dbDefaults{'serviceEnabled'}->value?_("Yes"):_("No")

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>
Project MemberIn charge of this item.
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>
Project 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>

 

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
  • -unavailable- added by haible (Updated the item)
  • -unavailable- added by gflohr (Posted a comment)
  • -unavailable- added by ueno (Posted a comment)
  • -unavailable- added by phitho
  • -unavailable- added by phitho (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2016 12:21:41 PM UTChaibleCategoryNone=>Perl
    Sat 26 Nov 2016 09:33:00 AM UTCgflohrStatusNone=>Confirmed
    Sat 26 Nov 2016 05:15:59 AM UTCuenoAssigned toNone=>gflohr
    Wed 23 Nov 2016 11:51:20 AM UTCphithoCarbon-Copy-=>Added josef reidinger
    Wed 23 Nov 2016 10:14:51 AM UTCphithoAttached File-=>Added test.pm, #39056

    Back to the top


    Powered by Savane 3.1-cleanup1