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

feature i18n switcher #53

Merged
merged 7 commits into from
Jun 26, 2024
Merged

feature i18n switcher #53

merged 7 commits into from
Jun 26, 2024

Conversation

warjiang
Copy link
Contributor

@warjiang warjiang commented Jun 24, 2024

What type of PR is this?
/kind feature

What this PR does / why we need it:

  • add i18n translation use the WIP i18n-cli
  • add i18n switcher to switch lang between zh-CN and en-US
    Feishu20240625-071527
  • add prettier(for consistent code-style) and husky(which is use to config git hooks)
  • add eslint to check code

Which issue(s) this PR fixes:
None

Special notes for your reviewer:
The prettier will format a bunch of code, but no changes for code logic, it's no need to review the logic line by line.

Does this PR introduce a user-facing change?:

- add i18n for dashboard

1. remove unused console.log
2. remove unused i18next plugin
3. refactor init render flow
4. add switch lang logic and icon for zh/cn

Signed-off-by: warjiang <[email protected]>
- translation for zh-CN/en-US(by i18n-cli)
- add lang switcher on the navigation bar

Signed-off-by: warjiang <[email protected]>
- husky for config git hooks
- prettier for consistent code style

Signed-off-by: warjiang <[email protected]>
@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 24, 2024
@karmada-bot karmada-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 24, 2024
@warjiang
Copy link
Contributor Author

cc @chouchongYHMing

- custom eslint rules in packages dir
- lint code in dashboard

Signed-off-by: warjiang <[email protected]>
@RainbowMango
Copy link
Member

/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 26, 2024
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

The pull request process is described 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants