-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed as not planned
Labels
area: @angular-devkit/build-angulardevkit/build-angular:i18nfeatureIssue that requests a new featureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under consideration
Milestone
Description
🚀 Feature request
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- xi18n
- run
- config
- help
- version
- doc
Description
The tool parses imported third party modules in node_modules folder too and there is no way to exclude directories from parsing. For example:
create an new app
ng new repro-app
install a third party module
npm @ng-bootstrap/ng-bootstrap
import this module in the app.module.ts
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
...
imports: [
...
NgbModule
]
...
run xi18n
ng xi18n --output-path src/locale --i18n-locale=de
look in the generated messages.xlf
<trans-unit id="ngb.alert.close" datatype="html">
<source>Close</source>
<context-group purpose="location">
<context context-type="sourcefile">node_modules/@ng-bootstrap/ng-bootstrap/alert/alert.d.ts</context>
<context context-type="linenumber">3</context>
</context-group>
</trans-unit>
As you cas see the file contains translation units from a third party module although we don,t use it in our templates.
Describe the solution you'd like
A command line parameter --exclude=path/one,path/two will solve my problem. Alternatively (or at once) the parameter --include=path/one, path/two will be helpful.
Describe alternatives you've considered
I could postprocess the messages.xlf with a custom tool to remove unwanted translation units.
julkue, tkonsta, jaska45, schwitin, eudzb and 24 more
Metadata
Metadata
Assignees
Labels
area: @angular-devkit/build-angulardevkit/build-angular:i18nfeatureIssue that requests a new featureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under consideration