summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-01-21 18:00:34 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-01-21 18:00:34 +0000
commit51a98b6175e075a5af3c8ec32cbd24616ccc3712 (patch)
tree5741ca041ac2935e7f5a238faf2ccfd9c110b47b /perl-install/interactive.pm
parent44cfbf59d7bb2958e83d3988c9e3f82c8c6a58b3 (diff)
downloaddrakx-51a98b6175e075a5af3c8ec32cbd24616ccc3712.tar
drakx-51a98b6175e075a5af3c8ec32cbd24616ccc3712.tar.gz
drakx-51a98b6175e075a5af3c8ec32cbd24616ccc3712.tar.bz2
drakx-51a98b6175e075a5af3c8ec32cbd24616ccc3712.tar.xz
drakx-51a98b6175e075a5af3c8ec32cbd24616ccc3712.zip
(ask_from_treelist_): created, split with the separator, call translate on
words, then re-join.
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r--perl-install/interactive.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index ebb9da067..224f97451 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -138,6 +138,11 @@ sub ask_from_treelist {
my ($o, $title, $message, $separator, $l, $def) = @_;
ask_from_treelistf($o, $title, $message, $separator, undef, $l, $def);
}
+sub ask_from_treelist_ {
+ my ($o, $title, $message, $separator, $l, $def) = @_;
+ my $transl = sub { join '|', map { translate($_) } split(quotemeta($separator), $_[0]) };
+ ask_from_treelistf($o, $title, $message, $separator, $transl, $l, $def);
+}
sub ask_from_treelistf {
my ($o, $title, $message, $separator, $f, $l, $def) = @_;
ask_from_entries_refH($o, $title, $message, [ { val => \$def, separator => $separator, list => $l, format => $f } ]);