[i18n] Converting the Czech translation from ISO 8859-2 to UTF-8
Jan Schneider
jan at horde.org
Fri Jan 16 14:54:15 UTC 2015
Zitat von Jan Schneider <jan at horde.org>:
> Zitat von Michael Grafnetter <grafnetter at dekanat.mff.cuni.cz>:
>
>> Dne 15.1.2015 11:37, Jan Schneider napsal(a):
>>>
>>> Zitat von Michael Grafnetter <grafnetter at dekanat.mff.cuni.cz>:
>>>
>>>>> Citat af Jan Schneider <jan at horde.org>:
>>>>> Sorry, I still don't follow.
>>>>
>>>> Sorry, my mistake, the problem does not lie in the input encoding, but
>>>> in the output encoding. Let me give you an example from the czech
>>>> nag.po file:
>>>>
>>>> msgid "_List Tasks"
>>>> msgstr "_Seznam úkolů"
>>>>
>>>> This works correctly, the letter S gets underlined in Horde and works
>>>> as an access key, ALT+S. The problem occurs, if you try to do
>>>> something like this:
>>>>
>>>> msgid "_List Tasks"
>>>> msgstr "Seznam _úkolů"
>>>>
>>>> Horde displays this string AS IS, "Seznam _úkolů", instead of
>>>> underlining the letter ú. And the shortcut ALT+U does not work. This
>>>> means that characters with diacritical marks cannot be used as access
>>>> keys.
>>>>
>>>> (I am aware that this is not the best example, because in this
>>>> particular case letter S gives more sense as an access key.)
>>>>
>>>> File /horde/config/nls.php contains this code snippet:
>>>>
>>>> 'charsets' => array(
>>>> ...
>>>> 'cs_CZ' => 'ISO-8859-2',
>>>> ...),
>>>>
>>>> If you changed it to
>>>>
>>>> 'cs_CZ' => 'UTF-8',
>>>>
>>>> then the PO file could contain this:
>>>>
>>>> msgid "_List Tasks"
>>>> msgstr "Seznam _uúkolů"
>>>>
>>>> Horde would render the string as "Seznam úkolů (U)" and ALT+U would
>>>> work as access key.
>>>
>>> I see now where you are coming from. OTOH this is a much uglier and
>>> space consuming access key markup that was originally intended for
>>> languages without any latin characters whatsoever.
>>>
>>
>> I cannot argue with that, it really is uglier. But is there any
>> better way to handle this? Unfortunately, the Czech language has
>> many words that start with letters with diacritical marks.
>>
>> And I still prefer the UTF-8 encoding, so my current configuration
>> in nls.local.php contains these lines:
>>
>> // Change the encoding from ISO-8859-2 to UTF-8
>> $horde_nls_config['charsets']['cs_CZ'] = 'UTF-8';
>>
>> // Do not treat UTF-8 as multibyte charset
>> unset($horde_nls_config['multibyte']['UTF-8']);
>>
>> I did not find a way to bind the "multibyteness" to a locale
>> instead of charset.
>>
>>
>> --
>> i18n mailing list
>> Frequently Asked Questions: http://wiki.horde.org/FAQ
>> To unsubscribe, mail: i18n-unsubscribe at lists.horde.org
>
> We could solve this by transliterating the access key to ASCII
> before further processing. We already have the tools for that.
> Unfortunately, translations cannot define dependency versions, so we
> should probably wait for Horde 6 until we officially allow this.
>
> --
> Jan Schneider
> The Horde Project
> http://www.horde.org/
> https://www.facebook.com/hordeproject
>
> --
> i18n mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: i18n-unsubscribe at lists.horde.org
This has been implemented in Horde_Core 2.19, but like I said, it
cannot be used in official translations before Horde 6 (master branch).
--
Jan Schneider
The Horde Project
http://www.horde.org/
https://www.facebook.com/hordeproject
More information about the i18n
mailing list