curve icon indicating copy to clipboard operation
curve copied to clipboard

translate Chinese annotations to English annotations

Open koko2pp opened this issue 1 year ago • 13 comments

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 avatar Sep 15 '23 07:09 koko2pp

cicheck

koko2pp avatar Sep 18 '23 02:09 koko2pp

good job, I'll review it, but it's too many files changed, so may be a long time will be needed.

aspirer avatar Sep 19 '23 06:09 aspirer

My review content:

  1. Checked all file changes to see if they were all changes in comments content.
  2. Randomly checked whether the translation of some comments is accurate. There is a small problem, which can be modified or not.

TODO for Contributor @koko2pp :

  1. Ensure that CI passes. It may involve some cpplint, pylint and other static code format check failures. You can modify it as needed, or if it cannot be modified or is not suitable for modification, you can add // NOLINT comment.
  2. If possible, it is best to open up the translation tool you wrote and give us a link to the code base. This is voluntary.

Thank you very much for your contribution. Great work~

aspirer avatar Sep 20 '23 05:09 aspirer

Tips: Please do not use force push with an all in one commit. You can add a new commit so we can get what you changed based on last commit. Otherwise, the changes between the two pushes cannot be confirmed. There are too many change files involved and it is impossible to review them one by one.

aspirer avatar Sep 20 '23 06:09 aspirer

cicheck

Cyber-SiKu avatar Oct 12 '23 09:10 Cyber-SiKu

cicheck

Cyber-SiKu avatar Oct 13 '23 07:10 Cyber-SiKu

cicheck

Cyber-SiKu avatar Oct 13 '23 14:10 Cyber-SiKu

cicheck

Cyber-SiKu avatar Oct 13 '23 14:10 Cyber-SiKu

cicheck

koko2pp avatar Oct 13 '23 15:10 koko2pp

cicheck

Cyber-SiKu avatar Oct 23 '23 02:10 Cyber-SiKu

Maybe you can retry ci after rebase.

SeanHai avatar Nov 07 '23 01:11 SeanHai

cicheck

koko2pp avatar Nov 27 '23 09:11 koko2pp

cicheck

koko2pp avatar Nov 27 '23 11:11 koko2pp