Skip to content

Conversation

@cdcd72
Copy link

@cdcd72 cdcd72 commented Aug 2, 2025

This change refactors the i18n logic to support separate Simplified and Traditional Chinese language variants. Previously, a single 'zh' locale was used for both.

  • Adds new 'zh-CN' and 'zh-TW' language codes.
  • Updates all relevant components and data sources to use the new codes.
  • Ensures proper display of Simplified and Traditional Chinese based on user's browser settings.

PS. The documentation website is also recommended to distinguish between zh-CN and zh-TW, which might be more user-friendly for regions using Traditional Chinese.

Summary by CodeRabbit

  • 新機能

    • 繁体字中国語(zh-TW)向けの新しいローカライズファイルとREADMEを追加し、アプリケーション全体で繁体字中国語のサポートを強化しました。
    • 繁体字中国語での利用規約およびロゴ利用規約ドキュメントを追加しました。
  • ドキュメント

    • READMEおよび関連ドキュメントの言語選択リンクを、簡体字中国語(zh-CN)と繁体字中国語(zh-TW)で明確に分離しました。
    • 自動翻訳機能の対応言語に簡体字中国語と繁体字中国語を明示的に追加しました。
  • バグ修正

    • 言語選択や音声合成、言語コード処理などで、簡体字中国語(zh-CN)と繁体字中国語(zh-TW)を個別に認識・選択できるよう修正しました。

cdcd72 added 2 commits August 2, 2025 15:04
This change refactors the i18n logic to support separate Simplified and Traditional Chinese language variants. Previously, a single 'zh' locale was used for both.

- Adds new 'zh-CN' and 'zh-TW' language codes.
- Updates all relevant components and data sources to use the new codes.
- Ensures proper display of Simplified and Traditional Chinese based on user's browser settings.
@vercel
Copy link

vercel bot commented Aug 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aituber-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 2, 2025 8:11am

@coderabbitai
Copy link

coderabbitai bot commented Aug 2, 2025

Walkthrough

中国語のローカライズと言語コードの扱いが「zh」(中国語)から「zh-CN」(簡体字中国語)と「zh-TW」(繁体字中国語)に細分化されました。これに伴い、関連する設定、ドキュメント、ローカライズファイル、コードロジックが全体的に更新・追加されています。

Changes

Cohort / File(s) Change Summary
README・ドキュメント言語リンク
README.md, docs/README_en.md, docs/README_ko.md, docs/README_pl.md, docs/README_zh-CN.md
言語選択リンクが「中文」から「简体中文」「繁體中文」に分割され、それぞれREADME_zh-CN.mdREADME_zh-TW.mdに対応。
新規繁体字中国語ドキュメント
docs/README_zh-TW.md, docs/logo_licence_zh-TW.md, docs/character_model_licence_zh-TW.md
繁体字中国語のREADME、ロゴ使用許諾、モデル使用許諾ドキュメントを新規追加。
ローカライズファイル
locales/zh-TW/translation.json
繁体字中国語(zh-TW)用の翻訳JSONファイルを新規追加。
i18n・言語設定
src/lib/i18n.js, src/features/constants/settings.ts, src/components/settings/based.tsx, src/pages/_app.tsx
言語コード「zh」を「zh-CN」「zh-TW」に分割し、i18n設定・言語選択UI・初期言語検出ロジックを修正。
音声合成・TTS関連
src/features/messages/synthesizeVoiceGoogle.ts, src/utils/voiceLanguage.ts, src/pages/api/stylebertvits2.ts
Google TTS、音声言語コード取得ロジックで「zh-CN」「zh-TW」を個別に判定するよう変更。
スライド変換API
src/pages/api/convertSlide.ts
言語名マッピングで「zh」を「zh-CN」「zh-TW」に分割し、それぞれに名称を割り当て。
自動翻訳関連
scripts/auto_translate.py, docs/auto_translate.md
対象言語リストを「zh」から「zh-CN」「zh-TW」に分割し、ドキュメントとスクリプトを修正。
環境変数例
.env.example
デフォルト言語コメントを「zh」から「zh-CN」「zh-TW」に分割し、説明を明確化。
ドキュメント運用ルール
CLAUDE.md
手動更新禁止対象言語を「zh」から「zh-CN」「zh-TW」に明記。

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI
    participant i18n
    participant LocaleFiles

    User->>UI: 言語選択ドロップダウンを開く
    UI->>i18n: 利用可能言語リストを取得
    i18n->>LocaleFiles: zh-CN/zh-TW/他 言語ファイルを参照
    UI->>User: 「简体中文」「繁體中文」などの選択肢を表示
    User->>UI: 言語を選択(例: zh-TW)
    UI->>i18n: 言語設定をzh-TWに変更
    i18n->>LocaleFiles: zh-TW/translation.jsonをロード
    UI->>User: UIを繁体字中国語で再描画
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15分

Possibly related PRs

Suggested labels

devin

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (5)
docs/logo_licence_zh-TW.md (1)

24-27: 表現のタイポと思われる箇所
Line 26 の「現狀有姿」は慣用句としては不自然で、通常は「現狀之下」または「現況のまま」を用いることが多いです。微修正をご検討ください。

docs/README_zh-CN.md (1)

42-45: 言語リンクの区切り文字に一貫性を

末尾の (縦棒)が隣接リンクと統一されているか確認してください。将来的にマークダウン自動整形ツールを導入する場合、余分な全角区切り文字が差分ノイズになる恐れがあります。

docs/README_en.md (1)

41-43: バックリンク漏れに注意

README_en.md からは README_ko.md など他言語へのリンクがありますが、README_zh-TW.md 内でも英語版への逆リンクが追加されているか確認してください。相互リンクが欠けるとユーザー遷移が片方向になります。

docs/README_zh-TW.md (2)

3-3: <img> タグに alt 属性が欠落しています
画像に代替テキストが無いため、アクセシビリティ lint (MD045) に抵触します。

-<img style="max-width: 100%;" src="../public/ogp.png">
+<img style="max-width: 100%;" src="../public/ogp.png" alt="AITuberKit OGP">

35-36: ドキュメントサイト URL が旧 zh のままです
ロケール分割後は zh-TW に合わせた URL へ更新した方が一貫性があります。

-https://docs.aituberkit.com/zh/
+https://docs.aituberkit.com/zh-TW/

これらのパスが既にリダイレクト対応済みであれば無視して構いません。

Also applies to: 54-55, 159-160

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 665c660 and b8b34d8.

📒 Files selected for processing (21)
  • .env.example (1 hunks)
  • CLAUDE.md (1 hunks)
  • README.md (1 hunks)
  • docs/README_en.md (1 hunks)
  • docs/README_ko.md (1 hunks)
  • docs/README_pl.md (1 hunks)
  • docs/README_zh-CN.md (2 hunks)
  • docs/README_zh-TW.md (1 hunks)
  • docs/auto_translate.md (2 hunks)
  • docs/character_model_licence_zh-TW.md (1 hunks)
  • docs/logo_licence_zh-TW.md (1 hunks)
  • locales/zh-TW/translation.json (1 hunks)
  • scripts/auto_translate.py (1 hunks)
  • src/components/settings/based.tsx (1 hunks)
  • src/features/constants/settings.ts (2 hunks)
  • src/features/messages/synthesizeVoiceGoogle.ts (2 hunks)
  • src/lib/i18n.js (1 hunks)
  • src/pages/_app.tsx (1 hunks)
  • src/pages/api/convertSlide.ts (1 hunks)
  • src/pages/api/stylebertvits2.ts (1 hunks)
  • src/utils/voiceLanguage.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.env.example

📄 CodeRabbit Inference Engine (CLAUDE.md)

設定画面の項目を追加・更新した場合は、必要に応じて新しい環境変数を.env.exampleの適切な項目に追加してください。

Files:

  • .env.example
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
PR: tegnike/aituber-kit#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T14:51:36.976Z
Learning: Applies to locales/{en,ko,zh}/** : 他の言語ファイル(en、ko、zh等)は手動で更新しない
Learnt from: CR
PR: tegnike/aituber-kit#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T14:51:36.976Z
Learning: Applies to locales/ja/** : 言語ファイルの更新は日本語(`/locales/ja/`)のみ行う
📚 Learning: applies to locales/{en,ko,zh}/** : 他の言語ファイル(en、ko、zh等)は手動で更新しない...
Learnt from: CR
PR: tegnike/aituber-kit#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T14:51:36.976Z
Learning: Applies to locales/{en,ko,zh}/** : 他の言語ファイル(en、ko、zh等)は手動で更新しない

Applied to files:

  • docs/README_zh-CN.md
  • README.md
  • .env.example
  • CLAUDE.md
  • src/features/constants/settings.ts
  • src/pages/api/stylebertvits2.ts
  • docs/README_pl.md
  • docs/auto_translate.md
  • scripts/auto_translate.py
  • docs/README_en.md
  • docs/README_ko.md
  • src/pages/_app.tsx
  • src/components/settings/based.tsx
  • src/lib/i18n.js
  • locales/zh-TW/translation.json
📚 Learning: applies to .env.example : 設定画面の項目を追加・更新した場合は、必要に応じて新しい環境変数を`.env.example`の適切な項目に追加してください。...
Learnt from: CR
PR: tegnike/aituber-kit#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T14:51:36.976Z
Learning: Applies to .env.example : 設定画面の項目を追加・更新した場合は、必要に応じて新しい環境変数を`.env.example`の適切な項目に追加してください。

Applied to files:

  • .env.example
  • CLAUDE.md
  • docs/auto_translate.md
📚 Learning: applies to locales/ja/** : 言語ファイルの更新は日本語(`/locales/ja/`)のみ行う...
Learnt from: CR
PR: tegnike/aituber-kit#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T14:51:36.976Z
Learning: Applies to locales/ja/** : 言語ファイルの更新は日本語(`/locales/ja/`)のみ行う

Applied to files:

  • .env.example
  • CLAUDE.md
  • docs/auto_translate.md
  • docs/README_ko.md
  • src/lib/i18n.js
📚 Learning: applies to **/__tests__/** : テストは`__tests__`ディレクトリに配置...
Learnt from: CR
PR: tegnike/aituber-kit#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T14:51:36.976Z
Learning: Applies to **/__tests__/** : テストは`__tests__`ディレクトリに配置

Applied to files:

  • CLAUDE.md
📚 Learning: in `src/components/messageinputcontainer.tsx`, the `if (true) { //isnewuser` condition in the `onuse...
Learnt from: RimgO
PR: tegnike/aituber-kit#395
File: src/components/messageInputContainer.tsx:46-60
Timestamp: 2025-05-21T14:11:19.604Z
Learning: In `src/components/messageInputContainer.tsx`, the `if (true) { //isNewUser` condition in the `onUserDetected` handler is intentionally left as is because this section is planned to be changed later.

Applied to files:

  • src/pages/_app.tsx
🪛 LanguageTool
docs/README_zh-TW.md

[uncategorized] ~125-~125: 您的意思是“"不"驟”?
Context: ... Node.js: ^20.0.0 - npm: ^10.0.0 ### 安裝步驟 1. 將倉庫克隆到本地。 ```bash git clone http...

(BU)


[uncategorized] ~304-~304: 您的意思是“"不"驟”?
Context: ...題時,包含以下資訊將有助於我們順利響應: - 問題或新功能的詳細描述 - 重現步驟(對於錯誤) - 預期行為與實際行為 - 使用環境(瀏覽器、作業系統、Node...

(BU)

🪛 markdownlint-cli2 (0.17.2)
docs/README_zh-TW.md

3-3: Images should have alternate text (alt text)

(MD045, no-alt-text)


347-347: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (18)
.env.example (1)

9-12: 中国語コードの分割反映を確認しました
コメント文に zh-CN / zh-TW が追記されており、実装変更と整合しています。新しい環境変数の追加はなく .env.example のガイドラインにも抵触しません。

README.md (1)

40-44: リンク分割の実装 OK
简体中文 / 繁體中文 へのリンク追加は i18n 分割方針と一致しており、他言語リンクとの整合も取れています。

scripts/auto_translate.py (1)

38-42: 新ディレクトリの存在を確認してください
TARGET_LANGUAGESzh-CNzh-TW を追加したことで、スクリプトは
locales/zh-CN/translation.jsonlocales/zh-TW/translation.json を読み書きします。リポジトリに両方のディレクトリが存在しない場合は実行時に失敗します。

必要に応じて空の translation.json を追加しておくか、スクリプト側でディレクトリ自動生成を行うと安全です。

docs/README_pl.md (1)

42-44: リンク先ファイルの存在確認を推奨

README_zh-CN.mdREADME_zh-TW.md へのリンクに更新されていますが、同じ docs/ 配下に実際のファイルが存在するか CI で検証することを推奨します。存在しない場合、GitHub 上の 404 となります。

docs/README_zh-CN.md (1)

334-335: パス名の -zh-CN 付与は OK

ライセンス関連ページのパスを *_zh-CN.md に変更した点は、zh-TW との切り分けとして妥当です。

docs/README_ko.md (1)

42-44: リンク更新は妥当ですがファイル配置を要確認

韓国語 README でも中国語を 2 バリアントへ分割した点は問題ありません。念のため CI でリンク切れチェックを行うことを推奨します。

src/components/settings/based.tsx (1)

158-159: 中国語のロケール分離が正しく実装されています

簡体字中国語(zh-CN)と繁体字中国語(zh-TW)の選択肢が適切に分離されており、既存の言語切り替えロジックとも整合性が取れています。

CLAUDE.md (1)

78-78: ドキュメントが新しい中国語ロケールコードに適切に更新されています

zh-CN、zh-TWの明示的な記載により、言語ファイル更新ルールがより明確になっています。

docs/auto_translate.md (1)

43-43: 自動翻訳ドキュメントが新しい中国語ロケールに正しく更新されています

対象言語の説明とコード例の両方で、zh-CNとzh-TWが明示的に記載され、自動翻訳機能の対象言語が正確に反映されています。

Also applies to: 80-80

src/lib/i18n.js (1)

12-17: 中国語ロケール設定と翻訳ファイル存在確認

zh-CNおよびzh-TWのtranslation.jsonlocales/zh-CN/locales/zh-TW/に正しく存在しており、i18n設定も他のロケールと同様の構造で実装されています。問題ありませんので承認します。

src/utils/voiceLanguage.ts (1)

12-15: 音声言語コードマッピングが中国語ロケール分離に正しく対応しています

zh-CNとzh-TWのケースが個別に処理されることで、音声合成で適切な言語コードが使用されます。

src/pages/_app.tsx (1)

29-34: 言語検出ロジックが適切に実装されています

繁体字中国語(zh-TW)と簡体字中国語(zh-CN)の判定ロジックが正しく実装されています。ブラウザ言語が「zh-TW」の場合はそのまま保持し、その他の「zh」系統は「zh-CN」にマッピングする処理が適切です。

src/features/constants/settings.ts (2)

107-108: 言語定数の更新が適切です

中国語言語コードを「zh」から「zh-CN」(簡体字中国語)と「zh-TW」(繁体字中国語)に分割した処理が正しく実装されています。


129-130: 音声言語タイプの更新が一貫しています

VoiceLanguageタイプでの中国語バリアント対応が、LANGUAGESの更新と一貫性を保って実装されています。

src/features/messages/synthesizeVoiceGoogle.ts (2)

68-71: Google TTS音声タイプのマッピングが正確です

中国語バリアントに対するGoogle TTSの音声タイプマッピングが適切に実装されています。「zh-CN」は「cmn-CN-Standard-A」、「zh-TW」は「cmn-TW-Standard-A」に正しくマッピングされています。


107-110: 音声言語コードの変換が一貫しています

getVoiceLanguageCode関数での中国語バリアント処理が、getGoogleTtsType関数と一貫性を保って実装されています。

locales/zh-TW/translation.json (1)

1-446: 新しい繁体字中国語翻訳ファイルが追加されました

従来の学習結果に基づき、日本語以外の言語ファイルは手動でレビューしません。このファイルはアプリケーションの繁体字中国語対応のために適切に追加されているようです。

docs/character_model_licence_zh-TW.md (1)

1-69: 繁体字中国語のモデル使用条項ドキュメントが適切に追加されました

VRMおよびLive2Dモデルの使用条項について、繁体字中国語での包括的なドキュメントが追加されています。著作権、使用許可・禁止事項、免責事項が明確に記載されており、多言語対応の一環として適切な追加です。

Comment on lines +358 to 362
case 'zh-CN':
return 'Simplified Chinese'
case 'zh-TW':
return 'Traditional Chinese'
case 'ko':
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

'zh' エイリアスを残さないと後方互換が切れる恐れ

フロント側や外部 API から "zh" が送られて来た場合、現在の実装だと default ルートに落ちて "Japanese" が返ります。旧バージョンとの互換性を保つなら、簡体字へフォールバックさせる案を推奨します。

   case 'zh-CN':
     return 'Simplified Chinese'
   case 'zh-TW':
     return 'Traditional Chinese'
+  case 'zh':       // backward compatibility
+    return 'Simplified Chinese'

以下のコマンドで src/pages/api/convertSlide.ts 内に case 'zh' が定義されているか確認しましょう。


🏁 Script executed:

#!/bin/bash
rg -n "case 'zh" src/pages/api/convertSlide.ts

Length of output: 95


更に前後のデフォルト処理を確認します。


🏁 Script executed:

#!/bin/bash
sed -n '300,380p' src/pages/api/convertSlide.ts

Length of output: 2136


Case 'zh' のエイリアスを追加して後方互換性を保つ

getLanguage 関数に case 'zh' がないため、フロントや外部 API から "zh" が渡ってきた際に意図しないデフォルト(日本語)へ落ちてしまいます。簡体字(Simplified Chinese)へフォールバックするよう、以下の変更をお願いします。

  • ファイル: src/pages/api/convertSlide.ts
  • 関数: getLanguage
  • 該当箇所: case 'zh-TW' の直後
   case 'zh-TW':
     return 'Traditional Chinese'
+  case 'zh':                // backward compatibility
+    return 'Simplified Chinese'
   case 'ko':
     return 'Korean'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
case 'zh-CN':
return 'Simplified Chinese'
case 'zh-TW':
return 'Traditional Chinese'
case 'ko':
case 'zh-CN':
return 'Simplified Chinese'
case 'zh-TW':
return 'Traditional Chinese'
case 'zh': // backward compatibility
return 'Simplified Chinese'
case 'ko':
return 'Korean'
🤖 Prompt for AI Agents
In src/pages/api/convertSlide.ts around lines 358 to 362, the getLanguage
function lacks a case for 'zh', causing inputs of 'zh' to default incorrectly to
Japanese. Add a new case 'zh' immediately after the 'case 'zh-TW':' line that
returns 'Simplified Chinese' to maintain backward compatibility and ensure
correct language mapping.

Comment on lines +14 to 16
case 'zh-CN':
case 'zh-TW':
return 'ZH'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

レガシー値 zh を受け付けず互換性が失われる
以前に zh を送っていたクライアントが 500 を返される恐れがあります。後方互換のため case 'zh': も残すか、defaultZH に変えて回避してください。

     case 'en':
       return 'EN'
+    case 'zh':
     case 'zh-CN':
     case 'zh-TW':
       return 'ZH'
-    default:
-      return 'EN'
+    default:
+      return 'EN'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
case 'zh-CN':
case 'zh-TW':
return 'ZH'
case 'en':
return 'EN'
case 'zh':
case 'zh-CN':
case 'zh-TW':
return 'ZH'
default:
return 'EN'
🤖 Prompt for AI Agents
In src/pages/api/stylebertvits2.ts around lines 14 to 16, the switch statement
no longer handles the legacy value 'zh', which may cause clients sending 'zh' to
receive a 500 error. To fix this, add a case for 'zh' alongside 'zh-CN' and
'zh-TW' to return 'ZH', or alternatively change the default case to return 'ZH'
to maintain backward compatibility.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
docs/README_zh-TW.md (1)

33-37: 文檔網站リンクが簡体字用 URL のままです
現在 https://docs.aituberkit.com/zh/ を指していますが、繁体字ページが存在する場合は /zh-TW/ など繁体字向け URL へ変更してください。検索エンジンや UA 言語設定による自動切り替えを行っていない場合、利用者が簡体字サイトへ遷移してしまいます。

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b8b34d8 and 652d775.

📒 Files selected for processing (2)
  • docs/README_zh-CN.md (2 hunks)
  • docs/README_zh-TW.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/README_zh-CN.md
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: tegnike/aituber-kit#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T14:51:36.976Z
Learning: Applies to locales/{en,ko,zh}/** : 他の言語ファイル(en、ko、zh等)は手動で更新しない
Learnt from: CR
PR: tegnike/aituber-kit#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T14:51:36.976Z
Learning: Applies to locales/ja/** : 言語ファイルの更新は日本語(`/locales/ja/`)のみ行う
📚 Learning: applies to locales/ja/** : 言語ファイルの更新は日本語(`/locales/ja/`)のみ行う...
Learnt from: CR
PR: tegnike/aituber-kit#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T14:51:36.976Z
Learning: Applies to locales/ja/** : 言語ファイルの更新は日本語(`/locales/ja/`)のみ行う

Applied to files:

  • docs/README_zh-TW.md
🪛 LanguageTool
docs/README_zh-TW.md

[uncategorized] ~125-~125: 您的意思是“"不"驟”?
Context: ... Node.js: ^20.0.0 - npm: ^10.0.0 ### 安裝步驟 1. 將倉庫克隆到本地。 ```bash git clone http...

(BU)


[uncategorized] ~304-~304: 您的意思是“"不"驟”?
Context: ...題時,包含以下資訊將有助於我們順利響應: - 問題或新功能的詳細描述 - 重現步驟(對於錯誤) - 預期行為與實際行為 - 使用環境(瀏覽器、作業系統、Node...

(BU)

🔇 Additional comments (1)
docs/README_zh-TW.md (1)

39-44: Polski README へのパス重複問題が解消されています
過去に指摘のあった docs/ 二重指定が修正され、相対パスが正しくなりました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant