Skip to content

Fix: translate the Add New type tiles - #60

Merged
SandObserver merged 1 commit into
mainfrom
fix/admin-add-new-type-labels
Aug 13, 2026
Merged

SandObserver merged 1 commit into
mainfrom
fix/admin-add-new-type-labels

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Resolve the App, Widget and Folder tile labels inside buildAddNewCard instead of in a module-level constant, which evaluated before initI18n populated the catalog and froze the raw type.* keys.
  • Rename the forEach parameter that shadowed the imported t, so the translation function is reachable inside the loop.
  • Build the tile aria-label from translated parts instead of concatenating a hardcoded English "Add ".

Testing
All green, including the homelab Docker build. No new coverage: the existing i18n reachability test already fails if a catalog key stops being named.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.
  • CHANGELOG.md updated under Unreleased if the change is user-visible.

@SandObserver SandObserver added bug Something isn't working ui/ux UI, UX, and accessibility only fix labels Aug 13, 2026
The tile labels were resolved when the module evaluated, before the
translation catalog was fetched, so each tile kept its lookup key.
Resolve them when the card is built.

Rename the loop variable that shadowed the translation function.
@SandObserver
SandObserver force-pushed the fix/admin-add-new-type-labels branch from 3c18411 to 1a17e98 Compare August 13, 2026 05:43
@SandObserver
SandObserver merged commit 0787046 into main Aug 13, 2026
4 checks passed
@SandObserver
SandObserver deleted the fix/admin-add-new-type-labels branch August 13, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ui/ux UI, UX, and accessibility only fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant