You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The transloco-keys-manager tool seems not to extract text from the attribute directive. The structural directive works, but the attribute directive is prefered because of it's simplicity.
This is not working:
<span transloco="Logged in as {{ username }}"></span>
This is working:
<span *transloco="let t">
{{ t('Logged in as {{ username }}') }}
</span>
Expected behavior
I expect that the text Logged in as {{ username }} is extracted when using the attribute directive.
Please provide a link to a minimal reproduction of the bug
@votdev They are not equal statements.
When you use {{ }} which is the interpolation syntax of Angular, he will read this and understand this code as a bound attribute with an expression (username), and expressions are not supported for extraction.
You can do one of the following:
Wrap the string with quotes:
<span[transloco]="'Logged in as {{ username }}'"></span>
Use a different interpolation pair, here is a working example.
Is there an existing issue for this?
Is this a regression?
No
Current behavior
The transloco-keys-manager tool seems not to extract text from the attribute directive. The structural directive works, but the attribute directive is prefered because of it's simplicity.
This is not working:
This is working:
Expected behavior
I expect that the text
Logged in as {{ username }}
is extracted when using the attribute directive.Please provide a link to a minimal reproduction of the bug
openmediavault/openmediavault#1329
Transloco Config
Debug Logs
No response
Please provide the environment you discovered this bug in
Additional context
No response
I would like to make a pull request for this bug
No
The text was updated successfully, but these errors were encountered: