[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-05-09 Thread STINNER Victor
STINNER Victor added the comment: Julien: Why not fixing Python 3.7? You approved https://github.com/python/cpython/pull/13218 (Python 3.7 backport) but then you closed it. Only Azure Pipelines PR failed on "ERROR: test_drain_raises (test.test_asyncio.test_streams.StreamTests)" which is unr

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-05-09 Thread Julien Palard
Change by Julien Palard : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-05-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +13129 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-05-09 Thread Julien Palard
Julien Palard added the comment: New changeset afd1e6d2f0f5aaf4030d13342809ec0915dedf81 by Julien Palard in branch 'master': bpo-36239: Skip comments in gettext infos (GH-12255) https://github.com/python/cpython/commit/afd1e6d2f0f5aaf4030d13342809ec0915dedf81 -- ___

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-09 Thread Julien Palard
Change by Julien Palard : -- keywords: +patch pull_requests: +12241 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread Julien Palard
Julien Palard added the comment: I tested further, and when we have this horrible mess in the po files: msgstr "" "Pro" "jec" "t-I" "d-V" "ers" "ion" ": " "dig" "ika" "m\n" We have a clean string in the .mo file. So there is no fear to have of: "Plural-Forms: nplurals=1; plural=0;\n" "#-#-#

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread Julien Palard
Julien Palard added the comment: That's literally sick þ Looks like we have to trust the "\n", not the file wrapping, but this means that: msgstr "" "Pro" "jec" "t-I" "d-V" "ers" "ion" ": " "dig" "ika" "m\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n"; is valid, too? I have to try it! HAHA

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread STINNER Victor
STINNER Victor added the comment: /usr/share/locale/ml/LC_MESSAGES/ktraderclient5.mo: svn cat svn://anonsvn.kde.org/home/kde/trunk/l10n-kf5/ml/messages/kde-workspace/ktraderclient5.po > ml_ktraderclient5.po Extract: msgid "" msgstr "" "Project-Id-Version: ktraderclient\n" "Report-Msgid-Bugs

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread STINNER Victor
STINNER Victor added the comment: /usr/share/locale/fa/LC_MESSAGES/digikam.mo: I downloaded the .po file using: svn cat svn://anonsvn.kde.org/home/kde/trunk/l10n-kf5/fa/messages/extragear-graphics/digikam.po > fa_digikam.po It contains many comments in headers. Extract: (...) # MaryamSada

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread Julien Palard
Julien Palard added the comment: The 'last-translator': '# ANI PETER|അനി പീറ്റര്\u200d ', case does not looks like an issue, it does *not* starts with #, it's in the middle of the line, the line starts with "Last-Translator". -- ___ Python tracke

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread STINNER Victor
STINNER Victor added the comment: I hacked gettext.py to parse all files of my system. I found 3 .mo files which contain "#" in headers: /usr/share/locale/fa/LC_MESSAGES/digikam.mo: {'content-transfer-encoding': '8bit\n' '#-#-#-#-# digikamimageplugin_channelmixe

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread STINNER Victor
STINNER Victor added the comment: I found a .po file with "#" in headers on the Internet, Sympa mailing list project: https://www.sympa.org/distribution/sympa-6.0.10/po-wwsympa/et.po: # #-#-#-#-# blank_web_help_et.po (sympa) #-#-#-#-# # Sympa online help internationalisation. # Copyright (C

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread Julien Palard
Julien Palard added the comment: After some research I found a few comments around comments being marked as starting by #-#-#-#-# and ending with #-#-#-#-#, not just starting with #. In gettext-0.19.8.1 sources for example: $ grep -r '#-#-#-#-' | head gettext-tools/misc/po-mode.el:#-#-#-#-#

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread STINNER Victor
STINNER Victor added the comment: Attached files: * comments.po: PO file with a comment in headers * messages.mo: comments.po compiled with msgfmt * parse.py: Python script to parse messages.mo -- ___ Python tracker

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file48197/messages.mo ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file48196/comments.po ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file48195/parse.py ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread STINNER Victor
New submission from STINNER Victor : When a translation .po file contains a comment in headers, it's kept when compiled as .mo by msgfmt. Example with test.po: --- msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "#-#-#-#-# plo.po