summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmenus.pm36
1 files changed, 23 insertions, 13 deletions
diff --git a/menus.pm b/menus.pm
index b2fbe8c4..bb76b41f 100755
--- a/menus.pm
+++ b/menus.pm
@@ -1,18 +1,28 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -w
+use POSIX;
use Gtk;
+use lib qw(/usr/lib/libDrakX);
+use interactive;
+use standalone;
init Gtk;
-use POSIX;
-use Locale::GetText;
+use strict;
+
+#-------------------------------------------------------------
+# 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-18)
+#-------------------------------------------------------------
-setlocale (LC_ALL, "");
-Locale::GetText::textdomain ("DrakConf");
-import Locale::GetText I_;
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('drakconf', $s) : '';
}
my $_bindir = "/usr/bin/";
@@ -55,13 +65,13 @@ $vbox->pack_start(new Gtk::HSeparator,0,0,5);
my $bbox = new Gtk::HButtonBox;
$vbox->pack_start($bbox,0,0,5);
$bbox->set_layout(-end);
-my $button_ok = new Gtk::Button _("OK");
-$button_ok->signal_connect ( clicked => sub { $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0); });
+my $button_ok = new Gtk::Button _("Done");
+$button_ok->signal_connect ( clicked => sub { $::isEmbedded ? kill('USR1', $::CCPID) : Gtk->exit(0); });
$button_ok->can_default(1);
$bbox->add($button_ok);
$window->show_all;
Gtk->main_iteration while Gtk->events_pending;
-$::isEmbedded and kill USR2, $::CCPID;
+$::isEmbedded and kill 'USR2', $::CCPID;
Gtk->main;