This commit is contained in:
Your Name 2024-05-20 15:43:44 -04:00 committed by Henri Dickson
parent de52e0b1ea
commit d79b0b1952
2 changed files with 22 additions and 22 deletions

View file

@ -27,24 +27,24 @@ def user_stats_of(collection: Collection, identity: APIdentity):
return collection.get_stats(identity) if identity else {}
# @register.filter(is_safe=True)
# @stringfilter
# def prural_items(category: str):
# # TODO support i18n here
# # return _(f"items of {category}")
# if category == "book":
# return "本书"
# elif category == "movie":
# return "部电影"
# elif category == "tv":
# return "部剧集"
# elif category == "album" or category == "music":
# return "张专辑"
# elif category == "game":
# return "个游戏"
# elif category == "podcast":
# return "个播客"
# elif category == "performance":
# return "场演出"
# else:
# return category
@register.filter(is_safe=True)
@stringfilter
def prural_items(category: str):
# TODO support i18n here
# return _(f"items of {category}")
if category == "book":
return "本书"
elif category == "movie":
return "部电影"
elif category == "tv":
return "部剧集"
elif category == "album" or category == "music":
return "张专辑"
elif category == "game":
return "个游戏"
elif category == "podcast":
return "个播客"
elif category == "performance":
return "场演出"
else:
return category

View file

@ -14,7 +14,7 @@ django-jsonform
django-maintenance-mode
django-markdownx
django-ninja
django-oauth-toolkit
django-oauth-toolkit==2.3.0
django-polymorphic
django-redis
django-rq