summaryrefslogtreecommitdiffstats
path: root/perl-install/lang.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-08-09 07:06:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-08-09 07:06:19 +0000
commit7db5765e222c6d84bfe33dd7258c8ffe61d4be12 (patch)
tree2931ec6f2bb94eb83d7994e47f958576e083e451 /perl-install/lang.pm
parent341632802a32dbc7924a82035ae34a1b73e58b37 (diff)
downloaddrakx-7db5765e222c6d84bfe33dd7258c8ffe61d4be12.tar
drakx-7db5765e222c6d84bfe33dd7258c8ffe61d4be12.tar.gz
drakx-7db5765e222c6d84bfe33dd7258c8ffe61d4be12.tar.bz2
drakx-7db5765e222c6d84bfe33dd7258c8ffe61d4be12.tar.xz
drakx-7db5765e222c6d84bfe33dd7258c8ffe61d4be12.zip
create lang::write_and_install() which takes a $do_pkgs
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r--perl-install/lang.pm28
1 files changed, 11 insertions, 17 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 18de34037..bc6d77d76 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -1007,6 +1007,17 @@ sub i18n_env {
$h;
}
+sub write_and_install {
+ my ($locale, $do_pkgs, $b_user_only, $b_dont_touch_kde_files) = @_;
+
+ my @packages = IM2packages($locale);
+ if (@packages && !$b_user_only) {
+ log::explanations("Installing IM packages: ", join(', ', @packages));
+ $do_pkgs->install(@packages);
+ }
+ &write($locale, $b_user_only, $b_dont_touch_kde_files);
+}
+
sub write {
my ($locale, $b_user_only, $b_dont_touch_kde_files) = @_;
@@ -1062,23 +1073,6 @@ sub write {
$h->{XIM_PROGRAM}{$locale->{lang}} ||
$h->{XIM_PROGRAM}{getlocale_for_country($locale->{lang}, $locale->{country})};
}
-
- my @packages = IM2packages($locale);
- if (@packages && $b_user_only) {
- require interactive;
- interactive->vnew->ask_warn(N("Warning"),
- N("You should install the following packages: %s",
- join(
- #-PO: the following is used to combine packages names. eg: "initscripts, harddrake, yudit"
- N(", "),
- @packages,
- ),
- )
- );
- } elsif (@packages) {
- log::explanations("Installing IM packages: ", join(', ', @packages));
- do_pkgs_standalone->new->install(@packages);
- }
}
#- deactivate translations on console for most CJK, RTL and complex languages