You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--lang option lacks error handling in 6.8.0-beta #10828
I linked the description of the behavior in the RFC and the utility that does the checking. The RFC calls out a particular package for error handling of the language codes and also that we check against misunderstanding for programmatic languages (someone thinking --lang TS for example).
An invalid lang code should normally display a warning, it should not error. Was decided here.
The placement of the warning is unfortunate, i.e. you might not see it because it is displayed before the list of generated files, so you might have to scroll upwards again.
Example:
WARNING: An issue with the `--lang` flag returned the following message:
Unrecognised language subtag, "ita".`WARNING: The human language of the application will NOT be setin the `<html>` element's `lang` attribute in `index.html`.If this was not your intention, you may edit the `<html>` element's`lang` attribute in`index.html` manually after the process is complete.Information about using the `--lang` flag: The `--lang` flag sets the base human language of an app or test app: - `app/index.html` (app) - `tests/dummy/app/index.html` (addon test app) If used, the lang option must specfify a valid language code. For default behavior, remove the flag. See `ember <command> help`for more information.installing app-blueprint✨ Creating a new Ember app in /home/bert/Code/temp/foo/foo: create .editorconfig create .ember-cli create .env.development create .github/workflows/ci.yml create .prettierignore create .prettierrc.mjs create .stylelintignore create .stylelintrc.cjs create .template-lintrc.mjs create .watchmanconfig create README.md create /home/bert/Code/temp/foo/foo/babel.config.cjs create /home/bert/Code/temp/foo/foo/eslint.config.mjs create app/app.js create app/components/.gitkeep create app/config/environment.js create app/controllers/.gitkeep create app/deprecation-workflow.js create app/helpers/.gitkeep create app/models/.gitkeep create app/router.js create app/routes/.gitkeep create app/styles/app.css create /home/bert/Code/temp/foo/foo/app/templates/application.gjs create config/ember-cli-update.json create config/environment.js create config/optional-features.json create config/targets.js create ember-cli-build.js create .gitignore create index.html create package.json create public/robots.txt create testem.cjs create tests/helpers/index.js create tests/index.html create tests/integration/.gitkeep create tests/test-helper.js create tests/unit/.gitkeep create vite.config.mjs🎉 Successfully created project foo.👉 Get started by typing: $ cd foo $ npm startHappy coding!
Yeah I know it can get lost in the output ... but I was directly comparing 6.7 and the 6.8 beta side-by-side. I'll try to recreate again at a later point but I don't think this is a blocker.
Activity
mansona commentedon Oct 6, 2025
Are you sure you're using the right beta? 🤔 we have a test for this in the blueprint: https://github.com/ember-cli/ember-app-blueprint/blob/main/tests/arguments.test.mjs#L100-L103
kategengler commentedon Oct 6, 2025
Used the correct beta but fat fingered the language code. We've lost all the error handling.
https://rfcs.emberjs.com/id/0635-ember-new-lang/#:~:text=Misusage%20and%20Error%20Handling
This was the utility that did so https://github.com/ember-cli/ember-cli/blob/master/lib/utilities/get-lang-arg.js
[-]`--lang` option does noting in 6.8.0-beta[/-][+]`--lang` option lacks error handling in 6.8.0-beta[/+]NullVoxPopuli commentedon Oct 6, 2025
???? explain?
kategengler commentedon Oct 6, 2025
I linked the description of the behavior in the RFC and the utility that does the checking. The RFC calls out a particular package for error handling of the language codes and also that we check against misunderstanding for programmatic languages (someone thinking
--lang TSfor example).mansona commentedon Oct 6, 2025
This 100% works exactly as it did before. There is no change in this behaviour, just a change in the file that it affects.
I opened a PR to confirm it and you can see in CI all the
--langrelated tests pass https://github.com/ember-cli/ember-cli/actions/runs/18292893934/job/52084296264?pr=10830#step:4:126kategengler commentedon Oct 6, 2025
I''ll re-verify but when I did
--lang itato the beta, I did not see a warning. When I do it to 6.8.0, I do.I also don't think this is a blocker for ready for release for vite though (it not working at all would have been imo).
bertdeblock commentedon Oct 7, 2025
An invalid lang code should normally display a warning, it should not error. Was decided here.
The placement of the warning is unfortunate, i.e. you might not see it because it is displayed before the list of generated files, so you might have to scroll upwards again.
Example:
kategengler commentedon Oct 7, 2025
Yeah I know it can get lost in the output ... but I was directly comparing 6.7 and the 6.8 beta side-by-side. I'll try to recreate again at a later point but I don't think this is a blocker.