Skip to content

feat: translate queues ui section into simplified chinese#271

Open
adarshdubey03 wants to merge 1 commit into
volcano-sh:mainfrom
adarshdubey03:feat/queue-ui-chinese-translation
Open

feat: translate queues ui section into simplified chinese#271
adarshdubey03 wants to merge 1 commit into
volcano-sh:mainfrom
adarshdubey03:feat/queue-ui-chinese-translation

Conversation

@adarshdubey03
Copy link
Copy Markdown

Summary

This PR translates the primary Queues page UI in Volcano Dashboard into Simplified Chinese.

The update includes:

  • queue page title
  • search and action labels
  • table headers
  • pagination labels
  • filter labels
  • empty state messaging
  • YAML dialog labels
  • user-facing alerts and errors

Implementation Notes

To keep the contribution incremental and easy to review, the translation logic is scoped locally to the queues feature module.

A lightweight translation dictionary was added under:

frontend/src/components/queues/

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

image

Queue YAML Inspection Dialog

image

@volcano-sh-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kevin-wangzefeng for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot
Copy link
Copy Markdown
Contributor

Welcome @adarshdubey03! It looks like this is your first PR to volcano-sh/dashboard 🎉

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +23 to +25
state: "状态",
filter: "筛选",
all: "全部",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
state: "状态",
filter: "筛选",
all: "全部",
state: "状态",
states: {
Open: "开启",
Closing: "关闭中",
Closed: "已关闭",
},
filter: "筛选",
all: "全部",

}}
>
Filter: {filters.status}
{t.filter}: {filters.status === "All" ? t.all : filters.status}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
{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}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Localize the status values in the filter dropdown menu items to maintain consistency with the rest of the translated UI.

Suggested change
{status === "All" ? t.all : status}
{status === "All" ? t.all : (t.states?.[status] || status)}

<TableCell sx={{ padding: "16px 24px" }}>
<Chip
label={queue.status ? queue.status.state : "Unknown"}
label={queue.status ? queue.status.state : t.unknown}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
label={queue.status ? queue.status.state : t.unknown}
label={queue.status ? (t.states?.[queue.status.state] || queue.status.state) : t.unknown}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants