evanmiller/ChicagoBoss — Issue #72: Issue parsing .po file with comments
Author: sebastianhoitz
Created: 2012-02-11 19:46:42+00:00
State: open

We have a gettext file created by poEdit, which contains a lot of additional data and comments.

The general file looks like this:

msgid ""
msgstr ""
"Project-Id-Version: Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-02-10 17:50+0100\n"
"PO-Revision-Date: 2012-02-10 17:50+0100\n"
"Last-Translator: Thomas Schaaf \n"
"Language-Team: komola UG \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: _;gettext;gettext_noop;_t\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-Language: German\n"
"X-Poedit-Country: GERMANY\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-SearchPath-0: .\n"

#: strings.php:2
msgid "PAGE_NOT_FOUND"
msgstr "Seite nicht gefunden!"

This is a common format for gettext files.

However, Chicago Boss only seems to be able to parse this file, when I deleted all the "X-Poedit" lines and the #: file:line lines.