Yesterday I downloaded the svn version of G2 locally to start to edit on some tr.po files with following command:
svn checkout https://gallery.svn.sourceforge.net/svnroot/gallery/trunk/gallery2 gallery2
Before editing I did a "svn update" again to be up-to-date.
Then I did "make tr.po" as described under Localization which gave me the following errors:
PHP Notice: Undefined variable: minutes in /srv/www/htdocs/gallery2/lib/tools/po/extract.php(165) : eval()'d code on line 3
PHP Notice: Undefined variable: hours in /srv/www/htdocs/gallery2/lib/tools/po/extract.php(165) : eval()'d code on line 3
PHP Notice: Undefined variable: days in /srv/www/htdocs/gallery2/lib/tools/po/extract.php(165) : eval()'d code on line 3
PHP Notice: Undefined variable: weeks in /srv/www/htdocs/gallery2/lib/tools/po/extract.php(165) : eval()'d code on line 3
PHP Notice: Undefined variable: minutes in /srv/www/htdocs/gallery2/lib/tools/po/extract.php(165) : eval()'d code on line 3
PHP Notice: Undefined variable: hours in /srv/www/htdocs/gallery2/lib/tools/po/extract.php(165) : eval()'d code on line 3
PHP Notice: Undefined variable: days in /srv/www/htdocs/gallery2/lib/tools/po/extract.php(165) : eval()'d code on line 3
PHP Notice: Undefined variable: weeks in /srv/www/htdocs/gallery2/lib/tools/po/extract.php(165) : eval()'d code on line 3
PHP Notice: Undefined variable: many in /srv/www/htdocs/gallery2/lib/tools/po/extract.php(165) : eval()'d code on line 3
PHP Notice: Undefined variable: many in /srv/www/htdocs/gallery2/lib/tools/po/extract.php(165) : eval()'d code on line 3
I tried the same with de.po and en.po which gave me the same errors.
Is my svn tree broken?
Did I miss something?
Help wanted
Posts: 8601
FAQ: What information is required when I ask for help in the forums?
cd modules/core/po
make tr.po
this works for me on current svn.
Posts: 35
Gallery version = 2.3-svn core 1.2.21 r17012
API = Core 7.36, Module 3.8, Theme 2.6, Embed 1.2
PHP version = 5.2.0 apache2handler
Webserver = Apache/2.2.3 (Linux/SUSE)
Database = mysqli 5.0.26, lock.system=flock
Toolkits = ArchiveUpload, Dcraw, Exif, Getid3, ImageMagick, jpegtran, LinkItemToolkit, NetPBM, SquareThumb, Thumbnail, Gd
Acceleration = none, none
Operating system = Linux cou 2.6.18.8-0.5-default #1 SMP Fri Jun 22 12:17:53 UTC 2007 i686
Default theme = matrix
gettext = enabled
Locale = en_GB
Browser = Opera/9.23 (X11; Linux i686; U; en)
Rows in GalleryAccessMap table = 21
Rows in GalleryAccessSubscriberMap table = 3
Rows in GalleryUser table = 2
Rows in GalleryItem table = 1
Rows in GalleryAlbumItem table = 1
Rows in GalleryCacheMap table = 0
Warning on system check with upgrade.php:
output_buffering is activated in php.ini
modified files (tr.po's and updated files)
Shall a add content of php -i too?
Posts: 8601
PHP version = 5.2.0 apache2handler
That's what your webserver is using.. but in this case for the makefiles we need to know what version you're using for cmdline PHP. From your shell do
php -v
.. is this also PHP 5.2.0? (cli) or (cgi) ?I ran make tr.po in core/po dir successfully, with PHP 4.4.4-9(cli) and PHP 5.2.3(cli).
Posts: 35
php -v says:
PHP 5.2.0 with Suhosin-Patch 0.9.6.1 (cli) (built: Jul 30 2007 15:36:02)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
with Suhosin v0.9.10, (C) Copyright 2006, by Hardened-PHP Project
Posts: 8601
If you have another php version you can try, it would be worth a check. Or if you would like to PM me temporary shell access to your server, I can login and debug the problem.
Posts: 35
Sorry - I suddenly remembered http://gallery.menalto.com/node/8742
It's an php5 related issue still not being fixed (see http://bugs.php.net/bug.php?id=18556)
In turkish there are two different letters (small/capital): i/İ and ı/I
and the conversion of for example classnames with a capital I in their name seems still not to be handled correctly in latest php5...
Posts: 8601
Hm.. I still couldn't see any error with PHP5.2.3 after setting LANG env var to tr_TR.UTF-8 (setlocale() in php code confirmed this locale is selected when extract.php runs). Also, there are no classes in extract.php so that particular bug doesn't apply.. but it could be something related.
Can you select a different locale in your shell before running 'make' and see if that helps?
Posts: 35
There are other bugs related to tr_TR, for example http://bugs.php.net/search.php?cmd=display&search_for=tr_TR&x=0&y=0
No difference with LANG=de_DE.UTF8 - same messages.
Posts: 8601
Ok. I can't do anything more without seeing the problem.. good luck!
Posts: 35
Ok, I'll stay put in #gallery-support...
Posts: 8601
(my offer to debug on your system still stands..)
Posts: 35
... do you read your PM?
Posts: 8601
yes. don't have time for remote debugging, i'm afraid. if you can debug and find out what strings are being eval'ed to generate those errors, that would be a start.
Posts: 35
ok.
I've set setDebug('buffered') and got this output when switching lamguage to turkish:
Fatal error: Call to undefined method CoreModule::setId() in /srv/www/htdocs/gallery2/modules/core/module.inc on line 32
No output in Smarty Debug window at all.
Same error in forum http://gallery.menalto.com/node/53921 with no answer (writer turkish). When searching with Google for "Fatal error: Call to undefined method CoreModule" there are only 4 links coming up, 2 in gallery and 2 abroad (turkish sites); one site seems to be down, the other shows a german interface (my kde is german)
Is there a way to debug that error further on?
I get mad about this! >-(
Posts: 8601
Sorry, all we can recommend is to use PHP 4.x.
See: http://bugs.php.net/bug.php?id=35050#c105582
(which is linked from our http://codex.gallery2.org/Gallery2:Known_Issues page)
Posts: 35
I somehow expected that answer... :-/
Please show me
the way
to the next
whisky bar
Oh don't ask why
Oh don't ask why
...
Posts: 35
Well I can be stubborn... ;-)
Please see again
and
modules/core/classes/GalleryTranslator.class
I added a line under it and finally was able to open the gallery with turkish interface:The only thing is: I do not know if and where I need to set LC_CTYPE somewhere to get the
make tr.po
andmake install PO=tr
to work.Posts: 8601
you can set it in your environment before you run make, or you can add it to lib/tools/po/extract.php
Posts: 35
Still didn't work...
Nonethless I decided not to care about that anymore, updated my system to php5.2.4, finished working on the tr.po files and sent them to sourceforge
Posts: 8601
great, thanks!!