GRM-86: feat: add Polish as officially supported language

This commit is contained in:
2026-06-24 23:20:59 +00:00
parent 3bb8d75748
commit 91440c1b0a
10 changed files with 167 additions and 89 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
"""Simple i18n for GRM console messages.
Set GRM_LANG environment variable to override the default English.
Supported: en, bg, de, ru, zh.
Supported: en, bg, de, ru, zh, pl.
"""
from __future__ import annotations
@@ -22,7 +22,7 @@ def _(key: str, **kwargs: object) -> str:
If unset, English is always returned regardless of system locale.
"""
lang = os.getenv("GRM_LANG", "en")
if lang not in ("en", "bg", "de", "ru", "zh"):
if lang not in ("en", "bg", "de", "ru", "zh", "pl"):
lang = "en"
template = TRANSLATIONS.get(key, {}).get(lang, key)
return template.format(**kwargs)