(consolidated_po_entries)
return [po_entry for i, po_entry in sorted(rows.items())]
get po_entries listed according to their expected order in the final set
        by using occurrences
get po_entries listed according to their expected order in the final set
        by using occurrences
get po_entries listed according to their expected order in the final set by using occurrences
def _get_rows_for_module_sheet(consolidated_po_entries):
        """
        get po_entries listed according to their expected order in the final set
        by using occurrences
        """
        rows = {}
        # align entries in a dict with their index as the key
        for po_entry in consolidated_po_entries:
            occurrences = po_entry.occurrences
            for occurrence in occurrences:
                index = int(occurrence[1])
                rows[index] = po_entry
        # ensure the number of final translations is same as the highest index
        # if rows:
            # ToDo: Add this message
            # if len(rows) != int(max(rows.keys())):
                # add a message for the user
        # sort by index to have the expected order
        return [po_entry for i, po_entry in sorted(rows.items())]
def _get_rows_for_module_sheet ( consolidated_po_entries ) : rows = { } # align entries in a dict with their index as the key for po_entry in consolidated_po_entries : occurrences = po_entry . occurrences for occurrence in occurrences : index = int ( occurrence [ 1 ] ) rows [ index ] = po_entry # ensure the number of final translations is same as the highest index # if rows: # ToDo: Add this message # if len(rows) != int(max(rows.keys())): # add a message for the user # sort by index to have the expected order return [ po_entry for i , po_entry in sorted ( rows . items ( ) ) ]