Bug 961413 - Publican creates blank POT files
Summary: Publican creates blank POT files
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 2.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 3.2
Assignee: Jeff Fearn 🐞
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-09 15:02 UTC by Eric Christensen
Modified: 2013-08-09 04:49 UTC (History)
4 users (show)

Fixed In Version: 3.2.0
Clone Of:
Environment:
Last Closed: 2013-08-09 04:49:00 UTC
Embargoed:


Attachments (Terms of Use)

Description Eric Christensen 2013-05-09 15:02:44 UTC
Description of problem: Publican creates POT files for where there are no strings in which to translate.

Version-Release number of selected component (if applicable): 2.8


Actual results: Publican creates blank POT files when the XML file contains no translatable content.


Expected results: Publican determines that there are no translatable content and does not create a POT file.

Comment 2 Jeff Fearn 🐞 2013-07-04 05:55:17 UTC
hmm I think this is actually less bad than if a POT file is missing, because if it's there but empty you can know the date it was processed but if it's missing then you just don't know why it's not there .... thoughts?

Comment 3 Eric Christensen 2013-07-08 13:46:51 UTC
(In reply to Jeff Fearn from comment #2)

That's a good point.  I guess this could also be a problem with the Transifex client not being happy with an empty POT file.  If you don't like it why import it?

I've written a tool to create the Transifex client config file and I can probably figure out how to include some sort of logic to actually read the POT files instead of just grabbing their names.  The other solution, from a Publican POV, would be to have Publican generate some sort of a log file that would tell why a certain POT file wasn't created.  I could see that becoming complicated, though, if a POT file once contained content but then later does not (how would that work?).

Comment 4 Jeff Fearn 🐞 2013-07-09 01:02:53 UTC
The problem with a log file is that, IMO, you don't want to check log files in to your source repository, so no one else will know why it's not there.

Empty POT and PO files are valid, translation tools should cope with that.

Comment 5 Jeff Fearn 🐞 2013-07-12 04:25:48 UTC
Actually there is already a check in place that attempts to delete empty pot files, it just doesn't work because the header gets printed out. I'll fix that check so it bases it on the message count as well.

Comment 6 HSS Product Manager 2013-07-12 04:37:32 UTC
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.

Comment 7 Jeff Fearn 🐞 2013-07-12 05:23:20 UTC
To ssh://git.fedorahosted.org/git/publican.git
   fe4c066..3dd294e  HEAD -> devel

Comment 8 Zac Dover 2013-07-22 09:19:58 UTC
I created a book, translated a bit of it to German, added a new Chapter with no content, and updated the po as follows:

$ publican update_po --langs=de-DE --firstname=Zac --surname=Dover --email=zdover
	Processing file pot/Author_Group.pot -> de-DE/Author_Group.po
	Processing file pot/Book_Info.pot -> de-DE/Book_Info.po
	Processing file pot/Chapter.pot -> de-DE/Chapter.po
	Processing file pot/Preface.pot -> de-DE/Preface.po
	Processing file pot/Revision_History.pot -> de-DE/Revision_History.po
	Processing file de-DE/Revision_History.xml -> de-DE/Revision_History.xml

The name of the chapter I created was Chapter2.xml. It had no translatable content in it. It does not appear in the above list of files processed by 'publican update_po'.

VERIFIED.

Comment 9 Jeff Fearn 🐞 2013-08-09 04:49:00 UTC
The fix for this bug has been shipped in publican 3.2.0


Note You need to log in before you can comment on or make changes to this bug.