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

Automated translation of README.md (GitHub action) #629

Closed

Conversation

d-beloved
Copy link

@d-beloved d-beloved commented Oct 11, 2024

Draft PR for #600

The Automation currently works as described in the issue

  • This workflow takes approximately 5 minutes to complete.
  • Links and code blocks are not translated.
  • This approach uses the deep_translator library. A free web-scraping technique to access the Google Translate service. For better results, the official Google Translate tool may be better, but it is not free.

I am open to discussions on this.


Important

Automates translation of README.md into Chinese, Japanese, and French using a GitHub action and Python script.

  • GitHub Action:
    • New workflow translate-readme.yml triggers on README.md changes to automate translation.
    • Uses deep_translator and markdown-it-py for translation and markdown parsing.
  • Translation Script:
    • scripts/translate_readme.py translates README.md into README-CN.md, README-JP.md, and README-FR.md.
    • Handles text in markdown, preserving non-translatable elements like code blocks.
    • Splits text into chunks to manage API limits.
  • Misc:
    • Adds translated README files: README-CN.md, README-JP.md, README-FR.md.

This description was created by Ellipsis for b363bea. It will automatically update as commits are pushed.

@d-beloved d-beloved changed the title Automated translation of README.md (GitHub action) [Draft] Automated translation of README.md (GitHub action) Oct 11, 2024
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to b363bea in 1 minute and 1 seconds

More details
  • Looked at 2918 lines of code in 6 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. scripts/translate_readme.py:39
  • Draft comment:
    Consider adding error handling for network-related exceptions during translation to ensure robustness.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is suggesting a code improvement related to error handling, which is a valid concern. The current code does have a generic exception handling mechanism, but it does not specifically address network-related issues, which could be more gracefully handled. This is a clear and actionable suggestion for improving code robustness.
    The comment does not specify what kind of network-related exceptions should be handled or how they should be handled, which might make it less actionable. However, the suggestion to improve error handling is generally a good practice.
    While the comment could be more specific, the suggestion to handle network-related exceptions is still a valid point for improving the code's robustness.
    Keep the comment as it suggests a valid improvement to the code's error handling mechanism, specifically for network-related exceptions.

Workflow ID: wflow_A07vQSkds6njTcTR


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

scripts/translate_readme.py Show resolved Hide resolved
scripts/translate_readme.py Show resolved Hide resolved
@d-beloved d-beloved changed the title [Draft] Automated translation of README.md (GitHub action) Automated translation of README.md (GitHub action) Oct 11, 2024
@d-beloved d-beloved marked this pull request as draft October 11, 2024 11:57
@creatorrr
Copy link
Contributor

Appreciate the PR but closing in favor of #624

@creatorrr creatorrr closed this Oct 13, 2024
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