c3po/converters/po_csv.py
def _write_new_messages(po_file_path, trans_writer, meta_writer,
                        msgids, msgstrs, languages):
    """
    Write new msgids which appeared in po files with empty msgstrs values
    and metadata. Look for all new msgids which are diffed with msgids list
    provided as an argument.
    """
    po_filename = os.path.basename(po_file_path)
    po_file = polib.pofile(po_file_path)

    new_trans = 0
    for entry in po_file:
        if entry.msgid not in msgids:
            new_trans += 1
            trans = [po_filename, entry.tcomment, entry.msgid, entry.msgstr]
            for lang in languages[1:]:
                trans.append(msgstrs[lang].get(entry.msgid, ''))

            meta = dict(entry.__dict__)
            meta.pop('msgid', None)
            meta.pop('msgstr', None)
            meta.pop('tcomment', None)

            trans_writer.writerow(trans)
            meta_writer.writerow([str(meta)])

    return new_trans
def _write_new_messages(po_file_path, trans_writer, meta_writer,
                        msgids, msgstrs, languages):
    """
    Write new msgids which appeared in po files with empty msgstrs values
    and metadata. Look for all new msgids which are diffed with msgids list
    provided as an argument.
    """
    po_filename = os.path.basename(po_file_path)
    po_file = polib.pofile(po_file_path)

    new_trans = 0
    for entry in po_file:
        if entry.msgid not in msgids:
            new_trans += 1
            trans = [po_filename, entry.tcomment, entry.msgid, entry.msgstr]
            for lang in languages[1:]:
                trans.append(msgstrs[lang].get(entry.msgid, ''))

            meta = dict(entry.__dict__)
            meta.pop('msgid', None)
            meta.pop('msgstr', None)
            meta.pop('tcomment', None)

            trans_writer.writerow(trans)
            meta_writer.writerow([str(meta)])

    return new_trans
Write new msgids which appeared in po files with empty msgstrs values
    and metadata. Look for all new msgids which are diffed with msgids list
    provided as an argument.