From f6da553aebdbf2aa826f0fe9f69ab51c9d3f3bb4 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Fri, 14 Aug 2026 20:27:06 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20i18n=20cleaner=20regex=20=E2=80=94=20add?= =?UTF-8?q?=20sk/sv=20Translate=20pivots?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/scripts/build_translation_cache.py | 19 +++++++++++++++++-- AppImage/messages/sk/common.json | 19 ++++++++++++++++--- AppImage/messages/sv/common.json | 19 ++++++++++++++++--- 3 files changed, 49 insertions(+), 8 deletions(-) diff --git a/.github/scripts/build_translation_cache.py b/.github/scripts/build_translation_cache.py index dddc9380..e1877328 100644 --- a/.github/scripts/build_translation_cache.py +++ b/.github/scripts/build_translation_cache.py @@ -163,8 +163,23 @@ def translate_appimage( def clean_translation(value: str) -> str: separator = r"[\s\u00a0]*[::]" - translate_labels = "Translate|Traducir|Traduire|Übersetzen|Tradurre|Traduci|Traduzir" - context_labels = "Context|Contexto|Contexte|Kontext|Contesto" + # `Translate` pivot in every locale currently supported. Without + # the target-language variant here, the cleaner can't locate the + # boundary between the context prompt and the real translation, + # and the whole payload leaks through as the translated context. + # Caught on the 2026-08-14 workflow run — every sk / sv key ended + # up as "Technický text používateľského rozhrania…" or + # "Teknisk gränssnittstext för en Proxmox-hanteringspanel.Övers" + # because Preložiť / Översätt / Översätta were missing. + translate_labels = ( + "Translate|Traducir|Traduire|Übersetzen|Tradurre|Traduci|Traduzir" + "|Preložiť|Prelož|Preloz" # sk + "|Översätta|Översätt" # sv + ) + context_labels = ( + "Context|Contexto|Contexte|Kontext|Contesto" + "|Sammanhang" # sv alternate + ) value = re.sub( rf"^.*?({translate_labels}){separator}", "", diff --git a/AppImage/messages/sk/common.json b/AppImage/messages/sk/common.json index 753390f9..4d756042 100644 --- a/AppImage/messages/sk/common.json +++ b/AppImage/messages/sk/common.json @@ -1263,7 +1263,12 @@ "ociBody": "Tento kontajner bol vytvorený z OCI (Docker) obrazu. Pripravovaná podpora aktualizácií OCI kontajnerov vytvorí kontajner znova z novšieho tagu obrazu namiesto aktualizácie balíkov vo vnútri.", "helperNotUpdateable": "Register community-scripts označuje túto aplikáciu ako neaktualizovateľnú.", "helperDetectedTitle": "Našiel sa aktualizačný skript z helper-scripts", - "helperDetectedBody": "Najbezpečnejšie je spustiť aktualizáciu ručne." + "helperDetectedBody": "Najbezpečnejšie je spustiť aktualizáciu ručne.", + "postApplyChecking": "", + "postApplyAllOk": "", + "postApplyNothingPending": "", + "postApplyPartial": "", + "postApplyPartialSubline": "" }, "appEditor": { "closePanel": "Zavrieť panel", @@ -1408,7 +1413,14 @@ "alsoDetectedContainer": "Ďalšie aplikácie nájdené v kontajneri", "addAnotherApplication": "Pridať ďalšiu aplikáciu", "doneButton": "Hotovo", - "editButton": "Upraviť" + "editButton": "Upraviť", + "upstreamErrorTimeout": "", + "upstreamErrorNetwork": "", + "upstreamErrorGeneric": "", + "notificationsEnabled": "", + "notificationsMuted": "", + "notifyUpstreamLabel": "", + "notifyUpstreamHelp": "" } }, "settings": { @@ -1678,7 +1690,8 @@ "post_install_update": "Dostupné aktualizácie optimalizácií ProxMenux", "secure_gateway_update_available": "K dispozícii je aktualizácia Secure Gateway", "nvidia_driver_update_available": "Dostupná aktualizácia ovládača NVIDIA", - "coral_driver_update_available": "Dostupná aktualizácia ovládača Coral TPU" + "coral_driver_update_available": "Dostupná aktualizácia ovládača Coral TPU", + "app_update_available": "" }, "ui": { "quietHours": "Tiché hodiny", diff --git a/AppImage/messages/sv/common.json b/AppImage/messages/sv/common.json index 4bb07f2b..95c5400d 100644 --- a/AppImage/messages/sv/common.json +++ b/AppImage/messages/sv/common.json @@ -1264,7 +1264,12 @@ "ociBody": "Den här behållaren skapades från en OCI-bild (Docker). Uppdateringshantering för OCI-behållare kommer med den kommande OCI-installationsfunktionen - uppdateringar kommer att bygga om behållaren från en nyare bildtagg snarare än att patcha paket inuti.", "helperNotUpdateable": "Community-scripts-registret markerar denna app som inte uppdateringsbar.", "helperDetectedTitle": "Upptäckte en hjälparskriptuppdatering", - "helperDetectedBody": "Att applicera manuellt är säkrast." + "helperDetectedBody": "Att applicera manuellt är säkrast.", + "postApplyChecking": "", + "postApplyAllOk": "", + "postApplyNothingPending": "", + "postApplyPartial": "", + "postApplyPartialSubline": "" }, "appEditor": { "closePanel": "Stäng panelen", @@ -1409,7 +1414,14 @@ "alsoDetectedContainer": "Detekteras även på denna behållare", "addAnotherApplication": "Lägg till ytterligare ett program", "doneButton": "Gjort", - "editButton": "Redigera" + "editButton": "Redigera", + "upstreamErrorTimeout": "", + "upstreamErrorNetwork": "", + "upstreamErrorGeneric": "", + "notificationsEnabled": "", + "notificationsMuted": "", + "notifyUpstreamLabel": "", + "notifyUpstreamHelp": "" } }, "settings": { @@ -1679,7 +1691,8 @@ "post_install_update": "ProxMenux optimeringsuppdateringar tillgängliga", "secure_gateway_update_available": "Secure Gateway uppdatering tillgänglig", "nvidia_driver_update_available": "NVIDIA drivrutinsuppdatering tillgänglig", - "coral_driver_update_available": "Coral TPU drivrutinsuppdatering tillgänglig" + "coral_driver_update_available": "Coral TPU drivrutinsuppdatering tillgänglig", + "app_update_available": "" }, "ui": { "quietHours": "Tysta timmar",