Closed JleHi closed 1 year ago
Hi @JleHi Thanks for reporting this!
Would you be able to share a (minimal) reproduction? Preferably a git repo I could checkout and run npm install
with a subsequent ng extract-i18n
on to reproduce it.
Hi @daniel-sc ,
Thanks for your answer. I've created a git repo on Github as you asked. I hope it is accessible, it's my first one : https://github.com/JleHi/repro-extract-i18n-missing-translations/
I can't post the project as it is so I made a short version of it for your tests. It has a slightly different comportment than the other: this one take the translations from CoreModule in account. But like the other the SharedModule seems to be ignored.
I've done this one in a hurry before leaving, let me know if something is wrong. Thanks again.
@JleHi thanks for providing a reproduction! It seems that the component in your shared module was not at all used in your application - this directly implies that the translations from this component cannot be extracted by angular (and cannot be managed by this plugin).
To prove this, I used the shared component in one of your feature components and then the i18n text is contained in the messages.(fr.)xlf - see https://github.com/JleHi/repro-extract-i18n-missing-translations/pull/1
Please reopen, if there is some other problem I overlooked!
Describe the bug I have an angular app developped with lazy-loaded modules architecture. I have a CoreModule, a SharedModule and some features modules grouped in the features folder. When I run ng extract-i18n it extract every string marked for translation inside the features folder but none of those inside CoreModule and SharedModule.
Setup/Configuration The extract-i18n entry in my angular.json file is like below :
Expected behavior I'd like to have all the marked string to appear in my messages.fr.xlf file.
Version (please complete the following information):