feat(compiler-cli): add an outFile option to ng-xi18n

Fixes #11416
Closes #14508
Closes #14657
This commit is contained in:
Marc Laval
2017-02-15 18:50:03 +01:00
committed by Igor Minar
parent 234f05996c
commit 39f56fafdd
7 changed files with 18 additions and 9 deletions

View File

@ -68,7 +68,7 @@ describe('template i18n extraction output', () => {
const genDir = 'out';
it('should extract i18n messages as xmb', () => {
const xmbOutput = path.join(outDir, 'messages.xmb');
const xmbOutput = path.join(outDir, 'custom_file.xmb');
expect(fs.existsSync(xmbOutput)).toBeTruthy();
const xmb = fs.readFileSync(xmbOutput, {encoding: 'utf-8'});
expect(xmb).toEqual(EXPECTED_XMB);

View File

@ -132,6 +132,7 @@ function i18nTest() {
angularCompilerOptions: config.ngOptions,
i18nFormat: 'xlf',
locale: null,
outFile: null,
readResource: (fileName: string) => {
readResources.push(fileName);
return hostContext.readResource(fileName);