Bug 4784 - get rid of ctccommon.GettextLocale
Summary: get rid of ctccommon.GettextLocale
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Other (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.1.1
Assignee: Pierre Ossman
URL:
Keywords: astrand_tester, prosaic
Depends on:
Blocks:
 
Reported: 2013-08-27 15:47 CEST by Pierre Ossman
Modified: 2013-10-24 11:05 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2013-08-27 15:47:56 CEST
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 Pierre Ossman cendio 2013-09-06 14:10:06 CEST
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 Peter Åstrand cendio 2013-10-15 09:08:54 CEST
(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.

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