jsverse / transloco-keys-manager

🦄 The Key to a Better Translation Experience

Home Page:https://github.com/jsverse/transloco/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Read input is ignored for template comments

zsimuno opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Is this a regression?

Yes

Current behavior

I have a "pricing" scope and inside it I have code like this

`

<custom-title
[title]="t('title')">

....
`

When it extracts the translations the "title", "investors" and such are put properly inside pricing/en.json.

These:
<!-- t(title,basic_calculator,detailed_implementation_plan,connect_with_investorst) -->

are just poot in the root en.json file as if they have no parent.

I tried even removing the other read like this:
`

<custom-title
[title]="t('title')">

....
`

But it still didn't put them in proper file.

With this I'm basically forced to write all prefixes manually which is what I've been doing untill now but no I had like 20 of these at once an putting prefixes on the will look really ugly and unreadable.

Module provider looks like this:

providers: [{provide: TRANSLOCO_SCOPE, useValue: {scope: 'pricing', alias: 'pricing'}}],

Expected behavior

Expected that translations are put inside the pricing/en.json with proper parent file and not the root translation file.

Please provide a link to a minimal reproduction of the bug

None

Transloco Config

keysManager: {
    input: ['common', 'services', 'app'],
    unflat: true,
    defaultValue: "{{key}}",
  }

Debug Logs

I tried this but it just said

> DEBUG=* transloco-keys-manager extract

'DEBUG' is not recognized as an internal or external command,
operable program or batch file.

Please provide the environment you discovered this bug in

Transloco: ^4.2.2
Transloco Keys Manager:^3.7.0
Angular: 15.2.4
Node: 18.13.0
Package Manager: npm 8.19.3
OS: win32 x64

Additional context

No response

I would like to make a pull request for this bug

No