bugGNU gettext - Bugs: bug #35944, xgettext: PHP Translate Function...

 
 

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

bug #35944: xgettext: PHP Translate Function is not recognized in String interpolation

Submitter:  None
Submitted:  Thu 22 Mar 2012 11:49:52 AM UTC
   
 
Category:  PHP Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Sun 01 Dec 2024 04:32:10 PM UTC, comment #2: 

The fix is contained in gettext 0.23.

Bruno Haible <haible>
Group administrator
Sat 21 Sep 2024 11:12:50 AM UTC, comment #1: 

Fixed through https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=9d4340a78812fad9d69a40b43fdac03417db4c8c

You also need to pass the option -kt__ to xgettext, so that it knows for which identifier to look.

Bruno Haible <haible>
Group administrator
Thu 22 Mar 2012 11:49:52 AM UTC, original submission:  

Following code is valid PHP, yet the xgettext cant find the translations inside the string interpolation/heredoc:

<?PHP
$t__ = "__"; // Trick allwoing to call gettext inside strings

$updateMail = <<<MAIL

{$t__('Your application is now recieved.')}

{$t__('Update your information')}
--------------------------
...
MAIL;
?>

If you ask me, the PHP source code parsing in xgettext is too clever as it doesn't recognize those, I first thought it couldn't be that clever and tried with several keywords.

Anonymous

 

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

No files currently attached

 

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)
  •  

    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
    2024-12-01 haible StatusFixed Fix Released
    2024-09-21 haible StatusNone Fixed
        Assigned toNone haible
        Open/ClosedOpen Closed
    2016-11-27 haible CategoryNone PHP

    Back to the top

    Powered by Savane 3.14-962f.
    Corresponding source code