-
Notifications
You must be signed in to change notification settings - Fork 545
33 lines (29 loc) · 1.19 KB
/
gpt-translate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: GPT Translate
on:
issue_comment:
types: [created]
jobs:
gpt_translate:
if: github.actor == 'thias15'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run GPT Translate
if: |
contains(github.event.comment.body, '/gpt-translate') ||
contains(github.event.comment.body, '/gt')
uses: 3ru/gpt-translate@master
with:
apikey: ${{ secrets.OPENAI_API_KEY }}
model: gpt-4o
prompt: |
Please translate the source file to {targetLanguage}. \
Make the translation sound as natural as possible. \
Make sure that {targetLanguage} is linked to the corresponding README file using its Language Culture Name. \
Keep the HTML snippet in the same place as in the source file or add it at the top and keep existing languages. \
For example, for English, Chinese and German the top of the README should look like this:
<p align="center">
<a href="README.md">Englisch</a> |
<a href="README.zh-CN.md">简体中文</a> |
<a href="README.de-DE.md">Deutsch</a>
</p>