[dev] Another translation problem

Jan Kuipers jrkuipers@lauwerscollege.nl
Mon, 28 May 2001 14:55:49 +0200


Citeren Jan Kuipers <jrkuipers@lauwerscollege.nl>:

> Aanhalen Chuck Hagenbuch <chuck@horde.org>:
> 
> > What do you mean by copy a string to the top of the file? Sorry if I'm
> > being 
> > slow... still on the first cup of coffee.
> 
> P.e.
> in sourceselect.inc
> -----<snip>----
> </script>
> 
> <?= _("Choose the order of addressbooks to search when expanding addresses.")
> ?><br />
> <input type="hidden" name="search_sources" value="<?= implode("\t",
> $selected) ?>" />
> <table>
> -----<snip>-----
> 
> The gettextstring is not translated here. But when you copy it to the
> beginning of the code,
> then it is translated ok. P.e.
> 
> <?php // $Horde: imp/templates/prefs/sourceselect.inc,v 1.1 2001/05/20
> 06:31:46 max Exp $ ?>
> <?= _("Choose the order of addressbooks to search when expanding addresses.")
> ?>
> ----<snip>-----

I narrowed this problem to this:

<?php
if ($registry->hasMethod('contacts/sources')) {
    $selected = explode("\t", $prefs->getValue('search_sources'));
    echo _("None"); 
    $readable = $registry->call('contacts/sources');
    $writeable = $registry->call('contacts/sources', true);

"None" is translated here.

<?php
if ($registry->hasMethod('contacts/sources')) {
    $selected = explode("\t", $prefs->getValue('search_sources'));
    $readable = $registry->call('contacts/sources');
    echo _("None");
    $writeable = $registry->call('contacts/sources', true);

"None" is NOT translated here.

Any ideas ??

Additional, when using the expand names function in compose the translation is (partly) dropped after clicking on "Expand Names".

-- 
Jan Kuipers,
Systeembeheer Lauwers College