-
Notifications
You must be signed in to change notification settings - Fork 7
fix(desktop): localize Chinese branding surfaces #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
916115b
fix(app): localize Chinese app branding copy
Astro-Han c5fd727
fix(desktop): sync localized runtime titles
Astro-Han 935bb87
fix(desktop): localize Chinese desktop UI copy
Astro-Han da94f68
fix(desktop): localize macOS bundle display names
Astro-Han df9659e
refactor(app): export desktop api subpath
Astro-Han 286c4c2
fix(app): guard shell title by route
Astro-Han 4fc46e7
chore(review): address low-risk nits
Astro-Han f6d3c89
fix(app): align zh first-touch branding
Astro-Han e8c274c
fix(app): relax zh release notice parsing
Astro-Han 521b71c
fix(app): keep zh branding fully localized
Astro-Han c9c7045
test(desktop): cover app name fallback
Astro-Han File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| export { buildDesktopContext, desktopWindowTitle, type DesktopContext } from "./utils/desktop-context" | ||
| export type { ReportProblemInput, ReportProblemResult, UpdateInfo } from "./context/platform" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import { describe, expect, test } from "bun:test" | ||
| import { dict as zh } from "./zh" | ||
|
|
||
| describe("zh branding copy", () => { | ||
| test("uses Chinese product naming on key user-facing surfaces", () => { | ||
| expect(zh["dialog.model.unpaid.freeModels.title"]).toBe("爪印内置免费模型") | ||
| expect(zh["session.new.subtitle"]).toBe("爪印可以帮你处理文件、分析信息、撰写内容并完成各类任务。") | ||
| expect(zh["sidebar.gettingStarted.line1"]).toBe("爪印内置免费模型,你可以立即开始使用。") | ||
| expect(zh["app.name.desktop"]).toBe("爪印") | ||
| expect(zh["toast.update.description"]).toBe("爪印有新版本 ({{version}}) 可安装。") | ||
| expect(zh["error.page.report.prefix"]).toBe("请将此错误报告给开发团队") | ||
| }) | ||
|
|
||
| test("removes standalone PawWork from curated Chinese UI strings", () => { | ||
| const curatedKeys = [ | ||
| "dialog.model.unpaid.freeModels.title", | ||
| "session.new.subtitle", | ||
| "sidebar.gettingStarted.line1", | ||
| "app.name.desktop", | ||
| "toast.update.description", | ||
| "error.page.report.prefix", | ||
| ] as const | ||
|
|
||
| for (const key of curatedKeys) { | ||
| expect(zh[key]).not.toContain("PawWork") | ||
| } | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| }) | ||
| }) | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.