This GitHub action uses OpenAI's GPT-4 to automatically translate the README.md
file to Japanese.
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.
- Valid OpenAI API Key.
- 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 totranslate-me.ja.md
. - If the source file is not specified, the default name
README.ja.md
is used.
- For example,
- If file already exists, it will be overwritten.
- uses: humonnom/readme-in-japanese@v1
with:
api_key: ${{ secrets.OPENAI_API_KEY }}
- uses: humonnom/readme-in-japanese@v1
with:
source_file: docs/README.md # Path to the source README file
api_key: ${{ secrets.OPENAI_API_KEY }}
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 }}
This action follows the Semantic Versioning convention for versioning.
When specifying the action version, you have two approaches:
-
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
- Initial latest release is v1.0.1.
- The v1 tag refers to the v1.0.1 commit.
- New patch release v1.0.2 is released.
- v1 tags automatically jump to v1.0.2 commit immediately.
-
-
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.
- For precise version control, specify the full version (e.g.,
The scripts and documentation in this project are released under the MIT License.