Skip to content

feat: Mehrsprachige Oberfläche EN/DE (Paket G) - #14

Merged
TimInTech merged 1 commit into
mainfrom
feat/paket-g-i18n-en-de
Jun 20, 2026
Merged

feat: Mehrsprachige Oberfläche EN/DE (Paket G)#14
TimInTech merged 1 commit into
mainfrom
feat/paket-g-i18n-en-de

Conversation

@TimInTech

Copy link
Copy Markdown
Owner

Was geändert wurde

Paket G führt eine mehrsprachige Oberfläche (EN/DE) für Blitztext ein:

  • Zentrale i18n-Schicht mit Übersetzungs-Dictionary (Deutsch + Englisch)
  • UI-Strings (Tabs, Workflow- und Preset-Namen, Fenster-/Settings-Texte) laufen über die i18n-Lookups statt über hartkodierte Strings
  • Sprachauswahl in den Einstellungen
  • Basis: a154965 (origin/main, enthält Paket F)

Tests / Verifikation

  • python3 -m compileall app tests → OK
  • QT_QPA_PLATFORM=offscreen WHISPER_GUI_TESTS=1 python -m pytest -q262 passed

i18n-Key-Vollständigkeit

  • de: 125 Keys
  • en: 125 Keys
  • missing: set() (keine fehlenden Keys, EN/DE deckungsgleich)

Hinweis

Ein Sprachwechsel wird nach einem Neustart der App wirksam.

Rollback

  • Vor Merge: PR schließen / Branch feat/paket-g-i18n-en-de löschen.
  • Nach Squash-Merge: Revert des Squash-Commits auf main.

Führt eine umschaltbare App-Oberfläche (Deutsch/Englisch) ein, plus eine
englische README. Leichtgewichtiges Dict-i18n statt Qt-Linguist – passt zum
Muster reiner, isoliert testbarer Domänendaten (wie writing_presets.py),
ohne zusätzliche Build-Toolchain.

Fundament
- app/i18n.py: TRANSLATIONS{de,en} (125 Keys), t(key) mit Fallback
  aktiv→de→key, get_language/set_language (ValueError bei ungültig),
  missing_keys() für die Vollständigkeits-Invariante.
- app/config.py: neuer Top-Level-Schlüssel ui_language (de/en, Default de)
  mit Property-Validierung und Sanitize, analog writing_preset.

UI
- Sprach-Combo im Allgemein-Tab; set_language beim Start (aus config) und
  nach Settings-Save. Hinweis: Sprachwechsel greift nach Neustart.
- String-Extraktion → t(...) in blitztext_linux.py (Tray-Menü + kompletter
  Settings-Dialog), main_window.py, tts_window.py, history_panel.py.
- Workflow- und Preset-Anzeigenamen zweisprachig über i18n-Keys aufgelöst;
  workflows.py/writing_presets.py bleiben strukturell unverändert (deutsche
  Defaults als Fallback, bestehende Tests bleiben grün).
- tts_window.py: Install-/Consent-Texte als lazy t()-Funktionen, damit
  Sprachwechsel greift.

Docs
- README.md jetzt Englisch (primär) + README.de.md (Deutsch), mit
  Sprach-Switcher und ui_language-Dokumentation.

Tests
- tests/test_i18n.py: Key-Vollständigkeit, Placeholder-Konsistenz zwischen
  Sprachen, Fallback- und set_language-Verhalten.
- tests/test_config.py: ui_language-Validierung/Sanitize.
- tests/test_settings_dialog.py: Sprach-Combo.
- tests/test_smoke_launch.py: Offscreen-Boot je Sprache (de/en).
- Volle Suite: 262 grün (offscreen, WHISPER_GUI_TESTS=1).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VMvvvYvyX69yWwFFCjTMzU

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e885958f89

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/blitztext_linux.py
self.config.ui_language = self.combo_ui_language.currentData()

self.config.save()
set_language(self.config.ui_language)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Defer language switch until all widgets refresh

When a user changes ui_language while the app is running, this immediately flips the global translator, but the subsequent refresh only updates a subset of existing UI; the already-open main window and optional history/TTS windows keep their old labels, and some tray items are still hardcoded. Since main() shows the main window at startup, saving a language change leaves users with a mixed-language interface until they restart; either defer set_language to the next launch or refresh/recreate all live widgets.

Useful? React with 👍 / 👎.

@TimInTech
TimInTech merged commit d1ba3cd into main Jun 20, 2026
7 checks passed
@TimInTech
TimInTech deleted the feat/paket-g-i18n-en-de branch June 20, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant