Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Error parsing .po files #23

Closed
sebastianhoitz opened this Issue Feb 11, 2012 · 2 comments

Comments

Projects
None yet
3 participants

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 <schaaf@komola.de>\n"
"Language-Team: komola UG <team@komola.de>\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, ErlyDTL only seems to be able to parse this file, when I deleted all the "X-Poedit" lines and the #: file:line lines.

Contributor

evanmiller commented Jan 16, 2013

That's a problem. Leaving this open until someone addresses it.

@ghost ghost assigned kaos Jan 18, 2014

kaos added a commit that referenced this issue Jan 19, 2014

Revert "Replace our po scanner with the one used by zotonic."
This reverts commit 1548261 for issue #23.

Conflicts:
	src/i18n/i18n_manager.erl

The parsed formats differed, and I don't want to translate between them.

Besides, it seems that it never was broken (or at least it works now) ((or the issue is/was something else)).

1> po_scanner:scan("23.po").
[{id,[]},
 {str,"Project-Id-Version: Project\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2012-02-10 17:50+0100\nPO-Revision-Date: 2012-02-10 17:50+0100\nLast-Translator: Thomas Schaaf <schaaf@komola.de>\nLanguage-Team: komola UG <team@komola.de>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nX-Poedit-KeywordsList: _;gettext;gettext_noop;_t\nX-Poedit-Basepath: .\nX-Poedit-Language: German\nX-Poedit-Country: GERMANY\nX-Poedit-SourceCharset: utf-8\nX-Poedit-SearchPath-0: .\n"},
 {comment,": strings.php:2"},
 {id,"PAGE_NOT_FOUND"},
 {str,"Seite nicht gefunden!"}]
Owner

kaos commented Jan 19, 2014

@sebastianhoitz,
is your issue still unresolved with the current version?

If so, please reopen with more information, and I will try and reproduce it.

@kaos kaos closed this in 1548261 Jan 19, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment