{"record":{"id":"6d82f66fc0ac1f5a","repo":"angular/angular-cli","slug":"error-6d82f6","errorCode":null,"errorMessage":"*","messagePattern":"\\*","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/angular_devkit/build_angular/src/builders/dev-server/webpack-server.ts","lineNumber":360,"sourceCode":"  }\n\n  rules.push(i18nRule);\n\n  // Add a plugin to reload translation files on rebuilds\n  const loader = await createTranslationLoader();\n  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n  webpackConfig.plugins!.push({\n    apply: (compiler: webpack.Compiler) => {\n      compiler.hooks.thisCompilation.tap('build-angular', (compilation) => {\n        if (i18n.shouldInline && i18nLoaderOptions.translation === undefined) {\n          // Reload translations\n          loadTranslations(\n            locale,\n            localeDescription,\n            context.workspaceRoot,\n            loader,\n            {\n              warn(message) {\n                addWarning(compilation, message);\n              },\n              error(message) {\n                addError(compilation, message);\n              },\n            },\n            undefined,\n            browserOptions.i18nDuplicateTranslation,\n          );\n\n          i18nLoaderOptions.translation = localeDescription.translation ?? {};\n        }\n\n        compilation.hooks.finishModules.tap('build-angular', () => {\n          // After loaders are finished, clear out the now unneeded translations\n          i18nLoaderOptions.translation = undefined;\n        });\n      });","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/angular_devkit/build_angular/src/builders/dev-server/webpack-server.ts#L342-L378","documentation":"This `warn` function is the logger adapter passed into `loadTranslations` for i18n locale processing; `\"*\"` denotes it forwards whatever message the translation loader produces. Any warning raised while loading/transpiling locale translation files (XLIFF/XTB parsing, missing translation units, format issues) is surfaced through this callback and added as a webpack compilation warning.","triggerScenarios":"Configured i18n locales in angular.json where a translation file contains issues — missing translation keys referenced by `$localize` tags, malformed XLIFF/XTB XML, or locale data mismatches — while running serve or build with translations.","commonSituations":"A translation file is out of date with source templates after adding new i18n-marked text; a translator hand-edited XLIFF and broke a unit; ICU plural/select syntax errors in translations.","solutions":["Read the forwarded warning message in the build output to identify the specific translation unit/file","Re-run `ng extract-i18n` and re-translate/review the changed units in the XLIFF files","Validate translation files with an XLIFF linter or XML schema validator","Ensure every `$localize`-tagged string in source has a corresponding translation unit for each locale"],"exampleFix":"// before (angular.json i18n)\n\"locales\": { \"fr\": \"src/locale/messages.fr.xlf\" } // stale file missing new units\n// after\nng extract-i18n --output-path src/locale\n// then merge new units into messages.fr.xlf","handlingStrategy":"validation","validationCode":"// validate translation files before building with i18n locales\nimport { readFileSync } from 'fs';\nfor (const file of localeFiles) {\n  const xml = readFileSync(file, 'utf8');\n  if (!xml.includes('<xliff') && !xml.includes('<xlf')) {\n    console.warn(`${file} does not look like a valid XLIFF document`);\n  }\n}","typeGuard":null,"tryCatchPattern":"// server-side: warnings are forwarded to the webpack logger, not thrown\ncompiler.hooks.afterCompile.tap('checkWarnings', (compilation) => {\n  compilation.warnings\n    .filter((w) => String(w).includes('Translation') || String(w).includes('i18n'))\n    .forEach((w) => console.warn('i18n warning:', String(w)));\n});","preventionTips":["Run ng extract-i18n and diff XLIFF files whenever source i18n markers change","Validate XLIFF/XTB files in CI with an XML schema check","Keep translation ids stable; prefer explicit @@ids to auto-generated ones","Translate every new unit before merging source changes"],"tags":["i18n","translations","xliff","localization","webpack-warning"],"backgroundTag":"translation-file-warning","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}