[LON-CAPA-cvs] cvs: loncom /interface londocs.pm lonsearchcat.pm /localize/localize de.pm newphrases.txt

www lon-capa-cvs@mail.lon-capa.org
Sun, 28 Sep 2003 00:14:25 -0000


This is a MIME encoded message

--www1064708065
Content-Type: text/plain

www		Sat Sep 27 20:14:25 2003 EDT

  Modified files:              
    /loncom/interface	londocs.pm lonsearchcat.pm 
    /loncom/localize/localize	de.pm newphrases.txt 
  Log:
  Internationalization and German localization
  
  
--www1064708065
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20030927201425.txt"

Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.83 loncom/interface/londocs.pm:1.84
--- loncom/interface/londocs.pm:1.83	Sun Sep 21 23:02:05 2003
+++ loncom/interface/londocs.pm	Sat Sep 27 20:14:25 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.83 2003/09/22 03:02:05 www Exp $
+# $Id: londocs.pm,v 1.84 2003/09/28 00:14:25 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -500,7 +500,7 @@
                  for (my $i=0;$i<=$level*5;$i++) {
                      $r->print('&nbsp;');
                  }
-                 $r->print('- Rendering: ');
+                 $r->print('- '.&mt('Rendering').': ');
                  my $oldpath=$ENV{'request.filename'};
                  $ENV{'request.filename'}=&Apache::lonnet::filelocation('',$url);
                  &Apache::lonxml::xmlparse($r,'web',
@@ -515,7 +515,8 @@
                      }
 		     if ($Apache::lonxml::warningcount) {
                         $r->print('<font color="blue">'.
-			  $Apache::lonxml::warningcount.' warning(s)</font>');
+			  $Apache::lonxml::warningcount.' '.
+				  &mt('warning(s)').'</font>');
                      }
                  } else {
                      $r->print('<font color="green">ok</font>');
@@ -530,11 +531,11 @@
                  }
              }
           } elsif ($result==HTTP_SERVICE_UNAVAILABLE) {
-             $r->print('<font color="red"><b>connection down</b></font>');
+             $r->print('<font color="red"><b>'.&mt('connection down').'</b></font>');
           } elsif ($result==HTTP_NOT_FOUND) {
-             $r->print('<font color="red"><b>not found</b></font>');
+             $r->print('<font color="red"><b>'.&mt('not found').'</b></font>');
           } else {
-             $r->print('<font color="red"><b>access denied</b></font>');
+             $r->print('<font color="red"><b>'.&mt('access denied').'</b></font>');
           }
       }
    }
@@ -580,7 +581,8 @@
        unless ($ENV{'form.timerange'}) {
 	   $ENV{'form.timerange'}=604800;
        }
-       my $seltext='during the last '.$ENV{'form.timerange'}.' seconds';
+       my $seltext=&mt('during the last').' '.$ENV{'form.timerange'}.' '
+	   .&mt('seconds');
        my $startsel='';
        my $monthsel='';
        my $weeksel='';
@@ -592,31 +594,41 @@
        }
        my $starttime=time-$ENV{'form.timerange'};
        if ($ENV{'form.timerange'}==2592000) {
-           $seltext='during the last month ('.localtime($starttime).')';
+           $seltext=&mt('during the last month').' ('.localtime($starttime).')';
            $monthsel='selected';
        } elsif ($ENV{'form.timerange'}==604800) {
-           $seltext='during the last week ('.localtime($starttime).')';
+           $seltext=&mt('during the last week').' ('.localtime($starttime).')';
            $weeksel='selected';
        } elsif ($ENV{'form.timerange'}==86400) {
-           $seltext='since yesterday ('.localtime($starttime).')';
+           $seltext=&mt('since yesterday').' ('.localtime($starttime).')';
            $daysel='selected';
        }
-
+       my %lt=&Apache::lonlocal::texthash
+	      ('st' => 'Since Start of Course',
+	       'lm' => 'Last Month',
+	       'lw' => 'Last Week',
+	       'sy' => 'Since Yesterday',
+	       'di' => 'Display',
+               'cc' => 'Content changed',
+	       'fi' => 'File',
+	       'md' => 'Modification Date',
+	       've' => 'Version',
+	       'di' => 'Differences');
        $r->print(<<ENDHEADERS);
 <form action="/adm/coursedocs" method="post">
 <select name="timerange">
-<option value="-1" $startsel>Since Start of Course</option>
-<option value="2592000" $monthsel>Last Month</option>
-<option value="604800" $weeksel>Last Week</option>
-<option value="86400" $daysel>Since Yesterday</option>
+<option value="-1" $startsel>$lt{'st'}</option>
+<option value="2592000" $monthsel>$lt{'lm'}</option>
+<option value="604800" $weeksel>$lt{'lw'}</option>
+<option value="86400" $daysel>$lt{'sy'}</option>
 </select>
-<input type="submit" name="versions" value="Display" />
+<input type="submit" name="versions" value="$lt{'di'}" />
 </form>
-<h3>Content changed $seltext</h3>
+<h3>$lt{'cc'} $seltext</h3>
 <table border="2">
 <tr>
-<th>File</th><th>Modification Date</th>
-<th>Version</th><th>Differences</th></tr>
+<th>$lt{'fi'}</th><th>$lt{'md'}</th>
+<th>$lt{'ve'}</th><th>$lt{'di'}</th></tr>
 ENDHEADERS
        foreach (keys %changes) {
 	  if ($changes{$_}>$starttime) {
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.186 loncom/interface/lonsearchcat.pm:1.187
--- loncom/interface/lonsearchcat.pm:1.186	Sun Sep 21 20:48:32 2003
+++ loncom/interface/lonsearchcat.pm	Sat Sep 27 20:14:25 2003
@@ -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 @@
    }
    &untiehash();
     unless ($totalfound) {
-	$r->print('<p>No resources found.</p>');
+	$r->print('<p>'.&mt('No resources found').'.</p>');
     }
 # =================================================== Done going through course
     $r->print('</body></html>');
@@ -559,41 +559,47 @@
     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.=<<END;
 </td><td><a
 href="/adm/searchcat?phase=disp_adv&catalogmode=$ENV{'form.catalogmode'}&launch=$ENV{'form.launch'}"
->Advanced Search</a></td></tr>
+>$header</a></td></tr>
 <tr><td>$relatedcheckbox use related words</td>
     <td>$domaincheckbox only search domain <b>$domain</b></td></tr>
 </table>
 </p>
 <p>
-&nbsp;<input type="submit" name="basicsubmit" value='SEARCH' />&nbsp;
+&nbsp;<input type="submit" name="basicsubmit" value='$srch' />&nbsp;
 $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;
-per page.
 </p>
 </form>
 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.=(<<ENDCOURSESEARCH);
 <hr />
-<h1>Course Search</h1>    
+<h1>$lt{'header'}</h1>    
 <form method="post" action="/adm/searchcat">
 <input type="hidden" name="phase" value="course_search" />
 $hidden_fields
 <p>
-Enter terms or phrases, then press SEARCH below.
+$lt{'note'}.
 </p>
 <p>
 <table>
@@ -610,7 +616,7 @@
 <tr><td>$relcheckbox use related words</td><td></td></tr>
 <tr><td>$crscheckbox fulltext search (time consuming)</td><td></td></tr>
 </table><p>
-&nbsp;<input type="submit" name="coursesubmit" value='SEARCH' />
+&nbsp;<input type="submit" name="coursesubmit" value='$lt{'srch'}' />
 </p>
 ENDENDCOURSE
     }
@@ -682,8 +688,8 @@
 			undef,undef,undef,
 			(10,20,50,100));
     $scrout.='&nbsp;'.
-        '<font color="#800000" face="helvetica">Per Page</font>';
-    $scrout.="</td><td>Related<br />Words</td></tr>\n";
+        '<font color="#800000" face="helvetica">'.&mt('Per Page').'</font>';
+    $scrout.="</td><td>".&mt('Related').'<br />'.&mt('Words')."</td></tr>\n";
     $scrout.=&searchphrasefield_with_related('title',   'title'   ,
                                              $ENV{'form.title'});
     $scrout.=&searchphrasefield('author',  'author'  ,$ENV{'form.author'});
@@ -1058,7 +1064,7 @@
 ###############################################
 
 sub fieldtitle {
-    my $title = uc(shift());
+    my $title = uc(&mt(shift()));
     return '<font color="#800000" face="helvetica"><b>'.$title.
         ':&nbsp;</b></font>';
 }
@@ -1153,7 +1159,7 @@
     my $i = 1;
     foreach (qw/January February March April May June 
 	     July August September October November December /){
-	$month .="<option value=\"$i\">$_</option>\n";
+	$month .="<option value=\"$i\">".&mt($_)."</option>\n";
 	$i++;
     }
     $month.="</select>\n";
@@ -1241,12 +1247,12 @@
     foreach (@idlist) {
         $selout.='<option value="'.$_.'"';
         if ($_ eq $default and !/^any$/) {
-	    $selout.=' selected >'.&{$functionref}($_).'</option>';
+	    $selout.=' selected >'.&mt(&{$functionref}($_)).'</option>';
 	}
 	elsif ($_ eq $default and /^$anyvalue$/) {
-	    $selout.=' selected >'.$anytag.'</option>';
+	    $selout.=' selected >'.&mt($anytag).'</option>';
 	}
-        else {$selout.='>'.&{$functionref}($_).'</option>';}
+        else {$selout.='>'.&mt(&{$functionref}($_)).'</option>';}
     }
     return $selout.'</select>'.(defined($title)?'</p>':' ');
 }
@@ -1841,8 +1847,8 @@
 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 @@
          copyright => 'Copyright',
          hostname  => 'Host',
          creationdate     => 'Creation Date',
-         lastrevisiondate => 'Revision Date',
+         lastrevisiondate => 'Revision Date'
      );
     ##
     my $table = $ENV{'form.table'};
@@ -2032,6 +2038,7 @@
 sub update_status {
     my ($r,$text) = @_;
     $text =~ s/\'/\\\'/g;
+    $text=&mt($text);
     $r->print
         ("<script>document.statusform.status.value = ' $text'</script>\n");
     $r->rflush();
@@ -2108,7 +2115,7 @@
     if (@Lines > 2) {
         $pretty_string = join '<br \>',(@Lines[0..2],'....<br />');
     }
-    $r->print("Search: ".$pretty_string);
+    $r->print(&mt("Search").": ".$pretty_string);
     $r->rflush();
     #
     # Determine the servers we need to contact.
@@ -2408,7 +2415,7 @@
          );
     if ($total_results == 0) {
         $r->print('<meta HTTP-EQUIV="Refresh" CONTENT="1">'.
-                  '<h3>There are currently no results.</h3>'.
+                  '<h3>'.&mt('There are currently no results').'.</h3>'.
                   "</form></body></html>");
         return;
     } else {
@@ -2439,7 +2446,7 @@
         $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
             ('<center>'.
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.29 loncom/localize/localize/de.pm:1.30
--- loncom/localize/localize/de.pm:1.29	Sat Sep 27 09:20:46 2003
+++ loncom/localize/localize/de.pm	Sat Sep 27 20:14:25 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.29 2003/09/27 13:20:46 www Exp $
+# $Id: de.pm,v 1.30 2003/09/28 00:14:25 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -134,7 +134,7 @@
 => 'reinitialisiert',
 
    ', or the next time you log in.'
-=> 'haben, oder wenn Sie das nächste Mal anmelden.',
+=> 'haben, oder wenn Sie sich das nächste Mal anmelden.',
 
    'Uploaded Document'
 => 'Hochgeladenes Dokument',
@@ -242,7 +242,7 @@
 => 'Kommunication und Nachrichten',
 
    'Course Coordinator'
-=> 'Kurs Koordinator',
+=> 'Kurskoordinator',
 
    'Course Statistics and Charts'
 => 'Kursstatistiken und Notenübersicht',
@@ -635,7 +635,7 @@
 => 'letzte Aufgabe',
 
    "may open later."
-=> 'mag zu einame spätern Zeitpunkt verfügbar sein',
+=> 'könnte zu einem späteren Zeitpunkt verfügbar werden',
 
    ', and answers will be available on'
 => 'und Antworten werden verfügbar sein am',
@@ -701,7 +701,7 @@
 => 'Seite',
 
    'Sequence'
-=> 'Sequence',
+=> 'Sequenz',
 
    'Map contents are not shown in order.'
 => 'Der Inhalt der Seite/Sequenz wird nicht in geordneter Abfolge gezeigt.',
@@ -820,8 +820,6 @@
    'Evaluation Data'
 => 'Beurteilungsdaten',
 
-
-#SYNC Fri Sep 26 14:41:18 2003
    'July'
 => 'Juli',
 
@@ -892,7 +890,7 @@
 => 'Wurde diese Version am ...',
 
    'Browse published resources'
-=> 'Browse published resources',
+=> 'Betrachte veröffentlichte Dokumente',
 
    'Choose the course to work on'
 => 'Wählen Sie den Kurs, in dem Sie arbeiten wollen',
@@ -904,8 +902,8 @@
 => 'Customized right of use ...	',
 
    'Delete messages from bulletin boards'
-=> 'Delete messages from bulletin boards',
-# Delete messages from Schwarzes Bretts
+=> 'Lösche Mitteilungen vom Schwarzen Brett',
+
    'Domain only - use limited to courses in the domain'
 => 'Domain only - use limited to courses in the domain',
 # Domäne only - use limited to kurss in the Domäne
@@ -925,7 +923,7 @@
 => 'Failed to write metadata copy',
 # Abbruched to write metadata copy
    'Finalize Publication'
-=> 'Finalize Publication',
+=> 'Veröffentlichung abschließen',
 
    'Grant/revoke role of Co-Author'
 => 'Grant/revoke role of Co-Author',
@@ -946,7 +944,7 @@
 => 'Grant/revoke role of Superuser',
 # Grant/revoke rolle of Superuser
    'No previous versions published.'
-=> 'No previous versions published.',
+=> 'Keine vorhergehenden Versionen veröffentlicht.',
 
    'No write permission to'
 => 'Keine Schreibberechtigung für', 
@@ -961,8 +959,8 @@
 => 'Private Publication - did not synchronize database',
 
    'Public - no authentication or authorization required for use'
-=> 'Public - no authentication or authorization required for use',
-# Public - no auDanntication or Autorization required for use
+=> 'Öffentlich - keine Anmeldung notwendig zur Benutzung',
+
    'Retrieval of an old version will overwrite the file currently in construction space'
 => 'Retrieval of an old version will overwrite the file currently in construction space',
 # Retrieval of an old version will overwrite the Datumi currently in construction space
@@ -982,7 +980,7 @@
 => 'Send broadcast and receipt-required email',
 # SEnde broadcast and receipt-required email
    'Show Problem Completeness'
-=> 'Show Problem Completeness',
+=> 'Zeige Aufgabenvollständigkeit',
 
    'Switch to another course'
 => 'Wechseln Sie über zu einem anderen Kurs',
@@ -1040,10 +1038,10 @@
 
    'Course Documents'
 => 'Kursdokumente',
-# kurs Documents
+
    'Creation Date'
-=> 'Creation Date',
-# Creation Datum
+=> 'Ersterstellungsdatum',
+
    'Custom Distribution File'
 => 'Custom Distribution File',
 # Custom Distribution Datumi
@@ -1072,10 +1070,10 @@
 => 'Go to the previous resource in the course sequence',
 # Go to the previous resource in the kurs Sequence
    'Import a published document'
-=> 'Import a published document',
+=> 'Importieren eines veröffentlichten Dokumentes',
 # Importieren a published document
    'Keyword(s)'
-=> 'Keyword(s)',
+=> 'Schlüsselwörter',
 
    'Load Map'
 => 'Lade Seite/Sequenz',
@@ -1096,23 +1094,23 @@
 => 'Das Material ist in ausreichender Tiefe behandelt',
 
    'Material is helpful'
-=> 'Material is helpful',
-# Material is Hilfeful
+=> 'Das Material ist hilfreich',
+
    'Material presented in clear way'
-=> 'Material presented in clear way',
+=> 'Das Material is klar dargestellt',
 
    'Metadata Information'
 => 'Metadateninformation',
 
    'My Personal Info'
-=> 'My Personal Info',
+=> 'Meine persönliche Information',
 
    'Network-wide number of accesses (hits)'
-=> 'Network-wide number of accesses (hits)',
+=> 'Netwerkweite Anzahl von Zugriffen ("Hits")',
 
    'Network-wide number of courses using resource'
-=> 'Network-wide number of courses using resource',
-# Network-wide number of kurss using resource
+=> 'Netwerkweite Anzahl von Kursen, die dieses Dokument benutzen',
+
    'Number of resources that follow this resource in maps'
 => 'Number of resources that follow this resource in maps',
 # Number of resources that follow this resource in Seite/Sequenzs
@@ -1138,17 +1136,17 @@
 => 'Publisher/Owner',
 
    'Publishing'
-=> 'Publishing',
+=> 'Veröffentlichung',
 
    'Resource Publication'
-=> 'Resource Publication',
+=> 'Veröffentlichung von Dokumenten',
 
    'Resource is technically correct'
 => 'Das Dokument ist technisch in Ordnung',
 
    'Score Upload Form'
-=> 'Score Upload Form',
-# Score UpLast Form
+=> 'Formular zum Hochladen von Noten',
+
    'Select Map'
 => 'Wähle Seite/Sequenz',
 
@@ -1168,19 +1166,19 @@
 => 'Erfolgreich angemeldet',
 
    'Suggested Replacement for Obsolete File'
-=> 'Suggested Replacement for Obsolete File',
-# Suggested Replacement for Obsolete Datumi
+=> 'Vorgeschlagener Ersatz für überholte Datei',
+
    'Switching Role'
-=> 'Switching Role',
-# Switching rolle
+=> 'Wechseln der Rolle',
+
    'Target'
 => 'Ziel',
 
    'This syllabus can be publicly viewed at'
-=> 'This syllabus can be publicly viewed at',
-# This Kursüberblick can be publicly seheed at
+=> 'Dieser Kursüberblick kann öffentlich abgerufen werden unter',
+
    'Total number of students who have worked on this problem'
-=> 'Total number of students who have worked on this problem',
+=> 'Gesamtzahl von Studierenden, die diese Aufgabe bearbeitet haben',
 # Total number of StudierEndeers who have worked on this problem
    'URLs To Include in Syllabus'
 => 'URLs To Include in Syllabus',
@@ -1192,7 +1190,7 @@
 => 'Upload a new supplemental course document',
 # UpLast a new supplemental kurs document
    'User'
-=> 'User',
+=> 'Benutzer',
 
    'Wrote Metadata'
 => 'Metadaten geschrieben',
@@ -1219,7 +1217,7 @@
 => 'chat',
 
    'close this window'
-=> 'close this window',
+=> 'dieses Fenster schließen',
 
    'con-'
 => 'con-',
@@ -1295,6 +1293,64 @@
 
    'visible to author and co-authors only'
 => 'nur für Autoren und Co-Autoren sichtbar',
+
+   'All versions'
+=> 'Alle Versionen',
+
+   'Could not write metadata'
+=> 'Konnte Metadaten nicht schreiben',
+
+   'Default Cataloging Information for Directory'
+=> 'Default Cataloging Information for Directory',
+
+   'Error Messages'
+=> 'Fehlermeldungen',
+
+   'Store Catalog Information'
+=> 'Speichere Katalogisierungsinformationen',
+
+   'Update Display'
+=> 'Neu anzeigen',
+
+   'Content changed'
+=> 'Content changed',
+
+   'Differences'
+=> 'Differenzen',
+
+   'Last Week'
+=> 'letzte Woche',
+
+   'Modification Date'
+=> 'Modifikationsdatum',
+
+   'Since Start of Course'
+=> 'seit Anfang des Kurses',
+
+   'Since Yesterday'
+=> 'seit gestern',
+
+   'Verify Course Documents'
+=> 'Überprüfe Kursdokumente',
+
+   'Version'
+=> 'Version',
+
+   'access denied'
+=> 'Zugriff verweigert',
+
+   'connection down'
+=> 'Verbindung unterbrochen',
+
+   'during the last'
+=> 'während der letzten',
+
+   'not found'
+=> 'nicht gefunden',
+
+   'warning(s)'
+=> 'Warnung(en)',
+
 
 #SYNCMARKER
 );
Index: loncom/localize/localize/newphrases.txt
diff -u loncom/localize/localize/newphrases.txt:1.3 loncom/localize/localize/newphrases.txt:1.4
--- loncom/localize/localize/newphrases.txt:1.3	Sat Sep 27 09:20:46 2003
+++ loncom/localize/localize/newphrases.txt	Sat Sep 27 20:14:25 2003
@@ -1,12 +1,18 @@
-Grant/revoke role of Student
-Grant/revoke role of Co-Author
-Send broadcast and receipt-required email
-Edit/Modify DOCS
-Delete messages from bulletin boards
-Default Cataloging Information for Directory
-Could not write metadata
-Wrote Metadata
 Store Catalog Information
 Error Messages
 Update Display
 All versions
+Since Start of Course
+Content changed
+Version
+Differences
+Since Yesterday
+Last Week
+Modification Date
+File
+during the last
+Verify Course Documents
+connection down
+not found
+access denied
+warning(s)

--www1064708065--