mirror of
https://github.com/decolua/9router.git
synced 2026-05-08 12:01:28 +00:00
chore: remove translation script and workflow files
This commit is contained in:
33
.github/workflows/translate-readme.yml
vendored
33
.github/workflows/translate-readme.yml
vendored
@@ -1,33 +0,0 @@
|
||||
name: Translate README
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
translate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Translate README to all languages
|
||||
env:
|
||||
GLM_API_KEY: ${{ secrets.GLM_API_KEY }}
|
||||
run: |
|
||||
node .github/scripts/translate-readme.js vi zh-CN
|
||||
|
||||
- name: Upload translations as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: translated-readmes
|
||||
path: i18n/
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -55,7 +55,6 @@ RM.vn.md
|
||||
RM.md
|
||||
cursor/*
|
||||
PUBLIC.md
|
||||
scripts/*
|
||||
Thanks.md
|
||||
PUBLIC.en.md
|
||||
PR/*
|
||||
|
||||
@@ -125,7 +125,7 @@ ${readmeContent}`;
|
||||
.replace(/<img src="\.\/images\//g, '<img src="../images/')
|
||||
.replace(/<img src="\.\/public\//g, '<img src="../public/');
|
||||
|
||||
const i18nDir = path.join(__dirname, '../../i18n');
|
||||
const i18nDir = path.join(__dirname, '../i18n');
|
||||
if (!fs.existsSync(i18nDir)) {
|
||||
fs.mkdirSync(i18nDir, { recursive: true });
|
||||
}
|
||||
@@ -149,7 +149,7 @@ async function main() {
|
||||
console.log(`Languages: ${targetLangs.join(', ')}`);
|
||||
console.log('='.repeat(60));
|
||||
|
||||
const readmePath = path.join(__dirname, '../../README.md');
|
||||
const readmePath = path.join(__dirname, '../README.md');
|
||||
const readmeContent = fs.readFileSync(readmePath, 'utf8');
|
||||
|
||||
// Translate languages in batches (parallel within batch)
|
||||
Reference in New Issue
Block a user