From ebbec40725eb566c91ca183f7677cc6526215a61 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sun, 21 Dec 2003 17:46:26 +0000 Subject: let a step name be a callback in order to be able to generate dynamic messages (in the past gettext was called at step time, but now it's called at wizard data structure compile time) --- perl-install/wizards.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/wizards.pm b/perl-install/wizards.pm index a9dd3b19c..9fefb5011 100644 --- a/perl-install/wizards.pm +++ b/perl-install/wizards.pm @@ -121,7 +121,8 @@ sub process { push @$data2, $d } } - my $a = $in->ask_from($o->{name}, $page->{name}, $data2, complete => $page->{complete} || sub { 0 }); + my $name = ref($page->{name}) ? $page->{name}->() : $page->{name}; + my $a = $in->ask_from($o->{name}, $name, $data2, complete => $page->{complete} || sub { 0 }); if ($a) { # step forward: push @steps, $next if !$page->{ignore} && $steps[-1] ne $next; -- cgit v1.2.1