transloco-keys-manager icon indicating copy to clipboard operation
transloco-keys-manager copied to clipboard

Feature: get array of parameters while extract

Open truthz03 opened this issue 1 year ago • 11 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is your feature request related to a problem? Please describe

I need a list of key parameters inside the extracted json file

Describe the solution you'd like

It would be nice to get an output like ngx-translate-extract does.

Current output:
`{
  "core.license.selectFile": "Missing value for 'core.license.selectFile'",
  "core.license.unableToGetFeatureValue": "Missing value for 'core.license.unableToGetFeatureValue'",
  "core.license.upload": "Missing value for 'core.license.upload'"
}`

Exprected output:
`{
  "core.license.selectFile": [],
  "core.license.unableToGetFeatureValue": [
    "feature"
  ],
  "core.license.upload": []
}`

Code:
this.translateService.translate('core.license.unableToGetFeatureValue', { feature: 'LineName' });

As you can see "core.license.unableToGetFeatureValue" has a parameter named "feature" inside the translate function and I need this parameter inside the extract output.

Additional context

No response

I would like to make a pull request for this feature

No 🚀

truthz03 avatar Mar 09 '23 16:03 truthz03