fix: interpolate German session time labels
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- **PR #2381** by @Michaelyklam (fixes #2379) — German relative session-time labels now interpolate the elapsed value instead of rendering the literal `{n}` placeholder in the sidebar/header. The German locale now uses function-valued translations for minutes, hours, and days, matching the other locale bundles.
|
||||
|
||||
## [v0.51.74] — 2026-05-16 — Release AX (stage-367 — 4-PR safe-lane batch — #2362 table-cell spacing + #2363 run-state-consistency RFC + #2365 custom_providers list-format + #2367 settings sidebar i18n)
|
||||
|
||||
### Added
|
||||
|
||||
@@ -6581,9 +6581,9 @@ const LOCALES = {
|
||||
session_toolsets_cleared: 'Toolsets cleared — using global config', // TODO: translate
|
||||
session_toolsets_failed: 'Failed to update toolsets: ', // TODO: translate
|
||||
session_time_unknown: 'Unbekannt',
|
||||
session_time_minutes_ago: 'Vor {n} Minuten',
|
||||
session_time_hours_ago: 'Vor {n} Stunden',
|
||||
session_time_days_ago: 'Vor {n} Tagen',
|
||||
session_time_minutes_ago: (n) => `Vor ${n} Minuten`,
|
||||
session_time_hours_ago: (n) => `Vor ${n} Stunden`,
|
||||
session_time_days_ago: (n) => `Vor ${n} Tagen`,
|
||||
session_time_last_week: 'Letzte Woche',
|
||||
session_time_bucket_today: 'Heute',
|
||||
session_time_bucket_yesterday: 'Gestern',
|
||||
|
||||
@@ -169,3 +169,12 @@ def test_relative_time_strings_are_localized_in_english_and_spanish_bundles():
|
||||
"session_time_bucket_older",
|
||||
):
|
||||
assert key in I18N_JS
|
||||
|
||||
|
||||
def test_german_relative_time_translations_interpolate_numbers():
|
||||
assert "session_time_minutes_ago: (n) => `Vor ${n} Minuten`" in I18N_JS
|
||||
assert "session_time_hours_ago: (n) => `Vor ${n} Stunden`" in I18N_JS
|
||||
assert "session_time_days_ago: (n) => `Vor ${n} Tagen`" in I18N_JS
|
||||
assert "session_time_minutes_ago: 'Vor {n} Minuten'" not in I18N_JS
|
||||
assert "session_time_hours_ago: 'Vor {n} Stunden'" not in I18N_JS
|
||||
assert "session_time_days_ago: 'Vor {n} Tagen'" not in I18N_JS
|
||||
|
||||
Reference in New Issue
Block a user