jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.54k stars 4.02k forks source link

French is auto-selected when choosing additional languages #24125

Closed mraible closed 11 months ago

mraible commented 11 months ago
Overview of the issue

I was updating one of my tutorials this evening, and I noticed that French is pre-selected when you're prompted for additional languages.

Screenshot 2023-11-06 at 9 36 02 PM
Motivation for or Use Case

In previous versions, we did not pre-select any additional languages.

Reproduce the error

Create a new app with v8 and the jhipster command.

JHipster Version(s)

8.0.0

mraible commented 11 months ago

I just noticed that even if I de-select French and select Spanish, French is still selected and written to .yo-rc.json.

"languages": ["en", "fr", "es"],

Is this an Easter Egg from @jdubois ?! 😅

Screenshots for proof:

Screenshot 2023-11-06 at 9 47 37 PM Screenshot 2023-11-06 at 9 47 57 PM
jdubois commented 11 months ago

Ah ah no I have no idea why this happens! Then as I'm testing with French, it probably explains why I haven't noticed it.

mraible commented 11 months ago

I'd like to see this fixed before 8.0.1 because it seems like a blocker for my JHipster 8 blog tutorial and screencast.

I searched for a .yo-rc.json in my home directory and in the parent directory but didn't find anything. Can anyone else reproduce?

mshima commented 11 months ago

The bug is that we are adding a non-selected language. Bringing 'en' and 'fr' as additional languages is currently the correct behavior unless we decide to don't add any additional language if i18n is enabled. https://github.com/jhipster/generator-jhipster/blob/80b511d76321beb209e6f4316aa5dce663ac37d9/jdl/jhipster/default-application-options.ts#L168 Translation enabled with only one language is quite useless.