def test_valid(self): """Validate that we can name all plural equations""" for code, dummy, dummy, pluraleq in self.all_data(): self.assertNotEqual( get_plural_type(code, pluraleq), data.PLURAL_UNKNOWN, 'Can not guess plural type for {0} ({1})'.format( code, pluraleq))
def test_valid(self): """Validate that we can name all plural equations""" for language in Language.objects.all(): self.assertNotEqual( get_plural_type(language.code, language.pluralequation), data.PLURAL_UNKNOWN, 'Can not guess plural type for {0} ({1})'.format( language.code, language.pluralequation))
def test_valid(self): """Validate that we can name all plural equations.""" for code, _unused, _unused, pluraleq in self.all_data(): self.assertNotEqual( get_plural_type(code.replace('_', '-').split('-')[0], pluraleq), data.PLURAL_UNKNOWN, 'Can not guess plural type for {0} ({1})'.format(code, pluraleq), )
def test_valid(self): """Validate that we can name all plural formulas.""" for code, _name, _nplurals, plural_formula in self.all_data(): self.assertNotEqual( get_plural_type(code.replace("_", "-").split("-")[0], plural_formula), data.PLURAL_UNKNOWN, "Can not guess plural type for {0} ({1})".format(code, plural_formula), )
def test_valid(self): """Validates that we can name all plural equations""" for language in Language.objects.all(): self.assertNotEqual( get_plural_type( language.code, language.pluralequation ), data.PLURAL_UNKNOWN )
def test_valid(self): """Validate that we can name all plural equations""" for code, dummy, dummy, pluraleq in self.all_data(): self.assertNotEqual( get_plural_type(code, pluraleq), data.PLURAL_UNKNOWN, 'Can not guess plural type for {0} ({1})'.format( code, pluraleq ) )
def forwards(self, orm): "Write your forwards methods here." for lang in orm.Language.objects.all(): # Cleanup plural equation if lang.pluralequation[-1] == ';': lang.pluralequation = lang.pluralequation[:-1] if lang.pluralequation[0] == '(' and lang.pluralequation[-1] == ')': lang.pluralequation = lang.pluralequation[1:-1] # Add plural type lang.plural_type = get_plural_type(lang.code, lang.pluralequation) lang.save()
def forwards(self, orm): "Write your forwards methods here." for lang in orm.Language.objects.all(): # Cleanup plural equation if lang.pluralequation[-1] == ';': lang.pluralequation = lang.pluralequation[:-1] if lang.pluralequation[0] == '(' and lang.pluralequation[-1] == ')': lang.pluralequation = lang.pluralequation[1:-1] # Add plural type lang.plural_type = get_plural_type( lang.code, lang.pluralequation ) lang.save()