summaryrefslogtreecommitdiffstats
path: root/perl-install/install/pkgs.pm
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/pkgs.pm
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/pkgs.pm')
-rw-r--r--perl-install/install/pkgs.pm17
1 files changed, 17 insertions, 0 deletions
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};