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

[Bug Report] vuetify overwrites the lang="" attribute in index.html and will set it to lang="en" #274

Closed
farhadnowzari opened this issue May 19, 2021 · 7 comments

Comments

@farhadnowzari
Copy link

Environment

Vuetify Version: 2.4.0
Vue Version: 2.6.11
Browsers: Chrome 90.0.4430.212
OS: Windows 10

Steps to reproduce

just on a new vue project, run

vue add vuetify

Expected Behavior

It is expected that after adding vuetify to the project it doesn't change this value back to "en" because it causes a lot of issues with translators for users.

Actual Behavior

by default vue has the lang attribute set to empty according to the following issue but after adding vuetify, it will replace the lang="" with lang="en"
vuejs/vue-cli#5945

@jacekkarczmarczyk
Copy link
Member

it doesn't change this value back to "en"

is doesn't "change this value back", it sets it to the language you have chosen in plugin options

@farhadnowzari
Copy link
Author

farhadnowzari commented May 19, 2021

I just created another project to check.

vue create some-project

index.html looks fine

then

vue add vuetify

Select Default (recommended) option (The first one)

and after adding index.html has lang="en".

no where in this process here it is asking me if I want vuetify to set lang="" to lang="en" so I will not know if vuetify has overwritten the vue lang="" because it was an issue before with vue and they fixed it. But now I realized that the default installation on vuetify is setting it to "en".

** Edit: ** The rest of the changes which vuetify-plugin does to the project are visible and they are fine and noticeable but normally I did not expect that it replaces the index.html lang attribute because that was a fix which vue guys have done already

@jacekkarczmarczyk
Copy link
Member

imho setting lang to "" should be only the workaround for those who have problem with translators, not the default behaviour

@farhadnowzari
Copy link
Author

farhadnowzari commented May 19, 2021

This is not related to vuetify to change it. It should leave it out because it has already had a long discussion in vue issues.
Setting it to empty will let the browser to decide (maybe at some point vue-i18n library can have an implementation but so far they don't).
Having it to empty for anyone who doesn't care about the translation will not matter but setting it to a default lang for every other project who people care about translators have a huge impact.
When we had this issue with Vue and we did not know about it, users were complaining about the website and were doubting if the website they are reaching is fake.
A proposal would be vue asks about the default locale but it doesn't they've just set it to empty.
I think with vuetify it should be the same, it was an unexpected behaviour after that fix with vue.

@ElijahKotyluk
Copy link
Contributor

If you don't want to use the presets you can select the configure option in the cli and it will prompt you for locale.

@farhadnowzari
Copy link
Author

There is a config for the CLI? Ok I will try that.

@ElijahKotyluk
Copy link
Contributor

I'm going to close this as this is currently the intended functionality and an option is provided to select locale if that is preferred. Feel free to open a feature request if you have any further suggestions, thank you.

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