mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 03:09:49 +08:00
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.
33 lines
638 B
Python
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
|