Skip to content

fix(web): localize hardcoded strings in queue and pod dialogs - #394

Open
Norway-02 wants to merge 1 commit into
volcano-sh:mainfrom
Norway-02:fix/web-localize-queue-and-pod-dialogs
Open

Norway-02 wants to merge 1 commit into
volcano-sh:mainfrom
Norway-02:fix/web-localize-queue-and-pod-dialogs

Conversation

@Norway-02

Copy link
Copy Markdown

What this PR does / why we need it:

This PR localizes hardcoded English strings in queue and pod management dialogs using existing next-intl translation keys:

  1. QueueEditDialog (apps/web/src/components/(dashboard)/queues/queue-edit-dialog.tsx):

    • Localized dialog title to {t("edit.title", { name: queueName })}
    • Localized dialog description to {t("edit.description")}
    • Localized tab switchers to {t("create.formTab")} and {t("create.yamlTab")}
    • Localized action buttons to {tc("actions.cancel")} and {tc("actions.reset")}
    • Localized YAML parsing fallback error message to t("create.parseFormFailed")
  2. PodEditDialog (apps/web/src/components/(dashboard)/pods/pod-edit-dialog.tsx):

    • Localized the Reset action button to {tc("actions.reset")}
  3. CreatePodDialog (apps/web/src/components/(dashboard)/pods/pod-create-dialog.tsx):

    • Localized the Reset action button to {tc("actions.reset")}

All matching translation keys are already defined in messages/en/ and messages/zh-CN/, ensuring full localization completeness without any dictionary schema drift.

Verification:

  • npm run i18n:validate --workspace=web: Passed (all locale message keys in sync)
  • npm run check-types: Passed (0 errors)
  • npm run lint: Passed (0 errors)
  • npm run build: Passed (production build succeeded)

Use next-intl translation keys instead of hardcoded English strings across
queue and pod management dialogs:
- In QueueEditDialog: localize dialog title and description, Form and YAML
  tab buttons, Cancel and Reset actions, and YAML parse error fallback.
- In PodEditDialog & CreatePodDialog: localize the Reset button using the
  shared common action translation.

Signed-off-by: Norway-02 <anshulkhetade02@gmail.com>
@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

@Norway-02

Copy link
Copy Markdown
Author

Hi @de6p @JesseStutler @kevin-wangzefeng, could you please review this PR when you have a moment? Thanks!

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