Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add capitalize and titleCase method for i18n #168

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

warjiang
Copy link
Contributor

@warjiang warjiang commented Jan 16, 2025

What type of PR is this?
/kind feature

What this PR does / why we need it:

1. capitalize or titleCase for some special usages.

  • sidebar case:
    image
  • table column case:
    image
  • card case:
    image
  • segment case:
    image

2. set english as default language.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

1. capitalize or titleCase for some special cases
2. set english as default language for dashboard

@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 16, 2025
@karmada-bot karmada-bot requested review from jhnine and samzong January 16, 2025 13:16
@karmada-bot karmada-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 16, 2025
@@ -21,7 +21,9 @@ const Overview = () => {
},
{
key: 'karmada-status',
label: i18nInstance.t('3fea7ca76cdece641436d7ab0d02ab1b', '状态'),
label: capitalize(
Copy link
Member

Choose a reason for hiding this comment

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

Shall we always use title case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1, for this case capitalize and titleCase method share the same effect, but titleCase is more suitable.

@karmada-bot karmada-bot added do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 18, 2025
@warjiang warjiang force-pushed the feat/i18n-translation branch 2 times, most recently from 2075e7a to a645653 Compare January 18, 2025 09:34
@karmada-bot karmada-bot removed the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Jan 18, 2025
@warjiang
Copy link
Contributor Author

/assign @RainbowMango @samzong

@karmada-bot
Copy link
Collaborator

[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 ask for approval from rainbowmango. For more information see the Kubernetes Code Review Process.

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

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

Copy link
Member

Choose a reason for hiding this comment

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

It seems unnecessary to handle it like this. recommended to correct the i18n text, otherwise, this part of the code logic will confuse users; Additionally, will there be any issues when concatenating prompt words?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants