File tree 3 files changed +5
-12
lines changed
packages/@ngtools/webpack/src
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 {
227
227
}
228
228
if ( options . locale !== undefined ) {
229
229
this . _compilerOptions . i18nInLocale = options . locale ;
230
+ this . _compilerOptions . i18nOutLocale = options . locale ;
230
231
this . _normalizedLocale = this . _validateLocale ( options . locale ) ;
231
232
}
232
233
if ( options . missingTranslation !== undefined ) {
Original file line number Diff line number Diff line change 1
1
import { join } from 'path' ;
2
2
import { ng } from '../../utils/process' ;
3
- import {
4
- expectFileToExist , writeFile ,
5
- expectFileToMatch
6
- } from '../../utils/fs' ;
3
+ import { writeFile , expectFileToMatch } from '../../utils/fs' ;
7
4
8
5
9
6
export default function ( ) {
@@ -14,8 +11,7 @@ export default function() {
14
11
. then ( ( ) => ng ( 'xi18n' , '--locale' , 'fr' ) )
15
12
. then ( ( output ) => {
16
13
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"' ) ;
19
15
}
20
16
} ) ;
21
17
}
Original file line number Diff line number Diff line change 1
1
import { join } from 'path' ;
2
2
import { ng } from '../../utils/process' ;
3
- import {
4
- expectFileToExist , writeFile ,
5
- expectFileToMatch
6
- } from '../../utils/fs' ;
3
+ import { writeFile , expectFileToMatch } from '../../utils/fs' ;
7
4
8
5
9
6
export default function ( ) {
@@ -14,8 +11,7 @@ export default function() {
14
11
. then ( ( ) => ng ( 'xi18n' , '--out-file' , 'messages.fr.xlf' ) )
15
12
. then ( ( output ) => {
16
13
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' ) ;
19
15
}
20
16
} ) ;
21
17
}
You can’t perform that action at this time.
0 commit comments