Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(38)

Issue 65: xliff2po & po2xliff should handle context

Unified Diff

File: translate/storage/pypo.py
Patch Set: A more complete patch, supporting CPO and pypo Created 1 year, 4 months ago
Jump to:
View side by-side-diff with in line comments
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()

Powered by Google App Engine
This is Rietveld r159