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

i18n: the default language value is incorrect #675

Closed
ericsyh opened this issue Jul 8, 2020 · 4 comments · Fixed by #677
Closed

i18n: the default language value is incorrect #675

ericsyh opened this issue Jul 8, 2020 · 4 comments · Fixed by #677
Labels

Comments

@ericsyh
Copy link
Contributor

ericsyh commented Jul 8, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

What did you do?

I setup the TiDB Dashboard environment then signed in and go to the Setting page.

What did you expect to see?

The Language & Location value should be 简体中文 or English.

What did you see instead?
I got zh instead.

image

What version of TiDB Dashboard are you using (./tidb-dashboard --version)?

The latest version:

Release Version: ui_release_20200619_3-14-g00bca6f
Git Commit Hash: 00bca6f05d8e3d348a2b530204d6c4929140e7b8
Git Branch: master
UTC Build Time:  2020-07-08 01:44:05
@breezewish
Copy link
Member

This is not an expected behaviour. @baurine PTAL if you are free

@baurine
Copy link
Collaborator

baurine commented Jul 8, 2020

Ahh, looks weird, I even can't find the zh keyword in the source code... What's your browser version and system? Does it display correctly after refreshing the browser?

@baurine
Copy link
Collaborator

baurine commented Jul 8, 2020

I guess the language code i18next get from the browser is 'zh' instead of 'zh-CN'. We need to refine it. @ericsyh Would you like to help check what's the value of i18n.language in the ui/lib/apps/DashboardSettings?

@baurine
Copy link
Collaborator

baurine commented Jul 9, 2020

I changed my browser language to 'zh-TW', get a 'zh-TW' option in language selector, and a whole page with the English language.

image

breezewish added a commit that referenced this issue Jul 15, 2020
* ui: Fix TiFlash log searching (#680)
* ui: Add a whitelist in i18next to fix the issue #675 (#677)
* docs: add ericsyh as a contributor (#681)
* ui: refine code and error handle (#662)
* *: Rename disable_telemetry to enable_telemetry (#684)
* ui: Update space behaviour in statement / slow log search (#682)
* ui: No need to generate ui library (#687)
* forwarder: evict invalid current picked remote (#689)
* keyviz: support to merge cold logical range (#674)
* Update release version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants