Skip to content

vue ui get error message in locale zh-cn #3410

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

Closed
dousybox opened this issue Feb 3, 2019 · 2 comments
Closed

vue ui get error message in locale zh-cn #3410

dousybox opened this issue Feb 3, 2019 · 2 comments

Comments

@dousybox
Copy link

dousybox commented Feb 3, 2019

Version

3.4.0

Environment info

  System:
    OS: Windows 7
    CPU: (4) x64 Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
  Binaries:
    Node: 10.15.0 - D:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.7.0 - D:\Program Files\nodejs\npm.CMD
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

  1. npm install -g @vue/cli
  2. vue ui
  3. system default browser will start automaticlly
  4. change browser language to zh-cn
  5. refresh the Vue Project Manager, language will change to zh-cn automaticlly
  6. open the develop tool in browser, get the error message: Uncaught (in promise) Error: Cannot find module './zh'

What is expected?

no error message in browser console,
and pages can work fast.

What is actually happening?

error message Uncaught (in promise) Error: Cannot find module './zh' in browser console;
and the pages are woking very slowlly.


Runing vue ui has encured some error when the page switch to zh-cn language automaticlly.
image

Is there any way to the the default locale language for the Vue Project Manager?

@arthurdenner
Copy link
Contributor

arthurdenner commented Feb 8, 2019

I investigated this issue and noticed that because of some "inconsistencies" between browser language, UI's locales and date-fns, this problem happens with Chinese and Brazilian Portuguese (and maybe others).

For Chinese, the browser gives us ["zh", "zh", "zh"] as language codes, the UI has zh.json, but date-fns has only zh_cn;

For Brazilian Portuguese, the browser gives us ["pt-BR", "pt-br", "pt"] as language codes, the UI has only pt_BR.json (and therefore we get 404 on unpkg), and date-fns has only pt;

@sodatea, any idea on how to proceed about this?

@haoqunjiang
Copy link
Member

Fixed in #3966

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants