Title: Extracted translations include unused translations · Issue #24145 · angular/angular-cli · GitHub
Open Graph Title: Extracted translations include unused translations · Issue #24145 · angular/angular-cli
X Title: Extracted translations include unused translations · Issue #24145 · angular/angular-cli
Description: Command extract-i18n Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was No response Description The extracted translations from the extract-i18n builde...
Open Graph Description: Command extract-i18n Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was No response Description The extracted t...
X Description: Command extract-i18n Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was No response Description The extracted t...
Opengraph URL: https://github.com/angular/angular-cli/issues/24145
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Extracted translations include unused translations","articleBody":"### Command\r\n\r\nextract-i18n\r\n\r\n### Is this a regression?\r\n\r\n- [ ] Yes, this behavior used to work in the previous version\r\n\r\n### The previous version in which this bug was not present was\r\n\r\n_No response_\r\n\r\n### Description\r\n\r\nThe extracted translations from the `extract-i18n` builder include trans-units from unused templates/components **unless** these components import and use the `$localize` function. This is the case for both app components as well as library components.\r\n\r\n### Minimal Reproduction\r\n\r\nReproduction repository: https://github.com/fischeversenker/ng-decorator-tree-shaking \\\r\n(don't be fooled by the name of the repository. I re-used an existing repro-repo.)\r\n\r\nIn essence:\r\n\r\n- Import a library module that exports components with translatable strings but where the components don't use the `$localize` function\r\n- **don't** use any of these components in your app\r\n- run `extract-i18n` on your app and verify that the generated `messages.xlf` file contains unused translations from these components\r\n\r\n### Exception or Error\r\n\r\n_No response_\r\n\r\n### Your Environment\r\n\r\n```text\r\nAngular CLI: 14.2.6\r\nNode: 16.16.0\r\nPackage Manager: yarn 1.22.19 \r\nOS: linux x64\r\n\r\nAngular: 14.2.7\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... localize, platform-browser, platform-browser-dynamic, router\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1402.6\r\n@angular-devkit/build-angular 14.2.6\r\n@angular-devkit/core 14.2.6\r\n@angular-devkit/schematics 14.2.6\r\n@angular/cli 14.2.6\r\n@schematics/angular 14.2.6\r\nng-packagr 14.2.2\r\nrxjs 7.5.7\r\ntypescript 4.7.4\r\n```\r\n\r\n\r\n### Anything else relevant?\r\n\r\n_No response_","author":{"url":"https://github.com/fischeversenker","@type":"Person","name":"fischeversenker"},"datePublished":"2022-10-26T15:02:44Z","url":"https://github.com/angular/angular-cli/issues/24145"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1b5b8af2-0d4f-afc8-8786-ffcc8df78658 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AA0C:683FF:99FB35:C7B109:6B00E055 |
| html-safe-nonce | bfc3b25561bad0f2b2b178c6975db43537ebe27d14a07359dcb3a7254103f1d9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTBDOjY4M0ZGOjk5RkIzNTpDN0IxMDk6NkIwMEUwNTUiLCJ2aXNpdG9yX2lkIjoiMjQwNzk0ODE2MTg4OTkxOTA2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 27a945fd2f95c948cb69ee316cfab442c00f698835055fb47cd4b7928bb26290 |
| hovercard-subject-tag | issue:1424214851 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/24145/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c7ed7bfea927c9f6730696bb847e2774e523809a49926cabd6a446cd6473035f/angular/angular-cli/issues/24145 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c7ed7bfea927c9f6730696bb847e2774e523809a49926cabd6a446cd6473035f/angular/angular-cli/issues/24145 |
| og:image:alt | Command extract-i18n Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was No response Description The extracted t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fischeversenker |
| hostname | github.com |
| expected-hostname | github.com |
| None | 043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5425dc24e8bd8d6fca9641a12afc984825a43875 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width