summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2003-02-17 12:14:51 +0000
committerPablo Saratxaga <pablo@mandriva.com>2003-02-17 12:14:51 +0000
commit9a694f490df12a60a4c0b2d9775009ca66dc1ee0 (patch)
treeff7a2d7b3ca3a4e42a9ef6c7903dbe8593fc253b
parentca0be443e7e4002979c08e48c1d2b52df68fc560 (diff)
downloaddrakx-backup-do-not-use-9a694f490df12a60a4c0b2d9775009ca66dc1ee0.tar
drakx-backup-do-not-use-9a694f490df12a60a4c0b2d9775009ca66dc1ee0.tar.gz
drakx-backup-do-not-use-9a694f490df12a60a4c0b2d9775009ca66dc1ee0.tar.bz2
drakx-backup-do-not-use-9a694f490df12a60a4c0b2d9775009ca66dc1ee0.tar.xz
drakx-backup-do-not-use-9a694f490df12a60a4c0b2d9775009ca66dc1ee0.zip
correction for non-latin1 locales,
made strings "Unknown" and "unknown" translatable in device info
-rwxr-xr-xperl-install/standalone/harddrake28
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2
index c32b4d4e6..b65c40fa0 100755
--- a/perl-install/standalone/harddrake2
+++ b/perl-install/standalone/harddrake2
@@ -6,9 +6,13 @@ use lib qw(/usr/lib/libDrakX);
use standalone;
use common;
-require harddrake::data;
use ugtk2 qw(:create :helpers :wrappers);
use interactive;
+#- needed for proper execution for non-8bits locales
+ugtk2::prepare_gtk2();
+#- this must come *after* gtk2 and gettext initialization, as it uses some
+#- translatable strings
+require harddrake::data;
# { field => [ short_translation, full_description] }
@@ -188,7 +192,7 @@ my $selection = gtksignal_connect($tree->get_selection(), 'changed' => sub {
# it must come *after* the space, as the space must follow
# the colon following the direction of writting.
if_($fields{$_}[0], [ $fields{$_}[0] . ": \x{200e}", { 'foreground' => 'royalblue3', 'weight' => Gtk2::Pango->WEIGHT_BOLD } ],
- [ "$current_device->{$_}\n\n", { 'foreground' => ($_ eq 'driver' && $current_device->{$_} =~ /^(unknown|Bad:)/ ? 'indian red' : 'black') } ])
+ [ ($_ && $current_device->{$_} =~ /^(unknown)/ ? N("unknown") : $_ && $current_device->{$_} =~ /^(Unknown)/ ? N("Unknown") : "$current_device->{$_}") . "\n\n", { 'foreground' => ($_ eq 'driver' && $current_device->{$_} =~ /^(unknown|Bad:)/ ? 'indian red' : 'black') } ])
} sort keys %$current_device ]);
foreach (keys %$current_device) {