Changeset View
Changeset View
Standalone View
Standalone View
pology/message.py
Show First 20 Lines • Show All 935 Lines • ▼ Show 20 Line(s) | 888 | def __init__ (self, init={}): | |||
---|---|---|---|---|---|
936 | self._lines_msgctxt_previous = init.get("_lines_msgctxt_previous", [])[:] | 936 | self._lines_msgctxt_previous = init.get("_lines_msgctxt_previous", [])[:] | ||
937 | self._lines_msgid_previous = init.get("_lines_msgid_previous", [])[:] | 937 | self._lines_msgid_previous = init.get("_lines_msgid_previous", [])[:] | ||
938 | self._lines_msgid_plural_previous = init.get("_lines_msgid_plural_previous", [])[:] | 938 | self._lines_msgid_plural_previous = init.get("_lines_msgid_plural_previous", [])[:] | ||
939 | self._lines_msgctxt = init.get("_lines_msgctxt", [])[:] | 939 | self._lines_msgctxt = init.get("_lines_msgctxt", [])[:] | ||
940 | self._lines_msgid = init.get("_lines_msgid", [])[:] | 940 | self._lines_msgid = init.get("_lines_msgid", [])[:] | ||
941 | self._lines_msgid_plural = init.get("_lines_msgid_plural", [])[:] | 941 | self._lines_msgid_plural = init.get("_lines_msgid_plural", [])[:] | ||
942 | self._lines_msgstr = init.get("_lines_msgstr", [])[:] | 942 | self._lines_msgstr = init.get("_lines_msgstr", [])[:] | ||
943 | 943 | | |||
944 | def __eq__(self, other): | ||||
945 | return ( | ||||
946 | self._manual_comment == other._manual_comment | ||||
947 | and self._auto_comment == other._auto_comment | ||||
948 | and self._source == other._source | ||||
949 | and self._flag == other._flag | ||||
950 | and self._obsolete == other._obsolete | ||||
951 | and self._msgctxt_previous == other._msgctxt_previous | ||||
952 | and self._msgid_previous == other._msgid_previous | ||||
953 | and self._msgid_plural_previous == other._msgid_plural_previous | ||||
954 | and self._msgctxt == other._msgctxt | ||||
955 | and self._msgid == other._msgid | ||||
956 | and self._msgid_plural == other._msgid_plural | ||||
957 | and self._msgstr == other._msgstr | ||||
958 | and self._fuzzy == other._fuzzy | ||||
959 | and self._refline == other._refline | ||||
960 | and self._refentry == other._refentry | ||||
961 | ) | ||||
962 | | ||||
963 | def __repr__(self): | ||||
964 | return 'Message({{"refline": {}, "msgid": {}, ...}})'.format( | ||||
965 | repr(self._refline), repr(self._msgid)) | ||||
944 | 966 | | |||
945 | def _renew_lines (self, wrapf=wrap_field, force=False, colorize=0): | 967 | def _renew_lines (self, wrapf=wrap_field, force=False, colorize=0): | ||
946 | 968 | | |||
947 | if not self.obsolete_modcount: | 969 | if not self.obsolete_modcount: | ||
948 | mod = {} | 970 | mod = {} | ||
949 | mod["manual_comment"] = ( self.manual_comment_modcount | 971 | mod["manual_comment"] = ( self.manual_comment_modcount | ||
950 | or self.manual_comment.modcount) | 972 | or self.manual_comment.modcount) | ||
951 | mod["auto_comment"] = ( self.auto_comment_modcount | 973 | mod["auto_comment"] = ( self.auto_comment_modcount | ||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |