Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

Auto Translate Readme

Actions
Automatically translate the language of README via Github Action
v1
Star (40)

action-translate-readme

中文版README.md

Introduction

  • We all know that writing documentation is time-consuming, but now there is a solution that can save you half the time . This is our action-translate-readme

  • With this tool, you can automatically translate README.md files, not only for translation, but also for various elements such as inline code, emoticons, code blocks, HTML tags and links

  • Its operating principle is to realize automation through Github Actions, only need to push the updated README file, and the translated README (zh or en) file can be automatically updated

  • Continuous Integration (CI)

  • Automatically translate the language of README via Github Action

  • Update README.md and push it, this action will automatically update README.zh-TW.md (Update README.zh-TW.md automatically update README.md)

  • Save half the time of writing documents .

Features

  • Not translated:
    • inline code (inline_code)
    • for emoji
    • code blocks
    • HTML tags
    • links

How to use ?

  1. Click the ⭐ icon to add this project to your Github repository .

  2. set your Github Token:

    • Create a new Github Secret Token

      • settings
      • Developer settings
      • Personal Access Token - Tokens(classic)
      • generate a new token
      • selection range: repo and workflow
      • keep your secret token (don’t lose it, you need to paste it later)
    • Create a new repository secret

      • in your repository - settings
      • Securits and variables
      • Actions
      • New repository secret
      • fill in the label by token and name it (eg: Action_Bot)
  3. create README language you want: README.md, READM.zh-TW.md, ...

  4. Create your action example in the directory .github/workflows/your_action.yml.:

    # .github/workflows/translate.yml
    name: Translate Readme
    
    on:
        push:
            branches: ['**']
    
    jobs:
        translate:
            runs-on: ubuntu-latest
            steps:
                - name: Checkout
                  uses: actions/checkout@v3
                  with:
                    fetch-depth: 3
    
                - name: Auto Translate
                  uses: Lin-jun-xiang/action-translate-readme@v1 # Based on the tag
                  with:
                    token: ${{ secrets.Action_Bot }} # Based on step2 name
    
  5. Now you can update README.md, and it will auto generate a translation version!


Results of Test Document

Back to top

Auto Translate Readme is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Automatically translate the language of README via Github Action
v1

Auto Translate Readme is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.