diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-12-10 01:47:46 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-12-10 01:47:46 +0000 |
commit | 46cac51c37cbf83afd59af00030b7397bcc39d8e (patch) | |
tree | a2256ce9329c858fe9f73c5139237706605e0984 /perl-install/Xconfig | |
parent | 3567c50a33be996d7a3f4fd6c622622105d55a51 (diff) | |
download | drakx-46cac51c37cbf83afd59af00030b7397bcc39d8e.tar drakx-46cac51c37cbf83afd59af00030b7397bcc39d8e.tar.gz drakx-46cac51c37cbf83afd59af00030b7397bcc39d8e.tar.bz2 drakx-46cac51c37cbf83afd59af00030b7397bcc39d8e.tar.xz drakx-46cac51c37cbf83afd59af00030b7397bcc39d8e.zip |
do not duplicate "An error occurred ..." t10n string
Diffstat (limited to 'perl-install/Xconfig')
-rw-r--r-- | perl-install/Xconfig/test.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/perl-install/Xconfig/test.pm b/perl-install/Xconfig/test.pm index 4fafaafa8..154b4886f 100644 --- a/perl-install/Xconfig/test.pm +++ b/perl-install/Xconfig/test.pm @@ -65,6 +65,11 @@ sub test { my $_b = before_leaving { unlink $f_err }; + my $warn_error = sub { + my ($error_msg) = @_; + $in->ask_warn('', [ N("An error occurred:\n%s\nTry to change some parameters", $error_msg) ]); + }; + if (!xtest(":9")) { open(my $F, $f_err); @@ -76,8 +81,7 @@ sub test { local $_; while (<$F>) { /reporting a problem/ and last; - push @msg, $_; - $in->ask_warn('', [ N("An error occurred:"), " ", @msg, N("\ntry to change some parameters") ]); + $warn_error->(join(@msg, $_)); return 0; } } @@ -90,7 +94,7 @@ sub test { /^$/ and last; push @msg, $_; } - $in->ask_warn('', [ N("An error occurred:"), " ", @msg, N("\ntry to change some parameters") ]); + $warn_error->(join(@msg)); return 0; } } @@ -139,7 +143,7 @@ sub test { my $rc = close $F; my $err = $?; - $rc || $err == 222 << 8 or $in->ask_warn('', N("An error occurred, try to change some parameters")); + $rc || $err == 222 << 8 or $warn_error->(''); unlink "$::prefix/$f", "$::prefix/$f-4"; unlink "/tmp/.X11-unix/X9" if $::prefix; |