Skip to content

feat(dashboard): i18n for Admin (Users & Roles) + Media gallery#109

Closed
telivity-otaip wants to merge 1 commit into
mainfrom
feat/i18n-admin-media
Closed

feat(dashboard): i18n for Admin (Users & Roles) + Media gallery#109
telivity-otaip wants to merge 1 commit into
mainfrom
feat/i18n-admin-media

Conversation

@telivity-otaip

Copy link
Copy Markdown
Collaborator

What

Extends i18n coverage to the dashboard surfaces added since the i18n foundation (#105): the Admin / RBAC panels (Users & Roles) and the Media / photo gallery. These shipped in #108 with hardcoded English; this wires them to react-i18next and adds the keys.

Changes

  • en.json: new admin.* (33 keys) and media.* (13 keys) namespaces — source of truth
  • de.json: matching keys as empty stubs (fall back to English until translated) — ready for the German contributor (@bluemoon288)
  • Migrated to t():
    • components/admin/UserSettings.tsx (+ sub-components RoleChecklist, EditRoles)
    • components/admin/RolesSettings.tsx (+ PermissionMatrix)
    • components/media/MediaGallery.tsx
  • Interpolation: admin.rolesForUser → "Roles — {{name}}", admin.permissionsCount → "{{count}} permissions"
  • Left as data: permission group names and permission labels come from the API/permission catalog, not hardcoded UI strings, so they're not in the locale files.

Scope

Strings-only migration of the three new components. No behavior change. Other pages remain on the incremental migration path.

Verification

  • pnpm --filter @telivityhaip/dashboard typecheck — clean
  • pnpm --filter @telivityhaip/dashboard test — 43/43 pass
  • pnpm --filter @telivityhaip/dashboard build — OK

🤖 Generated with Claude Code

Extends i18n coverage to the surfaces added since the i18n foundation (#105):
the Admin/RBAC user + role management panels and the media/photo gallery.

- en.json: new `admin.*` (33 keys) and `media.*` (13 keys) namespaces
- de.json: matching empty stubs (fall back to English) for translation
- Migrate UserSettings, RolesSettings (+ sub-components RoleChecklist,
  EditRoles, PermissionMatrix) and MediaGallery to t()
- Interpolation for "Roles — {{name}}" and "{{count}} permissions"
- Data-driven strings (permission group names/labels from the API) left as-is

Verified: dashboard typecheck clean, 43/43 tests pass, build OK.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@telivity-otaip

Copy link
Copy Markdown
Collaborator Author

Superseded by #110, which includes this admin/media migration plus @bluemoon288's recovered German translations from #107 in one coherent PR.

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