Skip to content
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

🐛 fix: switch language correctly #7131

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AmAzing129
Copy link

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

  1. 当在左侧修改语言时,右侧全局设置不更新,代码维护了两个全局变量,不知是否有意为之
image
  1. 增加了新窗口打开链接,不影响我当前会话
image

📝 补充信息 | Additional Information

Copy link

vercel bot commented Mar 25, 2025

@AmAzing129 is attempting to deploy a commit to the LobeChat Desktop Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Mar 25, 2025
@lobehubbot
Copy link
Member

👍 @AmAzing129

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@dosubot dosubot bot added the 🐛 Bug Something isn't working | 缺陷 label Mar 25, 2025
Copy link
Contributor

gru-agent bot commented Mar 25, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail b9111d5 🚫 Skipped No files need to be tested {"src/const/settings/common.ts":"target file(src/const/settings/common.ts) not in work scope \n include: src/utils,src/server,src/database,src/services,src/store,packages//src/ \n exclude: node_modules,/*.test.ts,/.test.tsx,**/.spec.ts,/*.spec.tsx,/.d.ts,**/.test.js,/*.spec.js,src/database/server","src/features/ChatInput/ActionBar/Model/ControlsForm.tsx":"target file(src/features/ChatInput/ActionBar/Model/ControlsForm.tsx) not in work scope \n include: src/utils,src/server,src/database,src/services,src/store,packages//src/** \n exclude: node_modules,/*.test.ts,/.test.tsx,**/.spec.ts,/*.spec.tsx,/.d.ts,**/.test.js,/*.spec.js,src/database/server","src/features/User/UserPanel/LangButton.tsx":"target file(src/features/User/UserPanel/LangButton.tsx) not in work scope \n include: src/utils,src/server,src/database,src/services,src/store,packages//src/** \n exclude: node_modules,/*.test.ts,/.test.tsx,**/.spec.ts,**/*.spec.tsx…

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

@AmAzing129
Copy link
Author

发现注册时也有语言设置,也会导致不一致,要不要整体统一下

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I found that there are language settings when registering, which can also lead to inconsistency. Should I align the whole thing?

@arvinxx
Copy link
Contributor

arvinxx commented Mar 25, 2025

这个是之前改的,User setting 里的 language 已经废弃了,全部切到了 localStorage 里。所以读值应该读 localStorage 里的值,用 systemStatus 中的状态。

原因是如果存到 user 设置里会让切换语言变得非常慢(需要db更新)

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


This was changed before. The language in User settings has been abandoned and has been cut into localStorage. Therefore, the reading value should be read in localStorage and use the status in systemStatus.

The reason is that if stored in the user settings, it will make switching languages ​​very slow (db update is required)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants