[gnome-doc-utils] xml2po/modes/mallard.py: Set @xml:lang on pages, bug #630053



commit 5495828ef2dafef0ae1f7b1a8957b4740d921dba
Author: Shaun McCance <shaunm gnome org>
Date:   Mon Jan 10 11:10:41 2011 -0500

    xml2po/modes/mallard.py: Set @xml:lang on pages, bug #630053

 xml2po/xml2po/modes/mallard.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/xml2po/xml2po/modes/mallard.py b/xml2po/xml2po/modes/mallard.py
index 2dac38a..017c281 100644
--- a/xml2po/xml2po/modes/mallard.py
+++ b/xml2po/xml2po/modes/mallard.py
@@ -130,5 +130,7 @@ class mallardXmlMode(basicXmlMode):
         self._output_images(root,msg)
 
     def postProcessXmlTranslation(self, doc, language, translators):
-        # FIXME: add translator credits
-        return
+        """Sets a language and translators in "doc" tree."""
+        root = doc.getRootElement()
+        if root and root.name == 'page':
+            root.setProp('xml:lang', language)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]