Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/modules/bl_i18n_utils/utils.py
| Show First 20 Lines • Show All 451 Lines • ▼ Show 20 Lines | class I18nMessages: | ||||
| def unescape(self, do_all=True): | def unescape(self, do_all=True): | ||||
| for msg in self.msgs.values(): | for msg in self.msgs.values(): | ||||
| msg.unescape(do_all) | msg.unescape(do_all) | ||||
| def check(self, fix=False): | def check(self, fix=False): | ||||
| """ | """ | ||||
| Check consistency between messages and their keys! | Check consistency between messages and their keys! | ||||
| Check messages using format stuff are consistant between msgid and msgstr! | Check messages using format stuff are consistent between msgid and msgstr! | ||||
| If fix is True, tries to fix the issues. | If fix is True, tries to fix the issues. | ||||
| Return a list of found errors (empty if everything went OK!). | Return a list of found errors (empty if everything went OK!). | ||||
| """ | """ | ||||
| ret = [] | ret = [] | ||||
| default_context = self.settings.DEFAULT_CONTEXT | default_context = self.settings.DEFAULT_CONTEXT | ||||
| _format = re.compile(self.settings.CHECK_PRINTF_FORMAT).findall | _format = re.compile(self.settings.CHECK_PRINTF_FORMAT).findall | ||||
| done_keys = set() | done_keys = set() | ||||
| rem = set() | rem = set() | ||||
| ▲ Show 20 Lines • Show All 1,085 Lines • Show Last 20 Lines | |||||