Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .codex/prompts/readme-translation.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Your task is translate `README.md` into several languages. The translation should sound natural and easy to read.
Target languages: Chinese (zh-cn), Chinese (zh-tw), Japanese (ja-JP)
Use the following format for each translation: `README.{language_code}-{country_code}.md`
Rules:
- If a translation file already exists, only update the changes
- If a translation file does not exist, create a new one and add the link in `README.md` and each translated readme file
- Do not modify the original `README.md` file
- git commit to current branch and push to remote
6 changes: 6 additions & 0 deletions .github/workflows/files-changed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:
value: ${{ jobs.detect.outputs.swagger }}
yaml:
value: ${{ jobs.detect.outputs.yaml }}
readme:
value: ${{ jobs.detect.outputs.readme }}

jobs:
detect:
Expand All @@ -33,6 +35,7 @@ jobs:
docker: ${{ steps.changes.outputs.docker }}
swagger: ${{ steps.changes.outputs.swagger }}
yaml: ${{ steps.changes.outputs.yaml }}
readme: ${{ steps.changes.outputs.readme }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
Expand Down Expand Up @@ -98,3 +101,6 @@ jobs:
- "**/*.yaml"
- ".yamllint.yaml"
- "pyproject.toml"

readme:
- "README.md"
22 changes: 22 additions & 0 deletions .github/workflows/pull-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,25 @@ jobs:
go-version-file: go.mod
check-latest: true
- run: make lint-actions

readme:
if: needs.files-changed.outputs.readme == 'true'
needs: files-changed
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: translate-readme
if: steps.openai-secret.outputs.skip != 'true'
run: |
npm install -g @openai/codex
codex exec --full-auto \
-c model="gpt-5-codex" \
-c model_provider="gitea_openai" \
-c model_providers.gitea_openai.name="gitea_openai" \
-c model_providers.gitea_openai.base_url="${{ secrets.OPENAI_BASE_URL }}" \
-c model_providers.gitea_openai.env_key="OPENAI_API_KEY" \
-c model_providers.gitea_openai.wire_api="responses" \
"$(cat ./.codex/prompts/readme-translation.txt)"

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod&color=green)](https://gitpod.io/#https://github.com/go-gitea/gitea)
[![](https://badges.crowdin.net/gitea/localized.svg)](https://translate.gitea.com "Crowdin")

this line is added for test

[繁體中文](./README.zh-tw.md) | [简体中文](./README.zh-cn.md)

## Purpose
Expand Down
Loading