fix: add notification language UI labels

This commit is contained in:
Vaso73
2026-09-17 11:46:29 +02:00
committed by VAIO73
parent f11aba3492
commit 38ac46460e
3 changed files with 23 additions and 2 deletions
+4 -1
View File
@@ -1981,7 +1981,10 @@
"systemHostname": "System hostname",
"displayNameHint": "Name shown in notifications. Edit it or leave it empty to use the system hostname.",
"activeFooter": "Notifications are active. Each channel follows its own category and event selection.",
"inactiveFooter": "Enable notifications to receive system, health and security alerts through the configured channels."
"inactiveFooter": "Enable notifications to receive system, health and security alerts through the configured channels.",
"notificationLanguage": "Notification language",
"selectNotificationLanguage": "Select notification language",
"notificationLanguageHint": "Used for deterministic runtime notifications even when AI is disabled."
},
"ai": {
"title": "AI enhancement",
+4 -1
View File
@@ -1981,7 +1981,10 @@
"systemHostname": "Názov systému",
"displayNameHint": "Meno zobrazené v notifikáciách. Upravte ho alebo nechajte prázdne a použije sa názov systému.",
"activeFooter": "Notifikácie sú aktívne. Každý kanál posiela udalosti podľa vlastného výberu kategórií.",
"inactiveFooter": "Zapnite notifikácie a dostávajte upozornenia o systéme, stave a bezpečnosti cez nastavené kanály."
"inactiveFooter": "Zapnite notifikácie a dostávajte upozornenia o systéme, stave a bezpečnosti cez nastavené kanály.",
"notificationLanguage": "Jazyk notifikácií",
"selectNotificationLanguage": "Vyberte jazyk notifikácií",
"notificationLanguageHint": "Používa sa pre spoľahlivé runtime notifikácie aj vtedy, keď je AI vypnutá."
},
"ai": {
"title": "AI vylepšenie",
@@ -70,6 +70,21 @@ class RuntimeCatalogTests(unittest.TestCase):
for key in en:
self.assertEqual(_placeholders(sk[key]), _placeholders(en[key]), key)
def test_notification_language_ui_keys_exist_in_both_catalogs(self):
required = {
"notificationLanguage",
"selectNotificationLanguage",
"notificationLanguageHint",
}
for language in ("en", "sk"):
path = APPIMAGE_DIR / "messages" / language / "common.json"
common = json.loads(path.read_text(encoding="utf-8"))
ui = common["settings"]["notifications"]["ui"]
self.assertTrue(required.issubset(ui), language)
for key in required:
self.assertIsInstance(ui[key], str)
self.assertTrue(ui[key].strip(), f"{language}:{key}")
def test_slovak_catalog_preserves_placeholders_and_translates_static_text(self):
en = self.catalogs["en"]["templates"]
sk = self.catalogs["sk"]["templates"]