Commits

Apostolis Bessas  committed 346d018

Make _post_compile accept no arguments.

  • Participants
  • Parent commits 1f6cb84

Comments (0)

Files changed (4)

File transifex/resources/formats/compilation/compilers.py

         self._pre_compile(template)
         content = self._examine_content(template)
         self._compile(content)
-        self._post_compile(content)
+        self._post_compile()
         del self.language
         return self.compiled_template
 

File transifex/resources/formats/pofile.py

 class PoCompiler(GettextCompiler):
     """Compiler for PO files."""
 
-    def _post_compile(self, content):
+    def _post_compile(self):
         """Add copyright headers, if any.
 
         We first try to find where to insert those. Then, we just concatenate

File transifex/resources/formats/qt.py

 
         return doc.toxml()
 
-    def _post_compile(self, content=None):
-        super(QtCompiler, self)._post_compile(content)
+    def _post_compile(self):
+        super(QtCompiler, self)._post_compile(self.compiled_template)
         esc_template_text = re.sub("'(?=(?:(?!>).)*<\/source>)",
             r"&apos;", self.compiled_template)
         esc_template_text = re.sub("'(?=(?:(?!>).)*<\/translation>)",

File transifex/resources/formats/xliff.py

         content = doc.toxml()
         return content
 
-    def _post_compile(self, content=None):
-        super(XliffCompiler, self)._post_compile(content)
-        doc = xml.dom.minidom.parseString(self.compiled_template.encode('UTF-8'))
+    def _post_compile(self):
+        super(XliffCompiler, self)._post_compile()
+        doc = xml.dom.minidom.parseString(
+            self.compiled_template.encode('UTF-8')
+        )
         root = doc.documentElement
         for node in root.getElementsByTagName("target"):
             value = ""