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

Add: add the i18nTool project for ospp 2024. #127

Closed

Conversation

chouchongYHMing
Copy link
Contributor

What type of PR is this?
feature

What this PR does / why we need it:
It's the out-of-the-box i18n tool, which can i18n transforms codes under development. It also offers translation feature, adapting multiple ways of translating.
Which issue(s) this PR fixes:
Fixes #53

Special notes for your reviewer:
It still needs some enhance and fix up.
Does this PR introduce a user-facing change?:
NONE.

-add i18nTool

@karmada-bot karmada-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 17, 2024
@chouchongYHMing
Copy link
Contributor Author

It still needs to add and renovate the 'translate' part. More, some Chinese content needs to turn into English. It won't wait long time. 🫡

@chouchongYHMing
Copy link
Contributor Author

I want to add the LLM API soon.

@warjiang
Copy link
Contributor

/assign

Copy link
Contributor

Choose a reason for hiding this comment

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

we use pnpm, it's no need to use npm to manage dependencies

Copy link
Contributor

Choose a reason for hiding this comment

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

so we can delete this file

if (!configFilePath) {
// Get the directory where this script is located and construct the default path to i18n.config.js
const scriptDir = path.dirname(__filename); // Get the directory where i18n-tool.js is located
configFilePath = path.join(scriptDir, 'i18n.config.js');
Copy link
Contributor

Choose a reason for hiding this comment

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

Here, you mean if user don't specify the config file, our cli will try to load the i18n.config.js in the i18n-tool ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, This config in the same directory is set as the default path, if the user does not specify it by the -c parameter.

// Get the directory where this script is located and construct the default path to i18n.config.js
const scriptDir = path.dirname(__filename); // Get the directory where i18n-tool.js is located
configFilePath = path.join(scriptDir, 'i18n.config.js');
console.log(`No configuration file specified, using default path: ${configFilePath}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we unify all the log usage ? You provide the log method, you use console.log for some cases but log for another cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My original idea is adding debug model that developer can test and find where are the errors. The idea might be childish. I will improve.

@karmada-bot
Copy link
Collaborator

Adding label do-not-merge/contains-merge-commits because PR contains merge commits, which are not allowed in this repository.
Use git rebase to reapply your commits on top of the target branch. Detailed instructions for doing so can be found here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@karmada-bot karmada-bot added the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Sep 25, 2024
@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 warjiang. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. 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