mdpo.polib module

Workaround for polib issue and required improvement to make work mdpo.

See https://github.com/izimobil/polib/pulls for details.

mdpo.polib.poentry__cmp__(self, other, compare_obsolete=True, compare_msgstr=True, compare_occurrences=True)

Compare entries like __cmp__ method of polib.POEntry.

This function add custom entries comparison capabilities to polib.POEntry, needed by mdpo to prevent some errors.

Parameters:
  • self (polib.POEntry) – Entry to be compared.

  • other (polib.POEntry) – Entry to compare against.

  • compare_obsolete (bool) – Indicates if the obsolete property of the entries will be used comparing them.

  • compare_msgstr (bool) – Indicates if the msgstr property of the entries will be used comparing them.

  • compare_occurrences (bool) – Indicates if the occurrences property of the entries will be used comparing them.