Skip to content

feat: support lang option #369

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
wants to merge 1 commit into from
Closed

Conversation

btea
Copy link
Collaborator

@btea btea commented Nov 8, 2023

No description provided.

@btea btea requested a review from cexbrayat November 8, 2023 05:10
@cexbrayat
Copy link
Member

@sodatea @btea I'm wondering something: is there documentation somewhere that lists the flags that can be used with create-vue?

I'm afraid that --lang will go unnoticed if we don't document it.

@haoqunjiang
Copy link
Member

Why do we need this option? I think environment variable would suffice, if not more convenient (and with less maintenance burden).

LANG=zh_CN npm create vue@latest

@haoqunjiang
Copy link
Member

is there documentation somewhere that lists the flags that can be used with create-vue?

I didn't explicitly document them because I was initially concerned about the potential breaking changes. And later we indeed made one: --with-tests uses vitest now.
But as of now, I think we can document some of the more stable options.
I think --with-tests is still subject to change, and I haven't made my opinion on the --eslint-with-prettier feature. The rest should be stable enough now.

@btea
Copy link
Collaborator Author

btea commented Nov 9, 2023

Why do we need this option? I think environment variable would suffice, if not more convenient (and with less maintenance burden).

I think providing a lang option can make it easier for users to switch their location more autonomously and flexibly.

LANG=zh_CN npm create vue@latest

Powershell does not seem to support this writing method. If it is passed successfully using bash, Intl.DateTimeFormat().resolvedOptions().locale will also overwrite the passed value.

@CoolPlayLin
Copy link
Contributor

CoolPlayLin commented Nov 11, 2023

Powershell does not seem to support this writing method. If it is passed successfully using bash, Intl.DateTimeFormat().resolvedOptions().locale will also overwrite the passed value.

@btea
No, powershell actually support setup env. you can set env in $env var
So, you can simply replace LANG=zh_CN npm create vue@latest with $env:LANG = "en_US" & npm create vue@latest to choose the locale you want to use in Windows. But currently, Intl.DateTimeFormat().resolvedOptions().locale has the highest priority and it caused choosing locale fail.

@btea btea deleted the feat/support-lang-option branch December 6, 2023 07:05
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.

4 participants