Mercurial > repos > IBBoard
diff Lang/TranslationXmlExtractor.cs @ 80:a23c07137fa4
Re #32: Add staged loading of translations
* Move from passing entire document to XmlTranslationSet to just passing XmlNodeList of translation nodes
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 10 Apr 2010 19:05:26 +0000 |
parents | a70d89de1435 |
children |
line wrap: on
line diff
--- a/Lang/TranslationXmlExtractor.cs Fri Apr 09 19:48:51 2010 +0000 +++ b/Lang/TranslationXmlExtractor.cs Sat Apr 10 19:05:26 2010 +0000 @@ -10,21 +10,11 @@ { public class TranslationXmlExtractor { - public Dictionary<string, string> ExtractTranslationsFromDocument(XmlDocument doc) + public XmlNodeList GetTranslationNodes(XmlDocument doc) { try { - XmlNodeList translationNodes = doc.GetElementsByTagName("translation"); - Dictionary<string, string> translationStrings = new Dictionary<string, string>(); - - foreach (XmlNode node in translationNodes) - { - string id = node.Attributes["id"].Value; - string text = node.InnerText; - translationStrings.Add(id, text); - } - - return translationStrings; + return doc.GetElementsByTagName("translation"); } catch(Exception ex) {