feat: replace cloud translation with local Neural CLI

## Changes

### Removed (OpenAI-dependent)
-  `.github/workflows/translation-sync.yml` - GPT-Translate workflow
-  `docs/Development/translation-workflow.md` - OpenAI setup docs

### Added (Local Ollama-based)
-  `Makefile`: New `make translate` target using Neural CLI
-  `docs/Development/translation-guide.md` - Neural CLI guide

## Benefits

**Before (GPT-Translate)**:
- 💰 Monthly cost: ~¥90 (OpenAI API)
- 🔑 Requires API key setup
- 🌐 Data sent to external API
- ⏱️ Network latency

**After (Neural CLI)**:
-  **$0 cost** - Fully local execution
-  **No API keys** - Zero setup friction
-  **Privacy** - No external data transfer
-  **Fast** - ~1-2 min per README
-  **Offline capable** - Works without internet

## Technical Details

**Neural CLI**:
- Built in Rust with Tauri
- Uses Ollama + qwen2.5:3b model
- Binary size: 4.0MB
- Auto-installs to ~/.local/bin/

**Usage**:
```bash
make translate  # Translates README.md → README-zh.md, README-ja.md
```

## Requirements

- Ollama installed: `curl -fsSL https://ollama.com/install.sh | sh`
- Model downloaded: `ollama pull qwen2.5:3b`
- Neural CLI built: `cd ~/github/neural/src-tauri && cargo build --bin neural-cli --release`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kazuki
2025-10-18 22:38:02 +09:00
parent 1147a09a16
commit ed7dda7d7c
4 changed files with 237 additions and 280 deletions

View File

@@ -1,96 +0,0 @@
name: Auto-translate README
on:
push:
branches: [master, main]
paths:
- 'README.md'
pull_request:
paths:
- 'README.md'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
translate:
name: Translate README to Multiple Languages
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Translate README to Chinese
uses: 3ru/gpt-translate@v1.1.11
with:
apikey: ${{ secrets.OPENAI_API_KEY }}
inputFiles: 'README.md'
outputFiles: 'README-zh.md'
targetLanguage: 'Simplified Chinese'
- name: Translate README to Japanese
uses: 3ru/gpt-translate@v1.1.11
with:
apikey: ${{ secrets.OPENAI_API_KEY }}
inputFiles: 'README.md'
outputFiles: 'README-ja.md'
targetLanguage: 'Japanese'
- name: Check for changes
id: check_changes
run: |
if git diff --quiet HEAD -- README-zh.md README-ja.md; then
echo "No translation changes detected"
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "Translation changes detected"
echo "has_changes=true" >> $GITHUB_OUTPUT
fi
- name: Commit translations
if: steps.check_changes.outputs.has_changes == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add README-zh.md README-ja.md
git commit -m "chore: auto-translate README to ZH/JA
🤖 Generated with [GPT-Translate](https://github.com/3ru/gpt-translate)
Co-Authored-By: GitHub Actions <noreply@github.com>"
- name: Push changes
if: steps.check_changes.outputs.has_changes == 'true' && github.event_name == 'push'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Create Pull Request
if: steps.check_changes.outputs.has_changes == 'true' && github.event_name == 'pull_request'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: auto-translate README to ZH/JA"
title: "🌐 Auto-translate README updates"
body: |
## 🤖 Automated Translation Update
This PR contains automated translations of README.md updates.
**Changes:**
- ✅ README-zh.md (Simplified Chinese)
- ✅ README-ja.md (Japanese)
**Translation powered by:**
- [GPT-Translate](https://github.com/3ru/gpt-translate)
- OpenAI GPT-4
Please review the translations for accuracy before merging.
branch: chore/auto-translate-readme
delete-branch: true