diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-07-09 18:24:08 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-07-09 18:24:08 +0000 |
commit | 587a134c46dff887ebe745a29059c9f3f0cd63c2 (patch) | |
tree | 0d7746205ae69a8d6b46353de16a4b9156eb310d | |
parent | 3cd86c98e3a7fcc3da8993a2d4e887037e7252d2 (diff) | |
download | userdrake-587a134c46dff887ebe745a29059c9f3f0cd63c2.tar userdrake-587a134c46dff887ebe745a29059c9f3f0cd63c2.tar.gz userdrake-587a134c46dff887ebe745a29059c9f3f0cd63c2.tar.bz2 userdrake-587a134c46dff887ebe745a29059c9f3f0cd63c2.tar.xz userdrake-587a134c46dff887ebe745a29059c9f3f0cd63c2.zip |
stop reinventing the wheel by duplicating it and reuse existent
infrastructure
-rwxr-xr-x | userdrake | 19 |
1 files changed, 2 insertions, 17 deletions
@@ -26,6 +26,8 @@ use standalone; use common; use any; +# i18n: IMPORTANT: to get correct namespace (userdrake instead of libDrakX) +BEGIN { unshift @::textdomains, 'userdrake' } use ugtk2 qw(:all); use interactive; use POSIX qw(mktime ceil); @@ -36,23 +38,6 @@ my $conffile = '/etc/sysconfig/userdrake'; my $secfile = '/etc/sysconfig/msec'; my $pixdir = '/usr/share/userdrake/pixmaps/'; -c::bind_textdomain_codeset('userdrake', 'UTF8'); -sub translate { - my ($s) = @_; - my $r = $s ? c::dgettext('userdrake', $s) : ''; - c::set_tagged_utf8($r); - $r; -} -sub sprintf_fixutf8 { - my $need_upgrade; - $need_upgrade |= to_bool(c::is_tagged_utf8($_)) + 1 foreach @_; - if ($need_upgrade == 3) { c::upgrade_utf8($_) foreach @_ }; - sprintf shift, @_; -} -sub N { - my $s = shift @_; my $t = translate($s); - sprintf_fixutf8 $t, @_; -} my $in = interactive->vnew('su'); |