i18n DataGrid view-toggle tooltips

PR #4262 introduced a DataGrid view-toggle button with two hardcoded
English tooltip strings ("Switch to table view" / "Switch to card view")
and explicitly deferred translation to a follow-up. Without the keys in
the locale JSON files, next-intl would surface the raw label paths at
runtime for any non-English user once the strings move to t().

Adds switchToTableView and switchToCardView label entries in
messages.ts, swaps the hardcoded strings in DataGrid.tsx for
t(labels.x), and populates "switch-to-table-view" and
"switch-to-card-view" in all 52 locale JSON files with proper
translations (no English fallbacks).

Verified in Playwright that the toggle tooltip renders the expected
translated string in en-US, fr-FR and ja-JP via the same useMessages
pipeline already used for the search field placeholder, with no
MISSING_MESSAGE errors in the console.
This commit is contained in:
Yan committed 2026-05-25 08:36:23 -04:00
1 parent cee7884a94
commit c43dd1da92
54 files changed
+109 -1

No files matched your search

+2
View File
@@ -304,6 +304,8 @@
"sum": "Tổng",
"support": "Hỗ trợ",
"switch-account": "Chuyển tài khoản",
"switch-to-card-view": "Chuyển sang chế độ xem thẻ",
"switch-to-table-view": "Chuyển sang chế độ xem bảng",
"table": "Bảng",
"tablet": "Máy tính bảng",
"tag": "Thẻ",