Skip to content

Commit b100c71

Browse files
authored
fix(@angular/build): provide extract-i18n does not respect
`i18nDuplicateTranslation` config value (angular#29179) This fixes an issue where the config was not passed. Closes angular#23635
1 parent 3c91721 commit b100c71

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/angular/build/src/builders/extract-i18n/builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export async function execute(
9494
// eslint-disable-next-line @typescript-eslint/no-explicit-any
9595
checkFileSystem as any,
9696
extractionResult.messages,
97-
'warning',
97+
normalizedOptions.i18nOptions.i18nDuplicateTranslation || 'warning',
9898
// eslint-disable-next-line @typescript-eslint/no-explicit-any
9999
extractionResult.basePath as any,
100100
);

packages/angular/build/src/utils/i18n-options.ts

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9+
import { DiagnosticHandlingStrategy } from '@angular/localize/tools';
910
import path from 'node:path';
1011
import type { TranslationLoader } from './load-translations';
1112

@@ -28,6 +29,7 @@ export interface I18nOptions {
2829
flatOutput?: boolean;
2930
readonly shouldInline: boolean;
3031
hasDefinedSourceLocale?: boolean;
32+
i18nDuplicateTranslation?: DiagnosticHandlingStrategy;
3133
}
3234

3335
function normalizeTranslationFileOption(

0 commit comments

Comments
 (0)