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

建议提供网站页面语言设置 #3692

Closed
muyunil opened this issue Apr 4, 2023 · 5 comments · Fixed by #4085
Closed

建议提供网站页面语言设置 #3692

muyunil opened this issue Apr 4, 2023 · 5 comments · Fixed by #4085
Assignees
Labels
area/console Issues or PRs related to the Halo Console kind/improvement Categorizes issue or PR as related to a improvement.
Milestone

Comments

@muyunil
Copy link

muyunil commented Apr 4, 2023

你当前使用的版本

2.4.1

描述一下此特性

部分浏览器的翻译对英文页面自动显示翻译弹窗,但有时候该页面完全是中文的也会显示,似乎只是判断网站环境变量是什么,所以希望提供简单的语言设置,容器默认为en_US。可以修改为zh_CN就可以了,只跳过浏览器的判断,和网站的具体页面语言无关。

附加信息

No response

@JohnNiang
Copy link
Member

/priority awaiting-more-evidence

@f2c-ci-robot f2c-ci-robot bot added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Apr 6, 2023
@longjuan
Copy link
Member

现在console端无论选择什么语言都会弹出翻译,确实很烦。
原因可能是vue的index.html中设置了html标签的lang属性。

<html lang="en">

chrome可能根据第一个请求的html来确定是否启动翻译。
image

我觉得可以直接删掉,但这样会使得选择了英文语言的时候翻译不会弹出。
另外我还试了下watch i18n的选择,并动态改变html标签的lang属性,chrome和edge并不理会用js改变的这一属性。

@JohnNiang
Copy link
Member

/remove-priority awaiting-more-evidence
/kind improvement
/area console

@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. area/console Issues or PRs related to the Halo Console and removed priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. labels Jun 16, 2023
@JohnNiang JohnNiang added this to the 2.7.x milestone Jun 16, 2023
@longjuan
Copy link
Member

/assign

@ruibaby
Copy link
Member

ruibaby commented Jun 16, 2023

@longjuan 先去掉 index.html 的 lang 属性吧。

f2c-ci-robot bot pushed a commit that referenced this issue Jun 19, 2023
#### What type of PR is this?
/kind improvement
/area console

#### What this PR does / why we need it:

去除`index.html`的`lang`属性以避免console端出现翻译提示

#### Which issue(s) this PR fixes:

Fixes #3692

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?


```release-note
避免 Console 端出现翻译提示
```
@ruibaby ruibaby modified the milestones: 2.7.x, 2.7.0 Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/console Issues or PRs related to the Halo Console kind/improvement Categorizes issue or PR as related to a improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants