From cddda6e73c8e813016abd6eae413c99d4eafaaf0 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 26 Mar 2009 10:20:58 +0000 Subject: extract message so that the code is clearer --- gurpmi.addmedia | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gurpmi.addmedia b/gurpmi.addmedia index faebe3d2..f2f3faef 100755 --- a/gurpmi.addmedia +++ b/gurpmi.addmedia @@ -144,12 +144,11 @@ foreach (@addmedia_args) { ); } if ($success) { - interactive_msg( - 'gurpmi.addmedia', - @names > 1 + my $message = + @names > 1 ? N("Successfully added media %s.", join ", ", @names) - : N("Successfully added medium `%s'.", $names[0]) - ) if !$silent_success; + : N("Successfully added medium `%s'.", $names[0]); + interactive_msg('gurpmi.addmedia', $message) if !$silent_success; myexit(0); } else { myexit(-1); -- cgit v1.2.1