summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-21 17:12:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-21 17:12:04 +0000
commit616c8655d15435fcbfd85111da8a390bf6c46d15 (patch)
tree6a75f4c9bc40053e659128079f5e879070378270 /perl-install/install
parent9c87798ef0c93e820802b0da58c708f7025add45 (diff)
downloaddrakx-616c8655d15435fcbfd85111da8a390bf6c46d15.tar
drakx-616c8655d15435fcbfd85111da8a390bf6c46d15.tar.gz
drakx-616c8655d15435fcbfd85111da8a390bf6c46d15.tar.bz2
drakx-616c8655d15435fcbfd85111da8a390bf6c46d15.tar.xz
drakx-616c8655d15435fcbfd85111da8a390bf6c46d15.zip
- translate the pkg summary when mdv-rpm-summary info is available
(for the "Details" mode when installing packages) - ensure mdv-rpm-summary is installed first (if selected)
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/NEWS4
-rw-r--r--perl-install/install/pkgs.pm17
-rw-r--r--perl-install/install/steps_gtk.pm2
3 files changed, 22 insertions, 1 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index a8f8cd414..0e54a5cb5 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,7 @@
+- translate the pkg summary when mdv-rpm-summary info is available
+ (for the "Details" mode when installing packages)
+- ensure mdv-rpm-summary is installed first (if selected)
+
Version 10.4.207 - 21 September 2007, by Thierry Vignaud
- localization:
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index 70769dfaa..33b33a1c0 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -688,6 +688,11 @@ sub installTransactionClosure {
}
}
+ if (my $p = packageByName($packages, 'mdv-rpm-summary')) {
+ #- if it is selected, make it the first package
+ exists $id2pkg->{$p->id} and unshift @l, $p->id;
+ }
+
my %closure;
foreach my $id (@l) {
my @l2 = $id;
@@ -783,6 +788,9 @@ sub install {
@transToInstall = grep {
if ($_->flag_installed || !packageMedium($packages, $_)->{selected}) {
+ if ($_->name eq 'mdv-rpm-summary' && $_->flag_installed) {
+ install::pkgs::setup_rpm_summary_translations();
+ }
$_->free_header;
0;
} else {
@@ -1033,6 +1041,15 @@ sub remove {
}
}
+sub setup_rpm_summary_translations {
+ my @domains = qw(rpm-summary-contrib rpm-summary-devel rpm-summary-main);
+ push @::textdomains, @domains;
+ foreach (@domains) {
+ Locale::gettext::bind_textdomain_codeset($_, 'UTF-8');
+ Locale::gettext::bindtextdomain($_, "$::prefix/usr/share/locale");
+ }
+}
+
sub selected_leaves {
my ($packages) = @_;
my $provides = $packages->{provides};
diff --git a/perl-install/install/steps_gtk.pm b/perl-install/install/steps_gtk.pm
index dd3a96d8d..f0cea7f74 100644
--- a/perl-install/install/steps_gtk.pm
+++ b/perl-install/install/steps_gtk.pm
@@ -544,7 +544,7 @@ sub installPackages {
} elsif ($type eq 'open') {
gtkval_modify(\$pkg_progress, 0);
my $p = $packages->{depslist}[$id];
- mygtk2::gtkadd($pkg_log_widget, text => sprintf("\n%s: %s", $p->name, (split /\n/, $p->summary)[0] || ''));
+ mygtk2::gtkadd($pkg_log_widget, text => sprintf("\n%s: %s", $p->name, translate($p->summary)));
$current_total_size += $last_size;
$last_size = $p->size;
$advertize->(1) if $show_advertising && $total_size > 20_000_000 && time() - $change_time > 20;