Skip to content

fix: translate execution-provider strings from German to English - #47

Merged
smb merged 2 commits into
mainfrom
fix/english-provider-labels
Sep 5, 2026
Merged

smb merged 2 commits into
mainfrom
fix/english-provider-labels

Conversation

@smb

@smb smb commented Sep 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The execution-provider feature left German strings in an otherwise English
UI. All six user-visible German strings found in the feature are now
translated:

  • src/matteloop/ui/inspector.py — "Rechenbeschleunigung" to "Compute acceleration" (accessible name and form-row label), matching the sentence-case style of the surrounding labels ("Edge treatment", "Output FPS").
  • src/matteloop/core/parameters.py — the stale_category invalidation reason to "Compute acceleration".
  • src/matteloop/core/execution_providers.py — the "– empfohlen" suffix to "– recommended", and the "– experimentell" suffix to "– experimental", both keeping the same en-dash and spacing (e.g. "CPU – recommended", "Apple CoreML – experimental").
  • src/matteloop/jobs/segmentation_host.py — the CPU-fallback notice shown when a model fails to load on the selected provider, from German to "{label} could not load this model. Processing continues on the CPU.".

Tests that asserted on the old German text were updated to match:
tests/test_app_smoke.py, tests/ui/test_parameter_inspector.py,
tests/core/test_parameters.py, tests/core/test_execution_providers.py,
tests/jobs/models/test_session.py.

A repo-wide grep for the German fragments (Rechenbeschleunigung,
empfohlen, experimentell, konnte, fortgesetzt, über die) and for
stray umlauts/ß in src//tests/ .py files turns up nothing left in
user-visible strings (the two remaining umlaut hits are Unicode-path test
fixtures, unrelated to this feature).

Test plan

  • uv run ruff check .
  • uv run mypy src
  • QT_QPA_PLATFORM=offscreen uv run pytest -q (all passing)
  • uv run python scripts/check_guardrails.py
  • grep -rniE "Rechenbeschleunigung|empfohlen|experimentell|konnte|fortgesetzt|über die" . returns no hits

🤖 Generated with Claude Code

smb and others added 2 commits September 5, 2026 09:28
The execution-provider feature introduced four German strings into an
otherwise English UI: the accessible name and form-row label for the
compute-acceleration picker in the inspector, the invalidation reason
recorded when the provider changes, and the "recommended" suffix
appended to a provider's label. Everything around them (the other
inspector form labels, the CLI's own "[recommended]" marker) is
English, so the German stood out as an inconsistency rather than a
deliberate choice.

Changed "Rechenbeschleunigung" to "Compute acceleration" in
src/matteloop/ui/inspector.py (accessible name and form label) and in
src/matteloop/core/parameters.py (the stale_category reason recorded
by _reduce_execution_provider). Changed the "– empfohlen" suffix built
in src/matteloop/core/execution_providers.py to "– recommended",
keeping the same en-dash and spacing so provider labels read e.g.
"CPU – recommended".

Updated the tests that asserted on the old German text so they match
the new English strings: the CLI smoke test's --providers output, the
inspector test's provider-option fixtures, and the execution-provider
unit tests' expected labels.

Trigger: repro — running `matteloop --providers`, or opening the
inspector's execution-provider row, showed "Rechenbeschleunigung" and
"– empfohlen" next to English labels like "Edge treatment" and
"Output FPS".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The first pass on this branch fixed four German strings but left two
more, both flagged in review as still user-visible: the "experimental"
suffix on the CoreML provider label, and the fallback notice shown
when a model can't load on the selected provider. Leaving them meant
the inspector's provider picker still mixed German and English labels
side by side ("Apple CoreML – experimentell" next to "CPU –
recommended"), and the fallback path showed a German sentence in an
otherwise English error/notice surface.

Changed the "– experimentell" suffix in
src/matteloop/core/execution_providers.py to "– experimental",
matching the en-dash and spacing of the "– recommended" suffix built
in the same function.

Changed the CPU-fallback notice in
src/matteloop/jobs/segmentation_host.py from
"{label} konnte dieses Modell nicht laden. Die Verarbeitung wird
automatisch über die CPU fortgesetzt." to
"{label} could not load this model. Processing continues on the CPU.",
keeping it as an f-string with the provider label in the same
position.

Updated the tests that asserted on the old German text:
tests/ui/test_parameter_inspector.py and
tests/core/test_execution_providers.py (the CoreML label), and
tests/jobs/models/test_session.py (the fallback notice).

Trigger: repro — selecting a BirefNet model on Apple Silicon showed
"Apple CoreML – experimentell" in the provider picker, and forcing a
model load failure on a non-default provider produced a German
fallback notice, both alongside otherwise-English UI text.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@smb
smb merged commit 26f775d into main Sep 5, 2026
17 of 18 checks passed
@smb
smb deleted the fix/english-provider-labels branch September 5, 2026 09:22
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