Exclude Directories From "ng Xi18n" · Issue #18885 - GitHub
- Notifications You must be signed in to change notification settings
- Fork 11.9k
- Star 27k
- Code
- Issues 263
- Pull requests 21
- Actions
- Security
Uh oh!
There was an error while loading. Please reload this page.
- Insights
Description
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.
👍React with 👍29Metadata
Metadata
Assignees
No one assignedLabels
Issue that requests a new featureFeature request for which voting has completed and the request is now under considerationType
No typeProjects
No projectsMilestone
- needsTriageNo due date
Relationships
None yetDevelopment
No branches or pull requestsIssue actions
You can’t perform that action at this time.Từ khóa » Ng Xi18n
-
Angular CLI - Ng Xi18n Command - Tutorialspoint
-
Ng Xi18n - Angular
-
Ng Extract-i18n - Angular
-
Ng Xi18n - Angular 10 - W3cubDocs
-
Angular - Ng Xi18n - W3resource
-
Ng Xi18n Not Working For Library · Issue #17140 - GitHub
-
Ng Xi18n - CLI - Angular References
-
Problems With Ng Xi18n When Adding New Tags - Stack Overflow
-
How To Use Internationalization (i18n) In Angular | DigitalOcean
-
Angular - Ng Xi18n
-
Ng Xi18n - Angular 10 Documentation - TypeError
-
Angular CLI - Ng Xi18n Command - Adglob Infosystem Pvt Ltd
-
Angular I18n: Performing Translations With Built-in Module - Lokalise
-
Ng Extract-i18n - Angular