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

Change jdl to don't set nativeLanguage and languages if not present in jdl. #12810

Merged
merged 5 commits into from
Nov 8, 2020

Conversation

mshima
Copy link
Member

@mshima mshima commented Oct 21, 2020

Closes #12809.

  • try to set nativeLanguage to current locale
  • defaults to en when environment variable CI is true

Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@mshima mshima requested a review from MathieuAA October 21, 2020 16:02
Copy link
Member

@MathieuAA MathieuAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the user has to specify a language if the locale one isn't the right one? all the time?
I don't think it's a good idea...

test/jdl/jhipster/default-application-options.spec.js Outdated Show resolved Hide resolved
@mshima
Copy link
Member Author

mshima commented Oct 22, 2020

So the user has to specify a language if the locale one isn't the right one? all the time?
I don't think it's a good idea...

Why is better to set 'en' then guessing from user locale?

@MathieuAA
Copy link
Member

Unless the user explicitly asks for a language, getting it fro the OS's locale may not work: my locale's set to French, but my apps are always in English.

@mshima mshima changed the title Generate the application with the user locale by default. Change jdl to don't set nativeLanguage and languages if not present in jdl. Oct 23, 2020
@mshima
Copy link
Member Author

mshima commented Oct 23, 2020

@MathieuAA dropped user language.

@mshima mshima requested a review from MathieuAA October 26, 2020 14:44
@mshima
Copy link
Member Author

mshima commented Oct 29, 2020

Unless the user explicitly asks for a language, getting it fro the OS's locale may not work: my locale's set to French, but my apps are always in English.

You just need to set your apps native language and languages at jdl.

Having default to user locale should mainly influence at examples like jhipster jdl bug-tracker.jh.

@pascalgrimaud
Copy link
Member

I didn't follow closely what is done here, but in my opinion, the command jhipster jdl bug-tracker.jh should generate the same project, no matter the machine

If it's different because of local, we'll have a lot of difficulty to reproduce, to guess the locale of the user etc...

Just my opinion

@mshima
Copy link
Member Author

mshima commented Nov 8, 2020

@pascalgrimaud I planning to merge this PR so we can change the generator to make jhipster jdl bug-tracker.jh --native-language xx generate only the native language.

I didn't follow closely what is done here, but in my opinion, the command jhipster jdl bug-tracker.jh should generate the same project, no matter the machine

If it's different because of local, we'll have a lot of difficulty to reproduce, to guess the locale of the user etc...

Just my opinion

Your concern is valid I will think about this.
Can you repost your comment at #12900?

@mshima mshima merged commit 1034631 into jhipster:main Nov 8, 2020
@mshima mshima deleted the skip_ci_languages branch November 8, 2020 13:18
@pascalgrimaud
Copy link
Member

fine @mshima : I'm commenting the other ticket

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.

[JDL] Stop setting languages as ['en', 'fr'].
3 participants