[i18n] translation.php error
Miroslav Pendev
miro@cybershade.us
Tue Nov 12 21:25:38 2002
> > # ./translation.php -d extract
> >
> > Loading libraries...
> > Console_Getopt... OK
> > ...
> >
> > gettext version: 0.11.5 OK
> > PHP support in xgettext: No, trying C++ instead
> >
> > ...
> >
> > Found applications: horde, gollem, imp, kronolith, mnemo, nag, passwd,
> > turba, vacation, whups
> >
> > Error: Unknown command: ./translation.php
>
> I _thought_ I had fixed this finally. Can you confirm that you really have
> the latest version. If so, please put a var_dump($args); after the '$args ='
> and the 'array_shift($args)' lines (around line 1000) and tell me the output.
>
The version is:
$Horde: horde/po/translation.php,v 1.22 2002/11/11 16:31:57 jan Exp $
This (at row ~998):
===================
/* Commandline parameters */
$args = Console_Getopt::readPHPArgv();
var_dump($args);
returns:
========
Console_Getopt... OK
array(3) {
[0]=>
string(17) "./translation.php"
[1]=>
string(2) "-d"
[2]=>
string(7) "extract"
}
The following didn't return anything (at row ~1000):
...
if (PEAR::isError($options) && $args[0] == $_SERVER['PHP_SELF']) {
array_shift($args);
var_dump($args);
I got some more info by putting var_dump at row ~1062:
....
'update' => array('hl:m:c:n', array('module=.........
'update-help'=> array('hl:m:', array('module=', 'locale='))
);
$options_arr = $options[1];
var_dump($options_arr);
$options_arr:
=============
array(2) {
[0]=> string(17) "./translation.php"
[1]=> string(7) "extract"
}
and few rows later ~1065:
...
$cmd = array_shift($options_arr);
var_dump($cmd);
$cmd:
=====
string(17) "./translation.php"
It seems to me that array_shift($options_arr); is returning
the first element to $cmd instead of the second.
I tested with:
$options_arr = $options[1];
$first_arg = array_shift($options_arr);
$cmd = array_shift($options_arr);
...and it worked...! Although is not a nice solution.
You have the final word :-) how to fix this....
I am going to *HEAD refresh* the Bulgarian translations
in the next few hours :-)
Miro
P.S. Jan, sory for sending the same msg to your email, too... :-)
More information about the i18n
mailing list