INNER CODE UNIT · Python
category_label
GHJJ123/brainrotguard · i18n/__init__.py:76
def category_label(category: str, locale: str | None, short: bool = False) -> str:
"""Return localized category label."""
if short:
if category == "edu":
return t(locale, "Edu")
return t(locale, "Fun")
if category == "edu":
return t(locale, "Educational")
return t(locale, "Entertainment")
def day_label(day: str, locale: str | None, short: bool = False) -> str:
"""Return localized day label from canonical day code."""
mapping = {
"mon": ("Monday", "Mon"),
"tue": ("Tuesday", "Tue"),
"wed": ("Wednesday", "Wed"),
"thu": ("Thursday", "Thu"),