Skip to content

feat: add i18n - #75

Open
lxfu1 wants to merge 4 commits into
mainfrom
feat/i18n
Open

lxfu1 wants to merge 4 commits into
mainfrom
feat/i18n

Conversation

@lxfu1

@lxfu1 lxfu1 commented Nov 19, 2026 •

Copy link
Copy Markdown
Member
image

@lxfu1
lxfu1 requested a review from hustcc November 19, 2026 08:56
Comment thread src/shared/i18n/index.ts Resolved
Comment thread src/main/services/settings/index.ts Resolved
Comment thread src/shared/i18n/index.ts Resolved
Comment thread src/main/ipc/index.ts Resolved
Comment thread src/main/services/settings/index.ts Resolved
Comment thread src/main/ipc/index.ts
models: services.model.list(),
activeModelId: services.settings.getActiveModel().providerId,
preferences,
resolvedLocale: i18n.language,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个不需要,preferences 里面新增了 language 字段。

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preferences.language = 'system'; // 用户选择
resolvedLocale = 'en-US';         // 实际显示语言

renderer 需要实际语言来初始化 i18n,不能直接传入 'system',这个表示实际使用的语言。

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

渲染的时候处理就好了。

Comment thread src/renderer/main.tsx Resolved

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants