https://github.com/cfug/translator_bot
https://github.com/cfug/translator_bot
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/cfug/translator_bot
- Owner: cfug
- License: mit
- Created: 2025-05-09T09:18:21.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-27T11:28:41.000Z (about 1 year ago)
- Last Synced: 2025-06-03T14:28:47.277Z (about 1 year ago)
- Language: Dart
- Size: 130 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
> [!WARNING]
> 目前处于 Beta 阶段。
CFUG Translator Bot
使用 `Gemini` AI 翻译处理指定文档。
适用仓库:
- [cfug/flutter.cn](https://github.com/cfug/flutter.cn/blob/main/.github/workflows/translator_bot.yml)
- [cfug/dart.cn](https://github.com/cfug/dart.cn/blob/main/.github/workflows/translator_bot.yml)
## 配置
在需要使用的仓库中配置 [Github Action](./.github/workflows/translator_bot_template.yml)。
## 使用
在适用仓库的 issue 中评论来调用指令:
```md
# 评论:/translator-bot 仓库中文件的位置
/translator-bot ./src/xx.md
```
## 维护
### Prompt 调试
访问:https://aistudio.google.com/
### 本地调试
在根目录新建 `.env` 文件(注意不要上传到公共环境),并添加以下内容:
```
GH_TOKEN = xxxxxxx
GEMINI_API_KEY = xxxxxxx
```
调用以下指令:
```bash
$ dart bin/translator.dart --dry-run --repository username/repo --actionId 0 --issueId 0 --commentId 0 --filePath xxxxxx
```