Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to extract the default values from pipes #266

Open
klodianshaba opened this issue Oct 18, 2023 · 0 comments
Open

Is there a way to extract the default values from pipes #266

klodianshaba opened this issue Oct 18, 2023 · 0 comments

Comments

@klodianshaba
Copy link

I have in place across the system translate pipes like this
{{'app-welcome' | translate: '{ defaultText : 'Welcome'}'}}

When i run the script to extract the translations, i need the default values for each property into en.json taken from defaultText

This is the script i am using to init the en.json file
ngx-translate-extract --input ./src --output ./src/assets/i18n/en.json --key-as-default-value --replace --format json

The result in en.json
{
"'app-welcome": "'app-welcome",
}

The preferred result in en.json should be
{
"'app-welcome": "'Welcome", // "Welcome" taken from defaultText passed in pipe as parameter
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant