]> git.mjollnir.org Git - moodle.git/commitdiff
Removing hard coded strings
authorjulmis <julmis>
Mon, 10 May 2004 21:16:16 +0000 (21:16 +0000)
committerjulmis <julmis>
Mon, 10 May 2004 21:16:16 +0000 (21:16 +0000)
lib/editor/lang/en.php
lib/editor/popups/dlg_ins_char.php
lib/editor/popups/fullscreen.php
lib/editor/popups/insert_table.php
lib/editor/popups/link_std.php

index 8096a1366eab05e068975cdd9f6b44b8bd5ea081..dc0ef6eabd1cd3d8b7a1faf4f139e0201fcd86c3 100644 (file)
@@ -1,14 +1,14 @@
-<?php
-       include("../../../config.php");
-       $lastmodified = filemtime("en.php");
+<?php // $Id$
+    include("../../../config.php");
+    $lastmodified = filemtime("en.php");
     $lifetime = 1800;
-       
+
     header("Content-type: application/x-javascript");  // Correct MIME type
-    header("Last-Modified: " . gmdate("D, d M Y H:i:s", lastmodified) . " GMT");
+    header("Last-Modified: " . gmdate("D, d M Y H:i:s", $lastmodified) . " GMT");
     header("Expires: " . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT");
-    header("Cache-control: max_age = $lifetime"); 
+    header("Cache-control: max_age = $lifetime");
     header("Pragma: ");
-       
+
 ?>
 // I18N constants
 
 //       that states what encoding is necessary.)
 HTMLArea.I18N = {
 
-       // the following should be the filename without .js extension
-       // it will be used for automatically load plugin language.
-       lang: "en",
+    // the following should be the filename without .js extension
+    // it will be used for automatically load plugin language.
+    lang: "en",
 
-       tooltips: {
-               bold:           "<?php print_string("bold","editor") ?>",
-               italic:         "<?php print_string("italic","editor") ?>",
-               underline:      "<?php print_string("underline","editor") ?>",
-               strikethrough:  "<?php print_string("strikethrough","editor") ?>",
-               subscript:      "<?php print_string("subscript","editor") ?>",
-               superscript:    "<?php print_string("superscript","editor") ?>",
-               justifyleft:    "<?php print_string("justifyleft","editor") ?>",
-               justifycenter:  "<?php print_string("justifycenter","editor") ?>",
-               justifyright:   "<?php print_string("justifyright","editor") ?>",
-               justifyfull:    "<?php print_string("justifyfull","editor") ?>",
-               insertorderedlist:    "<?php print_string("orderedlist","editor") ?>",
-               insertunorderedlist:  "<?php print_string("unorderedlist","editor") ?>",
-               outdent:        "<?php print_string("outdent","editor") ?>",
-               indent:         "<?php print_string("indent","editor") ?>",
-               forecolor:      "<?php print_string("forecolor","editor") ?>",
-               hilitecolor:    "<?php print_string("hilitecolor","editor") ?>",
-               inserthorizontalrule: "<?php print_string("horizontalrule","editor") ?>",
-               createlink:     "<?php print_string("createlink","editor") ?>",
-               unlink:         "<?php print_string("removelink","editor") ?>",
-               insertimage:    "<?php print_string("insertimage","editor") ?>",
-               inserttable:    "<?php print_string("inserttable","editor") ?>",
-               htmlmode:       "<?php print_string("htmlmode","editor") ?>",
-               popupeditor:    "<?php print_string("popupeditor","editor") ?>",
-               about:          "<?php print_string("about","editor") ?>",
-               showhelp:       "<?php print_string("showhelp","editor") ?>",
-               textindicator:  "<?php print_string("textindicator","editor") ?>",
-               undo:           "<?php print_string("undo","editor") ?>",
-               redo:           "<?php print_string("redo","editor") ?>",
-               cut:            "<?php print_string("cut","editor") ?>",
-               copy:           "<?php print_string("copy","editor") ?>",
-               paste:          "<?php print_string("paste","editor") ?>",
-               insertsmile:    "<?php print_string("insertsmile","editor") ?>",
-               insertchar:             "<?php print_string("insertchar","editor") ?>"
-       },
+    tooltips: {
+        bold:           "<?php print_string("bold","editor") ?>",
+        italic:         "<?php print_string("italic","editor") ?>",
+        underline:      "<?php print_string("underline","editor") ?>",
+        strikethrough:  "<?php print_string("strikethrough","editor") ?>",
+        subscript:      "<?php print_string("subscript","editor") ?>",
+        superscript:    "<?php print_string("superscript","editor") ?>",
+        justifyleft:    "<?php print_string("justifyleft","editor") ?>",
+        justifycenter:  "<?php print_string("justifycenter","editor") ?>",
+        justifyright:   "<?php print_string("justifyright","editor") ?>",
+        justifyfull:    "<?php print_string("justifyfull","editor") ?>",
+        insertorderedlist:    "<?php print_string("orderedlist","editor") ?>",
+        insertunorderedlist:  "<?php print_string("unorderedlist","editor") ?>",
+        outdent:        "<?php print_string("outdent","editor") ?>",
+        indent:         "<?php print_string("indent","editor") ?>",
+        forecolor:      "<?php print_string("forecolor","editor") ?>",
+        hilitecolor:    "<?php print_string("hilitecolor","editor") ?>",
+        inserthorizontalrule: "<?php print_string("horizontalrule","editor") ?>",
+        createlink:     "<?php print_string("createlink","editor") ?>",
+        unlink:         "<?php print_string("removelink","editor") ?>",
+        insertimage:    "<?php print_string("insertimage","editor") ?>",
+        inserttable:    "<?php print_string("inserttable","editor") ?>",
+        htmlmode:       "<?php print_string("htmlmode","editor") ?>",
+        popupeditor:    "<?php print_string("popupeditor","editor") ?>",
+        about:          "<?php print_string("about","editor") ?>",
+        showhelp:       "<?php print_string("showhelp","editor") ?>",
+        textindicator:  "<?php print_string("textindicator","editor") ?>",
+        undo:           "<?php print_string("undo","editor") ?>",
+        redo:           "<?php print_string("redo","editor") ?>",
+        cut:            "<?php print_string("cut","editor") ?>",
+        copy:           "<?php print_string("copy","editor") ?>",
+        paste:          "<?php print_string("paste","editor") ?>",
+        insertsmile:    "<?php print_string("insertsmile","editor") ?>",
+        insertchar:     "<?php print_string("insertchar","editor") ?>",
+        clean:          "<?php print_string("wordclean","editor") ?>",
+        lefttoright:    "<?php print_string("lefttoright","editor");?>",
+        righttoleft:    "<?php print_string("righttoleft","editor");?>"
+    },
 
-       buttons: {
-               "ok":           "<?php print_string("ok","editor") ?>",
-               "cancel":       "<?php print_string("cancel","editor") ?>",
-               "browse":               "<?php print_string("browse","editor") ?>"
-       },
+    buttons: {
+        "ok":           "<?php print_string("ok","editor") ?>",
+        "cancel":       "<?php print_string("cancel","editor") ?>",
+        "browse":       "<?php print_string("browse","editor") ?>"
+    },
 
-       msg: {
-               "Path":         "<?php print_string("path","editor") ?>",
-               "TEXT_MODE":    "<?php print_string("textmode","editor") ?>"
-       }
+    msg: {
+        "Path":         "<?php print_string("path","editor") ?>",
+        "TEXT_MODE":    "<?php print_string("textmode","editor") ?>"
+    }
 };
index 86b71db6ba77fac50e84aba05fe3d66387ef445f..83d207a793e48a7ac7350f0572aa1f27c9f62ab1 100644 (file)
@@ -127,7 +127,7 @@ function cancel() {
 }
 //-->
 </SCRIPT>
-<title>Insert Character</title>
+<title><?php print_string("choosechar","editor");?></title>
 </head>
 <body onload="Init()">
 <table class="dlg" cellpadding="0" cellspacing="2">
index b43a3e8e531bb65f1f337e599118f5e6840e0412..cc5d275efd72321709dce1f2f38beac9f5c34992 100644 (file)
@@ -1,11 +1,11 @@
 <?php // $Id$
-       include("../../../config.php");
+    include("../../../config.php");
 ?>
 <html>
-<head><title>Fullscreen Editor</title>
+<head><title><?php print_string("fullscreen","editor");?></title>
 <style type="text/css">
 @import url(../htmlarea.css);
-html, body {   margin: 0px; border: 0px; background-color: buttonface; } </style>
+html, body {    margin: 0px; border: 0px; background-color: buttonface; } </style>
 
 
 <script type="text/javascript" src="../htmlarea.php<?php print($id != "")?"?id=$id":"";?>"></script>
@@ -39,8 +39,8 @@ var parent_object  = null;
 var editor         = null;      // to be initialized later [ function init() ]
 
 /* ---------------------------------------------------------------------- *\
-  Function    : 
-  Description : 
+  Function    :
+  Description :
 \* ---------------------------------------------------------------------- */
 
 function _CloseOnEsc(ev) {
@@ -62,7 +62,7 @@ function _CloseOnEsc(ev) {
 \* ---------------------------------------------------------------------- */
 
 function cloneObject(obj) {
-  var newObj          = new Object; 
+  var newObj          = new Object;
 
   // check for array objects
   if (obj.constructor.toString().indexOf("function Array(") == 1) {
@@ -77,7 +77,7 @@ function cloneObject(obj) {
     if (typeof node == 'object') { newObj[n] = cloneObject(node); }
     else                         { newObj[n] = node; }
   }
-  
+
   return newObj;
 }
 
@@ -115,7 +115,7 @@ function init() {
   config.height      = "auto";
 
   // change maximize button to minimize button
-  config.btnList["popupeditor"] = [ 'Minimize Editor', '<?php echo $CFG->wwwroot ?>/lib/editor/images/fullscreen_minimize.gif', true,
+  config.btnList["popupeditor"] = [ '<?php print_string("minimize","editor");?>', '<?php echo $CFG->wwwroot ?>/lib/editor/images/fullscreen_minimize.gif', true,
                                     function() { window.close(); } ];
 
   // generate editor and resize it
index 17029558cea13065b3639a237ff18b9486546118..522c34371b6f2db8fa9ce9b6ecf14d36b909e1d4 100644 (file)
-<?php\r
-       include("../../../config.php");\r
-?>\r
-<html>\r
-<head>\r
-<meta http-equiv="content-type" content="text/html; charset=<?php print_string("thischarset");?>" />\r
-  <title>Insert Table</title>\r
-<script type="text/javascript" src="popup.js"></script>\r
-<script type="text/javascript">\r
-\r
-function Init() {\r
-  __dlg_init();\r
-  document.getElementById('f_rows').focus();\r
-};\r
-\r
-function onOK() {\r
-  var required = {\r
-    "f_rows": "You must enter a number of rows",\r
-    "f_cols": "You must enter a number of columns"\r
-  };\r
-  for (var i in required) {\r
-    var el = document.getElementById(i);\r
-    if (!el.value) {\r
-      alert(required[i]);\r
-      el.focus();\r
-      return false;\r
-    }\r
-  }\r
-  var fields = ["f_rows", "f_cols", "f_width", "f_unit",\r
-                "f_align", "f_border", "f_spacing", "f_padding"];\r
-  var param = new Object();\r
-  for (var i in fields) {\r
-    var id = fields[i];\r
-    var el = document.getElementById(id);\r
-    param[id] = el.value;\r
-  }\r
-  __dlg_close(param);\r
-  return false;\r
-};\r
-\r
-function onCancel() {\r
-  __dlg_close(null);\r
-  return false;\r
-};\r
-\r
-</script>\r
-\r
-<style type="text/css">\r
-html, body {\r
-  width: 410;\r
-  height: 240;\r
-  background: ButtonFace;\r
-  color: ButtonText;\r
-  font: 11px Tahoma,Verdana,sans-serif;\r
-  margin: 0px;\r
-  padding: 0px;\r
-}\r
-body { padding: 5px; }\r
-table {\r
-  font: 11px Tahoma,Verdana,sans-serif;\r
-}\r
-form p {\r
-  margin-top: 5px;\r
-  margin-bottom: 5px;\r
-}\r
-.fl { width: 9em; float: left; padding: 2px 5px; text-align: right; }\r
-.fr { width: 7em; float: left; padding: 2px 5px; text-align: right; }\r
-fieldset { padding: 0px 10px 5px 5px; }\r
-select, input, button { font: 11px Tahoma,Verdana,sans-serif; }\r
-button { width: 70px; }\r
-.space { padding: 2px; }\r
-\r
-.title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;\r
-border-bottom: 1px solid black; letter-spacing: 2px;\r
-}\r
-form { padding: 0px; margin: 0px; }\r
-</style>\r
-\r
-</head>\r
-\r
-<body onload="Init()">\r
-\r
-<div class="title"><?php print_string("inserttable","editor") ?></div>\r
-\r
-<form action="" method="get">\r
-<table border="0" style="padding: 0px; margin: 0px">\r
-  <tbody>\r
-\r
-  <tr>\r
-    <td style="width: 4em; text-align: right"><?php print_string("rows","editor") ?>:</td>\r
-    <td><input type="text" name="f_rows" id="f_rows" size="5" title="Number of rows" value="2" /></td>\r
-    <td></td>\r
-    <td></td>\r
-    <td></td>\r
-  </tr>\r
-  <tr>\r
-    <td style="width: 4em; text-align: right"><?php print_string("cols","editor") ?>:</td>\r
-    <td><input type="text" name="f_cols" id="f_cols" size="5" title="Number of columns" value="4" /></td>\r
-    <td style="width: 4em; text-align: right"><?php print_string("width","editor") ?>:</td>\r
-    <td><input type="text" name="f_width" id="f_width" size="5" title="Width of the table" value="100" /></td>\r
-    <td><select size="1" name="f_unit" id="f_unit" title="Width unit">\r
-      <option value="%" selected="1"  ><?php print_string("percent","editor") ?></option>\r
-      <option value="px"              ><?php print_string("pixels","editor") ?></option>\r
-      <option value="em"              >Em</option>\r
-    </select></td>\r
-  </tr>\r
-\r
-  </tbody>\r
-</table>\r
-\r
-<p />\r
-\r
-<fieldset style="float: left; margin-left: 5px;">\r
-<legend><?php print_string("layout","editor") ?></legend>\r
-\r
-<div class="space"></div>\r
-\r
-<div class="fl"><?php print_string("alignment","editor") ?>:</div>\r
-<select size="1" name="f_align" id="f_align"\r
-  title="Positioning of this image">\r
-  <option value="" selected="1"                ><?php print_string("notset","editor") ?></option>\r
-  <option value="left"                         ><?php print_string("left","editor") ?></option>\r
-  <option value="right"                        ><?php print_string("right","editor") ?></option>\r
-  <option value="texttop"                      ><?php print_string("texttop","editor") ?></option>\r
-  <option value="absmiddle"                    ><?php print_string("absmiddle","editor") ?></option>\r
-  <option value="baseline"                     ><?php print_string("baseline","editor") ?></option>\r
-  <option value="absbottom"                    ><?php print_string("absbottom","editor") ?></option>\r
-  <option value="bottom"                       ><?php print_string("bottom","editor") ?></option>\r
-  <option value="middle"                       ><?php print_string("middle","editor") ?></option>\r
-  <option value="top"                          ><?php print_string("top","editor") ?></option>\r
-</select>\r
-\r
-<p />\r
-\r
-<div class="fl"><?php print_string("borderthickness","editor") ?>:</div>\r
-<input type="text" name="f_border" id="f_border" size="5" value="1"\r
-title="Leave empty for no border" />\r
-<!--\r
-<p />\r
-\r
-<div class="fl">Collapse borders:</div>\r
-<input type="checkbox" name="collapse" id="f_collapse" />\r
--->\r
-<div class="space"></div>\r
-\r
-</fieldset>\r
-\r
-<fieldset style="float:right; margin-right: 5px;">\r
-<legend><?php print_string("spacing","editor") ?></legend>\r
-\r
-<div class="space"></div>\r
-\r
-<div class="fr"><?php print_string("cellspacing","editor") ?>:</div>\r
-<input type="text" name="f_spacing" id="f_spacing" size="5" value="1"\r
-title="Space between adjacent cells" />\r
-\r
-<p />\r
-\r
-<div class="fr"><?php print_string("cellpadding","editor") ?>:</div>\r
-<input type="text" name="f_padding" id="f_padding" size="5" value="1"\r
-title="Space between content and border in cell" />\r
-\r
-<div class="space"></div>\r
-\r
-</fieldset>\r
-\r
-<div style="margin-top: 85px; text-align: right;">\r
-<hr />\r
-<button type="button" name="ok" onclick="return onOK();"><?php print_string("ok","editor") ?></button>\r
-<button type="button" name="cancel" onclick="return onCancel();"><?php print_string("cancel","editor") ?></button>\r
-</div>\r
-\r
-</form>\r
-\r
-</body>\r
-</html>\r
+<?php
+    include("../../../config.php");
+?>
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=<?php print_string("thischarset");?>" />
+  <title><?php print_string("inserttable","editor");?></title>
+<script type="text/javascript" src="popup.js"></script>
+<script type="text/javascript">
+
+function Init() {
+  __dlg_init();
+  document.getElementById('f_rows').focus();
+};
+
+function onOK() {
+  var required = {
+    "f_rows": "You must enter a number of rows",
+    "f_cols": "You must enter a number of columns"
+  };
+  for (var i in required) {
+    var el = document.getElementById(i);
+    if (!el.value) {
+      alert(required[i]);
+      el.focus();
+      return false;
+    }
+  }
+  var fields = ["f_rows", "f_cols", "f_width", "f_unit",
+                "f_align", "f_border", "f_spacing", "f_padding"];
+  var param = new Object();
+  for (var i in fields) {
+    var id = fields[i];
+    var el = document.getElementById(id);
+    param[id] = el.value;
+  }
+  __dlg_close(param);
+  return false;
+};
+
+function onCancel() {
+  __dlg_close(null);
+  return false;
+};
+
+</script>
+
+<style type="text/css">
+html, body {
+  width: 410;
+  height: 240;
+  background: ButtonFace;
+  color: ButtonText;
+  font: 11px Tahoma,Verdana,sans-serif;
+  margin: 0px;
+  padding: 0px;
+}
+body { padding: 5px; }
+table {
+  font: 11px Tahoma,Verdana,sans-serif;
+}
+form p {
+  margin-top: 5px;
+  margin-bottom: 5px;
+}
+.fl { width: 9em; float: left; padding: 2px 5px; text-align: right; }
+.fr { width: 7em; float: left; padding: 2px 5px; text-align: right; }
+fieldset { padding: 0px 10px 5px 5px; }
+select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
+button { width: 70px; }
+.space { padding: 2px; }
+
+.title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
+border-bottom: 1px solid black; letter-spacing: 2px;
+}
+form { padding: 0px; margin: 0px; }
+</style>
+
+</head>
+
+<body onload="Init()">
+
+<div class="title"><?php print_string("inserttable","editor") ?></div>
+
+<form action="" method="get">
+<table border="0" style="padding: 0px; margin: 0px">
+  <tbody>
+
+  <tr>
+    <td style="width: 4em; text-align: right"><?php print_string("rows","editor") ?>:</td>
+    <td><input type="text" name="f_rows" id="f_rows" size="5" title="Number of rows" value="2" /></td>
+    <td></td>
+    <td></td>
+    <td></td>
+  </tr>
+  <tr>
+    <td style="width: 4em; text-align: right"><?php print_string("cols","editor") ?>:</td>
+    <td><input type="text" name="f_cols" id="f_cols" size="5" title="Number of columns" value="4" /></td>
+    <td style="width: 4em; text-align: right"><?php print_string("width","editor") ?>:</td>
+    <td><input type="text" name="f_width" id="f_width" size="5" title="Width of the table" value="100" /></td>
+    <td><select size="1" name="f_unit" id="f_unit" title="Width unit">
+      <option value="%" selected="1"  ><?php print_string("percent","editor") ?></option>
+      <option value="px"              ><?php print_string("pixels","editor") ?></option>
+      <option value="em"              >Em</option>
+    </select></td>
+  </tr>
+
+  </tbody>
+</table>
+
+<p />
+
+<fieldset style="float: left; margin-left: 5px;">
+<legend><?php print_string("layout","editor") ?></legend>
+
+<div class="space"></div>
+
+<div class="fl"><?php print_string("alignment","editor") ?>:</div>
+<select size="1" name="f_align" id="f_align"
+  title="Positioning of this image">
+  <option value="" selected="1"                ><?php print_string("notset","editor") ?></option>
+  <option value="left"                         ><?php print_string("left","editor") ?></option>
+  <option value="right"                        ><?php print_string("right","editor") ?></option>
+  <option value="texttop"                      ><?php print_string("texttop","editor") ?></option>
+  <option value="absmiddle"                    ><?php print_string("absmiddle","editor") ?></option>
+  <option value="baseline"                     ><?php print_string("baseline","editor") ?></option>
+  <option value="absbottom"                    ><?php print_string("absbottom","editor") ?></option>
+  <option value="bottom"                       ><?php print_string("bottom","editor") ?></option>
+  <option value="middle"                       ><?php print_string("middle","editor") ?></option>
+  <option value="top"                          ><?php print_string("top","editor") ?></option>
+</select>
+
+<p />
+
+<div class="fl"><?php print_string("borderthickness","editor") ?>:</div>
+<input type="text" name="f_border" id="f_border" size="5" value="1"
+title="Leave empty for no border" />
+<!--
+<p />
+
+<div class="fl">Collapse borders:</div>
+<input type="checkbox" name="collapse" id="f_collapse" />
+-->
+<div class="space"></div>
+
+</fieldset>
+
+<fieldset style="float:right; margin-right: 5px;">
+<legend><?php print_string("spacing","editor") ?></legend>
+
+<div class="space"></div>
+
+<div class="fr"><?php print_string("cellspacing","editor") ?>:</div>
+<input type="text" name="f_spacing" id="f_spacing" size="5" value="1"
+title="Space between adjacent cells" />
+
+<p />
+
+<div class="fr"><?php print_string("cellpadding","editor") ?>:</div>
+<input type="text" name="f_padding" id="f_padding" size="5" value="1"
+title="Space between content and border in cell" />
+
+<div class="space"></div>
+
+</fieldset>
+
+<div style="margin-top: 85px; text-align: right;">
+<hr />
+<button type="button" name="ok" onclick="return onOK();"><?php print_string("ok","editor") ?></button>
+<button type="button" name="cancel" onclick="return onCancel();"><?php print_string("cancel","editor") ?></button>
+</div>
+
+</form>
+
+</body>
+</html>
index 3743c62647b6ec4c7519a59a062ddf6a517397b3..adb37205f932d3e7abddbf6de7a7306fedb02b86 100644 (file)
@@ -13,7 +13,7 @@
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; <?php print_string("thischarset");?>">
-  <title>Insert/Modify Link</title>
+  <title><?php print_string("insertlink","editor");?></title>
   <script type="text/javascript" src="popup.js"></script>
   <script type="text/javascript">
     window.resizeTo(400, 200);