From 14b6fcdb5fc4042a75e6210955576fd3475b21ff Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 3 Nov 2003 05:30:32 +0000 Subject: [PATCH] The font style menu is now translatable (Heading, etc) --- lang/en/editor.php | 4 ++++ lib/editor/htmlarea.php | 27 ++++++++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/lang/en/editor.php b/lang/en/editor.php index 449d570bd1..454a59f9ce 100644 --- a/lang/en/editor.php +++ b/lang/en/editor.php @@ -4,6 +4,7 @@ $string['about'] = "About this editor"; $string['absbottom'] = "Absbottom"; $string['absmiddle'] = "Absmiddle"; +$string['address'] = "Address"; $string['alignment'] = "Alignment"; $string['alternatetext'] = "Alternate text"; $string['baseline'] = "Baseline"; @@ -22,6 +23,7 @@ $string['copy'] = "Copy selection"; $string['createlink'] = "Insert Web Link"; $string['cut'] = "Cut selection"; $string['forecolor'] = "Font Color"; +$string['heading'] = "Heading"; $string['hilitecolor'] = "Background Color"; $string['horizontal'] = "Horizontal"; $string['horizontalrule'] = "Horizontal Rule"; @@ -40,6 +42,7 @@ $string['justifyright'] = "Justify Right"; $string['layout'] = "Layout"; $string['left'] = "Left"; $string['middle'] = "Middle"; +$string['normal'] = "Normal"; $string['notset'] = "Not Set"; $string['ok'] = "OK"; $string['orderedlist'] = "Ordered List"; @@ -49,6 +52,7 @@ $string['path'] = "Path"; $string['percent'] = "Percent"; $string['pixels'] = "Pixels"; $string['popupeditor'] = "Enlarge Editor"; +$string['preformatted'] = "Preformatted"; $string['preview'] = "Preview"; $string['redo'] = "Redo your last action"; $string['right'] = "Right"; diff --git a/lib/editor/htmlarea.php b/lib/editor/htmlarea.php index a96d436724..d5870e22ef 100644 --- a/lib/editor/htmlarea.php +++ b/lib/editor/htmlarea.php @@ -15,6 +15,11 @@ if (empty($lang)) { $lang = "en"; } + + $strheading = get_string("heading", "editor"); + $strnormal = get_string("normal", "editor"); + $straddress = get_string("address", "editor"); + $strpreformatted = get_string("preformatted", "editor"); ?> // @@ -122,10 +127,10 @@ HTMLArea.Config = function () { "Arial": 'arial,helvetica,sans-serif', "Courier New": 'courier new,courier,monospace', "Georgia": 'georgia,times new roman,times,serif', + "Impact": 'impact', "Tahoma": 'tahoma,arial,helvetica,sans-serif', "Times New Roman": 'times new roman,times,serif', "Verdana": 'verdana,arial,helvetica,sans-serif', - "impact": 'impact', "WingDings": 'wingdings' }; @@ -140,15 +145,15 @@ HTMLArea.Config = function () { }; this.formatblock = { - "Heading 1": "h1", - "Heading 2": "h2", - "Heading 3": "h3", - "Heading 4": "h4", - "Heading 5": "h5", - "Heading 6": "h6", - "Normal": "p", - "Address": "address", - "Formatted": "pre" + " 1": "h1", + " 2": "h2", + " 3": "h3", + " 4": "h4", + " 5": "h5", + " 6": "h6", + "": "p", + "": "address", + "": "pre" }; this.customSelects = {}; @@ -197,7 +202,7 @@ HTMLArea.Config = function () { outdent: [ "Decrease Indent", "ed_indent_less.gif", false, function(e) {e.execCommand("outdent");} ], indent: [ "Increase Indent", "ed_indent_more.gif", false, function(e) {e.execCommand("indent");} ], forecolor: [ "Font Color", "ed_color_fg.gif", false, function(e) {e.execCommand("forecolor");} ], - hilitecolor: [ "Background Color", "ed_color_bg.gif", false, function(e) {e.execCommand("hilitecolor");} ], + hilitecolor: [ "Background Colorxxx", "ed_color_bg.gif", false, function(e) {e.execCommand("hilitecolor");} ], inserthorizontalrule: [ "Horizontal Rule", "ed_hr.gif", false, function(e) {e.execCommand("inserthorizontalrule");} ], createlink: [ "Insert Web Link", "ed_link.gif", false, function(e) {e.execCommand("createlink", true);} ], insertimage: [ "Insert Image", "ed_image.gif", false, function(e) {e.execCommand("insertimage");} ], -- 2.39.5