Esempio n. 1
0
    def get_content(self, context):
        archive_file = StringIO()

        po_project_export(self.object, self.object.get_current_version(),
                          archive_file)

        return archive_file.getvalue()
Esempio n. 2
0
 def do_po_project_export(self):
     """
     Export all catalogs from a project into PO files with the good directory 
     structure
     """
     if not self.project_slug:
         raise CommandError("project slug is empty")
     
     # Open and fill tarball archive
     #archive_file = StringIO()
     archive_file = open("{0}.tar.gz".format(self.project_slug), "wb")
     
     po_project_export(self.project_slug, archive_file)
     
     archive_file.close()
Esempio n. 3
0
    def get_content(self, context):
        archive_file = StringIO()

        po_project_export(self.object, self.object.get_current_version(), archive_file)

        return archive_file.getvalue()