-
Notifications
You must be signed in to change notification settings - Fork 26.2k
docs(aio): updated i18n guide and example #19975
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
Conversation
@@ -0,0 +1,22 @@ | |||
// #docregion | |||
import {enableProdMode, TRANSLATIONS, TRANSLATIONS_FORMAT} from '@angular/core'; |
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 and all the other import {}
needs spaces, AKA { enableProdMode }
and not {enableProdMode}
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.
Of course, in all files
294f17c
to
6b6e9b5
Compare
36f5ddc
to
b4a3d33
Compare
b4a3d33
to
b709810
Compare
You can preview b709810 at https://pr19975-b709810.ngbuilds.io/. |
b709810
to
331ba2e
Compare
331ba2e
to
9ce17d9
Compare
You can preview 9ce17d9 at https://pr19975-9ce17d9.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.
LGTM as soon as Travis is happy (except for the guide content, which has been approved by @jenniferfell).
@@ -29,4 +29,3 @@ <h1 i18n="@@introductionHeader">Hello i18n!</h1> | |||
<!--#docregion i18n-title--> | |||
<img [src]="logo" title="Angular logo"> | |||
<!--#enddocregion i18n-title--> | |||
Contact GitHub API Training Shop Blog About |
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.
😂
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.
yeah, no idea why we had this
<!--#docregion i18n-select--> | ||
<span i18n>The hero is {gender, select, m {male} f {female}}</span> | ||
<span i18n>The author is {gender, select, m {male} f {female} o {other}}</span> |
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 think @naomiblack once said that using gender in examples is tricky and maybe not a good idea.
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 was the example used previously, I just added other, but you're right, maybe I can find another example
} | ||
male() { this.gender = 'm'; } | ||
female() { this.gender = 'f'; } | ||
other() { this.gender = 'o'; } |
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.
Either align all three, or none 😁
@@ -0,0 +1,48 @@ | |||
'use strict'; // necessary for es6 output in node |
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.
Doesn't TypeScript add that?
|
||
import { browser, element, by } from 'protractor'; | ||
|
||
// disable until we get cli 1.5+ and angular 5+ to be able to run this |
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.
Can this comment go now?
Hello i18n! | ||
</source> | ||
<context-group purpose="location"> | ||
<context context-type="sourcefile">app\app.component.ts</context> |
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.
Is the \
(instead of /
) as path separator intentional? Does it make any difference?
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.
no difference, this is purely for documentation (it's generated and not used)
The Travis failures will probably go away with a rebase on master. |
@@ -31,6 +31,26 @@ const BOILERPLATE_PATHS = { | |||
'tsconfig.json', | |||
'tslint.json' | |||
], | |||
i18n: [ |
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 don't need any of this.
9ce17d9
to
fcf6586
Compare
You can preview fcf6586 at https://pr19975-fcf6586.ngbuilds.io/. |
@ocombe where to merge ? |
should be master & patch apparently |
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 Type
What kind of change does this PR introduce?
Target: v5.0.0 docs
What is the current behavior?
I18n guide is outdated
Issue Number: #19510
What is the new behavior?
Updated i18n guide for Angular v5+ and cli 1.5+.
Does this PR introduce a breaking change?
Things that we could add later