From 813b11ac3a8f9cb95605cd9f1d6a67ebe82eec14 Mon Sep 17 00:00:00 2001
From: Colin Kuskie
Date: Fri, 21 Apr 2006 21:50:01 +0000
Subject: [PATCH] attempting to keep up with Roy for i18n and template vars
---
.../Asset/Wobject/EventManagementSystem.pm | 14 +++----
.../English/Asset_EventManagementSystem.pm | 42 ++++++++++++++++++-
2 files changed, 48 insertions(+), 8 deletions(-)
diff --git a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm
index d6c419d00..a45f3218c 100644
--- a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm
+++ b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm
@@ -2735,7 +2735,7 @@ sub www_search {
$var{'addEvent.url'} = $self->getUrl('func=editEvent;pid=new');
$var{'addEvent.label'} = $i18n->get('add event');
$var{'managePrereqs'} = ($managePrereqs) ? 1 : 0;
- $var{'managePrereqsMessage'} = "Use the form below to add prerequisite assignments to ".$self->getEventName($eventToAssignPrereqTo).".";
+ $var{'managePrereqsMessage'} = sprintf $i18n->get('managePrereqsMessage'), $self->getEventName($eventToAssignPrereqTo);
$var{'prereqForm.header'} = WebGUI::Form::formHeader($self->session,{action=>$self->getUrl}).
WebGUI::Form::hidden($self->session,{name=>"eventToAssignPrereqTo", value=>$eventToAssignPrereqTo}).
WebGUI::Form::hidden($self->session,{name=>"func", value=>"savePrerequisites"});
@@ -2767,21 +2767,21 @@ sub www_search {
#Determine type of search results we're displaying
if ($subSearchFlag && !$managePrereqsFlag && ($numSearchResults <= $maxResultsForInitialDisplay || $paginationFlag || $hasSearchedFlag)) {
if ($self->canEdit) { #Admin manage sub events small resultset
- $message = "You may manage the events below. You can narrow the list of events displayed using the basic or advanced filter options above.";
+ $message = $i18n->get('Admin manage sub events small resultset');
} else { #User sub events small resultset
- $message = "You may also choose from the following sub-events. You can narrow the list of sub-events by using the basic or advanced filter options above.";
+ $message = $i18n->get("User sub events small resultset");
}
} elsif ($subSearchFlag && $numSearchResults > $maxResultsForInitialDisplay && !$managePrereqsFlag && !$paginationFlag) {
if ($self->canEdit) { #Admin manage sub events large resultset
- $message = "You may manage the events below. Due to the large number of sub-events available none are currently displayed, please narrow the results using the basic or advanced filter options above.";
+ $message = $i18n->get('Admin manage sub events large resultset');
} else { #User sub events large resultset
- $message = "You may also choose from the following sub-events. Due to the large number of sub-events available none are currently displayed, please narrow the results using the basic or advanced filter options above.";
+ $message = $i18n->get('User sub events large resultset');
}
} elsif ($managePrereqsFlag && ($numSearchResults <= $maxResultsForInitialDisplay || $paginationFlag || $hasSearchedFlag)) {
- $message = "You can narrow the list of prerequisites displayed using the basic or advanced filter options above.";
+ $message = $i18n->get('option to narrow');
} elsif ($managePrereqsFlag && $numSearchResults > $maxResultsForInitialDisplay && !$paginationFlag) {
- $message = "Due to the large number of prerequisites available none are currently displayed, please narrow the results using the basic or advanced filter options above."
+ $message = $i18n->get('forced narrowing');
}
$var{'message'} = $message;
diff --git a/lib/WebGUI/i18n/English/Asset_EventManagementSystem.pm b/lib/WebGUI/i18n/English/Asset_EventManagementSystem.pm
index 7a25c9b09..fc7216e48 100644
--- a/lib/WebGUI/i18n/English/Asset_EventManagementSystem.pm
+++ b/lib/WebGUI/i18n/English/Asset_EventManagementSystem.pm
@@ -840,8 +840,12 @@ The URL to this Asset.
The URL the EventManagementSystem area in the WebGUI Extras directory.
+message
+Messages from the system about the number and type of results being displayed.
+
+
|,
- lastUpdated => 1145465299,
+ lastUpdated => 1145655811,
},
@@ -1038,6 +1042,42 @@ allows you to edit events, delete events, or change their order.
context => q|Button in search form to limit displayed events based on user criteria|,
},
+ 'managePrereqsMessage' => {
+ message => q|Use the form below to add prerequisite assignments to %s.|,
+ lastUpdated => 1145653451,
+ context => q|Message for search form, that is passed to sprintf to fill in the name|,
+ },
+
+ 'Admin manage sub events small resultset' => {
+ message => q|You may manage the events below. You can narrow the list of events displayed using the basic or advanced filter options above.|,
+ lastUpdated => 1145653452,
+ },
+
+ 'User sub events small resultset' => {
+ message => q|You may also choose from the following sub-events. You can narrow the list of sub-events by using the basic or advanced filter options above.|,
+ lastUpdated => 1145653452,
+ },
+
+ 'Admin manage sub events large resultset' => {
+ message => q|You may manage the events below. Due to the large number of sub-events available none are currently displayed, please narrow the results using the basic or advanced filter options above.|,
+ lastUpdated => 1145653452,
+ },
+
+ 'User sub events large resultset' => {
+ message => q|You may also choose from the following sub-events. Due to the large number of sub-events available none are currently displayed, please narrow the results using the basic or advanced filter options above.|,
+ lastUpdated => 1145653452,
+ },
+
+ 'option to narrow' => {
+ message => q|You can narrow the list of prerequisites displayed using the basic or advanced filter options above.|,
+ lastUpdated => 1145653452,
+ },
+
+ 'forced narrowing' => {
+ message => q|Due to the large number of prerequisites available none are currently displayed, please narrow the results using the basic or advanced filter options above.|,
+ lastUpdated => 1145653452,
+ },
+
};
1;