Bug 822346

Summary: comment in the end resulting in python failing to push po/pot file to server
Product: [Fedora] Fedora Reporter: Joyce Chang <jochang>
Component: zanata-python-clientAssignee: Ding-Yi Chen <dchen>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: medium Docs Contact:
Priority: medium    
Version: 17CC: dchen, kent.neo, petersen, sflaniga, zanata-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 1.8.0-SNAPSHOT (20120827-0014) Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-15 00:00:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joyce Chang 2012-05-17 06:32:16 UTC
Description of problem:
A comment on the bottom of entry in the po file will result in failing to push po to server.Both python and maven client have this issue. Po files should be able to be pushed to server regardless wherever comments go


Version-Release number of selected component (if applicable):
1.6.0-alpha-3-SNAPSHOT

How reproducible:
always

Steps to Reproduce:

1.put a comment in the end of a entry in a po file 

ex:
  msgid " source text"
  msgstr " translation text "
  # a comment in the end resulting in failure to push po 

2. push this po file using zanata push --push-trans

  
Actual results:
po being pushed to server 

Expected results:
error: Syntax error in po file /home/jochang/test/ibus-chewing/po/zh_TW.po (line 25)

additional info.
same issue happens when pushing pot

Comment 1 Joyce Chang 2012-05-17 06:42:40 UTC
Actually, pot is still able to be pushed to server, with a comment in the end of an entry. sorry~~

Comment 2 Joyce Chang 2012-05-18 00:33:45 UTC
(In reply to comment #2)

i managed to reproduce the bug precisely, i realized whether po or pot, a comment in the end of the file will result in failing to be pushed to server like what Runa said( Bug 822344 ).So, it did happened to pot as well, when pushing it, with a comment in the end

Comment 3 Sean Flanigan 2012-06-05 04:43:41 UTC
See http://l10n.gnome.org/POT/gdm.master/gdm.master.bn_IN.po for another file which breaks polib, and thus zanata-python-client.  In this case, it seems to be a "previous msgid" which is a problem:

#~| msgid "AT SPI Registry Wrapper

Comment 4 James Ni 2012-06-18 02:49:45 UTC
Hi,

I have commit a patch to polib to fix this issue, which is accepted by owner of polib. Please see the patch and issues description:

https://bitbucket.org/izi/polib/pull-request/5/ignore-obsolete-previous-msgid-entries

https://bitbucket.org/izi/polib/issue/28/ioerror-on-reading-obsolete-previous-msgid

So i think we need to build a new release for python-polib.

Comment 5 Ding-Yi Chen 2012-08-27 01:51:20 UTC
VERIFIED with 1.8.0-SNAPSHOT (20120827-0014)

zanata-python-client-1.3.11,
python-polib-1.0.0