summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Siegel <siegel@linux-mandrake.com>2001-08-31 14:07:32 +0000
committerStefan Siegel <siegel@linux-mandrake.com>2001-08-31 14:07:32 +0000
commitd2709af2a86edae7a984827b5bdf12c9afe48f2b (patch)
tree6d1343ba2edca47ae1a709f8967748fab35074f3
parentc0186d69c653867f391b48329845cc7492fc4b6d (diff)
downloadmgaonline-d2709af2a86edae7a984827b5bdf12c9afe48f2b.tar
mgaonline-d2709af2a86edae7a984827b5bdf12c9afe48f2b.tar.gz
mgaonline-d2709af2a86edae7a984827b5bdf12c9afe48f2b.tar.bz2
mgaonline-d2709af2a86edae7a984827b5bdf12c9afe48f2b.tar.xz
mgaonline-d2709af2a86edae7a984827b5bdf12c9afe48f2b.zip
fixed UTF-8 -> ISO-8859-X conversion
-rwxr-xr-xmdkonline33
1 files changed, 20 insertions, 13 deletions
diff --git a/mdkonline b/mdkonline
index b149f184..eddb4468 100755
--- a/mdkonline
+++ b/mdkonline
@@ -20,26 +20,33 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
################################################################################
-use Config;
use POSIX;
-use Locale::GetText;
-#use strict;
-
-setlocale (LC_ALL, "");
-
-Locale::GetText::textdomain ("MdkOnline");
-
-import Locale::GetText I_;
+use Gtk;
use lib qw(/usr/lib/libDrakX);
use interactive;
+use Config;
+init Gtk;
+Gtk->set_locale;
+#use strict;
+use MDK::Common;
my $in = 'interactive'->vnew('su', 'default');
+#-------------------------------------------------------------
+# i18n routines
+# IMPORTANT: next two routines have to be redefined here to
+# get correct namespace (drakconf instead of libDrakX)
+# (This version is now UTF8 compliant - Sg 2001-08-31)
+#-------------------------------------------------------------
+
sub _ {
- my $s = shift @_; my $t = I_($s);
- $t && ref $t or return sprintf $t, @_;
- my ($T, @p) = @$t;
- sprintf $T, @_[@p];
+ my $s = shift @_; my $t = translate($s);
+ sprintf $t, @_;
+}
+
+sub translate {
+ my ($s) = @_;
+ $s ? c::dgettext('mdkonline', $s) : '';
}
my $authentication_host = "bi";