URL:
  <http://savannah.gnu.org/bugs/?48747>

                 Summary: Muitiline invocation of *gettext has confusing
translation comments syntax
                 Project: GNU gettext
            Submitted by: None
            Submitted on: Wed 10 Aug 2016 11:29:45 AM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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 <l...@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.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48747>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


Reply via email to