attempting to keep up with Roy for i18n and template vars

This commit is contained in:
Colin Kuskie 2006-04-21 21:50:01 +00:00
parent ef15ac0067
commit 813b11ac3a
2 changed files with 48 additions and 8 deletions

View file

@ -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;

View file

@ -840,8 +840,12 @@ The URL to this Asset.
The URL the EventManagementSystem area in the WebGUI Extras directory.
</p>
<p><b>message</b><br />
Messages from the system about the number and type of results being displayed.
</p>
|,
lastUpdated => 1145465299,
lastUpdated => 1145655811,
},
@ -1038,6 +1042,42 @@ allows you to edit events, delete events, or change their order.</p>
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;