Open mberthouzoz opened 4 years ago
We have same problem. Unfortunately, ngx-translate-extract does not extract by type (or inherited type), but merely by name. You can se here that it has hardcoded pipe name.
I've created PR to solve this (also to solve hardcoded directive names, marker name, service name and service available methods). It seems that this PR will be here for long, so I've published these changes on npm, so you can use it as @enilp/ngx-translate-extract@7.0.4
.
So, in your case, you would use it (notice the --pipe containerStatusLabel
) as:
ngx-translate-extract --pipe containerStatusLabel -f pot -i ./src -o ./i18n/template2.pot
(Multiple pipes can be specified if you use both pipes, the built one translate
and containerStatusLabel
): --pipe translate --pipe containerStatusLabel
Environment
Angular: 8.2.14 ngx-translate-extract: 5.0.1 and 7.0.3
Description
I'm trying to extract the string from a Pipe. This Pipe extends from TranslatePipe.
Code
How to reproduce
ngx-translate-extract -f pot -i ./src -o ./i18n/template2.pot
Result
The strings( 'Delivered', 'Shipped', ...) are not extracted. I don't see these strings in the pot file.
Expected
The strings should be present in the pot file.
Someone has the same error or has an idea how to get the strings in the pot file without using a marker?