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

translate ch-comments to en-comments #2927

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

koko2pp
Copy link

@koko2pp koko2pp commented Nov 27, 2023

What problem does this PR solve?
Issue Number: #2576

Problem Summary: translate Chinese annotations to English annotations

What is changed and how it works?
What's Changed: The Chinese comments in the code files have been converted into English comments.

How it Works: Write a GO script. For various programming languages, extract all comments from code files using different regular expressions, then determine whether the comments contain Chinese characters. If there are Chinese characters, use the Baidu Translate API to translate the Chinese comments into English comments, and then write them back to the file.

Side effects(Breaking backward compatibility? Performance regression?): None

Check List
[1] Relevant documentation/comments is changed or added
[1] I acknowledge that all my contributions will be made under the project's license

@koko2pp
Copy link
Author

koko2pp commented Nov 28, 2023

cicheck

@Ziy1-Tan Ziy1-Tan self-requested a review November 29, 2023 09:31
Copy link
Contributor

@Ziy1-Tan Ziy1-Tan left a comment

Choose a reason for hiding this comment

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

I suggest that it is best not to break the original code format. Otherwise you will struggle with ci endlessly.🤣

*/
struct IoPerfMetric {
uint64_t readCount;
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment translation should not break the original code format.

* | group id |
* | 32 | 32 |
* | logic pool id | copyset id |
*/
inline GroupNid ToGroupNid(const LogicPoolID &logicPoolId,
const CopysetID &copysetId) {
inline GroupNid ToGroupNid(const LogicPoolID& logicPoolId,
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto.

@caoxianfei1
Copy link
Contributor

repeated with #2754 and ensure it.

@caoxianfei1 caoxianfei1 reopened this Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants