i have uploaded the dir libs/tools from gallery2-development
to my existing gallery2
i did this because i changed the nl.po file
and then i did
make install po=nl
and i get this result
/bin/sh: line 1: php: command not found
msgfmt: tmp.po: warning: PO file header missing or invalid
warning: charset conversion will not work
msgfmt: found 1 fatal error
what did i do wrong??
plz help me out
greetz
ramonskil
Posts: 8601
try:
make install PO=nl
(capitals for PO)
Posts: 18
still the same problem
but if i PO instead of po
then i only get one of those error if i user po then i got several of the same errors
Posts: 79
I have the same problem here, did you find the solution to that ?
thanks for stopping at my thread for explanation : http://gallery.menalto.com/node/33533
Posts: 8601
you need php in your path.
Posts: 18
what do you mean i need php in my path??
Posts: 8601
use google to learn about shell/commandline PATHs
Posts: 18
lol i know a lil about php en shell command line paths but what do you mean with i need php in my path
when i do make install PO=nl
i need to be in the po dir which i want to change right?
Posts: 8601
yes, you should be in the po dir.
in that dir, type 'php -v'
that must work. ie, you must be able to run php just by typing php, not C:\Path\PHP\bin\php.exe
that's "in your path"
Posts: 18
i have linux debian installd with apache php4 and several addons and that works fine
Posts: 3
My paths are correct...version is displayed with php -v...but i've always this error:
make install PO=it
Updating it
it
tmp.po:1: parse error
tmp.po:2: la parola chiave "b" è sconoscita
tmp.po: warning: PO file header missing, fuzzy, or invalid
warning: charset conversion will not work
found 3 fatal errors
Fail: it
make: *** [install] Error 1
PS: fuzzy line is removed.
Any help?
Posts: 8601
make sure you have a valid po header and po tags around that line and the line itself is valid.. can't really tell you more without seeing it.
Posts: 34
I'm having trouble as well, I get this message:
[***@server po]# make install PO=nl
Updating nl
nl
PHP Warning: file(nl.po): failed to open stream: No such file or directory in /var/www/html/gallery2/lib/tools/po/trim-po.php on line 42
msgfmt: tmp.po: warning: PO file header missing or invalid
warning: charset conversion will not work
msgfmt: found 1 fatal error
Fail: nl
The only thing I've edited are a couple of translations of EXIF tags (because they were incorrect), so I'm pretty sure the .po is valid.
Posts: 8601
http://codex.gallery2.org/index.php/Gallery2:Localization
it mentions near the top you need a developer install or nightly snapshot or current svn (these include the lib/tools/po dir).
Posts: 34
Well... I HAVE the developer install. So I don't know what's going on. I used to have the "typical" package but that gave a totally different error, so I installed the developer and now I get this.
Posts: 8601
oops, misread the error.. "nl.po" is the file is didn't find, not trim-po.php as I thought.
cd modules/exif/po
make install PO=nl
this is what you tried? make sure nl.po exists and has correct permissions.
Posts: 34
To give you some more info; I'm running this from /var/www/html/gallery2/modules/exif/po
So yeah, that should be the right directory. I've tried chmodding nl.po (it IS present, I can see it perfectly using dir and I can edit it with nano or vi or whatever) to 666 and even 777, but to no avail This is really, really weird.
Here, look at my complete console output:
Posts: 34
OK, I've figured it out. I the following console command:
[root@server gallery2]# cp modules/exif/po/nl.po lib/tools/po/
To create a copy of nl.po from the exif directory to the tools directory, and it worked:
I restart Apache and, it's a miracle, it worked! I don't know if I just overlooked the step "copy the po file from it's modules directory to the lib/tools/po directory", or something like that, but anyway, it worked and I'm really happy with it
Posts: 18
make: *** Geen regel voor het maken van doel `install'. Stop.
i get this error
in english it means
make: *** No rule to create for map `install'. Stop.
Posts: 34
Can you post your complete console output? You had a different error when you first started this topic - it was similar to mine, what did you change?
Posts: 18
if i dit what you did
copied the nl.po to /var/www/gallery2/lib/tools/po
and then i get make: *** Geen regel voor het maken van doel `install'. Stop.
when i try it in the same dir like /var/www/gallery2/moduels/rating/po
then i get
[***@server po]# make install PO=nl
Updating nl
nl
PHP Warning: file(nl.po): failed to open stream: No such file or directory in /var/www/html/gallery2/lib/tools/po/trim-po.php on line 42
msgfmt: tmp.po: warning: PO file header missing or invalid
warning: charset conversion will not work
msgfmt: found 1 fatal error
Fail: nl
Posts: 8601
what do you get for php -v ?
you should not have to copy the po file to lib/tools/po. for some reason the current directory when the trim-po.php script runs is lib/tools/po instead of the dir where you ran 'make'.. i'm guessing maybe you're using php-cgi instead of php-cli.. if that's the cause, maybe we can figure out how to make it work for both.
Posts: 18
yes i have installed php-cgi
Posts: 34
I don't know what my problem was, but the solution to it was indeed to copy the .po file to the direcotry where trim-po.php is located, as stated above.
Posts: 8601
neither of you answered my question:
Posts: 18
Server2:~# php -v
-bash: php: command not found
this what i get
Posts: 8601
uhhh....
Posts: 18
??? what you mean with uhhh.. something wrong?
keep in mind
i have linux debian no windows
php4, apache 1.3, mysql installed and evrey thing works fine
Posts: 34
Sorry, here's my output:
So yeah, I guess it's cgi :P
It means you don't have PHP in your path - you can't execute it from any directory you choose. I don't really know how to fix it though - you could search for it on Google.
Posts: 18
didnt install php-cgi *dumb*
so i installed it
and it works like a charm :D
Posts: 8601
current svn now has a change so it should work with either php-cli or php-cgi.
Posts: 34
Nice
Posts: 1
What were these changese and how can I upgrade my installation to get those changes?
Lauri
Posts: 8601
click "downloads" above.. it has info on svn and nightly snapshots.
Posts: 59
Hello,
Please help me with the localization problem, as it seems that noone olse wants to translate Gallery to Estonian...
I had the same "msgfmt: tmp.po: warning: PO file header missing or invalid" error when trying to "make install et.po"
Reading this thread I discovered i had also the php cgi so I used the SVN.
After that the error changed:
Gallery version = 2.2-svn core 1.1.14
PHP version = 5.0.4 apache2handler
Webserver = Apache/2.2.0 (Fedora)
Database = mysql 5.0.22-log, lock.system=flock
Toolkits = Gd, SquareThumb, ImageMagick, NetPBM
Acceleration = full/900, none
Operating system = Linux must.minupildid.ee 2.6.16-1.2122_FC5 #1 Sun May 21 15:01:01 EDT 2006 i686
Default theme = classic
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5
Posts: 59
After translating more strings and trying the "make install PO=et" again, the error changed to this:
Can you help?
Posts: 8601
ah, warning output from that script only worked with PHP CLI, not CGI. i have committed an update that should fix this. update from svn or get tomorrow's nightly snapshot.
Posts: 59
Hello again, thanks mindless, updating the svn worked fine, the errors are gone.
Unfortunately the translation does not work
I did it like this:
in /home/web/minupildid.ee/g2/modules/core/po/
i executed "make et.po", then changed header to:
then translated some of the file, then did:
Then added to /home/web/minupildid.ee/g2/modules/core/classes/GalleryTranslator.class between other language lines the lines:
And changed in the web page the language to "Eesti".
But nothing happens.. Everything is still in English...
Do I have to restart the server or something else?
Have i forgotten anything?
Your help is much appreciated..
Posts: 59
restarting httpd had no effect. restarting the server had no effect either...
Posts: 8601
did you select the new language? either edit your user account (Your Account or in site admin/users) or add the Language Selector block to your theme.
Posts: 59
Yes, I tried both ways, I have language selector on my main page sidebar and I changed the language in my account settings too..
Everything I have read about the translations says that I should be set to go..
Posts: 59
Maybe the only way to go is to submit the half-translated file and to get it with the svn update?
I have currently 445 translated messages, 481 untranslated messages.
Posts: 8601
you're welcome to submit something.. i don't know why you aren't able to see the translation.
Posts: 59
So..
I submitted a few Estonian language po files and they were integrated..
After "svn update" and "httpd restart" nothing happened.. everything is still in English while the language selector is on Eesti.
Tried even changing the language to something else first and then to "Eesti", but no effect...
Does it work for anyone else?
Posts: 8601
oops, I put the wrong country code in GalleryTranslator.class... fixed now in svn, and I see the et translations ok.
Posts: 59
Yeeeehhaaaaa!
After another svn update I had two "Eesti" in the css file, one didn't work(the one I entered) and one worked fine(yours), so I deleted mine
I can now see my translations right after make install PO=et
Thank you mindless