def num_plurals(catalog, message):
 if (not message.pluralizable):
  if (not isinstance(message.string, string_types)):
   raise TranslationError('Found plural forms for non-pluralizable message')
  return
 elif (catalog is None):
  return
 msgstrs = message.string
 if (not isinstance(msgstrs, (list, tuple))):
  msgstrs = (msgstrs,)
 if (len(msgstrs) != catalog.num_plurals):
  raise TranslationError(('Wrong number of plural forms (expected %d)' % catalog.num_plurals))

def num_plurals ( catalog , message ) : if ( not message . pluralizable ) : if ( not isinstance ( message . string , string_types ) ) : raise TranslationError ( 'Found plural forms for non-pluralizable message' ) return elif ( catalog is None ) : return msgstrs = message . string if ( not isinstance ( msgstrs , ( list , tuple ) ) ) : msgstrs = ( msgstrs , ) if ( len ( msgstrs ) != catalog . num_plurals ) : raise TranslationError ( ( 'Wrong number of plural forms (expected %d)' % catalog . num_plurals ) )
verify the number of plurals in the translation .