From: <fri...@us...> - 2008-02-29 07:40:27
|
Revision: 7035 http://translate.svn.sourceforge.net/translate/?rev=7035&view=rev Author: friedelwolff Date: 2008-02-28 23:40:32 -0800 (Thu, 28 Feb 2008) Log Message: ----------- Test that the template PO file actually has any units before trying to use them Modified Paths: -------------- src/trunk/translate/convert/pot2po.py Modified: src/trunk/translate/convert/pot2po.py =================================================================== --- src/trunk/translate/convert/pot2po.py 2008-02-29 07:38:26 UTC (rev 7034) +++ src/trunk/translate/convert/pot2po.py 2008-02-29 07:40:32 UTC (rev 7035) @@ -116,7 +116,7 @@ pot_creation_date=pot_creation_date, po_revision_date=po_revision_date, last_translator=last_translator, language_team=language_team, mime_version=mime_version, plural_forms=plural_forms, **kwargs) # Get the header comments and fuzziness state - if templatepofile is not None: + if templatepofile is not None and len(templatepo.units) > 0: if templatepo.units[0].isheader(): if templatepo.units[0].getnotes("translator"): targetheader.addnote(templatepo.units[0].getnotes("translator"), "translator") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |