def test_pos(self): try: gettextutil.check_version() except gettextutil.GettextError: return gettextutil.check_po(PODIR, self.lang)
def test_missing(self): try: gettextutil.check_version() except gettextutil.GettextError: return results = gettextutil.get_missing(PODIR, "quodlibet") if results: raise MissingTranslationsException(results)
def test_missing(self): try: gettextutil.check_version() except gettextutil.GettextError: return result = gettextutil.get_missing(PODIR, "quodlibet") if result: raise Exception("\n".join(result))
def has_gettext_util(): try: gettextutil.check_version() except gettextutil.GettextError: return False return True
def setUpClass(cls): gettextutil.check_version() pot_path = gettextutil.update_pot(PODIR, "quodlibet") cls.pot = polib.pofile(pot_path)
def setUpClass(cls): gettextutil.check_version() with gettextutil.create_pot(PODIR, "quodlibet") as pot_path: cls.pot = polib.pofile(pot_path)