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/storage/pypo.py
Patch Set: A more complete patch, supporting CPO and pypo
Jump to:
Index: translate/storage/pypo.py
===================================================================
--- translate/storage/pypo.py (revision 7897)
+++ translate/storage/pypo.py (working copy)
@@ -740,6 +740,16 @@
"""Get the message context."""
return unquotefrompo(self.msgctxt) + self._extract_msgidcomments()
+ def setcontext(self, context):
+ """Sets the message context.
+
+ @param context: unescaped context message
+ """
+ if not self.msgctxt and context:
+ self.msgctxt = quoteforpo(context)
+ else:
+ self.msgctxt = []
+
def getid(self):
"""Returns a unique identifier for this unit."""
context = self.getcontext()