Mercurial > hg
diff i18n/polib.py @ 43977:04e0e0e73892
polib: drop an unused local function
Caught by PyCharm.
Differential Revision: https://phab.mercurial-scm.org/D7745
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 27 Dec 2019 13:50:53 -0500 |
parents | 2372284d9457 |
children | 9d2b2df2c2ba |
line wrap: on
line diff
--- a/i18n/polib.py Fri Dec 27 13:47:17 2019 -0500 +++ b/i18n/polib.py Fri Dec 27 13:50:53 2019 -0500 @@ -551,18 +551,6 @@ offsets = [] entries = self.translated_entries() - # the keys are sorted in the .mo file - def cmp(_self, other): - # msgfmt compares entries with msgctxt if it exists - self_msgid = _self.msgctxt and _self.msgctxt or _self.msgid - other_msgid = other.msgctxt and other.msgctxt or other.msgid - if self_msgid > other_msgid: - return 1 - elif self_msgid < other_msgid: - return -1 - else: - return 0 - # add metadata entry entries.sort(key=lambda o: o.msgctxt or o.msgid) mentry = self.metadata_as_entry()