feat: translate queues ui section into simplified chinese#271
feat: translate queues ui section into simplified chinese#271adarshdubey03 wants to merge 1 commit into
Conversation
|
[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 @adarshdubey03! It looks like this is your first PR to volcano-sh/dashboard 🎉 |
There was a problem hiding this comment.
Code Review
This pull request implements internationalization for the Volcano Queues dashboard by introducing a Simplified Chinese translation dictionary and updating various components to use localized strings. The changes cover the queue table, pagination, search bar, and dialogs. The review feedback correctly identifies that while static labels were translated, dynamic queue states (such as 'Open' or 'Closed') were still being displayed in English. The reviewer provided actionable code suggestions to add a state mapping to the translation file and apply it across the table headers, filters, and row chips to ensure a fully localized user experience.
| state: "状态", | ||
| filter: "筛选", | ||
| all: "全部", |
There was a problem hiding this comment.
The current translation dictionary is missing the localized strings for the queue states (Open, Closing, Closed). Adding a mapping for these will ensure the UI is fully translated into Simplified Chinese as intended.
| state: "状态", | |
| filter: "筛选", | |
| all: "全部", | |
| state: "状态", | |
| states: { | |
| Open: "开启", | |
| Closing: "关闭中", | |
| Closed: "已关闭", | |
| }, | |
| filter: "筛选", | |
| all: "全部", |
| }} | ||
| > | ||
| Filter: {filters.status} | ||
| {t.filter}: {filters.status === "All" ? t.all : filters.status} |
There was a problem hiding this comment.
The filter label currently displays the raw state value in English (e.g., 'Filter: Open'). Use the suggested states mapping from the translation file to display the localized value.
| {t.filter}: {filters.status === "All" ? t.all : filters.status} | |
| {t.filter}: {filters.status === "All" ? t.all : (t.states?.[filters.status] || filters.status)} |
| }} | ||
| > | ||
| {status} | ||
| {status === "All" ? t.all : status} |
| <TableCell sx={{ padding: "16px 24px" }}> | ||
| <Chip | ||
| label={queue.status ? queue.status.state : "Unknown"} | ||
| label={queue.status ? queue.status.state : t.unknown} |
There was a problem hiding this comment.
The status chip label in the table row should be localized using the states mapping for a better user experience in the Simplified Chinese UI.
| label={queue.status ? queue.status.state : t.unknown} | |
| label={queue.status ? (t.states?.[queue.status.state] || queue.status.state) : t.unknown} |
Summary
This PR translates the primary Queues page UI in Volcano Dashboard into Simplified Chinese.
The update includes:
Implementation Notes
To keep the contribution incremental and easy to review, the translation logic is scoped locally to the
queuesfeature module.A lightweight translation dictionary was added under:
and used only by queue-related components without introducing broader application-wide i18n infrastructure or additional dependencies.
This keeps the change feature-scoped, low-risk, and easy to extend incrementally in future contributions.
Notes
This PR focuses on presentation-layer queue UI translation only. Kubernetes resource names, raw YAML content, and backend queue state values remain unchanged.
Screenshots
Main Queues Page
Queue YAML Inspection Dialog