bugGNU gettext - Bugs: bug #48747, Muitiline invocation of *gettext...

 
 

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

bug #48747: Muitiline invocation of *gettext has confusing translation comments syntax

Submitter:  None
Submitted:  Wed 10 Aug 2016 11:29:45 AM UTC
   
 
Category:  PHP Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Wed 10 Aug 2016 11:36:20 AM UTC, comment #1: 


$ xgettext -V
xgettext (GNU gettext-tools) 0.19.3
Copyright (C) 1995-1998, 2000-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Ulrich Drepper.


Apologies, forgot to add the output of xgettext -V

Patrick Rose <patrickrose>
Wed 10 Aug 2016 11:29:45 AM UTC, original submission:  

Running xgettext on the following PHP code does not add the translation comments to the generated .po file:


<?php

// L10N: Here is a comment
dgettext(
    'Core',
    'Some text'
);


Generated .po file:

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-10 12:20+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#: tmp.php:6
msgid "Some text"
msgstr ""


Playing about with comments, I found that I had to put the translation comment immediately above the "Some text" line instead of above the function invocation which makes the code confusing to read for future developers.

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)
  • -email is unavailable- added by patrickrose (Posted a comment)
  • -email is unavailable- added by patrickrose (Was submitted by me - didn't have account)
  •  

    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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-27 haible CategoryNone PHP
    2016-08-10 patrickrose Carbon-Copy- Added patrickrose

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code