Skip to content

fix(i18n): translate hardcoded data table, actions and inbox filter labels - #1588

Merged
realcodesiman merged 1 commit into
ChatbotXIO:mainfrom
SEYM0UR99:fix/i18n-hardcoded-table-labels
Oct 31, 2026
Merged

realcodesiman merged 1 commit into
ChatbotXIO:mainfrom
SEYM0UR99:fix/i18n-hardcoded-table-labels

Conversation

@SEYM0UR99

Copy link
Copy Markdown
Contributor

Summary

Several table and inbox labels render in English for every locale because they are hardcoded:

  • DataTable / DataTablePagination (packages/ui): "No results.", "x of y row(s) selected.", "Rows per page", "Page x of y" and the page-navigation aria-labels. None of the 57 DataTable usages in the builder pass labels, so every table shows them in English.
  • The "Actions" column header in 7 tables (flows, tags, triggers, webhooks, email topics, custom fields, AI agents) and the "Actions" button of the contacts list.
  • The inbox bot-category filter ("All" / "Human" / "Bot").

Changes

  • packages/ui: new DataTableLabelsProvider / useDataTableLabels (data-table-labels.tsx), mirroring FormOptionalLabelProvider: the app supplies translated defaults once; a table's own labels prop still wins key by key; without a provider the labels stay English, so other consumers are unaffected. DataTablePaginationLabels moved there and is re-exported from data-table-pagination (no API change).
  • builder: DataTableLabelsBridge (next to FormOptionalLabelBridge in the root layout) feeds the keys the hand-rolled paginations already share (analytics.pagination.*, messages.noResults), so no new keys for the tables.
  • "Actions" headers/button use the existing actions.actions. Every affected column already has an explicit id, so column ids, visibility and sorting state are unchanged.
  • New fields.botCategory.options.{all,human,bot} in all 21 locale files; human/bot reuse each locale's existing analytics.human/analytics.bot wording.

Test plan

  • New packages/ui/__tests__/data-table-labels.test.tsx: English fallback without a provider, provider labels (incl. aria-label), per-table override wins
  • pnpm --filter @chatbotx.io/ui test (22 files, 96 tests)
  • pnpm --filter @chatbotx.io/ui check-types, pnpm --filter builder check-types
  • pnpm --filter builder i18n:check (no missing/invalid keys)
  • biome check on all touched files
  • pnpm --filter builder test (1037 files, 9405 tests)

Not covered here (follow-ups if welcome): other hardcoded English such as "Agents"/"Inbox Teams"/"All"/"Unassigned" in useWorkspaceMembers, and the fixed yyyy/MM/dd date format in tables.

🤖 Generated with Claude Code

@github-actions github-actions Bot added the bug Something isn't working as expected label Oct 29, 2026
@realcodesiman
realcodesiman merged commit 0b248b3 into ChatbotXIO:main Oct 31, 2026
14 checks passed
hello-jackytruong referenced this pull request in hello-jackytruong/ChatWorkAI Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants