Remove NLS from low-level code
- De-NLS errors in config.js, URITemplate.js
- Also remove unused values from messages file
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/URITemplate.js b/bundles/org.eclipse.orion.client.core/web/orion/URITemplate.js
index 370a969..a050901 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/URITemplate.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/URITemplate.js
@@ -49,7 +49,7 @@
 		if (encoding === "U+R-,") { //$NON-NLS-0$

 			return encodeURI(value).replace(/%5B/g, '[').replace(/%5D/g, ']').replace(/,/g, '%2C'); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$

 		}

-		throw new Error(messages["Unknown allowed character set: "] + encoding);

+		throw new Error("Unknown allowed character set: " + encoding);

 	}

 	

 	function encodeArray(value, encoding, separator) {

@@ -79,7 +79,7 @@
 		for (var i=0; i < rawSpecs.length; i++) {

 			var match = rawSpecs[i].match(VARSPEC_REGEXP);

 			if (match === null) {

-				throw new Error(messages["Bad VarSpec: "] + text);

+				throw new Error("Bad VarSpec: " + text); //$NON-NLS-0$

 			}

 			result.push({

 				name: match[1], 

@@ -92,7 +92,7 @@
 	

 	function Expression(text) {

 		if (text.length === 0) {

-			throw new Error(messages["Invalid Expression: 0 length expression"]);

+			throw new Error("Invalid Expression: 0 length expression"); //$NON-NLS-0$

 		}

 		

 		this._operator = OPERATOR[text[0]];

@@ -146,7 +146,7 @@
 							resultText += encodeObject(value, this._operator.allow, "=", this._operator.sep); //$NON-NLS-0$

 						}

 					} else {

-						throw new Error(messages["bad param type: "] + name + " : " + valueType); //$NON-NLS-1$

+						throw new Error("bad param type: " + name + " : " + valueType); //$NON-NLS-1$ //$NON-NLS-0$

 					}

 					result.push(resultText);

 				}

@@ -163,7 +163,7 @@
 			result.push(new Literal(text.substring(current, curlyStartIndex)));

 			var curlyEndIndex = text.indexOf("}", curlyStartIndex + 1); //$NON-NLS-0$

 			if (curlyEndIndex === -1) {

-				throw new Error(messages["Invalid template: "] + text);

+				throw new Error("Invalid template: " + text); //$NON-NLS-0$

 			}

 			result.push(new Expression(text.substring(curlyStartIndex + 1, curlyEndIndex)));

 			current = curlyEndIndex + 1;

diff --git a/bundles/org.eclipse.orion.client.core/web/orion/config.js b/bundles/org.eclipse.orion.client.core/web/orion/config.js
index e25dac0..04f7f79 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/config.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/config.js
@@ -10,7 +10,7 @@
  ******************************************************************************/
 /*global console define setTimeout*/
 /*jslint sub:true*/
-define(['i18n!orion/nls/messages', 'orion/textview/eventTarget', 'orion/preferences'], function(messages, mEventTarget, mPreferences) {
+define(['orion/textview/eventTarget', 'orion/preferences'], function(mEventTarget, mPreferences) {
 var PreferencesService = mPreferences.PreferencesService;
 var ServiceTracker, ManagedServiceTracker, ConfigAdminFactory, ConfigStore, ConfigAdminImpl, ConfigImpl;
 
@@ -53,7 +53,7 @@
 		};
 		this.close = function() {
 			if (state !== OPENED) {
-				throw messages['Already closed'];
+				throw 'Already closed'; //$NON-NLS-0$
 			}
 			state = CLOSED;
 			serviceRegistry.removeEventListener('serviceAdded', addedListener); //$NON-NLS-0$
@@ -76,7 +76,7 @@
 		};
 		this.open = function() {
 			if (state !== CLOSED) {
-				throw messages['Already open'];
+				throw 'Already open'; //$NON-NLS-0$
 			}
 			state = OPENED;
 			var self = this;
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/nls/root/messages.js b/bundles/org.eclipse.orion.client.core/web/orion/nls/root/messages.js
index 64852e4..a08d4e2 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/nls/root/messages.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/nls/root/messages.js
@@ -37,8 +37,6 @@
 	"Type a keyword or wild card to search in root": "Type a keyword or wild card to search in root",
 	"Orion is in Beta. Please try it out but BEWARE your data may be lost.": "Orion is in Beta. Please try it out but BEWARE your data may be lost.",
 	"Add this page to the favorites list": "Add this page to the favorites list",
-	"Already closed": "Already closed",
-	"Already open": "Already open",
 	"LOG: ": "LOG: ",
 	"Switch": "Switch",
 	"Switch the type of outliner used": "Switch the type of outliner used",
@@ -47,12 +45,6 @@
 	"no tree model": "no tree model",
 	"no renderer": "no renderer",
 	"could not find table row ": "could not find table row ",
-	"Timeout exceeded: ": "Timeout exceeded: ",
-	"Unknown allowed character set: ": "Unknown allowed character set: ",
-	"Bad VarSpec: ": "Bad VarSpec: ",
-	"Invalid Expression: 0 length expression": "Invalid Expression: 0 length expression",
-	"bad param type: ": "bad param type: ",
-	"Invalid template: ": "Invalid template: ",
 	"Resource is out of sync with the server. Do you want to save it anyway?": "Resource is out of sync with the server. Do you want to save it anyway?",
 	"Orion Home": "Orion Home",
 	"Operations - Press spacebar to show current operations": "Operations - Press spacebar to show current operations",
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/xhr.js b/bundles/org.eclipse.orion.client.core/web/orion/xhr.js
index 267a6f0..12fefba 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/xhr.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/xhr.js
@@ -88,7 +88,7 @@
 		if (typeof options.timeout === 'number') { //$NON-NLS-0$
 			xhr.timeout = options.timeout;
 			xhr.addEventListener('timeout', function(e) { //$NON-NLS-0$
-				d.reject('Timeout exceeded: ' + e);
+				d.reject('Timeout exceeded: ' + e); //$NON-NLS-0$
 			});
 		}
 		xhr.onreadystatechange = function() {