mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-09-15 19:26:45 +00:00
feat(i18n): add Swedish support + include Slovak in auto-fill defaults
Two related changes to the translation infrastructure: 1. Add Swedish (sv) as a supported locale in both the CLI and Monitor translation systems. Inspired by PR #121, which arrived before the current auto-generated cache layout existed. 2. Include Slovak (sk) in the default auto-fill target set. Guardrail #1 in build_i18n_messages.py never overwrites a key whose target value differs from EN, so Vaso73's curated Slovak strings stay intact — auto-translation only fills keys that are still on the English fallback. Trade-off accepted: sk users see decent machine translation for new keys immediately instead of raw English while human curation catches up, and Vaso73 keeps full ownership of the wording via follow-up PRs. Changes: - AppImage/lib/i18n/languages.ts: add "sv" to LanguageCode + register in SUPPORTED_LANGUAGES. - AppImage/messages/sv/common.json: stub — will be filled by the i18n workflow on the local bootstrap. - .github/scripts/build_translation_cache.py: add "sv" to DEFAULT_LANGUAGES. - .github/scripts/build_i18n_messages.py: add "sk" and "sv" to DEFAULT_LANGUAGES; update comments to explain the sk decision. - .github/workflows/build-i18n-messages.yml: default input includes sk + sv; comments updated to match.
This commit is contained in:
@@ -10,12 +10,11 @@ name: Build i18n messages
|
||||
#
|
||||
# Guardrails baked into build_i18n_messages.py:
|
||||
# - Never overwrites a key whose target value differs from EN (i.e.
|
||||
# already translated by a human).
|
||||
# already translated by a human). This is what makes it safe to
|
||||
# include sk in the default set: Vaso73's curated strings are
|
||||
# protected end-to-end; auto only fills keys still on the EN
|
||||
# fallback.
|
||||
# - `{placeholder}` tokens are protected end-to-end.
|
||||
# - `sk` is excluded from the default list — Vaso73's locale is
|
||||
# human-curated and full. Add it back via workflow_dispatch inputs
|
||||
# if you ever want auto-fill for the ~200 keys added post his last
|
||||
# PR (only missing keys will be touched; existing ones are safe).
|
||||
#
|
||||
# Triggers:
|
||||
# - push to develop touching AppImage/messages/en/common.json
|
||||
@@ -35,8 +34,8 @@ on:
|
||||
type: boolean
|
||||
default: false
|
||||
languages:
|
||||
description: 'Comma-separated locales. Default: es,de,fr,it,pt (sk skipped).'
|
||||
default: 'es,de,fr,it,pt'
|
||||
description: 'Comma-separated locales. Default: es,de,fr,it,pt,sk,sv (guardrail protects Vaso73 sk).'
|
||||
default: 'es,de,fr,it,pt,sk,sv'
|
||||
|
||||
# Prevent two runs from racing on the same branch and fighting over the
|
||||
# auto-commit. cancel-in-progress:false because a full first-run may take
|
||||
|
||||
Reference in New Issue
Block a user