feat(i18n): Add Korean language (ko) - #3363
Conversation
WalkthroughA new Korean language (한국어) is added to the project's localization support. A complete Korean README (README.ko.md) is created, the LanguageSelector component adds a Korean language option, and language links in all existing READMEs are updated to reference the new Korean documentation. ChangesKorean Language Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@README.ko.md`:
- Around line 214-215: Replace the incorrect domain "https://doc.newapi.pro/"
with the correct "https://docs.newapi.pro/" for the three links in the README
(the Google Gemini link and the two Rerank 모델 links) so they match the rest of
the file; update the URL strings associated with the "Google Gemini" and "Rerank
모델" list items to use "https://docs.newapi.pro/..." instead of
"https://doc.newapi.pro/...".
In `@web/src/components/layout/headerbar/LanguageSelector.jsx`:
- Line 30: Update the inline comment in the LanguageSelector component to
accurately describe the actual menu order and contents: ensure the comment next
to the language sorting statement in LanguageSelector.jsx lists all locales
present (including zh-TW and vi) and reflects their displayed order (e.g.,
Chinese (zh-CN), Traditional Chinese (zh-TW), English (en), Vietnamese (vi),
French (fr), Japanese (ja), Korean (ko), Russian (ru)) so the comment stays
synchronized with the rendered menu.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 16205e55-be28-4088-8939-e1641a6c67c9
📒 Files selected for processing (11)
README.fr.mdREADME.ja.mdREADME.ko.mdREADME.mdREADME.zh_CN.mdREADME.zh_TW.mdweb/src/components/layout/headerbar/LanguageSelector.jsxweb/src/components/settings/personal/cards/PreferencesSettings.jsxweb/src/i18n/i18n.jsweb/src/i18n/language.jsweb/src/i18n/locales/ko.json
| - ⚡ [Google Gemini](https://doc.newapi.pro/kr/api/google-gemini-chat) | ||
| - 🔄 [Rerank 모델](https://docs.newapi.pro/kr/docs/api/ai-model/rerank/create-rerank) (Cohere, Jina) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Potentially inconsistent URLs in README.ko.md:"
rg -n 'https://doc\.newapi\.pro|https://docs\.newapi\.pro' README.ko.md
echo
echo "Checking reachability of doc.newapi.pro links and docs.newapi.pro counterparts..."
python - <<'PY'
import re
from pathlib import Path
from urllib.request import Request, urlopen
text = Path("README.ko.md").read_text(encoding="utf-8")
urls = sorted(set(re.findall(r'https://doc\.newapi\.pro[^\s)\]]*', text)))
def status(url: str):
try:
req = Request(url, headers={"User-Agent": "Mozilla/5.0"})
with urlopen(req, timeout=10) as r:
return r.status
except Exception as e:
return f"ERR ({e})"
for u in urls:
fixed = u.replace("https://doc.newapi.pro", "https://docs.newapi.pro")
print(f"current: {status(u)} {u}")
print(f"fixed : {status(fixed)} {fixed}")
print("---")
PYRepository: QuantumNous/new-api
Length of output: 5132
Fix inconsistent documentation domain: doc.newapi.pro → docs.newapi.pro
Lines 214, 264, and 265 use https://doc.newapi.pro/..., while the rest of the file consistently uses https://docs.newapi.pro/kr/docs/.... Update the three occurrences:
Required changes
- - ⚡ [Google Gemini](https://doc.newapi.pro/kr/api/google-gemini-chat)
+ - ⚡ [Google Gemini](https://docs.newapi.pro/kr/docs/api/google-gemini-chat)
- | 🎨 Midjourney-Proxy | [Midjourney-Proxy(Plus)](https://github.com/novicezk/midjourney-proxy) | [문서](https://doc.newapi.pro/api/midjourney-proxy-image) |
- | 🎵 Suno-API | [Suno API](https://github.com/Suno-API/Suno-API) | [문서](https://doc.newapi.pro/api/suno-music) |
+ | 🎨 Midjourney-Proxy | [Midjourney-Proxy(Plus)](https://github.com/novicezk/midjourney-proxy) | [문서](https://docs.newapi.pro/kr/docs/api/midjourney-proxy-image) |
+ | 🎵 Suno-API | [Suno API](https://github.com/Suno-API/Suno-API) | [문서](https://docs.newapi.pro/kr/docs/api/suno-music) |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.ko.md` around lines 214 - 215, Replace the incorrect domain
"https://doc.newapi.pro/" with the correct "https://docs.newapi.pro/" for the
three links in the README (the Google Gemini link and the two Rerank 모델 links)
so they match the rest of the file; update the URL strings associated with the
"Google Gemini" and "Rerank 모델" list items to use "https://docs.newapi.pro/..."
instead of "https://doc.newapi.pro/...".
| render={ | ||
| <Dropdown.Menu className='!bg-semi-color-bg-overlay !border-semi-color-border !shadow-lg !rounded-lg dark:!bg-gray-700 dark:!border-gray-600'> | ||
| {/* Language sorting: Order by English name (Chinese, English, French, Japanese, Russian) */} | ||
| {/* Language sorting: Order by English name (Chinese, English, French, Japanese, Korean, Russian) */} |
There was a problem hiding this comment.
Update the language-order comment to match the actual menu.
Line 30 says the order is “Chinese, English, French, Japanese, Korean, Russian”, but the menu also contains zh-TW and vi. Please sync the comment so it stays trustworthy.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@web/src/components/layout/headerbar/LanguageSelector.jsx` at line 30, Update
the inline comment in the LanguageSelector component to accurately describe the
actual menu order and contents: ensure the comment next to the language sorting
statement in LanguageSelector.jsx lists all locales present (including zh-TW and
vi) and reflects their displayed order (e.g., Chinese (zh-CN), Traditional
Chinese (zh-TW), English (en), Vietnamese (vi), French (fr), Japanese (ja),
Korean (ko), Russian (ru)) so the comment stays synchronized with the rendered
menu.
This comment was marked as spam.
This comment was marked as spam.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/classic/src/components/layout/headerbar/LanguageSelector.jsx`:
- Line 30: Update the inline sorting comment in LanguageSelector.jsx to reflect
the actual menu items and their order used by the component; replace the
inaccurate “Chinese, English, French, Japanese, Korean, Russian” text with the
full list including zh-TW and vi (and the precise sequence as rendered by the
LanguageSelector component) so future editors see the correct language sort
order.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4785c336-adce-4f8a-82b9-02070cc9e005
📒 Files selected for processing (6)
README.fr.mdREADME.ja.mdREADME.mdREADME.zh_CN.mdREADME.zh_TW.mdweb/classic/src/components/layout/headerbar/LanguageSelector.jsx
🚧 Files skipped from review as they are similar to previous changes (2)
- README.fr.md
- README.zh_CN.md
| render={ | ||
| <Dropdown.Menu className='!bg-semi-color-bg-overlay !border-semi-color-border !shadow-lg !rounded-lg dark:!bg-gray-700 dark:!border-gray-600'> | ||
| {/* Language sorting: Order by English name (Chinese, English, French, Japanese, Russian) */} | ||
| {/* Language sorting: Order by English name (Chinese, English, French, Japanese, Korean, Russian) */} |
There was a problem hiding this comment.
Update the sorting comment to match actual menu items.
Line 30 says the order is “Chinese, English, French, Japanese, Korean, Russian”, but the menu also includes zh-TW and vi. This can mislead future edits.
Suggested fix
- {/* Language sorting: Order by English name (Chinese, English, French, Japanese, Korean, Russian) */}
+ {/* Language sorting: zh-CN, zh-TW, en, fr, ja, ko, ru, vi */}📝 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.
| {/* Language sorting: Order by English name (Chinese, English, French, Japanese, Korean, Russian) */} | |
| {/* Language sorting: zh-CN, zh-TW, en, fr, ja, ko, ru, vi */} |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@web/classic/src/components/layout/headerbar/LanguageSelector.jsx` at line 30,
Update the inline sorting comment in LanguageSelector.jsx to reflect the actual
menu items and their order used by the component; replace the inaccurate
“Chinese, English, French, Japanese, Korean, Russian” text with the full list
including zh-TW and vi (and the precise sequence as rendered by the
LanguageSelector component) so future editors see the correct language sort
order.
51fdfc5 to
2b6f1df
Compare
Add README.kr.md (Korean translation)
Add web/src/i18n/locales/kr.json (Korean translation file)
Add Korean language link to all README files
Add Korean language support to i18n settings (keys.go, i18n.js, language.js)
Add Korean option to LanguageSelector component
Add Korean support to index.jsx
"页脚内容更新失败": "푰터 내용 업데이트에 실패했습니다"
푰터 should be 푸터 (correct Korean transliteration of "footer").
-> Corrected to "页脚内容更新失败": "푸터 내용 업데이트에 실패했습니다", 로 수정하였습니다.
"每个备用码只能使用一次": "백업 코드는 한 번만 사용할 수 있습니다 있습니다"
Remove the duplicated 있습니다 at the end.
-> Due to the content of item 4, the corresponding key has been removed from the current PR. We will proceed with internationalization through a separate PR.
"备用码必须是8位": "백업 코드는 자리여야 합니다"
Should be 백업 코드는 8자리여야 합니다 — the number 8 is missing from the translation.
-> Due to the content of item 4, the corresponding key has been removed from the current PR. We will proceed with internationalization through a separate PR.
"kr": "한국어"
Since the latest commits switched everything to the ISO 639-1 code ko, this key should also be "ko": "한국어" for consistency.
File Naming
README.kr.md should be renamed to README.ko.md to match the ISO 639-1 language code convention used by the locale file (ko.json) and the rest of the codebase.
Scope Concern
This PR includes code changes beyond just adding Korean translations (e.g., wrapping strings with t() in LoginForm.jsx, RegisterForm.jsx, TwoFAVerification.jsx, utils.jsx, api.js, etc.). While these i18n improvements are welcome, they affect all languages and should ideally be in a separate PR, or at minimum need careful review since they touch auth flows and error handling logic.
In particular, the changes in web/src/helpers/api.js appear to modify OAuth redirect behavior (window.open vs window.location.href), which is a functional change beyond i18n scope.
-> I have changed all keys to "ko". As you advised, I will only cover the Korean localization work for the existing keys in this PR, and address the internationalization work in the next PR.
Please fix the 4 translation bugs and the filename, and I'll take another look. Thanks for the effort!
-> I will pay a little more attention to this in the next PR. Thank you for kindly letting me know.
Summary by CodeRabbit
New Features
Documentation