-
Notifications
You must be signed in to change notification settings - Fork 11.2k
feat(localization): added zh_TW #2910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6005da1
ade50cc
16f095f
423e974
78342c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| name: Build and Publish Docker | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| # Publish semver tags as releases. | ||
| tags: [ 'v*.*.*' ] | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| REGISTRY: ghcr.io | ||
| # github.repository as <account>/<repo> | ||
| IMAGE_NAME: ${{ github.repository }} | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| # This is used to complete the identity challenge | ||
| # with sigstore/fulcio when running outside of PRs. | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v3 | ||
|
|
||
| # Install the cosign tool except on PR | ||
| # https://github.com/sigstore/cosign-installer | ||
| - name: Install cosign | ||
| if: github.event_name != 'pull_request' | ||
| uses: sigstore/cosign-installer@v3.5.0 | ||
| with: | ||
| cosign-release: 'v2.2.4' | ||
|
Comment on lines
+29
to
+35
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cosign is installed but never used to sign the image. The workflow installs 🤖 Prompt for AI Agents |
||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Log into registry ${{ env.REGISTRY }} | ||
| if: github.event_name != 'pull_request' | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ${{ env.REGISTRY }} | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Extract Docker metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
| tags: | | ||
| type=raw,value=latest,enable={{is_default_branch}} | ||
| type=ref,event=branch | ||
| type=semver,pattern={{version}} | ||
|
|
||
| - name: Build and push Docker image | ||
| id: build-and-push | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| push: ${{ github.event_name != 'pull_request' }} | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,43 @@ | ||||||||||||||||||||||||||||
| name: Sync Upstream | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||
| contents: write | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||
| schedule: | ||||||||||||||||||||||||||||
| # Run once a day at midnight | ||||||||||||||||||||||||||||
| - cron: "0 0 * * *" | ||||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+10
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This workflow appears unrelated to the zh_TW localization PR. A fork-sync workflow doesn't belong in a PR that adds Traditional Chinese support. Consider splitting this into a separate PR to keep changes focused and reviewable. 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||
| sync_latest_from_upstream: | ||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||
| name: Sync latest commits from upstream repo | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||
| - name: Checkout target repo | ||||||||||||||||||||||||||||
| uses: actions/checkout@v3 | ||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update
Proposed fix- uses: actions/checkout@v3
+ uses: actions/checkout@v4📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.10)[error] 19-19: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| ref: main | ||||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Sync upstream changes | ||||||||||||||||||||||||||||
| id: sync | ||||||||||||||||||||||||||||
| uses: aormsby/Fork-Sync-With-Upstream-action@v3.4 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| upstream_sync_repo: QuantumNous/new-api | ||||||||||||||||||||||||||||
| upstream_sync_branch: main | ||||||||||||||||||||||||||||
| target_sync_branch: main | ||||||||||||||||||||||||||||
| target_repo_token: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||
| upstream_pull_args: '--allow-unrelated-histories' | ||||||||||||||||||||||||||||
|
Comment on lines
+26
to
+32
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result:
Use in workflow: Sources: [1] https://github.com/aormsby/Fork-Sync-With-Upstream-action/releases, [2] https://github.com/marketplace/actions/upstream-sync, [3] https://github.com/aormsby/Fork-Sync-With-Upstream-action/tags 🏁 Script executed: # Search for the action repository and check if it's still maintained
cd /tmp && git clone --depth 1 https://github.com/aormsby/Fork-Sync-With-Upstream-action.git 2>/dev/null || echo "Clone check attempted"
# Check GitHub releases via web if available
curl -s "https://api.github.com/repos/aormsby/Fork-Sync-With-Upstream-action/releases" 2>/dev/null | jq -r '.[0:5] | .[] | "\(.tag_name) - \(.published_at)"' | head -10Repository: QuantumNous/new-api Length of output: 206 Update action to v3.4.1 (or pin to commit SHA) and remove
Proposed fix- uses: aormsby/Fork-Sync-With-Upstream-action@v3.4
+ uses: aormsby/Fork-Sync-With-Upstream-action@v3.4.1
with:
upstream_sync_repo: QuantumNous/new-api
upstream_sync_branch: main
target_sync_branch: main
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
- upstream_pull_args: '--allow-unrelated-histories'📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: New commits found | ||||||||||||||||||||||||||||
| if: steps.sync.outputs.has_new_commits == 'true' | ||||||||||||||||||||||||||||
| run: echo "New commits were found to sync." | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: No new commits | ||||||||||||||||||||||||||||
| if: steps.sync.outputs.has_new_commits == 'false' | ||||||||||||||||||||||||||||
| run: echo "There were no new commits." | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Show value of 'has_new_commits' | ||||||||||||||||||||||||||||
| run: echo ${{ steps.sync.outputs.has_new_commits }} | ||||||||||||||||||||||||||||
|
Comment on lines
+42
to
+43
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quote the expression to prevent shell injection. Unquoted Proposed fix- run: echo ${{ steps.sync.outputs.has_new_commits }}
+ run: echo "${{ steps.sync.outputs.has_new_commits }}"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -7,9 +7,10 @@ | |||||
| 🍥 **Passerelle de modèles étendus de nouvelle génération et système de gestion d'actifs d'IA** | ||||||
|
|
||||||
| <p align="center"> | ||||||
| <a href="./README.zh.md">中文</a> | | ||||||
| <a href="./README.md">English</a> | | ||||||
| <strong>Français</strong> | | ||||||
| <a href="./README.zh_CN.md">简体中文</a> | | ||||||
| <a href="./README.zh_TW.md">繁體中文</a> | | ||||||
| <a href="./README.md">English</a> | | ||||||
| <strong>Français</strong> | | ||||||
| <a href="./README.ja.md">日本語</a> | ||||||
| </p> | ||||||
|
|
||||||
|
|
@@ -56,10 +57,10 @@ | |||||
|
|
||||||
| ## 📝 Description du projet | ||||||
|
|
||||||
| > [!NOTE] | ||||||
| > [!NOTE] | ||||||
| > Il s'agit d'un projet open-source développé sur la base de [One API](https://github.com/songquanpeng/one-api) | ||||||
|
|
||||||
| > [!IMPORTANT] | ||||||
| > [!IMPORTANT] | ||||||
| > - Ce projet est uniquement destiné à des fins d'apprentissage personnel, sans garantie de stabilité ni de support technique. | ||||||
| > - Les utilisateurs doivent se conformer aux [Conditions d'utilisation](https://openai.com/policies/terms-of-use) d'OpenAI et aux **lois et réglementations applicables**, et ne doivent pas l'utiliser à des fins illégales. | ||||||
| > - Conformément aux [《Mesures provisoires pour la gestion des services d'intelligence artificielle générative》](http://www.cac.gov.cn/2023-07/13/c_1690898327029107.htm), veuillez ne fournir aucun service d'IA générative non enregistré au public en Chine. | ||||||
|
|
@@ -186,7 +187,7 @@ docker run --name new-api -d --restart always \ | |||||
| | Fonctionnalité | Description | | ||||||
| |------|------| | ||||||
| | 🎨 Nouvelle interface utilisateur | Conception d'interface utilisateur moderne | | ||||||
| | 🌍 Multilingue | Prend en charge le chinois, l'anglais, le français, le japonais | | ||||||
| | 🌍 Multilingue | Prend en charge le chinois simplifié, le chinois traditionnel, l'anglais, le français et le japonais | | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incomplete language list in the multilingual feature row. The feature description lists Chinese (Simplified and Traditional), English, French, and Japanese, but omits Russian and Vietnamese which are also supported. 📝 Suggested fix-| 🌍 Multilingue | Prend en charge le chinois simplifié, le chinois traditionnel, l'anglais, le français et le japonais |
+| 🌍 Multilingue | Prend en charge le chinois simplifié, le chinois traditionnel, l'anglais, le français, le russe, le japonais et le vietnamien |Based on learnings: Frontend i18n supports zh_CN, zh_TW, en, fr, ru, ja, vi. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| | 🔄 Compatibilité des données | Complètement compatible avec la base de données originale de One API | | ||||||
| | 📈 Tableau de bord des données | Console visuelle et analyse statistique | | ||||||
| | 🔒 Gestion des permissions | Regroupement de jetons, restrictions de modèles, gestion des utilisateurs | | ||||||
|
|
@@ -372,7 +373,7 @@ docker run --name new-api -d --restart always \ | |||||
| calciumion/new-api:latest | ||||||
| ``` | ||||||
|
|
||||||
| > **💡 Explication du chemin:** | ||||||
| > **💡 Explication du chemin:** | ||||||
| > - `./data:/data` - Chemin relatif, données sauvegardées dans le dossier data du répertoire actuel | ||||||
| > - Vous pouvez également utiliser un chemin absolu, par exemple : `/your/custom/path:/data` | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -7,9 +7,10 @@ | |||||
| 🍥 **次世代大規模モデルゲートウェイとAI資産管理システム** | ||||||
|
|
||||||
| <p align="center"> | ||||||
| <a href="./README.zh.md">中文</a> | | ||||||
| <a href="./README.md">English</a> | | ||||||
| <a href="./README.fr.md">Français</a> | | ||||||
| <a href="./README.zh_CN.md">简体中文</a> | | ||||||
| <a href="./README.zh_TW.md">繁體中文</a> | | ||||||
| <a href="./README.md">English</a> | | ||||||
| <a href="./README.fr.md">Français</a> | | ||||||
| <strong>日本語</strong> | ||||||
| </p> | ||||||
|
|
||||||
|
|
@@ -56,10 +57,10 @@ | |||||
|
|
||||||
| ## 📝 プロジェクト説明 | ||||||
|
|
||||||
| > [!NOTE] | ||||||
| > [!NOTE] | ||||||
| > 本プロジェクトは、[One API](https://github.com/songquanpeng/one-api)をベースに二次開発されたオープンソースプロジェクトです | ||||||
|
|
||||||
| > [!IMPORTANT] | ||||||
| > [!IMPORTANT] | ||||||
| > - 本プロジェクトは個人学習用のみであり、安定性の保証や技術サポートは提供しません。 | ||||||
| > - ユーザーは、OpenAIの[利用規約](https://openai.com/policies/terms-of-use)および**法律法規**を遵守する必要があり、違法な目的で使用してはいけません。 | ||||||
| > - [《生成式人工智能服务管理暂行办法》](http://www.cac.gov.cn/2023-07/13/c_1690898327029107.htm)の要求に従い、中国地域の公衆に未登録の生成式AI サービスを提供しないでください。 | ||||||
|
|
@@ -186,7 +187,7 @@ docker run --name new-api -d --restart always \ | |||||
| | 機能 | 説明 | | ||||||
| |------|------| | ||||||
| | 🎨 新しいUI | モダンなユーザーインターフェースデザイン | | ||||||
| | 🌍 多言語 | 中国語、英語、フランス語、日本語をサポート | | ||||||
| | 🌍 多言語 | 簡体字中国語、繁体字中国語、英語、フランス語、日本語をサポート | | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incomplete language list in the multilingual feature row. The feature lists Simplified Chinese, Traditional Chinese, English, French, and Japanese, but omits Russian and Vietnamese which are also supported by the frontend. 📝 Suggested fix-| 🌍 多言語 | 簡体字中国語、繁体字中国語、英語、フランス語、日本語をサポート |
+| 🌍 多言語 | 簡体字中国語、繁体字中国語、英語、フランス語、ロシア語、日本語、ベトナム語をサポート |Based on learnings: Frontend i18n supports zh_CN, zh_TW, en, fr, ru, ja, vi. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| | 🔄 データ互換性 | オリジナルのOne APIデータベースと完全に互換性あり | | ||||||
| | 📈 データダッシュボード | ビジュアルコンソールと統計分析 | | ||||||
| | 🔒 権限管理 | トークングループ化、モデル制限、ユーザー管理 | | ||||||
|
|
@@ -374,7 +375,7 @@ docker run --name new-api -d --restart always \ | |||||
| calciumion/new-api:latest | ||||||
| ``` | ||||||
|
|
||||||
| > **💡 パス説明:** | ||||||
| > **💡 パス説明:** | ||||||
| > - `./data:/data` - 相対パス、データは現在のディレクトリのdataフォルダに保存されます | ||||||
| > - 絶対パスを使用することもできます:`/your/custom/path:/data` | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,9 +7,10 @@ | |
| 🍥 **Next-Generation LLM Gateway and AI Asset Management System** | ||
|
|
||
| <p align="center"> | ||
| <a href="./README.zh.md">中文</a> | | ||
| <strong>English</strong> | | ||
| <a href="./README.fr.md">Français</a> | | ||
| <a href="./README.zh_CN.md">简体中文</a> | | ||
| <a href="./README.zh_TW.md">繁體中文</a> | | ||
| <strong>English</strong> | | ||
| <a href="./README.fr.md">Français</a> | | ||
| <a href="./README.ja.md">日本語</a> | ||
| </p> | ||
|
|
||
|
|
@@ -56,10 +57,10 @@ | |
|
|
||
| ## 📝 Project Description | ||
|
|
||
| > [!NOTE] | ||
| > [!NOTE] | ||
| > This is an open-source project developed based on [One API](https://github.com/songquanpeng/one-api) | ||
|
|
||
| > [!IMPORTANT] | ||
| > [!IMPORTANT] | ||
| > - This project is for personal learning purposes only, with no guarantee of stability or technical support | ||
| > - Users must comply with OpenAI's [Terms of Use](https://openai.com/policies/terms-of-use) and **applicable laws and regulations**, and must not use it for illegal purposes | ||
| > - According to the [《Interim Measures for the Management of Generative Artificial Intelligence Services》](http://www.cac.gov.cn/2023-07/13/c_1690898327029107.htm), please do not provide any unregistered generative AI services to the public in China. | ||
|
|
@@ -186,7 +187,7 @@ docker run --name new-api -d --restart always \ | |
| | Feature | Description | | ||
| |------|------| | ||
| | 🎨 New UI | Modern user interface design | | ||
| | 🌍 Multi-language | Supports Chinese, English, French, Japanese | | ||
| | 🌍 Multi-language | Supports Simplified Chinese, Traditional Chinese, English, French, Japanese | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incomplete language list in the multilingual feature row. The feature description mentions Simplified Chinese, Traditional Chinese, English, French, and Japanese, but omits Russian and Vietnamese which are also supported. 📝 Suggested fix-| 🌍 Multi-language | Supports Simplified Chinese, Traditional Chinese, English, French, Japanese |
+| 🌍 Multi-language | Supports Simplified Chinese, Traditional Chinese, English, French, Russian, Japanese, Vietnamese |Based on learnings: Frontend i18n supports zh_CN, zh_TW, en, fr, ru, ja, vi. 🤖 Prompt for AI Agents |
||
| | 🔄 Data Compatibility | Fully compatible with the original One API database | | ||
| | 📈 Data Dashboard | Visual console and statistical analysis | | ||
| | 🔒 Permission Management | Token grouping, model restrictions, user management | | ||
|
|
@@ -372,7 +373,7 @@ docker run --name new-api -d --restart always \ | |
| calciumion/new-api:latest | ||
| ``` | ||
|
|
||
| > **💡 Path explanation:** | ||
| > **💡 Path explanation:** | ||
| > - `./data:/data` - Relative path, data saved in the data folder of the current directory | ||
| > - You can also use absolute path, e.g.: `/your/custom/path:/data` | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actions/checkout@v3is deprecated — upgrade tov4.v3 uses Node 16 which is EOL on GitHub Actions. This is also flagged by actionlint.
Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.10)
[error] 27-27: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents