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

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Tue, 28 Aug 2007 15:55:50 -0000


raeburn		Tue Aug 28 11:55:50 2007 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  localization
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.570 loncom/interface/loncommon.pm:1.571
--- loncom/interface/loncommon.pm:1.570	Sun Aug 26 17:09:43 2007
+++ loncom/interface/loncommon.pm	Tue Aug 28 11:55:49 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.570 2007/08/26 21:09:43 raeburn Exp $
+# $Id: loncommon.pm,v 1.571 2007/08/28 15:55:49 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5643,6 +5643,14 @@
                     'exact'     => 'is',
                     'contains'  => 'contains',
                     'begins'    => 'begins with',
+                    'youm'      => "You must include some text to search for.",
+                    'thte'      => "The text you are searching for must contain at least two characters when using a 'begins' type search.",
+                    'thet'      => "The text you are searching for must contain at least three characters when using a 'contains' type search.",
+                    'yomc'      => "You must choose a domain when using an institutional directory search.",
+                    'ymcd'      => "You must choose a domain when using a domain search.",
+                    'whus'      => "When using searching by last,first you must include a comma as separator between last name and first name.",
+                    'whse'      => "When searching by last,first you must include at least one character in the first name.",
+                     'thfo'     => "The following need to be corrected before the search can be run:",
                                        );
     my $domform = &select_dom_form($currdom,'srchdomain',1,1);
     my $srchinsel = ' <select name="srchin">';
@@ -5744,46 +5752,46 @@
 
     if (srchterm == "") {
         checkok = 0;
-        msg += "You must include some text to search for.\\n";
+        msg += "$lt{'youm'}\\n";
     }
 
     if (srchtype== 'begins') {
         if (srchterm.length < 2) {
             checkok = 0;
-            msg += "The text you are searching for must contain at least two characters when using a 'begins' type search.\\n";
+            msg += "$lt{'thte'}\\n";
         }
     }
 
     if (srchtype== 'contains') {
         if (srchterm.length < 3) {
             checkok = 0;
-            msg += "The text you are searching for must contain at least three characters when using a 'contains' type search.\\n";
+            msg += "$lt{'thet'}\\n";
         }
     }
     if (srchin == 'instd') {
         if (srchdomain == '') {
             checkok = 0;
-            msg += "You must choose a domain when using an institutional directory search.\\n";
+            msg += "$lt{'yomc'}\\n";
         }
     }
     if (srchin == 'dom') {
         if (srchdomain == '') {
             checkok = 0;
-            msg += "You must choose a domain when using a domain search.\\n";
+            msg += "$lt{'ymcd'}\\n";
         }
     }
     if (srchby == 'lastfirst') {
         if (srchterm.indexOf(",") == -1) {
             checkok = 0;
-            msg += "When using searching by last,first you must include a comma as separator between last name and first name.\\n";
+            msg += "$lt{'whus'}\\n";
         }
         if (srchterm.indexOf(",") == srchterm.length -1) {
             checkok = 0;
-            msg += "When searching by last,first you must include at least one character in the first name.\\n";
+            msg += "$lt{'whse'}\\n";
         }
     }
     if (checkok == 0) {
-        alert("The following need to be corrected before the search can be run:\\n"+msg);
+        alert("$lt{'thfo'}\\n"+msg);
         return;
     }
     if (checkok == 1) {