bugGNU gettext - Bugs: bug #59378, xgettext doesn't extract comments...

 
 

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

bug #59378: xgettext doesn't extract comments for strings on new line

Submitter:  Adam YS <adamys>
Submitted:  Thu 29 Oct 2020 09:06:45 AM UTC
   
 
Category:  C# Severity:  3 - Normal
Item Group:  None Status:  Not a Bug
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Sat 14 Nov 2020 08:37:36 PM UTC, comment #1: 

This is as documented in https://www.gnu.org/software/gettext/manual/html_node/xgettext-Invocation.html#Operation-mode in the description of '--add-comments'.

You may add an empty string in the second line, or combine the second and the third line.

Bruno Haible <haible>
Group administrator
Thu 29 Oct 2020 09:06:45 AM UTC, original submission:  

We noticed that some comments left in the code for translators are missing. The issue seems to be specific to strings declared on a new line:

// TRANSLATOR NOTE: Foobar
L.String(
        "foobar");


For the reference, the following works correctly:

// TRANSLATOR NOTE: Foobar
L.String("foobar");


Here's a minimal repro for it:
1. Download attached repro.sh and repro.cs into the same folder
2. Run repro.sh
3. Observe the generated repro.pot

Expected outcome:

#. TRANSLATOR NOTE: Foobar
#: repro.cs:3
#, csharp-format
msgid "{0} of {1}"
msgstr ""


Actual outcome:

#: repro.cs:3
#, csharp-format
msgid "{0} of {1}"
msgstr ""


Adam YS <adamys>

 

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

Attached Files
file #50158:  repro.cs added by adamys (49B - application/octet-stream)
file #50159:  repro.sh added by adamys (373B - application/x-sh)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by adamys (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
    2020-11-14 haible StatusNone Not a Bug
        Assigned toNone haible
        Open/ClosedOpen Closed
    2020-10-29 adamys Attached File- Added repro.cs, #50158
        Attached File- Added repro.sh, #50159

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code