Index: main/trunk/greenstone3/web/interfaces/oran/js/documentmaker_scripts.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentmaker_scripts.js	(revision 25295)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentmaker_scripts.js	(revision 25296)
@@ -37,5 +37,5 @@
 	if(docLinks.length == 0)
 	{
-		document.getElementById("gs_content").innerHTML = "No documents in the Document Basket";
+		document.getElementById("gs_content").innerHTML = gs.text.dse.no_docs;
 		return;
 	}
@@ -241,5 +241,5 @@
 	
 	//Add a title to the top-level item
-	var title = createSectionTitle("UNTITLED DOCUMENT");
+	var title = createSectionTitle(gs.text.dse.untitled);
 	topLevelLI.appendChild(title);
 	topLevelLI.sectionTitle = title;
@@ -293,5 +293,5 @@
 		//Create the delete section link
 		var deleteSectionLink = document.createElement("A");
-		deleteSectionLink.innerHTML = "delete section";
+		deleteSectionLink.innerHTML = gs.text.dse.delete_section;
 		deleteSectionLink.setAttribute("href", "javascript:;");
 		deleteSectionLink.setAttribute("class", "menuLink");
@@ -509,5 +509,5 @@
 	//"Edit" link
 	var toggleLink = document.createElement("A");
-	toggleLink.innerHTML = "edit";
+	toggleLink.innerHTML = gs.text.dse.edit;
 	toggleLink.setAttribute("class", "menuLink");
 	toggleLink.setAttribute("href", "javascript:;");
@@ -520,5 +520,5 @@
 		
 	var newSectionLink = document.createElement("A");
-	newSectionLink.innerHTML = "add&nbsp;sub-section";
+	newSectionLink.innerHTML = gs.text.dse.add_sub_section.replace(/ /g, "&nbsp;");
 	newSectionLink.setAttribute("class", "menuLink");
 	newSectionLink.setAttribute("href", "javascript:;");
@@ -542,5 +542,5 @@
 	//"Duplicate" link
 	var duplicateLink = document.createElement("A");
-	duplicateLink.innerHTML = "duplicate";
+	duplicateLink.innerHTML = gs.text.dse.duplicate;
 	duplicateLink.setAttribute("class", "menuLink");
 	duplicateLink.setAttribute("href", "javascript:;");
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentmaker_scripts_util.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentmaker_scripts_util.js	(revision 25295)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentmaker_scripts_util.js	(revision 25296)
@@ -178,4 +178,5 @@
 function save()
 {
+	//This works in most cases but will not work when taking a doc from one collection to another, will need to be fixed at some point
 	var collection;
 	if(gs.cgiParams.c && gs.cgiParams.c != "")
@@ -204,6 +205,6 @@
 		var value = valueCell.innerHTML;
 		
-		gs.functions.removeArchivesMetadata(collection /*bad*/, "localsite" /*bad*/, docID, name, null, value, function(){console.log("REMOVED ARCHIVES");});
-		addCollectionToBuild(collection); /*bad*/
+		gs.functions.removeArchivesMetadata(collection, gs.xsltParams.site_name, docID, name, null, value, function(){console.log("REMOVED ARCHIVES");});
+		addCollectionToBuild(collection);
 		
 		removeFromParent(currentRow);
@@ -232,9 +233,9 @@
 			if(changedElem.originalValue)
 			{
-				gs.functions.setArchivesMetadata(collection, "localsite" /*bad*/, docID, name, null, changedElem.innerHTML, changedElem.originalValue, "override", function(){console.log("SAVED ARCHIVES");});
+				gs.functions.setArchivesMetadata(collection, gs.xsltParams.site_name, docID, name, null, changedElem.innerHTML, changedElem.originalValue, "override", function(){console.log("SAVED ARCHIVES");});
 			}
 			else
 			{
-				gs.functions.setArchivesMetadata(collection, "localsite" /*bad*/, docID, name, null, changedElem.innerHTML, null, "accumulate", function(){console.log("SAVED ARCHIVES");});
+				gs.functions.setArchivesMetadata(collection, gs.xsltParams.site_name, docID, name, null, changedElem.innerHTML, null, "accumulate", function(){console.log("SAVED ARCHIVES");});
 			}
 			changedElem.originalValue = changedElem.innerHTML;
@@ -282,8 +283,8 @@
 			if(!xml || checkForErrors(xml))
 			{
-				alert("There was an error saving, aborting");
+				alert(gs.text.dse.error_saving);
 			
 				var saveButton = document.getElementById("saveButton");
-				saveButton.innerHTML = "Save changes";
+				saveButton.innerHTML = gs.text.dse.save_changes;
 				saveButton.disabled = false;
 				
@@ -300,8 +301,8 @@
 	{
 		var saveButton = document.getElementById("saveButton");
-		saveButton.innerHTML = "Saving...";
+		saveButton.innerHTML = gs.text.dse.saving + "...";
 		saveButton.disabled = true;
 
-		statusID = _statusBar.addStatus("Modifying archive files...");
+		statusID = _statusBar.addStatus(gs.text.dse.modifying_archives + "...");
 		ajax.send("a=g&rt=r&s=DocumentExecuteTransaction&s1.transactions=" + request);
 	}
@@ -313,6 +314,6 @@
 	if(!collections || collections.length == 0)
 	{
-		console.log("List of collections to build is empty");
-		saveButton.innerHTML = "Save changes";
+		console.log(gs.text.dse.empty_collection_list);
+		saveButton.innerHTML = gs.text.save_changes;
 		saveButton.disabled = false;
 		return;
@@ -334,8 +335,8 @@
 				if(!xml || checkForErrors(xml))
 				{
-					alert("Could not build collection -> " + collections[counter] + ", aborting");
+					alert(gs.text.dse.could_not_build_p1 + " " + collections[counter] + gs.text.dse.could_not_build_p2);
 					
 					_statusBar.removeStatus(statusID);
-					saveButton.innerHTML = "Save changes";
+					saveButton.innerHTML = gs.text.dse.save_changes;
 					saveButton.disabled = false;
 					
@@ -359,8 +360,8 @@
 							if(!xml || checkForErrors(xml))
 							{
-								alert("Could not activate collection -> " + collections[counter] + ", aborting");
+								alert(gs.text.dse.could_not_activate_p1 + " " + collections[counter] + gs.text.dse.could_not_activate_p2);
 								
 								_statusBar.removeStatus(statusID);
-								saveButton.innerHTML = "Save changes";
+								saveButton.innerHTML = gs.text.dse.save_changes;
 								saveButton.disabled = false;
 								
@@ -387,5 +388,5 @@
 
 									_statusBar.removeStatus(statusID);
-									saveButton.innerHTML = "Save changes";
+									saveButton.innerHTML = gs.text.dse.save_changes;
 									saveButton.disabled = false;
 								});
@@ -393,10 +394,10 @@
 						}
 					}
-					_statusBar.changeStatus(statusID, "Activating collection " + collections[counter] + "...");
+					_statusBar.changeStatus(statusID, gs.text.dse.activating + " " + collections[counter] + "...");
 					localAjax.send();
 				});
 			}
 		}
-		statusID = _statusBar.addStatus("Building collection " + collections[counter] + "...");
+		statusID = _statusBar.addStatus(gs.text.dse.activating + " " + collections[counter] + "...");
 		ajax.send();
 	}
@@ -421,8 +422,8 @@
 				if(!xml || checkForErrors(xml))
 				{
-					alert("Could not check status of " + serverFunction + ", there was an error in the XML, aborting");
+					alert(gs.text.dse.could_not_check_status_p1 + " " + serverFunction + gs.text.dse.could_not_check_status_p2a);
 					
 					_statusBar.removeStatus(statusID);
-					saveButton.innerHTML = "Save changes";
+					saveButton.innerHTML = gs.text.dse.save_changes;
 					saveButton.disabled = false;
 					
@@ -439,8 +440,8 @@
 				else if (code == HALTED || code == ERROR)
 				{
-					alert("Could not check status of " + serverFunction + ", there was an error on the server, aborting");
+					alert(gs.text.dse.could_not_check_status_p1 + " " + serverFunction + gs.text.dse.could_not_check_status_p2b);
 					
 					_statusBar.removeStatus(statusID);
-					saveButton.innerHTML = "Save changes";
+					saveButton.innerHTML = gs.text.dse.save_changes;
 					saveButton.disabled = false;
 				}
@@ -485,5 +486,5 @@
 	if(errorElems && errorElems.length > 0)
 	{
-		var errorString = "There was an error saving your changes: ";
+		var errorString = gs.text.dse.error_saving_changes + ": ";
 		for(var i = 0; i < errorElems.length; i++)
 		{
@@ -507,7 +508,7 @@
 		if(xmlDoc.parseError.errorCode!=0)
 		{
-			txt = "Error Code: " + xmlDoc.parseError.errorCode + "\n";
-			txt = txt + "Error Reason: " + xmlDoc.parseError.reason;
-			txt = txt + "Error Line: " + xmlDoc.parseError.line;
+			txt = dse.error_code + ": " + xmlDoc.parseError.errorCode + "\n";
+			txt = txt + dse.error_reason + ": " + xmlDoc.parseError.reason;
+			txt = txt + dse.error_line + ": " + xmlDoc.parseError.line;
 			console.log(txt);
 			return null;
@@ -524,5 +525,5 @@
 		if (xmlDoc.getElementsByTagName("parsererror").length > 0)
 		{
-			console.log("There was an error parsing the XML");
+			console.log(gs.text.dse.xml_error);
 			return null;
 		}
@@ -532,5 +533,5 @@
 	else
 	{
-		console.log('Your browser cannot handle XML validation');
+		console.log(gs.text.dse.browse_cannot_validate_xml);
 	}
 	return null;
@@ -641,5 +642,5 @@
 	
 	var addRowButton = document.createElement("BUTTON");
-	addRowButton.innerHTML = "Add new metadata";
+	addRowButton.innerHTML = gs.text.dse.add_new_metadata;
 	addRowButton.onclick = function() 
 	{ 
@@ -647,5 +648,5 @@
 		if(!name || name == "")
 		{
-			console.log("No value given for new metadata name");
+			console.log(gs.text.dse.no_value_given);
 			return;
 		}
@@ -738,5 +739,5 @@
 	//The "Save changes" button
 	var saveButton = document.createElement("BUTTON");
-	saveButton.innerHTML = "Save changes";
+	saveButton.innerHTML = gs.text.dse.save_changes;
 	saveButton.setAttribute("onclick", "save();");
 	saveButton.setAttribute("id", "saveButton");
@@ -751,5 +752,5 @@
 	//The "Create new document" button
 	var newDocButton = document.createElement("BUTTON");
-	newDocButton.innerHTML = "Create new document";
+	newDocButton.innerHTML = gs.text.dse.create_new_document;
 	newDocButton.setAttribute("onclick", "createNewDocumentArea();");
 	newDocCell.appendChild(newDocButton);
@@ -784,5 +785,5 @@
 		currentNode = currentNode.nextSibling;
 	}
-	return "{UNTITLED}";
+	return "";
 }
 
@@ -871,10 +872,10 @@
 		{
 			textDiv.style.display = "none";
-			section.menu.editTextLink.innerHTML = "edit";
+			section.menu.editTextLink.innerHTML = gs.text.dse.edit;
 		}
 		else
 		{
 			textDiv.style.display = "block";
-			section.menu.editTextLink.innerHTML = "hide";
+			section.menu.editTextLink.innerHTML = gs.text.dse.hide;
 		}
 	}
@@ -912,5 +913,5 @@
 	else
 	{
-		textSpan.appendChild(document.createTextNode(" [UNTITLED SECTION] "));
+		textSpan.appendChild(document.createTextNode(" [" + gs.text.dse.untitled_section + "] "));
 	}
 	return textSpan;
@@ -937,5 +938,5 @@
 	var newSecLI = document.createElement("LI");
 	var newSpan = document.createElement("SPAN");
-	newSpan.innerHTML = "Insert new section ";
+	newSpan.innerHTML = gs.text.dse.insert_new_section + " ";
 	
 	newSecLI.sectionTitle = newSpan;
