Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: update ivy i18n integration test
The integration test now checks that the locale inlining is working.
- Loading branch information
1 parent
8e8c140
commit 19ca362
Showing
12 changed files
with
402 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import {Component} from '@angular/core'; | ||
import {Component, Inject, LOCALE_ID} from '@angular/core'; | ||
|
||
@Component( | ||
{selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css']}) | ||
export class AppComponent { | ||
constructor(@Inject(LOCALE_ID) public locale: string) {} | ||
title = `cli-hello-world-ivy-compat`; | ||
message = $localize `Welcome to the i18n app.`; | ||
jan = new Date(2000, 0, 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
import {registerLocaleData} from '@angular/common'; | ||
import {LOCALE_ID, NgModule} from '@angular/core'; | ||
import {NgModule} from '@angular/core'; | ||
import {BrowserModule} from '@angular/platform-browser'; | ||
import localeFr from '@angular/common/locales/fr'; | ||
import {AppComponent} from './app.component'; | ||
|
||
// adding this code to detect issues like https://github.com/angular/angular-cli/issues/10322 | ||
// it should not affect the CLI importing additional locale data for compile time inlined bundles. | ||
registerLocaleData(localeFr); | ||
|
||
@NgModule({ | ||
declarations: [AppComponent], | ||
imports: [BrowserModule], | ||
providers: [{provide: LOCALE_ID, useValue: 'fr'}], | ||
bootstrap: [AppComponent] | ||
}) | ||
@NgModule({declarations: [AppComponent], imports: [BrowserModule], bootstrap: [AppComponent]}) | ||
export class AppModule { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.