i18n: backfill gallery + archetypes keys across 20 locales - #205
Conversation
The de-celebrified Voice Gallery (#203) added gallery.* (45) + archetypes.* (15) keys to en.json only, so all 20 other locales fell back to English for the new gallery UI. Backfill all 60 keys into every locale via the project's own scripts/translate_all.py (Google Translate, placeholder-masked, incremental) — the same tool/path fixed in the earlier update-channel backfill. Also removes 8 stale gallery.cat_* keys per locale (cat_celebs, cat_marvel, cat_disney, cat_politicians, cat_anime, cat_books, cat_gaming, cat_news) — the dead celebrity categories #203 removed from en.json but left behind in the other locales. Finishes the de-celebrification across the whole i18n layer. en.json / source untouched. Verified: all 21 locales valid JSON and key-aligned to en for gallery + archetypes (0 missing); {{version}}/{{pct}}/{{channel}}-style placeholders intact (0 losses); tsc clean; build OK; CJK guard passes (locales are the allowlisted translation layer). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughAll 17 frontend locale files are updated to support a new archetype-driven gallery UI and voice import workflow. Gallery category labels are replaced with zone/voice action strings, and a new top-level archetypes object is added for voice filtering by category and attributes. ChangesArchetype Gallery and Voice Import Localization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
🚥 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)
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 |
|
| Filename | Overview |
|---|---|
| frontend/src/i18n/locales/zh-CN.json | 21 of 60 backfilled keys are untranslated English strings — translation script silently failed for this locale |
| frontend/src/i18n/locales/ar.json | All 60 keys backfilled and fully translated; 8 stale cat_* keys removed correctly |
| frontend/src/i18n/locales/de.json | All 60 keys backfilled and fully translated; stale cat_* keys removed correctly |
| frontend/src/i18n/locales/fr.json | All 60 keys backfilled; facet_accent: Accent matches English but is a valid French loanword |
| frontend/src/i18n/locales/ja.json | All 60 keys backfilled and fully translated; stale cat_* keys removed correctly |
| frontend/src/i18n/locales/ko.json | All 60 keys backfilled and fully translated; stale cat_* keys removed correctly |
| frontend/src/i18n/locales/zh-TW.json | All 60 keys backfilled and fully translated into Traditional Chinese; stale cat_* keys removed |
| frontend/src/i18n/locales/hi.json | All 60 keys backfilled and fully translated into Hindi; stale cat_* keys removed correctly |
| frontend/src/i18n/locales/ru.json | All 60 keys backfilled and fully translated into Russian; stale cat_* keys removed correctly |
| frontend/src/i18n/locales/th.json | All 60 keys backfilled and fully translated into Thai; stale cat_* keys removed correctly |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[PR #205: i18n backfill] --> B[20 non-English locales]
B --> C[Remove 8 stale cat_* keys]
B --> D[Add 45 gallery.* keys]
B --> E[Add 15 archetypes.* keys]
D --> F{Translation result}
E --> F
F -->|19 locales| G[✅ Fully translated]
F -->|zh-CN| H[⚠️ 21 keys left in English]
H --> H1[16 gallery.* keys untranslated]
H --> H2[5 archetypes.* keys untranslated]
G --> I[All keys align with en.json]
Reviews (1): Last reviewed commit: "i18n: backfill gallery + archetypes keys..." | Re-trigger Greptile
| "clone_profile": "克隆配置", | ||
| "crop_audio": "裁剪音频", | ||
| "cat_disney": "迪士尼", | ||
| "cat_anime": "动漫", | ||
| "cat_marvel": "漫威/DC", | ||
| "cat_celebs": "名人", | ||
| "cat_politicians": "政治家", | ||
| "cat_news": "新闻主播", | ||
| "cat_gaming": "游戏", | ||
| "cat_books": "书籍/电影" | ||
| "subtitle": "Hundreds of ready-made designed voices — pick one and go.", | ||
| "zone_archetypes": "原型", | ||
| "zone_imports": "My Imports", | ||
| "all": "全部", | ||
| "favorites": "收藏夹", | ||
| "favorite": "最爱", | ||
| "reset": "重置", | ||
| "preview": "预览", | ||
| "use_voice": "Use voice", | ||
| "open_designer": "Open in Designer", | ||
| "no_matches": "No voices match these filters.", | ||
| "load_more": "加载更多", | ||
| "saved_as_profile": "Added \"{{name}}\" to your voices.", | ||
| "use_failed": "无法创建该声音 - 引擎可能正在加载。", | ||
| "preview_failed": "预览不可用 - 语音引擎可能仍在加载。", | ||
| "import_explainer": "粘贴您有权访问的 URL(或上传文件),修剪您需要的部分,然后将其另存为语音。您负责对您进口的任何物品进行许可。", | ||
| "import_placeholder": "Paste a video/audio URL, or type to search…", | ||
| "imported_clip": "Imported clip", | ||
| "upload": "上传文件", | ||
| "import": "进口", | ||
| "my_imports": "My Imports", | ||
| "no_imports": "Nothing imported yet. Paste a URL above to get started.", |
There was a problem hiding this comment.
21 gallery/archetypes keys left in English for zh-CN
The translation script appears to have silently fallen back to English for a large subset of zh-CN keys. All other 19 locales are fully translated, but zh-CN has 16 gallery.* keys and 5 archetypes.* keys with verbatim English values. Simplified Chinese users will see English for common UI text including the page subtitle, zone labels, error messages, and several category names.
Affected gallery keys: subtitle, zone_imports, use_voice, open_designer, no_matches, saved_as_profile, import_placeholder, imported_clip, my_imports, no_imports, search_results, download_failed, upload_failed, save_failed, confirm_delete, trim_load_failed.
Affected archetypes keys: use_narration, use_characters, use_social, use_entertainment, use_informative.
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 `@frontend/src/i18n/locales/ar.json`:
- Line 944: The Arabic translation for the key "facet_pitch" is currently
"الملعب" (stadium) which is incorrect for vocal pitch; update the value of
"facet_pitch" in the locales JSON so VoiceGallery.jsx (which reads
archetypes.facet_pitch) shows the correct concept—replace "الملعب" with a
suitable term such as "النبرة" or "حدة الصوت".
In `@frontend/src/i18n/locales/fr.json`:
- Line 945: The French translation for the key "facet_pitch" is
incorrect—replace the current value "Emplacement" with an appropriate
musical/vocal term such as "Hauteur" or "Tonalité" so that VoiceGallery.jsx
(which renders archetypes.facet_pitch) displays the correct meaning; update the
value for "facet_pitch" in frontend/src/i18n/locales/fr.json accordingly.
In `@frontend/src/i18n/locales/zh-CN.json`:
- Around line 932-947: The archetypes section contains untranslated English
values and an incorrect label for voice pitch: update the values for
"use_narration" -> a Chinese translation like "配音与故事", "use_conversational" is
already Chinese ("会话型"), "use_characters" -> "角色与动画", "use_social" -> "社交媒体",
"use_entertainment" -> "娱乐与电视", and "use_informative" -> "资讯与教育" (or similar
Chinese equivalents you prefer), and change the "facet_pitch" value from "间距" to
the correct Chinese term for voice pitch such as "音高". Ensure keys remain
unchanged (use_narration, use_conversational, use_characters, use_social,
use_entertainment, use_informative, facet_pitch) and only their string values
are updated.
- Around line 693-722: Several gallery localization keys remain in English
(e.g., "subtitle", "zone_imports", "use_voice", "open_designer", "no_matches",
"search_results", "download_failed", "import_placeholder", "imported_clip",
"import", "my_imports", "no_imports", "preview", "use_voice", etc.); translate
these values into zh-CN, preserving interpolation placeholders (e.g., {{count}},
{{msg}}, {{name}}) and any punctuation/escaping, and ensure keys like
"zone_archetypes", "zone_imports", "import_placeholder", "imported_clip",
"search_results", "download_failed", "search_failed", "upload_failed",
"save_failed", "confirm_delete", "trim_load_failed" contain Chinese strings
consistent with surrounding translations and JSON formatting.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: d1409799-735e-452c-bd14-264ed437e70f
📒 Files selected for processing (20)
frontend/src/i18n/locales/ar.jsonfrontend/src/i18n/locales/de.jsonfrontend/src/i18n/locales/es.jsonfrontend/src/i18n/locales/fr.jsonfrontend/src/i18n/locales/hi.jsonfrontend/src/i18n/locales/id.jsonfrontend/src/i18n/locales/it.jsonfrontend/src/i18n/locales/ja.jsonfrontend/src/i18n/locales/ko.jsonfrontend/src/i18n/locales/nl.jsonfrontend/src/i18n/locales/pl.jsonfrontend/src/i18n/locales/pt.jsonfrontend/src/i18n/locales/ru.jsonfrontend/src/i18n/locales/sv.jsonfrontend/src/i18n/locales/th.jsonfrontend/src/i18n/locales/tr.jsonfrontend/src/i18n/locales/uk.jsonfrontend/src/i18n/locales/vi.jsonfrontend/src/i18n/locales/zh-CN.jsonfrontend/src/i18n/locales/zh-TW.json
| "use_informative": "إعلامية وتعليمية", | ||
| "facet_gender": "الجنس", | ||
| "facet_age": "العمر", | ||
| "facet_pitch": "الملعب", |
There was a problem hiding this comment.
Fix the Arabic label for the pitch facet.
"الملعب" means “stadium/playground,” not vocal pitch. VoiceGallery.jsx reads archetypes.facet_pitch directly for the filter label, so this will show the wrong concept in the new gallery UI. Consider something like "النبرة" or "حدة الصوت".
🤖 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 `@frontend/src/i18n/locales/ar.json` at line 944, The Arabic translation for
the key "facet_pitch" is currently "الملعب" (stadium) which is incorrect for
vocal pitch; update the value of "facet_pitch" in the locales JSON so
VoiceGallery.jsx (which reads archetypes.facet_pitch) shows the correct
concept—replace "الملعب" with a suitable term such as "النبرة" or "حدة الصوت".
| "use_informative": "Informatif et éducatif", | ||
| "facet_gender": "Sexe", | ||
| "facet_age": "Âge", | ||
| "facet_pitch": "Emplacement", |
There was a problem hiding this comment.
Use a French term for vocal pitch here.
"Emplacement" means location/placement, so the pitch filter will read incorrectly in the archetypes UI. Since VoiceGallery.jsx renders archetypes.facet_pitch directly, this should be something like "Hauteur" or "Tonalité" instead.
🤖 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 `@frontend/src/i18n/locales/fr.json` at line 945, The French translation for
the key "facet_pitch" is incorrect—replace the current value "Emplacement" with
an appropriate musical/vocal term such as "Hauteur" or "Tonalité" so that
VoiceGallery.jsx (which renders archetypes.facet_pitch) displays the correct
meaning; update the value for "facet_pitch" in frontend/src/i18n/locales/fr.json
accordingly.
| "subtitle": "Hundreds of ready-made designed voices — pick one and go.", | ||
| "zone_archetypes": "原型", | ||
| "zone_imports": "My Imports", | ||
| "all": "全部", | ||
| "favorites": "收藏夹", | ||
| "favorite": "最爱", | ||
| "reset": "重置", | ||
| "preview": "预览", | ||
| "use_voice": "Use voice", | ||
| "open_designer": "Open in Designer", | ||
| "no_matches": "No voices match these filters.", | ||
| "load_more": "加载更多", | ||
| "saved_as_profile": "Added \"{{name}}\" to your voices.", | ||
| "use_failed": "无法创建该声音 - 引擎可能正在加载。", | ||
| "preview_failed": "预览不可用 - 语音引擎可能仍在加载。", | ||
| "import_explainer": "粘贴您有权访问的 URL(或上传文件),修剪您需要的部分,然后将其另存为语音。您负责对您进口的任何物品进行许可。", | ||
| "import_placeholder": "Paste a video/audio URL, or type to search…", | ||
| "imported_clip": "Imported clip", | ||
| "upload": "上传文件", | ||
| "import": "进口", | ||
| "my_imports": "My Imports", | ||
| "no_imports": "Nothing imported yet. Paste a URL above to get started.", | ||
| "search_results": "{{count}} results", | ||
| "download_failed": "Download failed: {{msg}}", | ||
| "search_failed": "搜索失败。", | ||
| "upload_failed": "Upload failed.", | ||
| "save_failed": "Could not save profile.", | ||
| "confirm_delete": "Delete \"{{name}}\"?", | ||
| "trim_load_failed": "Could not load audio for trimming.", | ||
| "delete": "删除" |
There was a problem hiding this comment.
Localize remaining English gallery strings in zh-CN.
Several newly added gallery values are still English (e.g., subtitle, zone_imports, use_voice, open_designer, no_matches, search_results, download_failed, etc.), which breaks zh-CN UI consistency.
Suggested patch
- "subtitle": "Hundreds of ready-made designed voices — pick one and go.",
+ "subtitle": "数百种现成设计好的声音——选一个就能用。",
- "zone_imports": "My Imports",
+ "zone_imports": "我的导入",
- "use_voice": "Use voice",
+ "use_voice": "使用声音",
- "open_designer": "Open in Designer",
+ "open_designer": "在设计器中打开",
- "no_matches": "No voices match these filters.",
+ "no_matches": "没有声音符合这些筛选条件。",
- "import_placeholder": "Paste a video/audio URL, or type to search…",
+ "import_placeholder": "粘贴视频/音频 URL,或输入以搜索…",
- "imported_clip": "Imported clip",
+ "imported_clip": "已导入片段",
- "my_imports": "My Imports",
+ "my_imports": "我的导入",
- "no_imports": "Nothing imported yet. Paste a URL above to get started.",
+ "no_imports": "还没有导入内容。粘贴上方 URL 开始使用。",
- "search_results": "{{count}} results",
+ "search_results": "{{count}} 条结果",
- "download_failed": "Download failed: {{msg}}",
+ "download_failed": "下载失败:{{msg}}",
- "upload_failed": "Upload failed.",
+ "upload_failed": "上传失败。",
- "save_failed": "Could not save profile.",
+ "save_failed": "无法保存配置。",
- "confirm_delete": "Delete \"{{name}}\"?",
+ "confirm_delete": "删除“{{name}}”?",
- "trim_load_failed": "Could not load audio for trimming.",
+ "trim_load_failed": "无法加载用于裁剪的音频。",
- "import": "进口",
+ "import": "导入",📝 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.
| "subtitle": "Hundreds of ready-made designed voices — pick one and go.", | |
| "zone_archetypes": "原型", | |
| "zone_imports": "My Imports", | |
| "all": "全部", | |
| "favorites": "收藏夹", | |
| "favorite": "最爱", | |
| "reset": "重置", | |
| "preview": "预览", | |
| "use_voice": "Use voice", | |
| "open_designer": "Open in Designer", | |
| "no_matches": "No voices match these filters.", | |
| "load_more": "加载更多", | |
| "saved_as_profile": "Added \"{{name}}\" to your voices.", | |
| "use_failed": "无法创建该声音 - 引擎可能正在加载。", | |
| "preview_failed": "预览不可用 - 语音引擎可能仍在加载。", | |
| "import_explainer": "粘贴您有权访问的 URL(或上传文件),修剪您需要的部分,然后将其另存为语音。您负责对您进口的任何物品进行许可。", | |
| "import_placeholder": "Paste a video/audio URL, or type to search…", | |
| "imported_clip": "Imported clip", | |
| "upload": "上传文件", | |
| "import": "进口", | |
| "my_imports": "My Imports", | |
| "no_imports": "Nothing imported yet. Paste a URL above to get started.", | |
| "search_results": "{{count}} results", | |
| "download_failed": "Download failed: {{msg}}", | |
| "search_failed": "搜索失败。", | |
| "upload_failed": "Upload failed.", | |
| "save_failed": "Could not save profile.", | |
| "confirm_delete": "Delete \"{{name}}\"?", | |
| "trim_load_failed": "Could not load audio for trimming.", | |
| "delete": "删除" | |
| "subtitle": "数百种现成设计好的声音——选一个就能用。", | |
| "zone_archetypes": "原型", | |
| "zone_imports": "我的导入", | |
| "all": "全部", | |
| "favorites": "收藏夹", | |
| "favorite": "最爱", | |
| "reset": "重置", | |
| "preview": "预览", | |
| "use_voice": "使用声音", | |
| "open_designer": "在设计器中打开", | |
| "no_matches": "没有声音符合这些筛选条件。", | |
| "load_more": "加载更多", | |
| "saved_as_profile": "Added \"{{name}}\" to your voices.", | |
| "use_failed": "无法创建该声音 - 引擎可能正在加载。", | |
| "preview_failed": "预览不可用 - 语音引擎可能仍在加载。", | |
| "import_explainer": "粘贴您有权访问的 URL(或上传文件),修剪您需要的部分,然后将其另存为语音。您负责对您进口的任何物品进行许可。", | |
| "import_placeholder": "粘贴视频/音频 URL,或输入以搜索…", | |
| "imported_clip": "已导入片段", | |
| "upload": "上传文件", | |
| "import": "导入", | |
| "my_imports": "我的导入", | |
| "no_imports": "还没有导入内容。粘贴上方 URL 开始使用。", | |
| "search_results": "{{count}} 条结果", | |
| "download_failed": "下载失败:{{msg}}", | |
| "search_failed": "搜索失败。", | |
| "upload_failed": "上传失败。", | |
| "save_failed": "无法保存配置。", | |
| "confirm_delete": "删除"{{name}}"?", | |
| "trim_load_failed": "无法加载用于裁剪的音频。", | |
| "delete": "删除" |
🤖 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 `@frontend/src/i18n/locales/zh-CN.json` around lines 693 - 722, Several gallery
localization keys remain in English (e.g., "subtitle", "zone_imports",
"use_voice", "open_designer", "no_matches", "search_results", "download_failed",
"import_placeholder", "imported_clip", "import", "my_imports", "no_imports",
"preview", "use_voice", etc.); translate these values into zh-CN, preserving
interpolation placeholders (e.g., {{count}}, {{msg}}, {{name}}) and any
punctuation/escaping, and ensure keys like "zone_archetypes", "zone_imports",
"import_placeholder", "imported_clip", "search_results", "download_failed",
"search_failed", "upload_failed", "save_failed", "confirm_delete",
"trim_load_failed" contain Chinese strings consistent with surrounding
translations and JSON formatting.
| "archetypes": { | ||
| "featured": "精选", | ||
| "browse_all": "浏览全部", | ||
| "use_narration": "Narration & Story", | ||
| "use_conversational": "会话型", | ||
| "use_characters": "Characters & Animation", | ||
| "use_social": "Social Media", | ||
| "use_entertainment": "Entertainment & TV", | ||
| "use_advertisement": "广告", | ||
| "use_informative": "Informative & Educational", | ||
| "facet_gender": "性别", | ||
| "facet_age": "年龄", | ||
| "facet_pitch": "间距", | ||
| "facet_accent": "口音", | ||
| "facet_lang": "语言", | ||
| "facet_whisper": "耳语" |
There was a problem hiding this comment.
Complete zh-CN localization in archetypes and fix pitch label.
archetypes still contains English values (use_narration, use_characters, use_social, use_entertainment, use_informative), and Line 944 uses “间距” for facet_pitch, which is semantically incorrect for voice pitch.
Suggested patch
- "use_narration": "Narration & Story",
+ "use_narration": "旁白与讲述",
- "use_characters": "Characters & Animation",
+ "use_characters": "角色与动画",
- "use_social": "Social Media",
+ "use_social": "社交媒体",
- "use_entertainment": "Entertainment & TV",
+ "use_entertainment": "娱乐与电视",
- "use_informative": "Informative & Educational",
+ "use_informative": "信息与教育",
- "facet_pitch": "间距",
+ "facet_pitch": "音高",📝 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.
| "archetypes": { | |
| "featured": "精选", | |
| "browse_all": "浏览全部", | |
| "use_narration": "Narration & Story", | |
| "use_conversational": "会话型", | |
| "use_characters": "Characters & Animation", | |
| "use_social": "Social Media", | |
| "use_entertainment": "Entertainment & TV", | |
| "use_advertisement": "广告", | |
| "use_informative": "Informative & Educational", | |
| "facet_gender": "性别", | |
| "facet_age": "年龄", | |
| "facet_pitch": "间距", | |
| "facet_accent": "口音", | |
| "facet_lang": "语言", | |
| "facet_whisper": "耳语" | |
| "archetypes": { | |
| "featured": "精选", | |
| "browse_all": "浏览全部", | |
| "use_narration": "旁白与讲述", | |
| "use_conversational": "会话型", | |
| "use_characters": "角色与动画", | |
| "use_social": "社交媒体", | |
| "use_entertainment": "娱乐与电视", | |
| "use_advertisement": "广告", | |
| "use_informative": "信息与教育", | |
| "facet_gender": "性别", | |
| "facet_age": "年龄", | |
| "facet_pitch": "音高", | |
| "facet_accent": "口音", | |
| "facet_lang": "语言", | |
| "facet_whisper": "耳语" |
🤖 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 `@frontend/src/i18n/locales/zh-CN.json` around lines 932 - 947, The archetypes
section contains untranslated English values and an incorrect label for voice
pitch: update the values for "use_narration" -> a Chinese translation like
"配音与故事", "use_conversational" is already Chinese ("会话型"), "use_characters" ->
"角色与动画", "use_social" -> "社交媒体", "use_entertainment" -> "娱乐与电视", and
"use_informative" -> "资讯与教育" (or similar Chinese equivalents you prefer), and
change the "facet_pitch" value from "间距" to the correct Chinese term for voice
pitch such as "音高". Ensure keys remain unchanged (use_narration,
use_conversational, use_characters, use_social, use_entertainment,
use_informative, facet_pitch) and only their string values are updated.
Backfills the de-celebrified Voice Gallery i18n. #203 added
gallery.*(45) +archetypes.*(15) to en.json only, so the other 20 locales fell back to English for the new gallery UI.scripts/translate_all.py(Google Translate, placeholder-masked, incremental — the tool/path fixed in the update-channel backfill).gallery.cat_*keys/locale (cat_celebs,cat_marvel,cat_disney,cat_politicians, …) — the dead celebrity categories feat(gallery): designed-voice archetype gallery + neutral importer #203 dropped from en.json but left in the other locales. Finishes the de-celebrification across the whole i18n layer.Verified: all 21 locales valid JSON and key-aligned to en for gallery+archetypes (0 missing); placeholders intact (0 losses);
tscclean; build OK; CJK guard passes.Quality is Google-tier (the project's chosen mechanism for bulk locale fill); placeholders and structure are verified exact.
🤖 Generated with Claude Code
Summary by CodeRabbit