--- loncom/interface/lonsearchcat.pm 2003/09/22 00:48:32 1.186 +++ loncom/interface/lonsearchcat.pm 2003/09/28 00:14:25 1.187 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.186 2003/09/22 00:48:32 www Exp $ +# $Id: lonsearchcat.pm,v 1.187 2003/09/28 00:14:25 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -441,7 +441,7 @@ sub course_search { } &untiehash(); unless ($totalfound) { - $r->print('

No resources found.

'); + $r->print('

'.&mt('No resources found').'.

'); } # =================================================== Done going through course $r->print(''); @@ -559,41 +559,47 @@ ENDDOCUMENT my $relatedcheckbox = &simplecheckbox('related',$ENV{'form.related'}); my $domain = $r->dir_config('lonDefDomain'); my $domaincheckbox = &simplecheckbox('domains',$domain); + my $srch=&mt('Search'); + my $header=&mt('Advanced Search'); $scrout.=<Advanced Search +>$header $relatedcheckbox use related words $domaincheckbox only search domain $domain

  +   $closebutton END - $scrout.=&selectbox(undef,'viewselect', + $scrout.=&selectbox('View','viewselect', $ENV{'form.viewselect'}, undef,undef,undef, sort(keys(%Views))); - $scrout.=&selectbox(undef,'show', + $scrout.=&selectbox('Per page','show', $ENV{'form.show'}, undef,undef,undef, (10,20,50,100)); $scrout.=< ENDDOCUMENT } if ($ENV{'request.course.id'}) { + my %lt=&Apache::lonlocal::texthash( + 'srch' => 'Search', + 'header' => 'Course Search', + 'note' => 'Enter terms or phrases, then press "Search" below', + ); $scrout.=(< -

Course Search

+

$lt{'header'}

$hidden_fields

-Enter terms or phrases, then press SEARCH below. +$lt{'note'}.

@@ -610,7 +616,7 @@ ENDCOURSESEARCH
$relcheckbox use related words
$crscheckbox fulltext search (time consuming)

ENDENDCOURSE } @@ -682,8 +688,8 @@ ENDHEADER undef,undef,undef, (10,20,50,100)); $scrout.=' '. - 'Per Page'; - $scrout.="Related
Words\n"; + ''.&mt('Per Page').''; + $scrout.="".&mt('Related').'
'.&mt('Words')."\n"; $scrout.=&searchphrasefield_with_related('title', 'title' , $ENV{'form.title'}); $scrout.=&searchphrasefield('author', 'author' ,$ENV{'form.author'}); @@ -1058,7 +1064,7 @@ field heading. ############################################### sub fieldtitle { - my $title = uc(shift()); + my $title = uc(&mt(shift())); return ''.$title. ': '; } @@ -1153,7 +1159,7 @@ END my $i = 1; foreach (qw/January February March April May June July August September October November December /){ - $month .="\n"; + $month .="\n"; $i++; } $month.="\n"; @@ -1241,12 +1247,12 @@ sub selectbox { foreach (@idlist) { $selout.=''; } elsif ($_ eq $default and /^$anyvalue$/) { - $selout.=' selected >'.$anytag.''; + $selout.=' selected >'.&mt($anytag).''; } - else {$selout.='>'.&{$functionref}($_).'';} + else {$selout.='>'.&mt(&{$functionref}($_)).'';} } return $selout.''.(defined($title)?'

':' '); } @@ -1841,8 +1847,8 @@ sub ensure_db_and_table { sub print_sort_form { my ($r,$pretty_query_string) = @_; ## - my %SortableFields = - (id => 'Default', + my %SortableFields=&Apache::lonlocal::texthash( + id => 'Default', title => 'Title', author => 'Author', subject => 'Subject', @@ -1854,7 +1860,7 @@ sub print_sort_form { copyright => 'Copyright', hostname => 'Host', creationdate => 'Creation Date', - lastrevisiondate => 'Revision Date', + lastrevisiondate => 'Revision Date' ); ## my $table = $ENV{'form.table'}; @@ -2032,6 +2038,7 @@ sub update_count_status { sub update_status { my ($r,$text) = @_; $text =~ s/\'/\\\'/g; + $text=&mt($text); $r->print ("\n"); $r->rflush(); @@ -2108,7 +2115,7 @@ END if (@Lines > 2) { $pretty_string = join '
',(@Lines[0..2],'....
'); } - $r->print("Search: ".$pretty_string); + $r->print(&mt("Search").": ".$pretty_string); $r->rflush(); # # Determine the servers we need to contact. @@ -2408,7 +2415,7 @@ sub display_results { ); if ($total_results == 0) { $r->print(''. - '

There are currently no results.

'. + '

'.&mt('There are currently no results').'.

'. "
"); return; } else { @@ -2439,7 +2446,7 @@ sub display_results { $r->rflush(); } if (@Results < 1) { - $r->print("There were no results matching your query"); + $r->print(&mt("There were no results matching your query")); } else { $r->print ('
'.