From c0adc273aa2329ed3f6ab9e259802f29e72eca84 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 9 Feb 2009 18:16:26 -0800 Subject: [PATCH] Label for regular expression errors on rule save. --- lib/WebGUI/PassiveAnalytics/Flow.pm | 2 ++ lib/WebGUI/i18n/English/PassiveAnalytics.pm | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/lib/WebGUI/PassiveAnalytics/Flow.pm b/lib/WebGUI/PassiveAnalytics/Flow.pm index 291233ca7..622cb8c68 100644 --- a/lib/WebGUI/PassiveAnalytics/Flow.pm +++ b/lib/WebGUI/PassiveAnalytics/Flow.pm @@ -230,6 +230,8 @@ sub www_editRuleSave { $session->log->warn("Error: $@"); my $error = $@; $error =~ s/at \S+?\.pm line \d+.*$//; + my $i18n = WebGUI::International->new($session, 'PassiveAnalytics'); + $error = join ' ', $i18n->get('Regular Expression Error:'), $error; return www_editRule($session, $error); } my $ruleId = $form->get('ruleId'); diff --git a/lib/WebGUI/i18n/English/PassiveAnalytics.pm b/lib/WebGUI/i18n/English/PassiveAnalytics.pm index 98a99bc41..01747ca57 100644 --- a/lib/WebGUI/i18n/English/PassiveAnalytics.pm +++ b/lib/WebGUI/i18n/English/PassiveAnalytics.pm @@ -123,6 +123,12 @@ home\?func=match, or
context => q|Button label to begin analyzing the logs.| }, + 'Regular Expression Error:' => { + message => q|Regular Expression Error:|, + lastUpdated => 0, + context => q|Error displayed when a user enters in a bad regular expression. This label will be followed by the error from perl.| + }, + }; 1;