bugGNU gettext - Bugs: bug #52395, msguniq 0.19.8.1 for Windows...

 
 

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

bug #52395: msguniq 0.19.8.1 for Windows sometimes processes .pot file with CRLF EOL incorrectly

Submitter:  Hendy Irawan <ceefour>
Submitted:  Sat 11 Nov 2017 05:36:43 PM UTC
   
 
Category:  Translator tools Severity:  3 - Normal
Item Group:  None Status:  Confirmed
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Sun 12 Nov 2017 10:24:19 PM UTC, comment #2: 

As a workaround, if you have PO or POT files with Windows EOL conventions, please run "tr -d '\r'" on them before using the GNU gettext tools on them.

Bruno Haible <haible>
Group administrator
Sun 12 Nov 2017 10:22:58 PM UTC, comment #1: 

I observe the bug also on Linux, but only with an additional --width argument:
$ msguniq --to-code=utf-8 -w 200 eolbug.pot > eolbug.out

The resulting eolbug.out has a first line that looks like this:
#: .\edu\templates\edu\home.html:69<CR> #: .\edu\templates\edu\music_country.html:34<CR>

No information has been lost; you only got that impression because the second part on the line overwrote the first part on the screen.

But a stray <CR>, not succeeded by <LF>, is evidently causing trouble in editors and possibly syntax errors in some other tools.

(file #42379, file #42380)

Bruno Haible <haible>
Group administrator
Sat 11 Nov 2017 05:36:43 PM UTC, original submission:  

eolbug.pot file : (save it as CRLF EOL)

#: .\edu\templates\edu\home.html:69
#: .\edu\templates\edu\music_country.html:34
#, python-format
msgid "Hi"
msgstr ""

then run:

msguniq --to-code=utf-8 eolbug.pot

Expected:

#: .\edu\templates\edu\home.html:69
#: .\edu\templates\edu\music_country.html:34
#, python-format
msgid "Hi"
msgstr ""

Actual:

warning: Could not open file /usr/share/gettext/styles/po-default.css

 .\edu\templates\edu\music_country.html:34
#, python-format
msgid "Hi"
msgstr ""

(the warning is ok, but resulting output has incorrect syntax and lost information)

But if the file is using LF EOL, file is processed fine.

Original bug report: https://code.djangoproject.com/ticket/28773

Hendy Irawan <ceefour>

 

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

Attached Files
file #42379:  eolbug.pot added by haible (124B - text/plain)
file #42380:  eolbug.out added by haible (118B - application/octet-stream)

 

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 claudep
  • -email is unavailable- added by ceefour (Submitted the item)
  • -email is unavailable- added by ceefour
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-12 haible Attached File- Added eolbug.pot, #42379
        Attached File- Added eolbug.out, #42380
        CategoryBuild Translator tools
        StatusNone Confirmed
    2017-11-11 claudep Carbon-Copy- Added claudep
    2017-11-11 ceefour Carbon-Copy- Added ceefour

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code