Recent Issues
|
Sign in
with your
Google
Account to create issues and add comments
Issue 65:
xliff2po & po2xliff should handle context
Unified Diff
File: translate/convert/test_xliff2po.py
Patch Set:
Jump to:
Index: translate/convert/test_xliff2po.py
===================================================================
--- translate/convert/test_xliff2po.py (revision 7848)
+++ translate/convert/test_xliff2po.py (working copy)
@@ -170,7 +170,20 @@
assert potext.index('msgstr[0] "inkomo"')
assert potext.index('msgstr[1] "iinkomo"')
+ def test_xliff_with_context(self):
+ """tests if we support context strings"""
+ minixlf = self.xliffskeleton % '''<trans-unit id="1">
+ <source>gold</source>
+ <target>ouro</target>
+ <context-group name="po-1025" purpose="match information">
+ <context context-type="x-unknown">the precious</context>
+ </context-group>
+</trans-unit>'''
+ pofile = self.xliff2po(minixlf)
+ unit = pofile.units[0]
+ assert unit.getcontext() == "the precious"
+
class TestBasicXLIFF2PO(TestXLIFF2PO):
"""This tests a basic XLIFF file without xmlns attribute"""