From: <al...@us...> - 2010-02-24 02:06:11
|
Revision: 13840 http://translate.svn.sourceforge.net/translate/?rev=13840&view=rev Author: alaaosh Date: 2010-02-24 02:06:05 +0000 (Wed, 24 Feb 2010) Log Message: ----------- convert for Store not just Unit Modified Paths: -------------- src/trunk/Pootle/local_apps/pootle_store/models.py Modified: src/trunk/Pootle/local_apps/pootle_store/models.py =================================================================== --- src/trunk/Pootle/local_apps/pootle_store/models.py 2010-02-24 02:05:18 UTC (rev 13839) +++ src/trunk/Pootle/local_apps/pootle_store/models.py 2010-02-24 02:06:05 UTC (rev 13840) @@ -512,6 +512,15 @@ if match is not None: unit.sync(match) + def convert(self, fileclass): + """export to fileclass""" + output = fileclass() + output.settargetlanguage(self.translation_project.language.code) + #FIXME: we should add some headers + for unit in self.units.iterator(): + output.addunit(unit.convert(output.UnitClass)) + return output + ######################## TranslationStore ######################### def _get_units(self): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |