Skip to content

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.🤣

* IO performance statistics composite metric type
*/
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.

*/
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.

3 participants