La version 5 de Planète Casio. Regroupe le forum, les programmes, les tutoriel, les sprites et tous les autres outils développés par nos soins.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
398 B

from app import app
def pluralize(count, singular="", plural="s"):
Make a noun plural. Meant for templates; use it like this:
Il y a {{ n }} groupe{{ n | pluralize }}.
You can specify different suffixes if "s" is not relevant;
Il y a {{ n }} hibou{{ n | pluralize("", "x") }}.
return singular if count <= 1 else plural