Esempio n. 1
0
 def test_targetlanguage(self):
     minipo = 'msgid "String"\nmsgstr "String"\n'
     tmx = self.po2tmx(minipo, targetlanguage="xh")
     print("The generated xml:")
     print(bytes(tmx))
     tuv = tmx.document.findall(".//%s" % tmx.namespaced("tuv"))[1]
     #tag[0] will be the source, we want the target tuv
     assert tuv.get("{%s}lang" % XML_NS) == "xh"
Esempio n. 2
0
 def test_targetlanguage(self):
     minipo = 'msgid "String"\nmsgstr "String"\n'
     tmx = self.po2tmx(minipo, targetlanguage="xh")
     print "The generated xml:"
     print str(tmx)
     tuv = tmx.document.findall(".//%s" % tmx.namespaced("tuv"))[1]
     #tag[0] will be the source, we want the target tuv
     assert tuv.get("{%s}lang" % XML_NS) == "xh"