i18n: add Korean (ko-KR) translation#1568
Conversation
Adds a full Korean UI translation for ScriptCat: - src/locales/ko-KR/: 11 i18next namespace JSON files (959 leaf keys) translated from the en-US source, covering common, popup, script, editor, settings, install, agent, logs, guide, tools, permission. - Registers ko-KR in src/locales/locales.ts (import + i18next resources). - Adds a Korean entry to the Monaco editor prompt/grant-value strings in src/pkg/utils/monaco-editor/langs.ts. - Adds src/assets/_locales/ko/messages.json for the chrome.i18n extension-market metadata (name/description), matching the existing per-locale files there. No terminology-ko-KR.md exists yet, so translations follow the existing style/voice used by ja-JP and de-DE per docs/translation.md guidance rather than introducing new terminology conventions. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Korean translation review — changes requested
I reviewed the Korean locale against both the English (en-US) source and the Simplified Chinese (zh-CN) source, together with the existing terminology guides.
The contribution is substantially complete and many strings are clear and accurate. However, the following issues should be corrected before merge:
- Authorization is mistranslated as authentication in the permission flow.
- The normal-script product type is translated as the generic userscript concept, losing a product distinction that both terminology guides require.
- Scheduled Script terminology is mixed with
crontab script, even though the product term is already established. - An exclude-rule explanation says “match rule,” producing incorrect UI meaning.
- A “clear storage” success message says the storage was reset, which is a different operation.
- A split popup sentence is grammatically broken when the number is inserted.
- Cross-browser background-running copy unnecessarily names Chrome.
- A Simplified Chinese full-width colon was copied into Korean text.
Must-fix findings
M1. Authorization is translated as authentication
File: src/locales/ko-KR/permission.json
Keys: auth_duration, loading_confirm, confirm_expired_title, confirm_expired_desc
The English source uses Authorization, and Simplified Chinese uses 授权. The Korean strings use 인증, which means authentication/identity verification rather than granting a script permission.
Current concepts:
인증 유효 기간인증 요청을 불러오는 중…인증 요청이 만료되었습니다
Suggested wording:
{
"auth_duration": "권한 허용 기간",
"loading_confirm": "권한 요청을 불러오는 중…",
"confirm_expired_title": "권한 요청이 만료되었습니다",
"confirm_expired_desc": "이 권한 요청은 시간이 초과되었거나 이미 처리되었습니다. 페이지로 돌아가 다시 시도해 주세요."
}This is a semantic issue, not only a style preference.
M2. The normal-script product type is translated as generic userscript
File: src/locales/ko-KR/script.json
Key: create_user_script
Current:
"create_user_script": "유저스크립트 만들기"In this UI, the key creates ScriptCat’s ordinary/normal script type. 유저스크립트 is also used as the generic userscript ecosystem concept elsewhere. Simplified Chinese deliberately resolves this product type as 普通脚本, and both terminology guides require preserving the distinction among normal, page, background, and scheduled scripts.
Suggested:
"create_user_script": "일반 스크립트 만들기"Use 유저스크립트 for the generic userscript concept and 일반 스크립트 for this ScriptCat type.
M3. Scheduled Script is mixed with crontab script
File: src/locales/ko-KR/editor.json
Key: only_background_scheduled_can_run
Current:
"only_background_scheduled_can_run": "백그라운드 스크립트/예약(crontab) 스크립트만 실행할 수 있습니다"The English crontab scripts wording is already identified as a source-copy review target. Simplified Chinese correctly uses the established scheduled-script product term.
Suggested:
"only_background_scheduled_can_run": "백그라운드 스크립트와 예약 스크립트만 실행할 수 있습니다"Keep cron/crontab only for the scheduling syntax, not the script-type name.
M4. Exclude-rule explanation incorrectly says “match rule”
File: src/locales/ko-KR/editor.json
Key: after_deleting_exclude_item
Current:
"after_deleting_exclude_item": "삭제 후에도 스크립트에 정의된 매치 규칙은 제외 목록에 다시 추가됩니다"This is the exclude list and should refer to an exclude rule.
Suggested:
"after_deleting_exclude_item": "삭제 후에도 스크립트에 정의된 제외 규칙은 제외 목록에 다시 추가됩니다"The English and Chinese strings appear to contain the same source-level inconsistency, but the Korean translation should not reproduce it when the key and UI context are clear.
M5. Clear storage is translated as reset
File: src/locales/ko-KR/editor.json
Key: clear_success
Current:
"clear_success": "초기화되었습니다"초기화 means reset/initialize and can imply restoring defaults. The action clears stored data; the UI already has separate reset and restore operations.
Suggested:
"clear_success": "저장소를 비웠습니다"모두 지웠습니다 may also work if the surrounding notification already identifies the storage object.
M6. Split popup sentence becomes grammatically incorrect
File: src/locales/ko-KR/popup.json
Keys: menu_expand_num_before, menu_expand_num_after
Current:
{
"menu_expand_num_before": "메뉴 항목이",
"menu_expand_num_after": "개를 초과하면 숨겨집니다."
}After inserting a number, this produces wording like 메뉴 항목이 5개를 초과하면 숨겨집니다, which is ungrammatical. It is the number of menu items that exceeds the limit.
Suggested:
{
"menu_expand_num_before": "메뉴 항목 수가 ",
"menu_expand_num_after": "개를 초과하면 자동으로 숨겨집니다."
}Please verify the exact leading/trailing spaces against the component concatenation.
M7. Cross-browser copy unnecessarily names Chrome
File: src/locales/ko-KR/settings.json
Key: enable_background.description
Current wording says the process remains active until the user manually quits Chrome. ScriptCat supports multiple browsers, and the Simplified Chinese source correctly generalizes this to “the browser.” The English terminology guide also identifies this as a source-copy review target.
Suggested:
활성화하면 모든 창을 닫아도 브라우저가 트레이에 최소화된 상태로 백그라운드에서 계속 실행되며, 브라우저를 직접 종료할 때까지 유지됩니다. 이를 통해 백그라운드 스크립트가 계속 실행될 수 있습니다.
M8. Simplified Chinese punctuation appears in Korean text
File: src/locales/ko-KR/settings.json
Key: migration_confirm_message
Current text contains the full-width Chinese colon ::
자세한 내용:https://docs.scriptcat.org/docs/change/v0.17/
Suggested:
저장소 엔진 마이그레이션을 다시 시도하면 기존 데이터가 변경됩니다. 진행하기 전에 확인해 주세요. 자세한 내용: https://docs.scriptcat.org/docs/change/v0.17/
Recommended improvements
R1. Translate generic “Source” as 출처, not 소스
File/key: src/locales/ko-KR/common.json → source
Suggested:
"source": "출처"Reserve 소스 or 소스 코드 for source code.
R2. Make “All” explicitly refer to browser tabs
File/key: src/locales/ko-KR/settings.json → script_run_env.all
Current: 전체
Suggested: 모든 탭
The sibling values are 일반 탭 and 시크릿 탭, so the bare label is ambiguous.
R3. Avoid the literal 절대 범위
File/key: src/locales/ko-KR/logs.json → absolute_range
Current: 절대 범위
Suggested: 절대 시간 범위
This follows the meaning clarified by the Simplified Chinese 绝对时间范围.
R4. Use desktop-appropriate wording for expanding update details
File/key: src/locales/ko-KR/install.json → updatepage.tap_to_expand
Current: 탭하여 펼치기
Suggested: 클릭하여 펼치기
This is primarily a desktop extension interface; Simplified Chinese also resolves the source’s ambiguous “Tap” to “click.”
R5. Clarify that models are fetched/listed, not imported
File/key: src/locales/ko-KR/agent.json → model_fetch
Current: 모델 가져오기
Suggested: 모델 목록 불러오기
가져오기 is already used for import operations elsewhere.
R6. Prefer 매개변수 for user-facing tool arguments
File/key: src/locales/ko-KR/agent.json → chat_tool_arguments
Current: 인수
Suggested: 매개변수
인수 is technically valid, but 매개변수 is clearer in this user-facing chat UI.
R7. Improve the OPFS expansion
File/key: src/locales/ko-KR/agent.json → opfs_subtitle
Current:
출처별 프라이빗 파일 시스템(OPFS) · 에이전트 전용 저장소
Suggested:
오리진 전용 파일 시스템(OPFS) · 에이전트 전용 저장소
출처별 does not clearly express the web-platform security-origin concept.
R8. Correct the CORS label
File/key: src/locales/ko-KR/permission.json → permission_cors
Current: 교차 도메인(CORS)
Suggested: 교차 출처 접근(CORS)
CORS specifically concerns cross-origin resource sharing.
R9. Normalize Skill as 스킬 in ordinary Korean UI
File/keys: src/locales/ko-KR/script.json
import_skilllink_import_hintdrop_to_installdrop_to_install_hint
The locale already uses 스킬 throughout agent.json and install.json, but these strings retain English Skill.
Suggested:
{
"import_skill": "스킬 가져오기",
"link_import_hint": "유저스크립트 / 구독 / 스킬 URL을 지원합니다",
"drop_to_install": "스크립트 또는 스킬을 여기에 드롭하여 설치",
"drop_to_install_hint": ".js 유저스크립트 / 구독 · .zip 스킬 패키지를 드롭하세요"
}Preserve exact identifiers and filenames such as SKILL.md, SKILL.cat.md, and SkillScript.
R10. Avoid placeholder particle notation
File/key: src/locales/ko-KR/script.json → confirm_delete_script_content
Current:
스크립트 "{{name}}"을(를) 삭제하시겠습니까?
Suggested:
"{{name}}" 스크립트를 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다.
Rephrasing is more natural than exposing Korean particle alternatives.
R11. Make execution exclusion labels more natural
File/keys: src/locales/ko-KR/common.json → exclude_on, exclude_off
Suggested:
{
"exclude_on": "$0에서 다시 실행",
"exclude_off": "$0에서 실행 제외"
}The current compressed noun phrases read like literal machine translation.
R12. Keep the generic userscript term consistent in Monaco
File/key: src/pkg/utils/monaco-editor/langs.ts → thisIsAUserScript
Current: 사용자 스크립트
Suggested: 유저스크립트
This aligns with the dominant generic term in the Korean locale. The normal ScriptCat product type should remain 일반 스크립트.
R13. Smooth two Monaco quick-fix strings
File/keys:
replaceMatchTldWildcardWithIncludereplaceIncludeWithMatch
Suggested:
@match 최상위 도메인 와일드카드를 @include {0}으로 바꾸기
@include를 @match {0}으로 바꾸기
This removes visible particle notation and reads more naturally as an action.
R14. Consider improving the extension-store description
File/key: src/assets/_locales/ko/messages.json → scriptcat_description
Current:
브라우저의 모든 잠재력을 끌어내는 강력한 유저스크립트 매니저!
Suggested:
브라우저의 잠재력을 최대한 활용할 수 있는 강력한 유저스크립트 관리자!
The current sentence is understandable, but the suggestion is more natural and neutral Korean product copy.
|
@cyfung1031 Thanks for the thorough review 🙏 I did a pass focused only on structure (not wording/grammar), and there's one thing that needs handling:
|
|
@moduvoice I am waiting for your follow-up. If there is no follow-up within this week, I will just use AI to apply all above suggestions. Then you might make another PR for any further changing. |
解决 pt-BR / ko-KR 的增量冲突:locales.ts 与 docs/translation.md 同时保留两个语言的注册项。
Address the remaining recommended fixes from cyfung1031's review (authorization/source/CORS/OPFS/absolute-range/tap-vs-click/model-fetch/ tool-arguments/Skill wording/particle notation/exclude labels), register ko-KR in monaco-editor/langs/index.ts (the language pack existed but was never imported, so it had no effect), and add the ko-KR translation for cloud_sync_connection_changed which was missing after a later main merge added the key to en-US. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Pushed a follow-up commit (30b8ce6) addressing the remaining recommended items from @cyfung1031's review that weren't covered yet:
M1–M8 (the must-fix items) were already resolved by the prior commit — verified against current file content rather than the original review diff. Verified with the |
|
@CodFrm please do final checking and then merge to main. |
* 🌐 添加翻译完整性机械检查 (check:i18n) PR #1587 (pt-BR) 合并后发现 messages.json 与 monaco 编辑器语言遗漏,且当时无机制拦截; 本次新增 scripts/check-i18n.mjs 并接入 pnpm lint / lint:ci,机械校验: - src/locales/<locale>/*.json 各命名空间 key 是否与 en-US 一一对应(缺失/多余均报错) - src/locales/<locale>/index.ts 是否导出全部命名空间 - src/assets/_locales/<chrome-locale>/messages.json 与 en/messages.json 的 key 是否一致 (尚未创建该目录时仅提示,不阻塞) - docs/references/terminology-<locale>.md 是否存在(每个 locale 必须有,缺失即报错) - src/pkg/utils/monaco-editor/langs.ts 中 editorLangs 各 locale 的 key 是否与 en-US 一致 (尚未创建该 locale 条目时仅提示;已创建则 key 必须对齐) 已用 scriptscat/scriptcat 官方仓库的 PR #1568(韩语)与 #1587(pt-BR)实际验证: 正确通过完整、正确的翻译提交,也能在人为剔除 key / 文件时正确报错。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * 🔧 支持拆分后的 monaco-editor langs 模块结构 用 PR #1605 实测时发现:check-i18n.mjs 硬编码了单文件 src/pkg/utils/monaco-editor/langs.ts 路径,一旦该文件被拆分为 langs/<locale>.ts + langs/index.ts(如 #1605 所做),检查会误报 "文件缺失"。改为先探测 langs/index.ts 是否存在,再退回单文件路径;并将 key 展开逻辑改为 按模块解析(parseModule/flattenNode),支持跨文件解析 import 绑定(如 index.ts 里 "pt-BR": ptBR 指向 ./pt-BR.ts 的 default export)与同文件 shorthand 属性 (如 pt-BR.ts 内的 grantValuePrompts,)。 已用 #1605 的实际分支验证:新结构下 0 误报,人为在拆分后的 pt-BR.ts 中删除顶层 key 与 grantValuePrompts 子 key 均能正确报出具体路径。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * 🔒 pre-commit 阶段强制翻译完整性检查 CI 的 lint:ci 已经跑 check:i18n,但那只在 push/PR 之后才会看到红叉。 本次让本地 pre-commit 钩子在暂存区涉及翻译相关路径 (src/locales/、src/assets/_locales/、docs/references/terminology-*.md、 src/pkg/utils/monaco-editor/langs.ts 或 langs/ 拆分文件)时, 提前跑一遍 pnpm run check:i18n,不通过则直接拒绝提交, 不需要等到推送后在 CI 里才发现。 真正能拦住"不通过就不许合并"的还有一层:仓库 main 分支的 branch protection 需要把 Lint 设为 required status check, 这一步需要 scriptscat/scriptcat 的仓库管理员在 GitHub 设置里配置, 不是贡献者这边能做的。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * 🔧 pre-commit 机械检查范围收窄为仅 json 文件改动 之前的触发范围包含 terminology-*.md、langs.ts/langs/* 等非 json 文件, 导致本 PR 自身改动 .husky/pre-commit、scripts/check-i18n.mjs 这类非 翻译内容的提交也可能被牵连(虽然本次未命中,但范围过宽)。收窄为只在 暂存区包含 src/locales/**/*.json 或 src/assets/_locales/**/*.json 时才 触发 pnpm run check:i18n,其余改动(含本 PR 自身)不受影响,仍可正常 提交推送。CI 侧的 lint:ci 不受影响,仍覆盖全部 5 类检查。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * 🐛 修复 check:i18n 的多处 fail-open 漏洞并补齐回归测试 CodFrm 在 PR #1606 review 中指出: pre-commit 的 check:i18n 校验的是工作区而非 Git 暂存快照(暂存坏版本、工作区改回好版本可绕过检查,删除操作也不触发); check-i18n.mjs 从未与 src/locales/locales.ts 的实际注册(NS/resources/import) 交叉核对,index.ts 导出检查只是子串匹配可被注释字符串骗过;Monaco 自定义 AST evaluator 对 spread、计算属性、循环别名等无法解析的结构会静默折叠为空/叶子键集 而非报错;Chrome _locales 与 Monaco 覆盖面缺失只是 warning。 本次改动: - scripts/git-staged-snapshot.mjs: 用 `git checkout-index` 直接从索引物化暂存 快照,.husky/pre-commit 改为对该快照跑 check:i18n(--diff-filter 补上 D)。 - scripts/check-i18n.mjs: 新增 locales.ts 双向一致性检查(NS 数组 vs 命名空间 文件、import/resources vs 磁盘目录);index.ts 导出改用真实 AST 解析;Monaco AST evaluator 对 spread/计算属性/不支持的表达式/循环引用/语法错误一律报错 (fail-closed);Chrome _locales 与 Monaco 覆盖面缺失由 warning 升级为 error。 - 新增 scripts/check-i18n.test.mjs、scripts/git-staged-snapshot.test.mjs 覆盖 上述所有可复现场景。 - docs/translation.md 同步更新为当前 fail-closed 行为。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * 🐛 修复 check:i18n 入口守卫在特殊路径下静默失效 check-i18n.mjs 与 git-staged-snapshot.mjs 都用 `import.meta.url === \`file://${process.argv[1]}\`` 判断是否被直接执行。 这个比较在两种情况下永不成立,main() / CLI 分支不执行,进程零输出 exit 0: - `import.meta.url` 是 percent-encoded 的,而 argv[1] 是原始路径:仓库路径含 空格或非 ASCII 字符(如 ~/我的项目/scriptcat)时两者不等; - `import.meta.url` 会解析软链而 argv[1] 不会:macOS 的 /tmp、/var 即是软链。 后果是本 PR 建立的机制整体失效且毫无迹象——`pnpm lint` / `lint:ci` 里这一格 永远绿,pre-commit 中两个脚本以 `&&` 串联、一起放行坏提交。实测在 ~/…/中文目录/ 下删掉 zh-CN/common.json 的一个 key 后 `git commit` 直接落库, 而同样的破坏在 ASCII 路径下会被正确拦截。这恰好是脚本自身 "fail-closed by design" 承诺要杜绝的失败模式。 改为两边都归一化成真实文件路径再比对,同时覆盖编码与软链两种情形。 补充 CLI 入口回归测试:原有用例都直接调 runCheck(),绕过了 CLI 入口, 覆盖不到"脚本到底有没有被执行"这一层。新用例把脚本复制到含空格 / 非 ASCII 字符的目录下真实 spawn,断言干净树输出通过信息、缺 key 时 exit 1。因需拉起 node 子进程(实测 300ms+),显式放宽这些用例的超时, 不套用 vitest.config.ts 给单元测试定的 340ms 预算。 --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: 王一之 <yz@ggnb.top>
Korean (ko-KR) translation PR body
Motivation
This adds Korean (
ko-KR) translation support — to help Korean-speaking users use thisopen-source project more comfortably in their own language.
한국 사람들의 오픈소스 이용에 도움이 되게 하기 위해서 한글화 작업을 하였습니다.
Changes
src/locales/ko-KR/locale: 11 namespace files (agent.json,common.json,editor.json,guide.json,install.json,logs.json,permission.json,popup.json,script.json,settings.json,tools.json) +index.ts, mirroring theen-USstructure — 959 translated keys, verified 1:1 key parity againsten-US(0 missing / 0 extra).src/locales/locales.ts("ko-KR": { title: "한국어", ...koKR }).src/assets/_locales/ko/messages.json— legacychrome.i18nextension metadata (name/description) for the Chrome Web Store listing.src/pkg/utils/monaco-editor/langs.ts— added Korean strings for the in-editor GM API grant-value hover prompts and metadata-field prompts (script header fields, crontab examples, etc.) used by the Monaco editor.Testing
ko-KR/*.jsonnamespace files diffed key-by-key againsten-US, confirming 959/959 keys with 0 missing and 0 extra.docs/translation.md: noterminology-ko-KR.mdexists yet, so translation style was kept consistent with the existing locale conventions rather than introducing new ad-hoc terminology; verified terminology consistency for core concepts across all 11 files (스크립트/유저스크립트, 권한, 구독, 백그라운드 스크립트, 샌드박스, 에이전트).install.json(security/permission warning copy) andagent.json(AI coding agent feature UI).npx tsc --noEmit— clean.npx eslint .— clean.npx vitest run— 3084/3084 tests passing (289 test files).