[dev] Localization issue

Etienne Goyer etienne.goyer at linuxquebec.com
Thu May 13 07:33:41 PDT 2004


Follow up on the issue :

My bad that I did not notice earlier that no custom translation work. 
This is due to a bug in horde/po/translation.php, where it assume that 
the folder where the app reside (in my case, IMP live in "horde/mail") 
_is_ the app name, thus build a .mo that is named wrong (ie in my case 
it is called mail.mo, when it need to be called imp.mo).

I entered a bug in the bug tracking system as ID 177.  I would have put 
up a patch, but I can't figure out how to extract the app name from the 
app path.  I can work around it at the moment, but I think it is worth 
fixing as I am probably not the only one who rename application folder 
and rebuild localisation.



Etienne Goyer wrote:
> Jan Schneider wrote:
> 
>> Zitat von Etienne Goyer <etienne.goyer at linuxquebec.com>:
>>
>>> Content-Type: text/plain; charset=us-ascii; format=flowed
>>> Content-Transfer-Encoding: 7bit
>>>
>>> Jan Schneider wrote:
>>>
>>>> Zitat von Etienne Goyer <etienne.goyer at linuxquebec.com>:
>>>>
>>>>> Hi,
>>>>>
>>>>> I have a localization issue that I don't understand.  A little
>>>>> clarification would be welcomed.  I am using horde-3.0-ALPHA and
>>>>> IMP-4.0-ALPHA.
>>>>>
>>>>> I have Horde configured to authenticate against IMP, as in :
>>>>>
>>>>>      $conf['auth']['driver'] = 'application';
>>>>>      $conf['auth']['params']['app'] = 'imp';
>>>>>
>>>>>
>>>>> On the login page (which is horde/imp/login.php), localization appear
>>>>> correctly except for some string.  I found out these string are coming
>>>>> from Horde (not IMP) object, ie the service name (as in "Welcome to
>>>>> <service name>"), the content of horde/config/motd.php, the logout
>>>>> reason, ect.  Even I put these string in the appropriate IMP po and
>>>>> rebuild the locale, it still does not appear.
>>>>
>>>>
>>>>
>>>>
>>>> This page is shown in whatever language you set as the preferred in 
>>>> your
>>>> browser setup.
>>>
>>>
>>>
>>> I know that already.  It is being shown in French.  The problem is that
>>> some element are not localized properly, so the login page is
>>> half-french, half-english.  It happen that the elements not localized
>>> properly seem to all come from Horde, where string coming from IMP _are_
>>> localized properly.  Stuff that does not display in the correct locale :
>>>
>>> - Service name, as in "Welcome to <service name>" (it is being retrieved
>>>   via $registry->getParam('name', ...) in horde/imp/login.php).
>>>
>>> - Content of horde/imp/config/motd.php
>>>
>>> - Logout reason, as provided by $auth->getLogoutReason()
>>
>>
>>
>> Neither "Welcome to" nor motd.php come from Horde.
> 
> 
> Ok, but what could cause the logout reason not to be localized ?
> 
> Regarding horde/imp/config/motd.php, the string being displayed should 
> be localized, ie _("message"), and is in horde/po/fr_FR.po _and_ 
> horde/imp/po/fr_FR.po.  Locale have been rebuilt with 
> "horde/po/translation.php make -m [horde|imp] -l fr_FR" and Apache have 
> been restart.  No luck yet.
> 
> Same for the service name in "Welcome to <service name>".
> 
> I don't expect to be spoonfed a solution, but a pointer toward what 
> might be wrong or knowing if other people are experiencing a similar 
> problem would be helpful.  If you don't think you can help, please don't 
> bother.
> 
> 
> ------------------------------------------------------------------------
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.horde.org/archives/dev/attachments/20040513/adeb0ec2/signature.bin


More information about the dev mailing list