Files
DeepTutor/deeptutor/core/response_languages.py
Bingxi Zhao (Frank) 47ae8a27e4 Merge PR #2515: feat(i18n): add Hungarian as an interface and reply language
Combine Hungarian with Italian UI and Hindi reply-language registries; translate 49 newly integrated keys and add the Hungarian endonym to Italian. Regenerate router and frontend contracts. 33 Python locale tests, full Node suite and locale parity pass.
2026-11-14 23:36:26 +08:00

33 lines
638 B
Python

"""Supported reply languages used by core turn-request validation."""
SUPPORTED_RESPONSE_LANGUAGES: tuple[str, ...] = (
"en",
"zh",
"zh-tw",
"ja",
"ko",
"es",
"fr",
"de",
"ru",
"pt",
"it",
"ar",
"pl",
"uk",
"ms",
"vi",
"tr",
"hi",
"hu",
)
def validate_reply_language_override(value: str | None) -> str | None:
"""Validate an explicit session choice; ``None`` follows the account default."""
if value is None:
return None
if value not in SUPPORTED_RESPONSE_LANGUAGES:
raise ValueError("Unsupported reply language")
return value