feat: implement internationalization support with next-intl#270
feat: implement internationalization support with next-intl#270shiverse94 wants to merge 2 commits into
Conversation
- Added support for English and Simplified Chinese locales. - Introduced message files for various components and pages. - Implemented locale-prefixed routing and validation script for message key parity. - Updated navigation and layout components to utilize internationalization features. Signed-off-by: Shive <shiverse94@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @shiverse94! It looks like this is your first PR to volcano-sh/dashboard 🎉 |
There was a problem hiding this comment.
Code Review
This pull request transitions the Volcano dashboard to a Next.js monorepo using TurboRepo, Shadcn UI, and tRPC, while introducing internationalization support for English and Simplified Chinese. The new architecture covers management pages for Jobs, Queues, Pods, and PodGroups. Review feedback primarily highlighted several instances of hardcoded user-facing strings in pagination components, form labels, tooltips, and chart legends that need to be integrated into the i18n system. Furthermore, the reviewer advised replacing brittle setTimeout patterns with tRPC query invalidation to ensure reliable UI updates following data mutations.
| onClick={() => onPageChange(page + 1)} | ||
| disabled={disabled || page >= safeTotalPages || total === 0} | ||
| > | ||
| Next |
| disabled={disabled} | ||
| /> | ||
| <Label htmlFor="reclaimable" className="text-sm font-normal cursor-pointer"> | ||
| Reclaimable |
| <Label htmlFor="queue-name"> | ||
| Queue Name {!nameReadOnly && <span className="text-destructive">*</span>} | ||
| </Label> |
| return ( | ||
| <div className="flex items-center justify-between space-x-2 py-4"> | ||
| <div className="flex-1 text-sm text-muted-foreground"> | ||
| Showing {startItem} to {endItem} of {total} results |
| </div> | ||
| <div className="flex items-center space-x-2"> | ||
| <div className="flex items-center space-x-2"> | ||
| <span className="text-sm text-muted-foreground">Show:</span> |
| setTimeout(async () => { | ||
| await handleRefresh() | ||
| }, 2000) |
| setTimeout(async () => { | ||
| await handleRefresh() | ||
| }, 2000) |
There was a problem hiding this comment.
|
|
||
| const chartConfig = { | ||
| allocated: { | ||
| label: "Allocated", |
| setTimeout(async () => { | ||
| await handleRefresh() | ||
| }, 2000) |
| color: "hsl(var(--chart-1))", | ||
| }, | ||
| capacity: { | ||
| label: "Capability", |
…hive-new-chinese-trans
|
Adding label DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
feat: implement internationalization support with next-intl
I created this branch from Deep’s PR for the new dashboard. Once his PR is merged, this branch can also be merged since it was created from his branch. Looking forward to contributing to and collaborating on the dashboard project.
@JesseStutler @de6p
Changes -> 217b0fc