Skip to content

Translate the `README.md` file into Japanese using OpenAI.

Notifications You must be signed in to change notification settings

humonnom/readme-in-japanese

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Japanese AI Translator for README.md

This GitHub action uses OpenAI's GPT-4 to automatically translate the README.md file to Japanese.

Introduction

The action simplifies the process of translating README.md files to japanese language, leveraging the power of OpenAI's GPT-4 technology.

By using this action, you can reach over 121 million Japanese-speaking developers and users, significantly expanding your project's accessibility in one of the world's largest tech communities.

Requirements

  • Valid OpenAI API Key.

Usage

- uses: humonnom/readme-in-japanese@v1
  with:
    # Path to the source README file
    #
    # Optional
    # Default: README.md
    source_file: ''

    # OpenAI API Key for translation 
    #
    # Required
    api_key: ''  
  • The translated file is saved in the same directory as the source file, named ${source_file name || 'README'}.ja.md.
    • For example, translate-me.md will be translated to translate-me.ja.md.
    • If the source file is not specified, the default name README.ja.md is used.
  • If file already exists, it will be overwritten.

Scenarios

Translate with default source file

- uses: humonnom/readme-in-japanese@v1
  with:
    api_key: ${{ secrets.OPENAI_API_KEY }}

Translate with Specific Source File

- uses: humonnom/readme-in-japanese@v1
  with:
    source_file: docs/README.md # Path to the source README file
    api_key: ${{ secrets.OPENAI_API_KEY }}

Examples

Translate when README.md is updated

name: Translate README

on:
  push:
    paths:
      - 'README.md'

jobs:
  translate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Translate README
        uses: humonnom/readme-in-japanese@v1
        with:
          api_key: ${{ secrets.OPENAI_API_KEY }}

Versioning

This action follows the Semantic Versioning convention for versioning.

Version Management

When specifying the action version, you have two approaches:

  1. Major Version Tracking:

    • The v1 tag automatically points to the latest patch release within the v1 major version.

    • The tag is dynamically updated with the latest commit of that major version on an ongoing basis.

    • Specific examples

      • Scenario: Version update process
      1. Initial latest release is v1.0.1.
      2. The v1 tag refers to the v1.0.1 commit.
      3. New patch release v1.0.2 is released.
      4. v1 tags automatically jump to v1.0.2 commit immediately.
  2. Specific Version Pinning:

    • For precise version control, specify the full version (e.g., v1.0.7).
    • This locks the action to exactly that version, preventing automatic updates.

License

The scripts and documentation in this project are released under the MIT License.

About

Translate the `README.md` file into Japanese using OpenAI.

Resources

Stars

Watchers

Forks

Packages

No packages published