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

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Thu, 17 Jan 2008 18:42:32 -0000


bisitz		Thu Jan 17 13:42:32 2008 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  Localization:
  Added missing &mt(...) / $lt{...} for popup messages ("New Folder", etc.)
  (More localization has to be done)
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.301 loncom/interface/londocs.pm:1.302
--- loncom/interface/londocs.pm:1.301	Fri Nov 30 22:46:03 2007
+++ loncom/interface/londocs.pm	Thu Jan 17 13:42:31 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.301 2007/12/01 03:46:03 albertel Exp $
+# $Id: londocs.pm,v 1.302 2008/01/17 18:42:31 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3132,10 +3132,32 @@
 sub editing_js {
     my ($udom,$uname) = @_;
     my $now = time();
+    my %lt = &Apache::lonlocal::texthash(
+                                          p_mnf => 'Name of New Folder',
+                                          t_mnf => 'New Folder',
+                                          p_mnp => 'Name of New Page',
+                                          t_mnp => 'New Page',
+                                          p_mxu => 'Listed Title for the Uploaded Score',
+                                          p_msp => 'Listed Title for the Page',
+                                          p_msb => 'Listed Title for the Problem',
+                                          p_mdb => 'Listed Title for the Drop Box',
+                                          p_mbb => 'Listed Title for the Bulletin Board',
+                                          p_mab => "Enter user:domain for User's 'About Me' Page",
+                                          p_mab2 => "About [_99]",
+                                          p_mab_alrt1 => 'Not a valid user:domain',
+                                          p_mab_alrt2 => 'Please enter both user and domain in the format user:domain',
+                                          p_chn => 'New Title',
+                                          p_rmr1 => 'WARNING: Removing a resource makes associated grades and scores inaccessible!',
+                                          p_rmr2a => 'Remove[_99]',
+                                          p_rmr2b => '?[_99]',
+                                          p_ctr1 => 'WARNING: Cutting a resource makes associated grades and scores inaccessible!\\nGrades remain inaccessible if resource is pasted into another folder.',
+                                          p_ctr2a => 'Cut[_98]',
+                                          p_ctr2b => '?[_98]'
+                                        );
 
     return <<ENDNEWSCRIPT;
 function makenewfolder(targetform,folderseq) {
-    var foldername=prompt('Name of New Folder','New Folder');
+    var foldername=prompt('$lt{"p_mnf"}','$lt{"t_mnf"}');
     if (foldername) {
        targetform.importdetail.value=escape(foldername)+"="+folderseq;
         targetform.submit();
@@ -3143,7 +3165,7 @@
 }
 
 function makenewpage(targetform,folderseq) {
-    var pagename=prompt('Name of New Page','New Page');
+    var pagename=prompt('$lt{"p_mnp"}','$lt{"t_mnp"}');
     if (pagename) {
         targetform.importdetail.value=escape(pagename)+"="+folderseq;
         targetform.submit();
@@ -3167,7 +3189,7 @@
 }
 
 function makeexamupload() {
-   var title=prompt('Listed Title for the Uploaded Score');
+   var title=prompt('$lt{"p_mxu"}');
    if (title) { 
     this.document.forms.newexamupload.importdetail.value=
 	escape(title)+'=/res/lib/templates/examupload.problem';
@@ -3176,7 +3198,7 @@
 }
 
 function makesmppage() {
-   var title=prompt('Listed Title for the Page');
+   var title=prompt('$lt{"p_msp"}');
    if (title) { 
     this.document.forms.newsmppg.importdetail.value=
 	escape(title)+'=/adm/$udom/$uname/$now/smppg';
@@ -3185,7 +3207,7 @@
 }
 
 function makesmpproblem() {
-   var title=prompt('Listed Title for the Problem');
+   var title=prompt('$lt{"p_msb"}');
    if (title) { 
     this.document.forms.newsmpproblem.importdetail.value=
 	escape(title)+'=/res/lib/templates/simpleproblem.problem';
@@ -3194,7 +3216,7 @@
 }
 
 function makedropbox() {
-   var title=prompt('Listed Title for the Drop Box');
+   var title=prompt('$lt{"p_mdb"}');
    if (title) { 
     this.document.forms.newdropbox.importdetail.value=
         escape(title)+'=/res/lib/templates/DropBox.problem';
@@ -3203,7 +3225,7 @@
 }
 
 function makebulboard() {
-   var title=prompt('Listed Title for the Bulletin Board');
+   var title=prompt('$lt{"p_mbb"}');
    if (title) {
     this.document.forms.newbul.importdetail.value=
 	escape(title)+'=/adm/$udom/$uname/$now/bulletinboard';
@@ -3212,20 +3234,20 @@
 }
 
 function makeabout() {
-   var user=prompt("Enter user:domain for User's 'About Me' Page");
+   var user=prompt('$lt{"p_mab"}');
    if (user) {
        var comp=new Array();
        comp=user.split(':');
        if ((typeof(comp[0])!=undefined) && (typeof(comp[1])!=undefined)) {
 	   if ((comp[0]) && (comp[1])) {
 	       this.document.forms.newaboutsomeone.importdetail.value=
-		   'About '+escape(user)+'=/adm/'+comp[1]+'/'+comp[0]+'/aboutme';
+		   '$lt{"p_mab2"}'+escape(user)+'=/adm/'+comp[1]+'/'+comp[0]+'/aboutme';
 	       this.document.forms.newaboutsomeone.submit();
 	   } else {
-               alert("Not a valid user:domain");
+               alert("$lt{'p_mab_alrt1'}");
            }
        } else {
-           alert("Please enter both user and domain in the format user:domain"); 
+           alert("$lt{'p_mab_alrt2'}");
        }
    }
 }
@@ -3247,7 +3269,7 @@
 }
 
 function changename(folderpath,index,oldtitle,container,pagesymb) {
-    var title=prompt('New Title',oldtitle);
+    var title=prompt('$lt{"p_chn"}',oldtitle);
     if (title) {
 	this.document.forms.renameform.markcopy.value=-1;
 	this.document.forms.renameform.title.value=title;
@@ -3264,7 +3286,7 @@
 }
 
 function removeres(folderpath,index,oldtitle,container,pagesymb,skip_confirm) {
-    if (skip_confirm || confirm('WARNING: Removing a resource makes associated grades and scores inaccessible!\\nRemove "'+oldtitle+'"?')) {
+    if (skip_confirm || confirm('$lt{"p_rmr1"}\\n\\n$lt{"p_rmr2a"} "'+oldtitle+'" $lt{"p_rmr2b"}')) {
 	this.document.forms.renameform.markcopy.value=-1;
 	this.document.forms.renameform.cmd.value='del_'+index;
         if (container == 'sequence') {
@@ -3279,7 +3301,7 @@
 }
 
 function cutres(folderpath,index,oldtitle,container,pagesymb,folder,skip_confirm) {
-    if (skip_confirm || confirm('WARNING: Cutting a resource makes associated grades and scores inaccessible!\\nGrades remain inaccessible if resource is pasted into another folder.\\nCut "'+oldtitle+'"?')) {
+    if (skip_confirm || confirm('$lt{"p_ctr1"}\\n\\n$lt{"p_ctr2a"} "'+oldtitle+'" $lt{"p_ctr2b"}')) {
 	this.document.forms.renameform.cmd.value='cut_'+index;
 	this.document.forms.renameform.markcopy.value=index;
 	this.document.forms.renameform.copyfolder.value=folder+'.'+container;