Skip to content

Commit 4afca00

Browse files
committed
revert: fix(@angular-devkit/build-angular): temporarily disable global locale data injection
This reverts commit 00aa5bb.
1 parent 1d105eb commit 4afca00

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

packages/angular_devkit/build_angular/src/utils/i18n-options.ts

+1-8
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ export async function configureI18nBuild<T extends BrowserBuilderSchema | Server
172172
`Locale data for '${locale}' cannot be found. No locale data will be included for this locale.`,
173173
);
174174
} else {
175-
// Temporarily disable pending FW locale data fix
176-
// desc.dataPath = localeDataPath;
175+
desc.dataPath = localeDataPath;
177176
}
178177
}
179178
}
@@ -182,12 +181,6 @@ export async function configureI18nBuild<T extends BrowserBuilderSchema | Server
182181
if (usedFormats.size > 0) {
183182
buildOptions.i18nFormat = [...usedFormats][0];
184183
}
185-
186-
// If only one locale is specified set the deprecated option to enable the webpack plugin
187-
// transform to register the locale directly in the output bundle.
188-
if (i18n.inlineLocales.size === 1) {
189-
buildOptions.i18nLocale = [...i18n.inlineLocales][0];
190-
}
191184
}
192185

193186
// If inlining store the output in a temporary location to facilitate post-processing

tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export default async function() {
3333
await expectFileToMatch(`${outputPath}/main-es2015.js`, lang);
3434

3535
// Verify the locale data is registered using the global files
36-
// await expectFileToMatch(`${outputPath}/main-es5.js`, '.ng.common.locales');
37-
// await expectFileToMatch(`${outputPath}/main-es2015.js`, '.ng.common.locales');
36+
await expectFileToMatch(`${outputPath}/main-es5.js`, '.ng.common.locales');
37+
await expectFileToMatch(`${outputPath}/main-es2015.js`, '.ng.common.locales');
3838

3939
// Execute Application E2E tests with dev server
4040
await ng('e2e', `--configuration=${lang}`, '--port=0');
@@ -49,9 +49,9 @@ export default async function() {
4949
}
5050

5151
// Verify deprecated locale data registration is not present
52-
// await ng('build', '--configuration=fr', '--optimization=false');
53-
// await expectToFail(() => expectFileToMatch(`${baseDir}/fr/main-es5.js`, 'registerLocaleData('));
54-
// await expectToFail(() => expectFileToMatch(`${baseDir}/fr/main-es2015.js`, 'registerLocaleData('));
52+
await ng('build', '--configuration=fr', '--optimization=false');
53+
await expectToFail(() => expectFileToMatch(`${baseDir}/fr/main-es5.js`, 'registerLocaleData('));
54+
await expectToFail(() => expectFileToMatch(`${baseDir}/fr/main-es2015.js`, 'registerLocaleData('));
5555

5656
// Verify missing translation behaviour.
5757
await appendToFile('src/app/app.component.html', '<p i18n>Other content</p>');

0 commit comments

Comments
 (0)