feat(i18n): add full internationalization support for Studio editor#2427
Open
lixianglong1205 wants to merge 6 commits into
Open
feat(i18n): add full internationalization support for Studio editor#2427lixianglong1205 wants to merge 6 commits into
lixianglong1205 wants to merge 6 commits into
Conversation
为中文用户提供本地化文档,包括 README_zh、项目概览,以及 skills 目录下各技能的中文版本。 Co-authored-by: Cursor <cursoragent@cursor.com>
- 引入 i18next + react-i18next,支持中/英文切换 - 新增 i18n 基础设施(语言检测、类型声明、useLanguage Hook) - ~80 个组件/Hook 中的硬编码英文字符串全部替换为 t() 翻译调用 - 提供中/英两套完整翻译文件(en.json / zh.json) - 新增语言切换按钮 LanguageSwitcher - 新增硬编码字符串检测脚本 check-hardcoded-strings.mjs - 更新 test-setup.ts 以支持测试中的 i18n 初始化 - 更新 .gitignore 忽略 .cursor/ 目录 Co-authored-by: Cursor <cursoragent@cursor.com>
…PR readiness - Fix oxlint unnecessary escape char warning in check-hardcoded-strings.mjs - Remove duplicate keys (overflow, size, position) in en.json and zh.json - Fix localStorage undefined in happy-dom test environment with shared MockStorage utility (SnapToolbar, distinctId, client tests) - Add extra animation frame flush in offCanvasIndicatorRefresh flaky test - Suppress fallow unused-export findings for intended public APIs - Suppress fallow inherited complexity/duplication from i18n import-path line shifts (no logic changed) - Apply oxfmt formatting to SKILL_zh.md files Co-authored-by: Cursor <cursoragent@cursor.com>
Author
Resolved conflicts across studio components/hooks. Preserved i18n strings in useRazorSplit, useTimelineEditing. Restored URL origin- stripping in deriveUsedPaths. Removed feature files deleted upstream (StudioPreviewArea, NLELayout). Removed dangling Finder duplicates. Co-authored-by: Cursor <cursoragent@cursor.com>
Added i18n support to files brought in or modified by the upstream main
merge that contained hardcoded English user-facing strings:
- TimelineToolbar.tsx: 13 tooltip/aria-label strings → i18n keys
- AssetContextMenu.tsx: "Add at playhead" + restored i18n composition
- useAppHotkeys.ts: 4 showToast strings (undo/redo/file-change/razor)
- useTimelineAssetDropOps.ts: 2 "cannotEdit" + "assetDropRestricted"
- useTimelineGroupEditing.ts: 1 "cannotEditWhileRecording"
- useBlockHandlers.ts: "alreadyInstalling" + "adding {{blockName}}"
- propertyPanelSections.tsx: "Content" + "Text color" labels
- useDomEditCommits.ts: "invalidLayoutValues" + "reorderFailed"
- DomEditCropHandles.tsx: "Reposition crop" + "Crop" labels
- AssetPreviewOverlay.tsx: "Preview: {{name}}" + "Close preview"
- PromotableControl.tsx: "Make this a variable"
Added 40+ new locale keys to en.json and zh.json across:
timelineToolbar, assetsTab, hooks.blockHandlers, hooks.domEdit,
editor.cropHandles, editor.promotable, nle
Co-authored-by: Cursor <cursoragent@cursor.com>
Added VariablesPanel, VariablesDeclarationForm, and VariablesOtherCompositions to the i18n system. Added 22 new locale keys (variablesPanel: 14 keys, variablesForm: 8 keys) to en.json and zh.json. All hardcoded English strings replaced with t() calls across 3 files. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Add complete internationalization (i18n) support to the Studio editor, enabling Chinese language localization for all user-facing strings. Includes translated README, project overview, and skill documentation in Chinese.
Why
Make Hyperframes Studio accessible to Chinese-speaking users by providing a fully localized UI experience. This expands the potential user base and improves usability for non-English speakers.
How
Test plan