parse error

leschek

Joined: 2006-07-29
Posts: 44
Posted: Thu, 2006-08-10 18:48

Hallo,
I have little problem with installing *.po file to my gallery2.
I downloaded new *.po file from my themes/PGtheme/po, translate it partly and try to install to theme again.

Here is result from SSH:

Quote:
­bash­2.05b$ make install PO=cs_CZ
Updating cs_CZ
cs_CZ
tmp.po:1:2: parse error
msgfmt: found 1 fatal error
Fail: cs_CZ
make: *** [install] Error 1

.
Unfortunately I don't know where the parse error find so I will happy if someone can lead me to right place to find it.
If somebody wants see the file I uploaded it here.

Last Run Details:

Gallery version = 2.2-svn core 1.1.14
PHP version = 4.4.2 cgi
Webserver = Apache/1.3.36 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.27 OpenSSL/0.9.7a PHP-CGI/0.1b
Database = mysql 4.1.18-standard, lock.system=flock
Toolkits = ArchiveUpload, Exif, Getid3, Thumbnail, Gd, ImageMagick, LinkItemToolkit
Acceleration = none, none
Operating system = Linux server4.hostingplex.com 2.6.16.18 #5 SMP PREEMPT Tue May 23 14:29:55 EDT 2006 i686
Default theme = PGtheme
gettext = enabled
Locale = en_GB
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2006-08-10 22:49

get rid of the control characters at the beginning of your po file. if needed, just copy/paste all the chars you can SEE into a new file.

 
leschek

Joined: 2006-07-29
Posts: 44
Posted: Fri, 2006-08-11 02:34

Thank you for the help. I found up what I did wrong. I edit files in Notepad++ - my favourite editor and it made parse error somehow. I have poEdit now and everything is O.K.

 
athlon

Joined: 2006-09-12
Posts: 26
Posted: Tue, 2006-09-12 13:10

Hello!

I also have an Problem, editing my de.po from the cart module.

make install PO=de
Updating de
de
msgfmt: tmp.po: warning: PO file header missing or invalid
warning: charset conversion will not work
msgfmt: found 1 fatal error
Fail: de
make: *** [install] Error 1

i´ve edited the de.po file with the std. vim.
Whats my mistake?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2006-09-12 15:07

if you do 'make de.po' first, does that help?

 
athlon

Joined: 2006-09-12
Posts: 26
Posted: Tue, 2006-09-12 16:36

no, that doesnt help:

# make de.po
# make install PO=de
Updating de
de
msgfmt: tmp.po: warning: PO file header missing or invalid
warning: charset conversion will not work
msgfmt: found 1 fatal error
Fail: de
make: *** [install] Error 1

whats wrong here:
i first made "make de.po"
then i edit the file "de.po" with vi and then i make "make de.po" and he says:
# make de.po
make: `de.po' is up to date.

but thats wrong, i made changes in file de.po.

is it possible that i cannt edit po files with vim?
vim --help
VIM - Vi IMproved 6.1 (2002 Mar 24, compiled Apr 18 2003 08:35:58)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2006-09-12 23:31

make clean de.po
will force an update of de.po (makes sure the strings to translate are up to date with those in the module for translation).

look at de.po in other modules, your file should have a similar header.
yes, editing with vim should be fine.

if you're using php-cgi make sure to use current svn or nightly snapshot, not 2.1.x. some fixes for php-cgi have been made since then.

 
athlon

Joined: 2006-09-12
Posts: 26
Posted: Wed, 2006-09-13 07:18

the de.po files in other modules have the same header.

But building de.po files in other modules dosn´t work too.
i got the same error.

here is the file header of de de.po file from the cart module:
its the original file from the gallery homepage. the only thing i changed, is :

msgid "Your Cart"
msgstr "Ihr Warenkorb"

here the header:

msgid ""
msgstr ""
"Project-Id-Version: Gallery: Cart 1.0.4\n"
"POT-Creation-Date: 2003-02-11 03:09-0800\n"
"PO-Revision-Date: 2006-01-16 00:41+0000\n"
"Last-Translator: Frederik Kunz <frederik.kunz@web.de>\n"
"Language-Team: German <gallery-devel@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: KBabel 1.10.1\n"

 
kmchen

Joined: 2007-02-20
Posts: 3
Posted: Fri, 2007-02-23 15:34

Got same problem with french. Any news ?