[LON-CAPA-cvs] cvs: loncom /interface lonsearchcat.pm

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Tue, 12 Feb 2008 18:48:09 -0000


bisitz		Tue Feb 12 13:48:09 2008 EDT

  Modified files:              
    /loncom/interface	lonsearchcat.pm 
  Log:
  Localization:
  - Added some missing &mt() calls
  - Optimized &mt() call for display of search fields
  
  
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.288 loncom/interface/lonsearchcat.pm:1.289
--- loncom/interface/lonsearchcat.pm:1.288	Wed Jul 11 16:32:15 2007
+++ loncom/interface/lonsearchcat.pm	Tue Feb 12 13:48:03 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Search Catalog
 #
-# $Id: lonsearchcat.pm,v 1.288 2007/07/11 20:32:15 albertel Exp $
+# $Id: lonsearchcat.pm,v 1.289 2008/02/12 18:48:03 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -868,7 +868,7 @@
         '<input type="hidden" name="phase" value="adv_search" />';
     my %fields=&Apache::lonmeta::fieldnames();
     #
-    $scrout .= '<h3>'.&mt('Standard [_1] Metadata',$srchtype).'</h3>';
+    $scrout .= '<h3>'.&mt("Standard $srchtype Metadata").'</h3>';
     $scrout .= "<table>\n";
     $scrout .= '<tr><td>&nbsp;</td><td colspan="2"><font size="-1">'.
         ('&nbsp;'x2).&searchhelp()."</font></td></tr>\n";
@@ -899,7 +899,7 @@
                                           $env{'form.'.$field.'_related'},
                                           50);
         if ($related_word_search{$field}) {
-            $scrout .= 'related words';
+            $scrout .= &mt('related words');
         } else {
             $scrout .= '</td><td>&nbsp;';
         }
@@ -2272,14 +2272,11 @@
 #    }
 #    $result.="</select>\n";
     my $revise = &revise_button();
-    $result.=<<END;
-<p>
-There are $total_results matches to your query. $revise
-</p><p>
-Search: $pretty_query_string
-</p>
-</form>
-END
+    $result.='<p>'
+            .&mt('There are [_1] matches to your query.',$total_results)
+            .' '.$revise.'</p>'
+            .'<p>'.&mt('Search: ').$pretty_query_string
+            .'</p></form>';
     $r->print($result.&Apache::loncommon::end_page());
     return;
 }
@@ -2451,13 +2448,14 @@
 ######################################################################
 ######################################################################
 sub revise_button {
+    my $revisetext = &mt('Revise search');
     my $revise_phase = 'disp_basic';
     $revise_phase = 'disp_adv' if ($env{'form.searchmode'} eq 'advanced');
     my $newloc = '/adm/searchcat'.
         '?persistent_db_id='.$env{'form.persistent_db_id'}.
             '&cleargroupsort=1'.
             '&phase='.$revise_phase;
-    my $result = qq{<input type="button" value="Revise search" name="revise"} .
+    my $result = qq{<input type="button" value="$revisetext" name="revise"} .
         qq{ onClick="parent.location='$newloc';" /> };
     return $result;
 }