Giter Club home page Giter Club logo

issues-translate-chinese-action's Introduction

Archive this repository

Use issues-translator instead The reason is that guessing the language the user is using is hard to do in an issue, First, many languages have the same parts, and second, issues contain a lot of formatting, comments and code

Issues Translate Chinese Action

Issues markdown contains multiple languages and code, and we can only guess which one it is, but that's pretty inaccurate, so we will only check if it contains Chinese.

The action for translating Chinese issues content to English.

中文文档

Usage

Use the default bot account @Issues-translate-bot

Create a workflow from this action

Create file issue-translator.yml in .github/workflows/

name: 'issue-translator'
on:
  issue_comment:
    types: [created]
  issues:
    types: [opened]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: a631807682/[email protected]
        with:
          IS_MODIFY_TITLE: false
          # not require, default false, . Decide whether to modify the issue title
          # if true, the robot account @Issues-translate-bot must have modification permissions, invite @Issues-translate-bot to your project or use your custom bot.
          CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿
          # not require. Customize the translation robot prefix message.

Advanced Custom

Use your own bot by add BOT_GITHUB_TOKEN

  1. Create a new github account as your bot

  2. Use the account to generate a new token as BOT_GITHUB_TOKEN

  3. Add the Secrets BOT_GITHUB_TOKEN = ${token} in your project

  4. Create a workflow from this action(Create file issue-translator.yml in .github/workflows/)

name: 'issue-translator'
on:
  issue_comment:
    types: [created]
  issues:
    types: [opened]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: a631807682/[email protected]
        with:
          BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
          # Required, input your bot github token
          BOT_LOGIN_NAME: Issues-translate-bot
          # Not required, suggest not input, action will get name from BOT_GITHUB_TOKEN
          # If input, BOT name must match github token

Other

  1. invite @Issues-translate-bot to your project
    Project -> Settings -> Manage access -> Invite a collaborator
    Post an issue in issues-translate-action to let me konw, the @Issues-translate-bot will join soon.

DEMO

action-sample

Have Fun!

issues-translate-chinese-action's People

Contributors

tomsun28 avatar a631807682 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.