Re: translate bit flux editor 2 to french

Ludovic Gasc <[email protected]> Thu, 28 Jul 2005 17:44:05 +0200
Newsgroups gmane.editors.bitflux.devel
Message-ID <[email protected]>
--Boundary-00=_F1P6CDzVzGpOYmq
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi,

I've finish to add i18n function in js/ of bxe source code :-)
Maybe I forget a text.

This mail contains a patch and the french translation (not finish).

Thanks to apply this.

Le Lundi 25 Juillet 2005 13:14, vous avez =E9crit=A0:
> Hi
>
> Ok, I added i18n support for BXE. The Class is there, but not much more
> (read: The needed additions to the JS code and the translations itself
> are still missing)
>
> Read http://wiki.bitfluxeditor.org/BXE_2.0/i18n for more details
>
> It's now your turn :)
>
> chregu
>
> On 20.7.2005 17:28 Uhr, Christian Stocker wrote:
> > On 20.7.2005 17:21 Uhr, Ludovic Gasc wrote:
> >>Le Mercredi 20 Juillet 2005 16:51, Christian Stocker a =E9crit :
> >>>On 20.7.2005 16:47 Uhr, Hannes Gassert wrote:
> >>>>On Wed, 2005-07-20 at 16:40 +0200, Christian Stocker wrote:
> >>>>>The question is just, how do we want to integrate it? Just a large
> >>>>>array, which is called? Some XML file? Any suggestion?
> >>>>
> >>>>What about using the same schema you already use for i18n in the CMS?
> >>>
> >>>Would make sense. It's stolen from cocoon anyway :)
> >>
> >>Maybe use this, or use xml file convert on javascript file with php.
> >>you choose the method :-)
> >>
> >>>>However: That'd be a great feature to have, if we could afford the
> >>>>(presumably rather big?) effort we would have bought it a long time
> >>>>ago :-)
> >>>
> >>>- Write a library which does the actual translation
> >>>- Search all strings, replace them with the method calls from the
> >>> library - Translate
> >>>
> >>>Not that hard, just labour...
> >>
> >>You choose the method.
> >>If it's xml file, I can create php file to convert.
> >>Else, I'm consent to search all strings, replace them with the method
> >> calls from the library and translate in french.
> >
> > Great, I'll start soon with that. We'll see when I find the time, maybe
> > next week or so.
> >
> > chregu

=2D-=20
GASC Ludovic - Stagiaire chez Hospimedia
=2D-
travaille sur Kubuntu 5.04 - KDE 3.4

--Boundary-00=_F1P6CDzVzGpOYmq
Content-Type: text/xml;
  charset="iso-8859-1";
  name="fr.xml"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="fr.xml"

<?xml version=3D"1.0"?>
<catalogue >
<!-- js/bxeFunctions.js -->
	<message key=3D"THIS DOCUMENT COULD NOT BE SAVED!\n You are using a Mozill=
a release with a broken XMLSerializer implementation.\n Mozilla 1.7 and Fir=
efox 0.9/0.9.1 are known to have this bug.\n Please up- or downgrade.">CE D=
OCUMENT NE PEUT PAS &#202;TRE SAUVEGARD&#201;!\n Vous utilisez une version =
de Mozilla avec un XMLSerializer bogu&#233;.\n Mozilla 1.7 et Firefox 0.9/0=
=2E9.1 ont ce bug.\n Changez de version.</message>
	<message key=3D"You're in Source Mode. Not possible to use this button">Vo=
us &#234;tes en Mode Source. Il n\'est pas possible d\'utiliser ce bouton</=
message>
	<message key=3D"Saving">Sauvegarde en cours</message>
	<message key=3D"Document couldn't be saved">Le document n\'a pas pu &#234;=
tre sauvegard&#233;</message>
	<message key=3D"Document successfully saved">Le document a bien &#233;t&#2=
33; sauvegard&#233;</message>
	<message key=3D"Benchmark ">Benchmark </message>
	<message key=3D"Total ">Total </message>
=09
	<message key=3D"Edit {0} Attributes">&#201;diter les attributs de {0}</mes=
sage>
	<message key=3D"Copy {0} Element">Copier l\'&#233;l&#233;ment {0}</message>
	<message key=3D"Append {0} from Clipboard">Ajouter {0} du presse-papiers</=
message>
	<message key=3D"Delete {0} Element">Supprimer l\'&#233;l&#233;ment {0}</me=
ssage>
	<message key=3D"Deletes the Element and all its children">Supprimer l\'&#2=
33;l&#233;ment et tout ses enfants</message>
	<message key=3D"Clean ">Nettoyer</message>
	<message key=3D"Removes the Element, but not its children">Supprimer l\'&#=
233;l&#233;ment mais pas ses enfants</message>
	<message key=3D"Move up">Remonter</message>
	<message key=3D"Move down">Descendre</message>
	<message key=3D"Split right">Scinder &#224; droite</message>
	<message key=3D"Split down">Scinder en bas</message>
	<message key=3D"Merge right">Fusionner &#224; droite</message>
	<message key=3D"Merge down">Fusionner en bas</message>
	<message key=3D"Append Row">Ajouter une ligne</message>
	<message key=3D"Append Col">Ajouter une colonne</message>
	<message key=3D"Remove Row">Enlever une ligne</message>
	<message key=3D"Remove Col">Enlever une colonne</message>
=09
	<!-- Menu	 -->
	<message key=3D"Save">Sauvegarder</message>
	<message key=3D"Save &amp; Exit">Sauvegarder &amp; Quitter</message>
	<message key=3D"Exit">Quitter</message>
	<message key=3D"File">Fichier</message>=20
	<message key=3D"Undo">Annuler</message>
	<message key=3D"Redo">Refaire</message>
	<message key=3D"Edit">&#201;diter</message>
	<message key=3D"Show XML Document">Afficher le document XML</message>
	<message key=3D"Show RNG Document">Afficher le document RNG</message>
	<message key=3D"Debug">D&#233;boguer</message>
	<message key=3D"About Bitflux Editor">&#192; propos de Bitflux Editor</mes=
sage>
	<message key=3D"Help">Aide</message>
	<message key=3D"BXE Website">Site Web BXE</message>
	<message key=3D"Show System Info">Afficher les informations syst&#232;mes<=
/message>
	<message key=3D"System Info">Informations syst&#232;mes</message>
	<message key=3D"BXE Version: ">Version de BXE: </message>
	<message key=3D"BXE Build Date: ">Date de construction BXE: </message>
	<message key=3D"BXE Revision: ">N=9C de r&#233;vision BXE: </message>
	<message key=3D"User Agent: ">Navigateur : </message>
	<message key=3D"OK">OK</message>
	<message key=3D"Report Bug">Rapport de Bogue</message>
	<message key=3D"Help">Aide</message>
	<message key=3D"no block found">pas de bloc trouv&#233;</message>
	<message key=3D"Enter the image url or file name:">Entrez l\'url de l\'ima=
ge ou son nom de fichier:</message>
	<message key=3D"Image URL:">URL de l\'image:</message>
	<message key=3D"{0} is not allowed as child of {1}">{0} n\'est pas un fils=
 de {1}</message>
	<message key=3D"Table is not allowed here"></message>
	<message key=3D"Create Table">Cr&#233;er un tableau</message>
	<message key=3D"Can't create table: invalid data">Impossible de cr&#233;er=
 le tableau: donn&#233;es invalides</message>
	<message key=3D"number of rows">nombre de colonnes</message>
	<message key=3D"number of cols">nombre de lignes</message>
	<message key=3D"Enter a URL:">Entrez l\'URL:</message>
	<message key=3D"ERROR in Bitflux Editor:">Erreur dans Bitflux Editor:</mes=
sage>
	<message key=3D"In File: ">Dans le fichier: </message>
	<message key=3D"Linenumber: ">Ligne: </message>
	<message key=3D"Type: ">Type: </message>
	<message key=3D"Stack:">Pile :</message>
	<message key=3D"You have unsaved changes.\n Click cancel to return to the =
document.\n Click OK to really leave to page.">Vou avez effectu&#233; des c=
hangements qui n\'ont pas &#233;t&#233; sauvegard&#233;s.\nCliquez sur canc=
el pour revenir au document.\nCliquez sur OK pour quitter la page.</message>
	<message key=3D"There is already a link here, please use the 'Edit Attribu=
tes' function, to edit the link.">Ceci est d&#233;j&#224; un lien, veuillez=
 utiliser la fonction \'&#201;diter les attributs\' pour &#233;diter le lie=
n.</message>
	<message key=3D"Alert">Alerte</message>
	<message key=3D"Validation Alert">Alerte de Validation</message>
=09
<!-- js/bxeXMLDocument.js -->
	<message key=3D"xsltransformdoc.xsldoc is : "></message>
	<message key=3D"Something went wrong during importing the XSLT document.">=
</message>
	<message key=3D"XHTML loaded..."></message>
	<message key=3D" Loading Failed. no 'body' element found in your external =
XHTML document."></message>
	<message key=3D"no 'body' element found in your external XHTML document. "=
></message>
	<message key=3D"Import external XHTML ..."></message>
	<message key=3D"The xhtmlfile: '{0}' was not found"></message>
=09
<!-- js/table.js -->
	<message key=3D"There's no right cell to be merged"></message>
	<message key=3D"Right cell's rowspan is different to this cell's rowspan, =
merging not possible"></message>
	<message key=3D"There's no cell below to be merged"></message>
	<message key=3D"Down cell's colspan is different to this cell's colspan, m=
erging not possible"></message>
	<message key=3D"Columns"></message>
	<message key=3D"Rows"></message>
	<message key=3D"create">cr&#233;er</message>
	<message key=3D"Nothing selected, please select the point, where you want =
the table inserted"></message>
	<message key=3D"No table-cell (but {0}) selected, please choose one"></mes=
sage>
	<message key=3D"add row">ajouter la ligne</message>
	<message key=3D"add col">ajouter la colonne</message>
	<message key=3D"add">ajouter</message>
	<message key=3D"ERROR: could not find the cell in matrix!"></message>
	<message key=3D"rowPos: {0}"></message>
	<message key=3D"no cell node at r=3D{0} c=3D{1}"></message>
	<message key=3D"got no table body!"></message>
=09
<!-- js/widget.js -->
	<message key=3D" Append "> Ajouter </message>
	<message key=3D"Choose Subelement of {0}">Choisir les sous-&#233;l&#233;me=
nts de {0}</message>
	<message key=3D" Append to "> Ajouter &#224; </message>
	<message key=3D"Append">Ajouter</message>
	<message key=3D"Insert ...">Ins&#233;rer ...</message>
	<message key=3D"Insert">Ins&#233;rer</message>
	<message key=3D"Cancel">Annuler</message>
	<message key=3D"Edit Attributes">&#201;diter les attributs</message>
	<message key=3D"Edit Attributes of {0}">&#201;diter les attributs de {0}</=
message>
=09
</catalogue>

--Boundary-00=_F1P6CDzVzGpOYmq
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="i18n_patch.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="i18n_patch.diff"

Index: js/bxeFunctions.js
===================================================================
--- js/bxeFunctions.js	(revision 1359)
+++ js/bxeFunctions.js	(working copy)
@@ -33,7 +33,7 @@
 const BXE_SNAPSHOT_LENGTH = 20;
 function __bxeSave(e) {
     if (bxe_bug248172_check()) {
-		alert ("THIS DOCUMENT COULD NOT BE SAVED!\n You are using a Mozilla release with a broken XMLSerializer implementation.\n Mozilla 1.7 and Firefox 0.9/0.9.1 are known to have this bug.\n Please up- or downgrade.");
+		alert (bxe_i18n.getText("THIS DOCUMENT COULD NOT BE SAVED!\n You are using a Mozilla release with a broken XMLSerializer implementation.\n Mozilla 1.7 and Firefox 0.9/0.9.1 are known to have this bug.\n Please up- or downgrade."));
 		return false;
 	}
 
@@ -46,7 +46,7 @@
 	}
 	var xml = bxe_getXmlDomDocument(true);
 	if (!xml) {
-		alert("You're in Source Mode. Not possible to use this button");
+		alert(bxe_i18n.getText("You're in Source Mode. Not possible to use this button"));
 	}
 	
 	var xmlstr =xml.saveXML(xml);
@@ -55,14 +55,14 @@
 		
 		
 		if (e.isError) {
-			var widg = mozilla.getWidgetModalBox("Saving");
-			widg.addText("Document couldn't be saved");
+			var widg = mozilla.getWidgetModalBox(bxe_i18n.getText("Saving"));
+			widg.addText(bxe_i18n.getText("Document couldn't be saved"));
 			widg.addText(e.statusText,true);
 			widg.show((window.innerWidth- 500)/2,50, "fixed");
 			return;
 		}
 		bxe_lastSavedXML = bxe_getXmlDocument();
-		bxe_status_bar.showMessage("Document successfully saved");
+		bxe_status_bar.showMessage(bxe_i18n.getText("Document successfully saved"));
 		if	(e.status == 201 && bxe_config.options['onSaveFileCreated']) {
 			eval(bxe_config.options['onSaveFileCreated']);
 			
@@ -101,10 +101,10 @@
 	var end = new Date();
 	
 
-	debug ("Benchmark " + string);
+	debug (bxe_i18n.getText("Benchmark ") + string);
 //	debug ("Start " + start.getTime());
 //	debug ("End   " + end.getTime() );
-	debug ("Total " +(end-start) + " / " +  iter + " = " + (end-start)/iter); 
+	debug (bxe_i18n.getText("Total ") +(end-start) + " / " +  iter + " = " + (end-start)/iter); 
 }
 
 function bxe_bench() {
@@ -142,7 +142,7 @@
 function bxe_history_redo() {
 	if (bxe_snapshots_position >= 0 && bxe_snapshots[( bxe_snapshots_position + 1)]) {
 		var currXmlStr = bxe_getXmlDocument();
-		if (!currXmlStr) { alert("You're in Source Mode. Not possible to use this button"); return false;} 
+		if (!currXmlStr) { alert(bxe_i18n.getText("You're in Source Mode. Not possible to use this button")); return false;} 
 		bxe_snapshots_position++;
 		var xmlstr = bxe_snapshots[bxe_snapshots_position];
 		if (currXmlStr == xmlstr && bxe_snapshots[bxe_snapshots_position + 1]) {
@@ -169,7 +169,7 @@
 			var currXmlStr = bxe_getXmlDocument();
 		}
 		
-		if (!currXmlStr) { alert("You're in Source Mode. Not possible to use this button"); return false;} 
+		if (!currXmlStr) { alert(bxe_i18n.getText("You're in Source Mode. Not possible to use this button")); return false;} 
 		var xmlstr = bxe_snapshots[bxe_snapshots_position];
 		if (xmlstr) {
 			bxe_snapshots_position--;
@@ -473,7 +473,7 @@
 		e.additionalInfo.namespaceURI = "";
 	}
 	if (bxe_checkForSourceMode(sel)) {
-		alert("You're in Source Mode. Not possible to use this button");
+		alert(bxe_i18n.getText("You're in Source Mode. Not possible to use this button"));
 		return false;
 	}
 	//search, if we are already in this mode for anchorNode
@@ -646,7 +646,7 @@
 
 	if (node.vdom && node.vdom.hasAttributes ) {
 		
-		var menui = popup.addMenuItem("Edit " + node.vdom.bxeName  + " Attributes", mozilla.getWidgetGlobals().EditAttributes.popup);
+		var menui = popup.addMenuItem(bxe_i18n.getText("Edit {0} Attributes",new Array(node.vdom.bxeName)), mozilla.getWidgetGlobals().EditAttributes.popup);
 		menui.MenuPopup._node = node._node;
 	}
 
@@ -671,7 +671,7 @@
 		if (node.parentNode.isAllowedChild(_clipboardNamespaceUri, _clipboardNodeName)) {
 			
 			
-			popup.addMenuItem("Append " + _clipboardNodeName + " from Clipboard", function (e) {
+			popup.addMenuItem(bxe_i18n.getText("Append {0} from Clipboard",new Array(_clipboardNodeName)), function (e) {
 				var widget = e.currentTarget.Widget;
 				var appNode = widget.MenuPopup.MainNode;
 				var clip = mozilla.getClipboard();
@@ -682,7 +682,7 @@
 		}
 	}
 	
-	popup.addMenuItem("Delete "  + node.vdom.bxeName  + " Element", function (e) {
+	popup.addMenuItem(bxe_i18n.getText("Delete {0} Element",new Array(node.vdom.bxeName)), function (e) {
 		var widget = e.currentTarget.Widget;
 		var delNode = widget.MenuPopup.MainNode;
 		//delNode.unlink();
@@ -691,10 +691,10 @@
 		var par = delNode.parentNode
 		delNode.unlink();
 		bxe_Transform(false,false,par);
-	},"Deletes the Element and all its children");
+	},bxe_i18n.getText("Deletes the Element and all its children"));
 	
 	if (node.parentNode.canHaveText) {
-		popup.addMenuItem("Clean ", function (e) {
+		popup.addMenuItem(bxe_i18n.getText("Clean "), function (e) {
 			var widget = e.currentTarget.Widget;
 			var delNode = widget.MenuPopup.MainNode;
 			
@@ -703,11 +703,11 @@
 			var par = delNode.parentNode;
 			delNode._node.removeElementOnly();
 			bxe_Transform(false,false,par);
-		}, "Removes the Element, but not its children");
+		}, bxe_i18n.getText("Removes the Element, but not its children"));
 	}
 
 	if (node.previousSibling) {
-		popup.addMenuItem("Move up", function (e) {
+		popup.addMenuItem(bxe_i18n.getText("Move up"), function (e) {
 			var widget = e.currentTarget.Widget;
 			var appNode = widget.MenuPopup.MainNode;
 			var prevSibling = appNode.previousSibling;
@@ -725,7 +725,7 @@
 	}
 	
 	if (node.nextSibling) {
-		popup.addMenuItem("Move down", function (e) {
+		popup.addMenuItem(bxe_i18n.getText("Move down"), function (e) {
 			var widget = e.currentTarget.Widget;
 			var appNode = widget.MenuPopup.MainNode;
 			var nextSibling = appNode.nextSibling;
@@ -775,7 +775,7 @@
 		
 		//split
 		if (node._node.getAttribute("colspan") > 1) {
-		var menui = popup.addMenuItem("Split right", function(e) {
+		var menui = popup.addMenuItem(bxe_i18n.getText("Split right"), function(e) {
 			var widget = e.currentTarget.Widget;
 			var _par = widget.MenuPopup.MainNode._node.parentNode;
 			widget.MenuPopup.MainNode._node.TableCellSplitRight();
@@ -786,7 +786,7 @@
 		
 		if (node._node.getAttribute("rowspan") > 1) {
 			
-			var menui = popup.addMenuItem("Split down", function(e) {
+			var menui = popup.addMenuItem(bxe_i18n.getText("Split down"), function(e) {
 				var widget = e.currentTarget.Widget;
 				var _par = widget.MenuPopup.MainNode._node.parentNode;
 				widget.MenuPopup.MainNode._node.TableCellSplitDown();
@@ -802,7 +802,7 @@
 			nextSibling = nextSibling.nextSibling;
 		}
 		if (nextSibling && (nextSibling.localName == "td" || nextSibling.localName == "th")) {
-			var menui = popup.addMenuItem("Merge right", function(e) {
+			var menui = popup.addMenuItem(bxe_i18n.getText("Merge right"), function(e) {
 				var widget = e.currentTarget.Widget;
 				var _par = widget.MenuPopup.MainNode._node.parentNode;
 				widget.MenuPopup.MainNode._node.TableCellMergeRight();
@@ -833,7 +833,7 @@
 				});
 			}
 		}*/
-		var menui = popup.addMenuItem("Merge down", function(e) {
+		var menui = popup.addMenuItem(bxe_i18n.getText("Merge down"), function(e) {
 					var widget = e.currentTarget.Widget;
 					var _par = widget.MenuPopup.MainNode._node.parentNode;
 					widget.MenuPopup.MainNode._node.TableCellMergeDown();
@@ -841,21 +841,21 @@
 					//_par.updateXMLNode();
 				});
 		
-		var menui = popup.addMenuItem("Append Row", function(e) {
+		var menui = popup.addMenuItem(bxe_i18n.getText("Append Row"), function(e) {
 			var widget = e.currentTarget.Widget;
 			
 			widget.MenuPopup.MainNode._node.TableAppendRow();
 			bxe_Transform(false,false,widget.MenuPopup.MainNode.parentNode);
 			
 		});
-		var menui = popup.addMenuItem("Append Col", function(e) {
+		var menui = popup.addMenuItem(bxe_i18n.getText("Append Col"), function(e) {
 			var widget = e.currentTarget.Widget;
 			var _par = widget.MenuPopup.MainNode._node.parentNode.parentNode;
 			widget.MenuPopup.MainNode._node.TableAppendCol();
 			bxe_Transform(true,false,widget.MenuPopup.MainNode.parentNode);
 			
 		});
-		var menui = popup.addMenuItem("Remove Row", function(e) {
+		var menui = popup.addMenuItem(bxe_i18n.getText("Remove Row"), function(e) {
 			var widget = e.currentTarget.Widget;
 			var _par = widget.MenuPopup.MainNode._node.parentNode.parentNode;
 			widget.MenuPopup.MainNode._node.TableRemoveRow();
@@ -863,7 +863,7 @@
 			
 		});
 		
-		var menui = popup.addMenuItem("Remove Col", function(e) {
+		var menui = popup.addMenuItem(bxe_i18n.getText("Remove Col"), function(e) {
 			var widget = e.currentTarget.Widget;
 			var _par = widget.MenuPopup.MainNode._node.parentNode.parentNode;
 			widget.MenuPopup.MainNode._node.TableRemoveCol();
@@ -1155,58 +1155,58 @@
 	
 	img.setAttribute("align","right");
 	bxe_menubar.node.appendChild(img);
-	var submenu = new Array("Save",function() {eDOMEventCall("DocumentSave",document);});
-	submenu.push("Save & Exit",function() {eDOMEventCall("DocumentSave",document,{"exit": true});});
-	submenu.push("Exit",function() {eDOMEventCall("Exit",document);});
-	bxe_menubar.addMenu("File",submenu);
+	var submenu = new Array(bxe_i18n.getText("Save"),function() {eDOMEventCall("DocumentSave",document);});
+	submenu.push(bxe_i18n.getText("Save & Exit"),function() {eDOMEventCall("DocumentSave",document,{"exit": true});});
+	submenu.push(bxe_i18n.getText("Exit"),function() {eDOMEventCall("Exit",document);});
+	bxe_menubar.addMenu(bxe_i18n.getText("File"),submenu);
 
-	var submenu2 = new Array("Undo",function() {eDOMEventCall("Undo",document);},"Redo",function () {eDOMEventCall("Redo",document)});
-	bxe_menubar.addMenu("Edit",submenu2);
+	var submenu2 = new Array(bxe_i18n.getText("Undo"),function() {eDOMEventCall("Undo",document);},bxe_i18n.getText("Redo"),function () {eDOMEventCall("Redo",document)});
+	bxe_menubar.addMenu(bxe_i18n.getText("Edit"),submenu2);
 	
 	var submenu3 = new Array();
-	submenu3.push("Show XML Document",function(e) {BX_showInWindow(bxe_getXmlDocument(true));})
-	submenu3.push("Show RNG Document",function(e) {BX_showInWindow(bxe_getRelaxNGDocument());})
+	submenu3.push(bxe_i18n.getText("Show XML Document"),function(e) {BX_showInWindow(bxe_getXmlDocument(true));})
+	submenu3.push(bxe_i18n.getText("Show RNG Document"),function(e) {BX_showInWindow(bxe_getRelaxNGDocument());})
 	
-	bxe_menubar.addMenu("Debug",submenu3);
+	bxe_menubar.addMenu(bxe_i18n.getText("Debug"),submenu3);
 	
 	
 	var submenu4 = new Array();
 	
-	submenu4.push("About Bitflux Editor",function(e) { 
+	submenu4.push(bxe_i18n.getText("About Bitflux Editor"),function(e) { 
 		bxe_about_box.setText("");
 		bxe_about_box.show(true);
 		
 	});
 	
-	submenu4.push("Help",function (e) { 
+	submenu4.push(bxe_i18n.getText("Help"),function (e) { 
 		bla = window.open("http://wiki.bitfluxeditor.org/BXE_2.0","help","width=800,height=600,left=0,top=0");
 		bla.focus();
 	
 	});
 
-	submenu4.push("BXE Website",function (e) { 
+	submenu4.push(bxe_i18n.getText("BXE Website"),function (e) { 
 		bla = window.open("http://www.bitfluxeditor.org","help","width=800,height=600,left=0,top=0");
 		bla.focus();
 	
 	});
 
-	submenu4.push("Show System Info", function(e) {
+	submenu4.push(bxe_i18n.getText("Show System Info"), function(e) {
 		var modal = new Widget_ModalBox();
 		modal.node = modal.initNode("div","ModalBox");
 		modal.Display = "block";
 		modal.node.appendToBody();
 		modal.position(100,100,"absolute");
-		modal.initTitle("System Info");
+		modal.initTitle(bxe_i18n.getText("System Info"));
 		modal.initPane();
-		var innerhtml =  "<br/>BXE Version: " + BXE_VERSION  + "<br />";
-		innerhtml += "BXE Build Date: " + BXE_BUILD + "<br/>";
-		innerhtml += "BXE Revision: " + BXE_REVISION + "<br/><br/>";
-		innerhtml += "User Agent: " + navigator.userAgent + "<br/><br/>";
+		var innerhtml =  "<br/>" + bxe_i18n.getText("BXE Version: ") + BXE_VERSION  + "<br />";
+		innerhtml += bxe_i18n.getText("BXE Build Date: ") + BXE_BUILD + "<br/>";
+		innerhtml += bxe_i18n.getText("BXE Revision: ") + BXE_REVISION + "<br/><br/>";
+		innerhtml += bxe_i18n.getText("User Agent: ") + navigator.userAgent + "<br/><br/>";
 		modal.PaneNode.innerHTML = innerhtml;
 		modal.draw();
 		var subm = document.createElement("input");
 		subm.setAttribute("type","submit");
-		subm.setAttribute("value","OK");
+		subm.setAttribute("value",bxe_i18n.getText("OK"));
 		subm.onclick = function(e) {
 			var Widget = e.target.parentNode.parentNode.Widget;
 			e.target.parentNode.parentNode.style.display = "none";
@@ -1215,14 +1215,14 @@
 		
 	});
 
-	submenu4.push("Report Bug",function(e) { 
+	submenu4.push(bxe_i18n.getText("Report Bug"),function(e) { 
 		bla = window.open("http://bugs.bitfluxeditor.org/enter_bug.cgi?product=Editor&version="+BXE_VERSION+"&priority=P3&bug_severity=normal&bug_status=NEW&assigned_to=&cc=&bug_file_loc=http%3A%2F%2F&short_desc=&comment=***%0DVersion: "+BXE_VERSION + "%0DBuild: " + BXE_BUILD +"%0DUser Agent: "+navigator.userAgent + "%0D***&maketemplate=Remember+values+as+bookmarkable+template&form_name=enter_bug","help","");
 		bla.focus();
 		
 	});
 	
 	
-	bxe_menubar.addMenu("Help",submenu4);
+	bxe_menubar.addMenu(bxe_i18n.getText("Help"),submenu4);
 	
 	bxe_menubar.draw();
 	
@@ -1292,7 +1292,7 @@
 			if (block  ) {
 				var thisNode = block;
 				if (!thisNode) {
-					bxe_format_list.appendItem("no block found","");
+					bxe_format_list.appendItem(bxe_i18n.getText("no block found"),"");
 					return false;
 				}
 				
@@ -1313,7 +1313,7 @@
 				
 				
 			} else {
-				bxe_format_list.appendItem("no block found","");
+				bxe_format_list.appendItem(bxe_i18n.getText("no block found"),"");
 			}
 		}
 	}
@@ -1461,7 +1461,7 @@
 		return false;
 	}
 	
-	var mod = mozilla.getWidgetModalBox("Enter the image url or file name:", function(values) {
+	var mod = mozilla.getWidgetModalBox(bxe_i18n.getText("Enter the image url or file name:"), function(values) {
 		if(values.imgref == null) // null href means prompt canceled
 			return;
 		if(values.imgref == "") 
@@ -1475,7 +1475,7 @@
 		img.setAttribute("src",values.imgref);
 	});
 	
-	mod.addItem("imgref", "", "textfield","Image URL:");
+	mod.addItem("imgref", "", "textfield",bxe_i18n.getText("Image URL:"));
 	mod.show(100,50,"fixed");
 	
 }
@@ -1483,14 +1483,14 @@
 function bxe_checkForSourceMode(sel) {
 	if (bxe_format_list.node.options.length == 1 && bxe_format_list.node.options.selectedIndex == 0) {
 		if ( bxe_format_list.node.options[0].text == "-Source Mode-") {
-			alert("You're in Source Mode. Not possible to use this button");
+			alert(bxe_i18n.getText("You're in Source Mode. Not possible to use this button"));
 			return true;
 		}
 	}
 	// the following is legacy code. actually not needed anymore, AFAIK..
 	var cssr = sel.getEditableRange();
 	if (cssr && cssr.top._SourceMode) {
-		alert("You're in Source Mode. Not possible to use this button");
+		alert(bxe_i18n.getText("You're in Source Mode. Not possible to use this button"));
 		return true;
 	}
 	return false;
@@ -1520,7 +1520,7 @@
 		return true;
 	} else {
 		if (!noAlert) {
-			alert (localName + " is not allowed as child of " + node.XMLNode.localName);
+			alert (bxe_i18n.getText("{0} is not allowed as child of {1}",new Array(localName,node.XMLNode.localName)));
 		}
 		return false;
 	}
@@ -1531,7 +1531,7 @@
 	var cssr = sel.getEditableRange();
 	
 	if (!bxe_checkIsAllowedChild("","table",sel, true) &&  !bxe_checkIsAllowedChildOfNode("","table",cssr.startContainer.parentNode.parentNode, true)) {
-		alert ("Table is not allowed here");
+		alert (bxe_i18n.getText("Table is not allowed here"));
 		return false;
 	}
 
@@ -1550,10 +1550,10 @@
 		return false;
 	}
 	
-	var mod = mozilla.getWidgetModalBox("Create Table", function(values) {
+	var mod = mozilla.getWidgetModalBox(bxe_i18n.getText("Create Table"), function(values) {
 		var te = documentCreateTable(values["rows"], values["cols"]);
 		if(!te) {
-			alert("Can't create table: invalid data");
+			alert(bxe_i18n.getText("Can't create table: invalid data"));
 		}
 		else if (window.bxe_ContextNode == BXE_SELECTION) {
 			//te.setAttribute("class", bxe_config.options[OPTION_DEFAULTTABLECLASS]);
@@ -1576,8 +1576,8 @@
 			bxe_Transform();
 		}
 	});
-	mod.addItem("rows",2,"textfield","number of rows");
-	mod.addItem("cols",2,"textfield","number of cols");
+	mod.addItem("rows",2,"textfield",bxe_i18n.getText("number of rows"));
+	mod.addItem("cols",2,"textfield",bxe_i18n.getText("number of cols"));
 	mod.show(100,50, "fixed");
 	
 }
@@ -1705,7 +1705,7 @@
 	}
 	
 	
-	var mod = mozilla.getWidgetModalBox("Enter a URL:", function(values) {
+	var mod = mozilla.getWidgetModalBox(bxe_i18n.getText("Enter a URL:"), function(values) {
 		var href = values["href"];
 		if(href == null) // null href means prompt canceled - BUG FIX FROM Karl Guertin
 			return;
@@ -1724,7 +1724,7 @@
 	);
 		
 	
-	mod.addItem("href",aValue,"textfield","Enter a URL:");
+	mod.addItem("href",aValue,"textfield",bxe_i18n.getText("Enter a URL:"));
 	mod.show(100,50, "fixed");
 	
 	
@@ -1744,34 +1744,34 @@
 }
 
 function bxe_catch_alert_message(e) {
-	var mes = "ERROR in Bitflux Editor:\n"+e.message +"\n";
+	var mes = bxe_i18n.getText("ERROR in Bitflux Editor:") + "\n" + e.message +"\n";
 	try
 	{
 		if (e.filename) {
-			mes += "In File: " + e.filename +"\n";
+			mes += bxe_i18n.getText("In File: ") + e.filename +"\n";
 		} else {
-			mes += "In File: " + e.fileName +"\n";
+			mes += bxe_i18n.getText("In File: ") + e.fileName +"\n";
 		}
 		
 	}
 	catch (e)
 	{
-		mes += "In File: " + e.fileName +"\n";
+		mes += bxe_i18n.getText("In File: ") + e.fileName +"\n";
 	}
 	try
 	{
-		mes += "Linenumber: " + e.lineNumber + "\n";
+		mes += bxe_i18n.getText("Linenumber: ") + e.lineNumber + "\n";
 	}
 	catch(e) {}
 	
-	mes += "Type: " + e.name + "\n";
-	mes += "Stack:" + e.stack + "\n";
+	mes += bxe_i18n.getText("Type: ") + e.name + "\n";
+	mes += bxe_i18n.getText("Stack:") + e.stack + "\n";
 	return mes;
 }
 
 function bxe_exit(e) {
 	if (bxe_checkChangedDocument()) {
-		if (confirm( "You have unsaved changes.\n Click cancel to return to the document.\n Click OK to really leave to page.")) {
+		if (confirm(bxe_i18n.getText("You have unsaved changes.\n Click cancel to return to the document.\n Click OK to really leave to page."))) {
 			bxe_lastSavedXML = bxe_getXmlDocument();
 			window.location = bxe_config.exitdestination;
 		}
@@ -1792,7 +1792,7 @@
 }
 
 function bxe_not_yet_implemented() {
-	alert("not yet implemented");
+	alert(bxe_i18n.getText("not yet implemented"));
 }
 
 
@@ -2054,20 +2054,20 @@
 function bxe_checkIfNotALink (node) {
 	var sel = window.getSelection();
 	if (sel.anchorNode.parentNode.XMLNode.localName == "a" || sel.focusNode.parentNode.XMLNode.localName == "a") {
-		alert("There is already a link here, please use the \"Edit Attributes\" function, to edit the link.");
+		alert(bxe_i18n.getText("There is already a link here, please use the 'Edit Attributes' function, to edit the link."));
 		return false;
 	}
 	return true;
 }
 
 function bxe_alert(text) {
-	var widg = mozilla.getWidgetModalBox("Alert");
+	var widg = mozilla.getWidgetModalBox(bxe_i18n.getText("Alert"));
 	widg.addText(text);
 	widg.show(100,50, "fixed");
 }
 
 function bxe_validationAlert(messages) {
-	var widg = mozilla.getWidgetModalBox("Validation Alert");
+	var widg = mozilla.getWidgetModalBox(bxe_i18n.getText("Validation Alert"));
 	for (i in messages) {
 		widg.addText( messages[i]["text"] );
 	}
Index: js/table.js
===================================================================
--- js/table.js	(revision 1359)
+++ js/table.js	(working copy)
@@ -66,13 +66,13 @@
 	var thisColspan = bxe_table_getSpanCount(this.getAttribute("colspan"));
 	var rightCol = matrix[rowPos][colPos+thisColspan][1];
 	if (!rightCol) {
-		alert("There's no right cell to be merged");
+		alert(bxe_i18n.getText("There's no right cell to be merged"));
 		return;
 	}
 	var rightRowSpanCount = bxe_table_getSpanCount(rightCol.getAttribute("rowspan"));
 	var thisRowSpanCount  = bxe_table_getSpanCount(this.getAttribute("rowspan"));
 	if (rightRowSpanCount != thisRowSpanCount) {
-			alert("Right cell's rowspan is different to this cell's rowspan, merging not possible");
+			alert(bxe_i18n.getText("Right cell's rowspan is different to this cell's rowspan, merging not possible"));
 			return;
 		
 	}
@@ -104,12 +104,12 @@
 	
 	var thisRowspan = bxe_table_getSpanCount(this.getAttribute("rowspan"));
 	if (!matrix[rowPos + thisRowspan]) {
-		alert("There's no cell below to be merged");
+		alert(bxe_i18n.getText("There's no cell below to be merged"));
 		return;
 	}
 	var downCol = matrix[rowPos + thisRowspan][colPos][1];
 	if (!downCol) {
-		alert("There's no cell below to be merged");
+		alert(bxe_i18n.getText("There's no cell below to be merged"));
 		return;
 	}
 	
@@ -117,7 +117,7 @@
 	var thisColSpanCount = bxe_table_getSpanCount(this.getAttribute("colspan"));
 	
 	if (downColSpanCount != thisColSpanCount) {
-			alert("Down cell's colspan is different to this cell's colspan, merging not possible");
+			alert(bxe_i18n.getText("Down cell's colspan is different to this cell's colspan, merging not possible"));
 			return;
 		
 	}
@@ -260,12 +260,12 @@
 	{
 		
 		output = "<form action=\"javascript:bxe_table_newtable('"+id+"');\" id='bxe_tabelle' name='tabelle'><table class=\"usual\"><tr>";
-		output += "<td >Columns</td><td ><input value='5' size=\"3\" name=\"cols\" /></td>\n";
+		output += "<td >"+bxe_i18n.getText("Columns")+"</td><td ><input value='5' size=\"3\" name=\"cols\" /></td>\n";
 		output += "</tr><tr>\n";
-		output += "<td>Rows</td><td ><input value='5' size=\"3\" name=\"rows\" /></td>\n";
+		output += "<td>"+bxe_i18n.getText("Rows")+"</td><td ><input value='5' size=\"3\" name=\"rows\" /></td>\n";
 		output += "</tr><tr>\n";
 		output += "<td colspan='2' align='right'>\n";
-		output += "<input type='submit' class=\"usual\" value='create' /> </td>";
+		output += "<input type='submit' class=\"usual\" value='"+bxe_i18n.getText("create")+"' /> </td>";
 		output += "</tr></table></form>";
 		BX_popup_addHtml(output);
 		
@@ -273,7 +273,7 @@
 	else
 	{
 		
-		output = "<span class='usual'>Nothing selected, please select the point, where you want the table inserted</span>";
+		output = "<span class='usual'>"+bxe_i18n.getText("Nothing selected, please select the point, where you want the table inserted")+"</span>";
 		BX_popup_addHtml(output);
 		
 	}
@@ -399,22 +399,22 @@
 	
 	if (!(BX_range))
 	{
-		alert("Nothing selected, please select a table cell");
+		alert(bxe_i18n.getText("Nothing selected, please select a table cell"));
 		return;
 	}
 	// <cope> changed != "entry" to "xhtml:td" in order to get the fucking col/rowspan work
 	if (BX_range.startContainer.parentNode.nodeName.toLowerCase() != "xhtml:td")
 	{
-		alert("No table-cell (but " + BX_range.startContainer.parentNode.nodeName +") selected, please choose one");
+		alert(bxe_i18n.getText("No table-cell (but {0}) selected, please choose one",new Array(BX_range.startContainer.parentNode.nodeName)));
 		return ;
 	}
 	BX_popup_start("Add Row or Col",110,90);
 	var output = "";
 	output += "<form action='javascript:bxe_table_insert_row_or_col();' id='bxe_tabelle' name='tabelle'><table class=\"usual\"><tr>";
-	output += "<td ><input name='ch' type='radio' value='row' checked='checked' /></td><td >add row</td>\n";
-	output += "</tr><tr><td ><input name='ch' type='radio' value='col' /></td><td >add col</td>\n";
+	output += "<td ><input name='ch' type='radio' value='row' checked='checked' /></td><td >"+bxe_i18n.getText("add row")+"</td>\n";
+	output += "</tr><tr><td ><input name='ch' type='radio' value='col' /></td><td >"+bxe_i18n.getText("add col")+"</td>\n";
 	
-	output += "</tr><tr><td colspan='2'><input type='submit' class=\"usual\" value='add' /> </td>";
+	output += "</tr><tr><td colspan='2'><input type='submit' class=\"usual\" value='"+bxe_i18n.getText("add")+"' /> </td>";
 	output += "</tr></table></form>";
 	
 	BX_popup_addHtml(output);
@@ -754,8 +754,8 @@
 		}
 	}
 	if(colPos == 0) {
-		alert("ERROR: could not find the cell in matrix!");
-		alert("rowPos: "+rowPos);
+		alert(bxe_i18n.getText("ERROR: could not find the cell in matrix!"));
+		alert(bxe_i18n.getText("rowPos: {0}",new Array(rowPos)));
 		return false;
 	}
 	var pos = new Array();
@@ -947,7 +947,7 @@
 			//only if matrix gives a cell: [0] == 1
 			if(matrix[r][c][0] == 1 || matrix[r][c][0] == 2) {
 				if(matrix[r][c][1] == false) {
-					alert("no cell node at r="+r+" c="+c);
+					alert(bxe_i18n.getText("no cell node at r={0} c={1}",new Array(r,c)));
 				} else {
 					//a cell without a span or a spaning one
 					rowNode.appendChild(matrix[r][c][1]);
@@ -991,7 +991,7 @@
 	
 	var tbody = td.parentNode.parentNode;
 	
-	if(tbody.nodeName.toLowerCase() != "table") { alert("got no table body!"); }
+	if(tbody.nodeName.toLowerCase() != "table") { alert(bxe_i18n.getText("got no table body!")); }
 	return bxe_createTableMatrixFromTable(tbody);
 }
 
Index: js/bxeXMLDocument.js
===================================================================
--- js/bxeXMLDocument.js	(revision 1359)
+++ js/bxeXMLDocument.js	(working copy)
@@ -157,7 +157,7 @@
 			
 		}
 		catch (e) {
-			alert ( e + "\n\n xsltransformdoc.xsldoc is : " + xsltransformdoc.xsldoc);
+			alert ( e + "\n\n "+bxe_i18n.getText("xsltransformdoc.xsldoc is : ") + xsltransformdoc.xsldoc);
 		}
 		processor = new XSLTProcessor();
 		try {
@@ -165,7 +165,7 @@
 			processor.importStylesheet(newDocument);
 		} catch(e) {
 			dump(newDocument.saveXML(newDocument));
-			alert("Something went wrong during importing the XSLT document.\n" + bxe_catch_alert_message(e) + "\n" + newDocument.saveXML(newDocument));
+			alert(bxe_i18n.getText("Something went wrong during importing the XSLT document.")+"\n" + bxe_catch_alert_message(e) + "\n" + newDocument.saveXML(newDocument));
 		}
 		bxe_config.processor = processor;
 		/*
@@ -196,12 +196,12 @@
 		var xhtmldoc = e.currentTarget;
 		debug ("XHTML loaded");
 		
-		bxe_about_box.addText("XHTML loaded...");
+		bxe_about_box.addText(bxe_i18n.getText("XHTML loaded..."));
 		var bxe_area = document.getElementsByTagName("body")[0];
 		var bodyInXhtml = xhtmldoc.getElementsByTagName("body");
 		if (!(bodyInXhtml && bodyInXhtml.length > 0)) {
-			bxe_about_box.addText(" Loading Failed. no 'body' element found in your external XHTML document.");
-			alert("no 'body' element found in your external XHTML document. ");
+			bxe_about_box.addText(bxe_i18n.getText(" Loading Failed. no 'body' element found in your external XHTML document."));
+			alert(bxe_i18n.getText("no 'body' element found in your external XHTML document. "));
 			return false; 
 		}
 		var new_body = document.importNode(bodyInXhtml[0],true);
@@ -221,7 +221,7 @@
 		xml_loaded(xhtmldoc.xmldoc);
 	}
 	
-	bxe_about_box.addText("Import external XHTML ...");
+	bxe_about_box.addText(bxe_i18n.getText("Import external XHTML ..."));
 	var xhtmldoc = document.implementation.createDocument("", "", null);
 	xhtmldoc.addEventListener("load", onload_xhtml, false);
 	xhtmldoc.xmldoc = this;
@@ -229,7 +229,7 @@
 	try {
 		xhtmldoc.load(xhtmlfile);
 	} catch(e) {
-		alert("The xhtmlfile: '" + xhtmlfile + "' was not found");
+		alert(bxe_i18n.getText("The xhtmlfile: '{0}' was not found",new Array(xhtmlfile)));
 	}
 
 	
Index: js/widget.js
===================================================================
--- js/widget.js	(revision 1359)
+++ js/widget.js	(working copy)
@@ -723,7 +723,7 @@
 
 Widget_ContextMenu.prototype.buildElementChooserPopup = function (node, ac ) {
 	this.Popup.removeAllMenuItems();
-	this.Popup.initTitle("Choose Subelement of " + node.vdom.bxeName);
+	this.Popup.initTitle(bxe_i18n.getText("Choose Subelement of {0}",new Array(node.vdom.bxeName)));
 	ac.sort(bxe_nodeSort);
 	for (i = 0; i < ac.length; i++) {
 				if (ac[i].nodeType != 3 && !(ac[i].vdom.bxeDontshow) &&  !bxe_config.dontShowInContext[ac[i].namespaceURI + ":" +ac[i].localName] &&  ac[i].vdom.canHaveChildren ) {
@@ -802,7 +802,7 @@
 			ele.addMenu(this.subPopup,function(e) {
 				var sub = e.currentTarget.Widget.SubPopup;
 				sub.removeAllMenuItems();
-				sub.setTitle("Append");
+				sub.setTitle(bxe_i18n.getText("Append"));
 				var newNode = e.currentTarget.Widget.AppendToNode._node;
 				/*if (newNode.XMLNode.vdom.hasAttributes && e.currentTarget.Widget.EditAttribute) {
 						var menui = sub.addMenuItem("Edit Attributes..", sub.EditAttributes.popup);
@@ -850,7 +850,7 @@
 	if (ac.length > 1 || (ac.length == 1 && ac[0].nodeType != 3) ) {
 	
 	this.addSeparator();
-	var ele = this.addMenuItem("Insert ...");
+	var ele = this.addMenuItem(bxe_i18n.getText("Insert ..."));
 	ele.node.XMLNode = node;
 	ele.node.addEventListener("mouseover",Widget_XPathMouseOver,false);
 	ele.node.addEventListener("mouseout",Widget_XPathMouseOut,false);
@@ -860,7 +860,7 @@
 		var widget = e.currentTarget.Widget;
 		var sub = widget.SubPopup;
 		sub.removeAllMenuItems();
-		sub.setTitle("Insert");
+		sub.setTitle(bxe_i18n.getText("Insert"));
 		sub.appendAllowedChildren(widget.AppendToNode);
 	});
 	}
@@ -1068,7 +1068,7 @@
 		var subm = document.createElement("input");
 		subm.setAttribute("type","submit");
 		subm.name="__submit";
-		subm.setAttribute("value","OK");
+		subm.setAttribute("value",bxe_i18n.getText("OK"));
 		this.hasTable.parentNode.addEventListener("submit", function(e) {
 			var Widget = e.currentTarget.Widget;
 			e.preventDefault();
@@ -1092,7 +1092,7 @@
 		if (this.doCancel) {
 			var cancel = document.createElement("input");
 			cancel.setAttribute("type","reset");
-			cancel.setAttribute("value","Cancel");
+			cancel.setAttribute("value",bxe_i18n.getText("Cancel"));
 			cancel.name="__cancel";
 			this.hasTable.parentNode.addEventListener("reset", function(e) { 
 				bxe_registerKeyHandlers(); 
@@ -1133,7 +1133,7 @@
 
 
 function Widget_ModalAttributeBox() {
-	this.setup("Edit Attributes");
+	this.setup(bxe_i18n.getText("Edit Attributes"));
 }
 
 Widget_ModalAttributeBox.prototype = new Widget_ModalBox();
@@ -1143,7 +1143,7 @@
 		
 	var box = mozilla.getWidgetGlobals().EditAttributes;
 	var xmlnode = e.target.Widget.MenuPopup.MainNode;
-	box.reset("Edit Attributes of " + xmlnode.vdom.bxeName, function(values) {
+	box.reset(bxe_i18n.getText("Edit Attributes of {0}",new Array(xmlnode.vdom.bxeName)), function(values) {
 		
 		this.setAttributes(values);
 	}

--Boundary-00=_F1P6CDzVzGpOYmq
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-- 
bx-editor-dev mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev

--Boundary-00=_F1P6CDzVzGpOYmq--