(self, worksheet)
return translations
:return: a list of Translation objects
:return: a list of Translation objects
: return : a list of Translation objects
def _generate_translations_for_po(self, worksheet):
        """
        :return: a list of Translation objects
        """
        rows, source, translation, occurrence, context = self._parse_excel_sheet(worksheet)
        translations = {worksheet.title: []}
        for row in rows[1:]:
            _occurrence = row[occurrence].value or '' if occurrence is not None else ''
            _context = row[context].value if context is not None else ''
            translations[worksheet.title].append(
                Translation(
                    row[source].value,
                    row[translation].value,
                    [(_occurrence, '')],
                    _context)
            )
        return translations
def _generate_translations_for_po ( self , worksheet ) : rows , source , translation , occurrence , context = self . _parse_excel_sheet ( worksheet ) translations = { worksheet . title : [ ] } for row in rows [ 1 : ] : _occurrence = row [ occurrence ] . value or '' if occurrence is not None else '' _context = row [ context ] . value if context is not None else '' translations [ worksheet . title ] . append ( Translation ( row [ source ] . value , row [ translation ] . value , [ ( _occurrence , '' ) ] , _context ) ) return translations