edit lang file
ramonskil
Joined: 2006-04-12
Posts: 18 |
![]() |
i have uploaded the dir libs/tools from gallery2-development i did this because i changed the nl.po file make install po=nl and i get this result /bin/sh: line 1: php: command not found what did i do wrong?? plz help me out greetz |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
try: |
|
ramonskil
Joined: 2006-04-12
Posts: 18 |
![]() |
still the same problem then i only get one of those error if i user po then i got several of the same errors |
|
sebmex
Joined: 2006-03-21
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 |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
you need php in your path. |
|
ramonskil
Joined: 2006-04-12
Posts: 18 |
![]() |
what do you mean i need php in my path?? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
use google to learn about shell/commandline PATHs |
|
ramonskil
Joined: 2006-04-12
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 |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
yes, you should be in the po dir. |
|
ramonskil
Joined: 2006-04-12
Posts: 18 |
![]() |
i have linux debian installd with apache php4 and several addons and that works fine |
|
renmarc
Joined: 2006-04-18
Posts: 3 |
![]() |
My paths are correct...version is displayed with php -v...but i've always this error: make install PO=it PS: fuzzy line is removed. Any help? |
|
mindless
![]()
Joined: 2004-01-04
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. |
|
JanP
Joined: 2005-10-05
Posts: 34 |
![]() |
I'm having trouble as well, I get this message: [***@server po]# make install PO=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. |
|
mindless
![]()
Joined: 2004-01-04
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). |
|
JanP
Joined: 2005-10-05
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. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
oops, misread the error.. "nl.po" is the file is didn't find, not trim-po.php as I thought. |
|
JanP
Joined: 2005-10-05
Posts: 34 |
![]() |
To give you some more info; I'm running this from /var/www/html/gallery2/modules/exif/po Here, look at my complete console output: [root@server po]# cd /var/www/html/gallery2/modules/exif/po [root@server po]# dir af.po da.po en_GB.po eu.po ga.po is.po ja.po messages.po no.po pt_BR.po sr.po sv.po vi.po zh_TW.po cs.po de.po es.po fr.po GNUmakefile it.po lt.po nl.po pl.po ru.po strings.raw tr.po zh_CN.po [root@server po]# chmod 666 nl.po [root@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 make: *** [install] Fout 1 |
|
JanP
Joined: 2005-10-05
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: [root@server gallery2]# cp modules/exif/po/nl.po lib/tools/po/ [root@server gallery2]# cd modules/exif/po [root@server po]# make install PO=nl Updating nl nl 144 translated messages.
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 |
|
ramonskil
Joined: 2006-04-12
Posts: 18 |
![]() |
make: *** Geen regel voor het maken van doel `install'. Stop. |
|
JanP
Joined: 2005-10-05
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? |
|
ramonskil
Joined: 2006-04-12
Posts: 18 |
![]() |
if i dit what you did 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 |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
what do you get for php -v ? |
|
ramonskil
Joined: 2006-04-12
Posts: 18 |
![]() |
yes i have installed php-cgi |
|
JanP
Joined: 2005-10-05
Posts: 34 |
![]() |
mindless wrote:
what do you get for php -v ? 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. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
neither of you answered my question: Quote:
what do you get for php -v ? |
|
ramonskil
Joined: 2006-04-12
Posts: 18 |
![]() |
Server2:~# php -v this what i get |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
uhhh.... |
|
ramonskil
Joined: 2006-04-12
Posts: 18 |
![]() |
??? what you mean with uhhh.. something wrong? keep in mind |
|
JanP
Joined: 2005-10-05
Posts: 34 |
![]() |
Sorry, here's my output: [***@server gallery2]# php -v PHP 4.3.11 (cgi) (built: Dec 1 2005 18:42:23) Copyright (c) 1997-2004 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies with eAccelerator v0.9.3, Copyright (c) 2004-2005 eAccelerator, by eAccelerator So yeah, I guess it's cgi :P ramonskil wrote:
??? what you mean with uhhh.. something wrong? 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. |
|
ramonskil
Joined: 2006-04-12
Posts: 18 |
![]() |
didnt install php-cgi *dumb* so i installed it |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
current svn now has a change so it should work with either php-cli or php-cgi. |
|
JanP
Joined: 2005-10-05
Posts: 34 |
![]() |
Nice |
|
lpa
Joined: 2006-05-18
Posts: 1 |
![]() |
mindless wrote:
current svn now has a change so it should work with either php-cli or php-cgi. What were these changese and how can I upgrade my installation to get those changes? Lauri |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
click "downloads" above.. it has info on svn and nightly snapshots. |
|
kalev377
Joined: 2006-06-06
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" [root@must po]# make install PO=et Updating et et PHP Notice: Use of undefined constant STDERR - assumed 'STDERR' in /home/web/minupildid.ee/g2/lib/tools/po/trim-po.php on line 21 PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/web/minupildid.ee/g2/lib/tools/po/trim-po.php on line 21 PHP Notice: Use of undefined constant STDERR - assumed 'STDERR' in /home/web/minupildid.ee/g2/lib/tools/po/trim-po.php on line 21 PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/web/minupildid.ee/g2/lib/tools/po/trim-po.php on line 21 tmp.po:41:10: invalid multibyte sequence msgfmt: tmp.po: warning: PO file header fuzzy warning: older versions of msgfmt will give an error on this msgfmt: found 1 fatal error Fail: et make: *** [install] Error 1 [root@must po]# php -v PHP 5.0.4 (cgi-fcgi) (built: May 23 2006 14:29:04) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies
|
|
kalev377
Joined: 2006-06-06
Posts: 59 |
![]() |
After translating more strings and trying the "make install PO=et" again, the error changed to this: [root@must po]# make install PO=et Updating et et PHP Notice: Use of undefined constant STDERR - assumed 'STDERR' in /home/web/minupildid.ee/g2/lib/tools/po/trim-po.php on line 21 PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/web/minupildid.ee/g2/lib/tools/po/trim-po.php on line 21 PHP Notice: Use of undefined constant STDERR - assumed 'STDERR' in /home/web/minupildid.ee/g2/lib/tools/po/trim-po.php on line 21 PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/web/minupildid.ee/g2/lib/tools/po/trim-po.php on line 21 tmp.po:41:10: invalid multibyte sequence tmp.po:73:16: invalid multibyte sequence tmp.po:74:16: invalid multibyte sequence tmp.po:79:16: invalid multibyte sequence tmp.po:80:16: invalid multibyte sequence tmp.po:83:11: invalid multibyte sequence tmp.po:110:10: invalid multibyte sequence tmp.po:113:25: invalid multibyte sequence tmp.po:113:26: invalid multibyte sequence tmp.po:117:10: invalid multibyte sequence tmp.po:126:10: invalid multibyte sequence tmp.po:129:10: invalid multibyte sequence tmp.po:129:21: invalid multibyte sequence tmp.po:138:10: invalid multibyte sequence tmp.po:141:10: invalid multibyte sequence tmp.po:141:14: invalid multibyte sequence tmp.po:153:28: invalid multibyte sequence tmp.po:165:33: invalid multibyte sequence tmp.po:171:17: invalid multibyte sequence tmp.po:174:23: invalid multibyte sequence msgfmt: too many errors, aborting Fail: et make: *** [install] Error 1 Can you help? |
|
mindless
![]()
Joined: 2004-01-04
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. |
|
kalev377
Joined: 2006-06-06
Posts: 59 |
![]() |
Hello again, thanks mindless, updating the svn worked fine, the errors are gone. I did it like this: in /home/web/minupildid.ee/g2/modules/core/po/ i executed "make et.po", then changed header to: "Project-Id-Version: Gallery: 2.2-svn core 1.1.14\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-07-28 23:27+0300\n" "PO-Revision-Date: 2006-07-30 13:03+0300\n" "Last-Translator: poromaan <poromaan@gmail.com>\n" "Language-Team: Estonian <poromaan@gmail.com>\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" then translated some of the file, then did: [root@must po]# make install PO=et Updating et et 6 translated messages, 929 untranslated messages. Then added to /home/web/minupildid.ee/g2/modules/core/classes/GalleryTranslator.class between other language lines the lines: /* Estonian */ $supportedLanguages['et']['ET']['description'] = 'Eesti'; $defaultCountry['et'] = 'ET'; And changed in the web page the language to "Eesti". But nothing happens.. Everything is still in English... Your help is much appreciated.. |
|
kalev377
Joined: 2006-06-06
Posts: 59 |
![]() |
restarting httpd had no effect. restarting the server had no effect either... |
|
mindless
![]()
Joined: 2004-01-04
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. |
|
kalev377
Joined: 2006-06-06
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.. |
|
kalev377
Joined: 2006-06-06
Posts: 59 |
![]() |
Maybe the only way to go is to submit the half-translated file and to get it with the svn update? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
you're welcome to submit something.. i don't know why you aren't able to see the translation. |
|
kalev377
Joined: 2006-06-06
Posts: 59 |
![]() |
So.. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
oops, I put the wrong country code in GalleryTranslator.class... fixed now in svn, and I see the et translations ok. |
|
kalev377
Joined: 2006-06-06
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 Thank you mindless |
|