-
Notifications
You must be signed in to change notification settings - Fork 12k
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
ng serve
is missing i18n
related options
#11039
Comments
Hello @smoke , You can leverage the new https://angular.io/guide/i18n#merge-with-the-aot-compiler Cheers from France 🇫🇷 |
@rhanb No I can not, as when I try to put the respective options under |
@smoke could you provide your |
@smoke those belong in the build configurations, but I agree, the configuration could use an overhaul to allow more flexibility without adding more bloat. Matrix style configurations should be possible at least. |
@phl3x0r @rhanb You are not getting the point. The This issue is for the same options and configuration to be available also for @rhanb although irrelevant here is the
With the above configuration:
And if I try placing configuration in
It gives me:
|
Please do the following:
You see outputting your |
@rhanb Thank you this option worked! Sorry if I was a bit too rude :( Still I think It would really be nice to have the rest of the options available on the cli and as standalone configurations. Also is there some documentation or explanation how things work with these |
@smoke it's ok no worries 👍 I agree on this point. I honestly had to dig into issues to find out about it.. The wiki is good but I think an API Doc should exists. |
I think we can all agree that the angular.json format needs more work, but afaik the devs are aware of this and hopefully the future will be brighter. :-) |
I wanted to avoid using configuration by angular.json because it blows up so many duplicate configurations, but i18n options that were working on previous Angular CLI version are no more working:
Related issues for improving angular.json configuration: #10612 #11233 |
It is true that the i18n options are now exclusively in the build. This is mostly because they are not related to serve at all. The existing options are documented in https://angular.io/cli/build and https://angular.io/cli/serve. Anything that you can set with a flag, you should be able to set in Now the problem with that approach and i18n in general is the explosive grown of combinations. The best place to discuss that problem is the existing #10612 issue. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Versions
@angular/cli@^6.0.0
Repro steps
ng serve --aot --i18n-file src/locale/messages.es.xlf --i18n-locale es-ES --i18n-format xlf --i18n-missing-translations warning
Observed behavior
Desired behavior
The
ng serve
with Angular 6 should have the i18n related options exposed as previously done by https://github.com/angular/angular-cli/pull/3098/files#diff-d0197aa8d6347193c60f14c6a528610f that are the same asng build
Mention any other details that might be useful (optional)
Given there are no i18n options available for
ng serve
there is no way for developers to take advantage of both things - AOT translations, live reloading, hmr, etc.The text was updated successfully, but these errors were encountered: