[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lon-capa-cvs
Subject:    [LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm /localize/localize de.pm
From:       bisitz <bisitz () source ! lon-capa ! org>
Date:       2013-04-30 15:10:28
Message-ID: cvsbisitz1367334628 () cvsserver
[Download RAW message or body]

bisitz		Tue Apr 30 15:10:28 2013 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
    /loncom/localize/localize	de.pm 
  Log:
  Internationalization: Richtext Editor
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.342 \
                loncom/interface/lonhtmlcommon.pm:1.343
--- loncom/interface/lonhtmlcommon.pm:1.342	Mon Mar 11 19:46:13 2013
+++ loncom/interface/lonhtmlcommon.pm	Tue Apr 30 15:10:22 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.342 2013/03/11 19:46:13 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.343 2013/04/30 15:10:22 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1280,6 +1280,14 @@
             }
         }
     }
+
+    my %lt = &Apache::lonlocal::texthash(
+              'plain'       => 'Plain text',
+              'rich'        => 'Rich formatting',
+              'plain_title' => 'Disable rich text formatting and edit in plain \
text', +              'rich_title'  => 'Enable rich text formatting (bold, italic, \
etc.)', +          );
+
     $output.='
     
     function containsBlockHtml(id) {
@@ -1308,14 +1316,14 @@
     	var rt_enabled  = $(this).hasClass("LC_enable_rt");
         if (rt_enabled) {
     		startRichEditor(id);
-			$("#LC_rt_"+id).html("<b>&laquo; Plain text</b>");
-			$("#LC_rt_"+id).attr("title", "Disable rich text formatting and edit in plain \
text"); +			$("#LC_rt_"+id).html("<b>&laquo; '.$lt{'plain'}.'</b>");
+			$("#LC_rt_"+id).attr("title", "'.$lt{'plain_title'}.'");
 			$("#LC_rt_"+id).addClass("LC_disable_rt");
 			$("#LC_rt_"+id).removeClass("LC_enable_rt");
     	} else {
 			destroyRichEditor(id);
-			$("#LC_rt_"+id).html("<b>Rich formatting &raquo;</b>");
-			$("#LC_rt_"+id).attr("title", "Enable rich text formatting (bold, italic, \
etc.)"); +			$("#LC_rt_"+id).html("<b>'.$lt{'rich'}.' &raquo;</b>");
+			$("#LC_rt_"+id).attr("title", "'.$lt{'rich_title'}.'");
 			$("#LC_rt_"+id).addClass("LC_enable_rt");
 			$("#LC_rt_"+id).removeClass("LC_disable_rt");
 	}';
@@ -1336,12 +1344,12 @@
 			var id = $(this).attr("id");
                         var rt_enabled = containsBlockHtml(id);
 			if(rt_enabled) {
-				$(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"Disable rich text \
formatting and edit in plain text\" class=\"LC_disable_rt\"><b>&laquo; Plain \
text</b></a></div>");				 +				$(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" \
title=\"'.$lt{'plain_title'}.'\" class=\"LC_disable_rt\"><b>&laquo; \
'.$lt{'plain'}.'</b></a></div>");				  startRichEditor(id);
 				$("#LC_rt_"+id).click(editorHandler);
 			}
 			else {
-				$(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"Enable rich text \
formatting (bold, italic, etc.)\" class=\"LC_enable_rt\"><b>Rich formatting \
&raquo;</b></a></div>"); +				$(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" \
title=\"'.$lt{'rich_title'}.'\" class=\"LC_enable_rt\"><b>'.$lt{'rich'}.' \
&raquo;</b></a></div>");  $("#LC_rt_"+id).click(editorHandler);
 			}';
     if ($dragmath_prefix ne '') {
@@ -1355,13 +1363,13 @@
 		});
 		$(".LC_richDefaultOn").each(function() {
 			var id = $(this).attr("id");
-			$(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"Disable rich text \
formatting and edit in plain text\" class=\"LC_disable_rt\"><b>&laquo; Plain \
text</b></a></div>");				 +			$(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" \
title=\"'.$lt{'plain_title'}.'\" class=\"LC_disable_rt\"><b>&laquo; \
'.$lt{'plain'}.'</b></a></div>");				  startRichEditor(id);
 			$("#LC_rt_"+id).click(editorHandler);
 		});
 		$(".LC_richDefaultOff").each(function() {
 			var id = $(this).attr("id");
-			$(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"Enable rich text \
formatting (bold, italic, etc.)\" class=\"LC_enable_rt\"><b>Rich formatting \
&raquo;</b></a></div>"); +			$(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" \
title=\"'.$lt{'rich_title'}.'\" class=\"LC_enable_rt\"><b>'.$lt{'rich'}.' \
&raquo;</b></a></div>");  $("#LC_rt_"+id).click(editorHandler);
 		});
 
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.507 loncom/localize/localize/de.pm:1.508
--- loncom/localize/localize/de.pm:1.507	Fri Apr 26 18:03:40 2013
+++ loncom/localize/localize/de.pm	Tue Apr 30 15:10:27 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.507 2013/04/26 18:03:40 bisitz Exp $
+# $Id: de.pm,v 1.508 2013/04/30 15:10:27 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -27222,6 +27222,18 @@
    '4'
 => '4',
 
+   'Plain text'
+=> 'Einfacher Texteditor',
+
+   'Rich formatting'
+=> 'WYSIWYG-Editor',
+
+   'Disable rich text formatting and edit in plain text'
+=> 'WYSIWYG-Editor deaktivieren und im einfachen Texteditor weiterarbeiten',
+
+   'Enable rich text formatting (bold, italic, etc.)'
+=> 'WYSIWYG-Editor aktivieren (Absätze, Fettschrift, etc.)',
+
 #SYNCMARKER
 );
 1;



_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic