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
docs(aio): Update i18n example to Angular V6 #23660
Conversation
ebc15a0
to
bd8fbdc
Compare
You can preview ebc15a0 at https://pr23660-ebc15a0.ngbuilds.io/. |
You can preview bd8fbdc at https://pr23660-bd8fbdc.ngbuilds.io/. |
hmm is it really possible to mix configurations? |
Confirmed by the CLI team, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a configuration seems really nice in theory, but you cannot use --prod
with --configuration
because --prod
is an alias for --configuration=production
, and the configurations are not additive.
We should either stick with the cli parameters, or add a "production:fr" configuration that includes everything from "production".
"build": "ng build --prod", | ||
"build:fr": "ng build --prod --i18nFile=src/locale/messages.fr.xlf --i18nFormat=xlf --locale=fr", | ||
"build:fr": "ng build --prod --configuration=fr", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will not work unfortunately
you either need to specify all i18n parameters and use --prod
, or create a new prod fr
config that includes everything from the production environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it to include a production-fr
configuration for production builds
"core-js": "^2.4.1", | ||
"rxjs": "^5.5.2", | ||
"zone.js": "^0.8.14" | ||
"@angular/animations": "^6.0.0-rc.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use rc6, or maybe just use 6.0.0 that will be released very soon?
b04f31a
to
1b1f661
Compare
You can preview b04f31a at https://pr23660-b04f31a.ngbuilds.io/. |
You can preview 1b1f661 at https://pr23660-1b1f661.ngbuilds.io/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can update the dependencies to 6.0.0 since it has just been released!
@ocombe made fixes and upgraded dependencies to V6. |
You can preview e12f469 at https://pr23660-e12f469.ngbuilds.io/. |
aio/content/guide/i18n.md
Outdated
} | ||
</code-example> | ||
|
||
You then pass the configuration with the `ng serve` or `ng build` commands. The example below shows how to serve the French language file created in previous sections of this guide: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
long line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
aio/content/guide/i18n.md
Outdated
|
||
For production builds, you define a separate `production-fr` build configuration in your `angular.json`. | ||
|
||
<code-example format="." language="ts"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what format="."
does but I am pretty sure it is not needed any more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact if you are just putting inline code then you should probably just use triple backtickets.
<code-example>
is really only for embedding examples written externally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change that moves all the examples to 6.0.0 looks scary :-)
But I guess if CI is green then we are good.
A couple of long lines that could be shortened.
And not the comment about inline code examples.
You can preview 4e72d3c at https://pr23660-4e72d3c.ngbuilds.io/. |
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. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information