www.cendio.com
Bug 4784 - get rid of ctccommon.GettextLocale
: get rid of ctccommon.GettextLocale
Status: CLOSED FIXED
: ThinLinc
Other
: trunk
: PC Unknown
: P2 Normal
: 4.1.1
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2013-08-27 15:47 by
Modified: 2013-10-24 11:05 (History)
Acceptance Criteria:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From cendio 2013-08-27 15:47:56
We have the magical class ctccommon.GettextLocale which sole purpose is to make
sure we get translations in the current locale's character encoding (normal
gettext returns whatever is specified in the .mo/.po).

Python 2.4+ however already has a function for this though, called lgettext().
We should switch over to using that.
------- Comment #1 From cendio 2013-09-06 14:10:06 -------
Fixed in r27840.

The following scripts were changed:

    tlmisc/scripts/tl-sso-update-password
    tlmisc/scripts/tl-nds-check-expired
    tlmisc/scripts/tl-passwd
    tlmisc/profiles/tl-select-profile
    vnc/tl-shadow-notify-helper

Note that all scripts were using it incorrectly and in fact should have been
requesting UTF-8 everywhere. New code therefore uses plain ol' gettext().

Tester should verify that all scripts are still translated. Preferably also
with a non-UTF8 locale like sv_SE or ru_RU.
------- Comment #2 From cendio 2013-10-15 09:08:54 -------
(In reply to comment #1)
> Fixed in r27840.
> 
> The following scripts were changed:
> 
>     tlmisc/scripts/tl-sso-update-password
>     tlmisc/scripts/tl-nds-check-expired
>     tlmisc/scripts/tl-passwd
>     tlmisc/profiles/tl-select-profile
>     vnc/tl-shadow-notify-helper

Tested with latin1 locale "sv_SE". Tested all scripts except
tl-nds-check-expired, but it uses the same principle as the others, and did
code inspection.