PO file import(at admin/config/regional/translate/import) fails when last entry of file is null msgstr. However, it succeeds when last entry is comment(#) or filled msgstr.
Please confirm it with attached .po file of 3 patterns.

FYI, this bug seems to live in _locale_import_read_po() in includes/locale.inc.

CommentFileSizeAuthor
#1 import_fail.po214 bytesTakafumi
#1 import_success_1.po224 bytesTakafumi
#1 import_success_2.po218 bytesTakafumi

Comments

Takafumi’s picture

StatusFileSize
new218 bytes
new224 bytes
new214 bytes

.po file of 3 patterns.

Takafumi’s picture

Status: Active » Fixed

I confirmed this bug had been fixed in 7.0.

oriol_e9g’s picture

Version: 7.x-dev » 6.x-dev
Status: Fixed » Patch (to be ported)

Same problem in D6

oriol_e9g’s picture

Status: Patch (to be ported) » Active
gábor hojtsy’s picture

Status: Active » Closed (duplicate)

This was fixed in Drupal 7 for #611786: .po file should not be considered broken if last msgstr is empty, please reopen that for Drupal 6 if it applies to Drupal 6. The assumption there was that it is not, because updating 7 to use the Drupal 6 code again solved it and was proved with tests.