Hi,
I'm Óscar (the spanish trasnlator) and I have a little problem.
I'll translate the lastest g2 svn source and when I do "make es.po" in any po folder I get the following error:
make: *** [messages.po] Error 255
If I try do "make es.po" in any older g2 it works perfetly.
I try make and gmake (is same, i'm using Gentoo Linux).
And, if I do "make install PO=es" (or make install only) i get this error:
************************************************************
WARNING: We detected the following as your g2data dir but
this directory does not appear to exist. We will be unable
to copy new .mo files into the g2data/locale directory until
this is fixed.
shell php > Parse error: syntax error, unexpected '<' in php shell code on line 1 >
Alternatively, point your browser at gallery2/lib/support,
click the "Filesystem Permissions" link and then click
the 'Make the locale folder read/write' link
************************************************************
make: *** [messages.po] Error 255
The g2data folder exists and this permisions are fine.
Ah!, and g2 works fine (I can create folders, upload items, etc...).
Posts: 15
Yes, I have the same problem. And if I try to make new language I get the same error too.
Posts: 8601
try editing lib/tools/po/GNUmakefile.inc, line 27.. starts with G2DATA =
remove the <?php and ?> tokens in that line. so now it should look like $(shell echo 'include(...........gallery.base");'
does that change anything?
Posts: 28
Hi mindless,
I'm having the same troubles...
I made the change you suggested, but the error remains. This is the new error message:
Thanks
-Ermanno (italian translator)
Posts: 15
I get the same error that ermannob, only change the g2data path line (shell php > /var/www/gallery/g2data/ php > in my case).
Greetings.
Óscar (Spanish G2 Translator)
Posts: 8601
what do you get for:
make -v
from the commandline?
Posts: 8601
we can continue to debug this, but for the short term (so you can work on 2.2.2 translations) you can comment out or remove the whole "G2DATA =" line and add a line that just has the right path, like:
G2DATA = /var/www/localhost/g2data
Posts: 15
My "make -v":
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i686-pc-linux-gnu
The change of G2DATA seems work, but I keep getting the error "make: *** [messages.po] Error 255" when I make "make es.po" or "make install PO=es".
Posts: 28
Hi,
here's the output of make -v
Your suggestion doesn't work. I wrote the right path as you wrote in the reply, but it still outputs error 255 with no description about the error. If I comment out the entire line, I get get error 255 again, complaining about the non-existant directory.
Thanks a lot for your support.
-Ermanno
Posts: 8601
not really sure what's wrong.. if either of you can PM me temporary ssh access to debug, that would be fastest.
Posts: 8601
got access and debugged, thanks! i'm done working on your systems now.
there are 2 problems.
1) it seems we should not be using "php -a" as it behaves very differently between php-cgi and php-cli. here is the line to use, fix will be in svn trunk shortly.
2) gentoo /usr/bin/php is compiled with --disable-tokenizer. Our code for parsing strings for translation out of the code now uses the tokenizer.
The tokenizer is built into php by default since PHP 4.3.0, so we decided to use it.. simplified our code quite a bit. Unfortunately that means you'll need to use a different php binary for working with G2 translations. You can compile and install it anywhere, then adjust your path so "php" finds that binary. Sorry!
Posts: 8601
the makefile now detects problem #2 and prints a descriptive error message (instead of just "Error 255" like you got before)
Posts: 28
I recompiled my php with tokenizer. Would you like to give it a try?
-ermanno
Posts: 15
Oki, I'm compiling php with tokenizer support. It may be some time.. xDD
I think that this must be in Install Documentation for future users ¿no?
When it finish to compile I tell you the results.
Thanks.
Oscar.
Posts: 28
I tried by myself...
After recompiling php with tokenizer, it works. Note that I modified GNUmakefile writing the path of G2DATA.
If I write in GNUmakefile the line you wrote, it gives a Warning about the non-existing g2data, but it performs successfully the update anyway. (?)
Would you (mindless) like me to keep your ssh access open for some more time?
-ermanno
Posts: 15
It's works fine for me after recompile php with tokenizer support (USE=tokenizer in Gentoo) and modified the G2DATA line.
Mindless, I keep ssh access to my machine open because if you need do any new test. When you finish tell me for close it.
Ah, and if you need do a new test in a Gentoo machine can have my total support. Can contact with me via Jabber or PM. ;)
Greetings,
Oscar.
PS: Now i go bed, is very late in Spain...
Posts: 8601
Current svn seems to work on both your systems.
ermannob, if you still see an error with current svn or tomorrow's nightly snapshot then please post the error message here.
(if g2data path doesn't work, it can still build the mo file in the module dir.. it just can't copy the result into g2data/locale.. so not a "fatal" error)
Posts: 28
With the new SVN version everything works fine.
Thanks!
-ermanno
Posts: 15
Yes, it works fine. I'm working in traslation now.
If i give any error i'll report you.
Thanks.
Oscar.