qt-locale.patch

Jakub Bogusz qboosh w pld-linux.org
Wto, 13 Lip 2004, 22:26:09 CEST


On Tue, Jul 13, 2004 at 10:12:54PM +0200, Piotr Szymański wrote:
> Hi,
> Piotr Szymański (Tuesday 13 July 2004 22:07):
> > ***************************************************************************
> >** Tutaj tak samo, AFAIR w /etc/sysconfig/i18n sterujemy ustawieniem jezyka
> > za pomoca LANG a nie LC_ALL albo LC_MESSAGES ktore przeciez moga byc rozne?
> > Co zatem ma decydowac?
> Hmm juz iwem oc stalo za druga czescia tego, znaczy za tym z LC_MESSGAES, 
> chodzi o toze jesli lang=pl_PL to tlumaczenia nie znajdzie bo tlumaczenia sa 
> w /usr/share/locale/pl. Z drugiej strony do tej pory i tak nie dzialalo w 
> takim razie.
> 
> Czy to jest poprawne ze LC_MESSAGES=pl_PL przy LANG=pl_PL?

I to też jest w qt skopane?!
Jeśli w _efektywnym_ LC_MESSAGES (czyli pochodzącym z $LC_ALL,
$LC_MESSAGES, $LANG) jest ustawione "pl_PL", to ma szukać pliku
w katalogu /usr/share/locale/pl_PL/LC_MESSAGES, a jeśli go nie ma - to
w /usr/share/locale/locale/pl/LC_MESSAGES.
W przypadku niegettextowych programów katalog może być inny, ale
algorytm skracania taki sam (żeby działało zarówno pl_PL, jak
i pl_PL.ISO-8859-2, pl_PL.iso88592, pl_PL.UTF-8).

info libc -> "Using gettextized software":

   The `gettext' functions know about situations like this and can
handle them gracefully.  The functions recognize the format of the value
of the environment variable.  It can split the value is different pieces
and by leaving out the only or the other part it can construct new
values.  This happens of course in a predictable way.  To understand
this one must know the format of the environment variable value.  There
is one more or less standardized form, originally from the X/Open
specification:

   `language[_territory[.codeset]][@modifier]'

   Less specific locale names will be stripped of in the order of the
following list:

  1. `codeset'

  2. `normalized codeset'

  3. `territory'

  4. `modifier'

   The `language' field will never be dropped for obvious reasons.
[...]


-- 
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/




Więcej informacji o liście dyskusyjnej pld-devel-pl