changeset 10:3b7a321e7c4c

Fixes #4 - unexpected exception in translations * Call private language load method to avoid check and exception * Don't null the local table after we've set a default
author IBBoard <dev@ibboard.co.uk>
date Sun, 04 Jan 2009 12:02:36 +0000
parents 562390c8d618
children ba9239164de2
files Lang/Translation.cs
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Lang/Translation.cs	Fri Jan 02 20:20:10 2009 +0000
+++ b/Lang/Translation.cs	Sun Jan 04 12:02:36 2009 +0000
@@ -40,8 +40,7 @@
 			FileInfo file = GetTranslationFile(DEFAULT_LANGUAGE);
 			XmlDocument doc = LoadTranslationDocument(file);
 			LoadTranslationsFromDocument(doc, translationsDefault);
-			translationsLocal = null;
-			LoadTranslation(lang);
+			LoadTranslationForLanguage(language);
 		}
 		
 		private static void InitialiseDefaults(string appPath)
@@ -140,7 +139,7 @@
 		{			
 			if (translationLanguage == "" || translationLanguage == null)
 			{
-				throw new ArgumentException("Translation language cannot be empty or null");
+				throw new ArgumentException("Translation language cannot be null or empty");
 			}
 
 			LoadTranslationForLanguage(translationLanguage);