File tree Expand file tree Collapse file tree 3 files changed +5
-12
lines changed
packages/@ngtools/webpack/src Expand file tree Collapse file tree 3 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,7 @@ export class AngularCompilerPlugin implements Tapable {
227227 }
228228 if ( options . locale !== undefined ) {
229229 this . _compilerOptions . i18nInLocale = options . locale ;
230+ this . _compilerOptions . i18nOutLocale = options . locale ;
230231 this . _normalizedLocale = this . _validateLocale ( options . locale ) ;
231232 }
232233 if ( options . missingTranslation !== undefined ) {
Original file line number Diff line number Diff line change 11import { join } from 'path' ;
22import { ng } from '../../utils/process' ;
3- import {
4- expectFileToExist , writeFile ,
5- expectFileToMatch
6- } from '../../utils/fs' ;
3+ import { writeFile , expectFileToMatch } from '../../utils/fs' ;
74
85
96export default function ( ) {
@@ -14,8 +11,7 @@ export default function() {
1411 . then ( ( ) => ng ( 'xi18n' , '--locale' , 'fr' ) )
1512 . then ( ( output ) => {
1613 if ( ! output . stdout . match ( / s t a r t i n g f r o m A n g u l a r v 4 / ) ) {
17- expectFileToExist ( join ( 'src' , 'messages.xlf' ) ) ;
18- expectFileToMatch ( join ( 'src' , 'messages.xlf' ) , / s o u r c e - l a n g u a g e = " f r " / ) ;
14+ return expectFileToMatch ( join ( 'src' , 'messages.xlf' ) , 'source-language="fr"' ) ;
1915 }
2016 } ) ;
2117}
Original file line number Diff line number Diff line change 11import { join } from 'path' ;
22import { ng } from '../../utils/process' ;
3- import {
4- expectFileToExist , writeFile ,
5- expectFileToMatch
6- } from '../../utils/fs' ;
3+ import { writeFile , expectFileToMatch } from '../../utils/fs' ;
74
85
96export default function ( ) {
@@ -14,8 +11,7 @@ export default function() {
1411 . then ( ( ) => ng ( 'xi18n' , '--out-file' , 'messages.fr.xlf' ) )
1512 . then ( ( output ) => {
1613 if ( ! output . stdout . match ( / s t a r t i n g f r o m A n g u l a r v 4 / ) ) {
17- expectFileToExist ( join ( 'src' , 'messages.fr.xlf' ) ) ;
18- expectFileToMatch ( join ( 'src' , 'messages.fr.xlf' ) , / H e l l o w o r l d / ) ;
14+ return expectFileToMatch ( join ( 'src' , 'messages.fr.xlf' ) , 'Hello world' ) ;
1915 }
2016 } ) ;
2117}
You can’t perform that action at this time.
0 commit comments