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

Incorrect behaviour with component mat-icon which includes a complex translation for the value of its attribute/property/directive #145

Closed
grackeon opened this issue Nov 16, 2022 · 2 comments · Fixed by #148

Comments

@grackeon
Copy link

grackeon commented Nov 16, 2022

Bug report

Describe the bug

The general issue is still the same as described in #115. The problem still appears if the translation for an attribute of the tag is more complex, like nested translations.

[email protected] works fine.
[email protected] shows error that project is missing translation keys.

To Reproduce

Steps to reproduce the behavior:

  • Use <mat-icon [matTooltip]="'general.labels.jumpTo' | translate:{value: 'general.goal'|translate}">open_in_new</mat-icon> on the view.
    Or even more complex logic like:
    <mat-icon [matTooltip]="'general.labels.jumpTo'|translate: { 'value': condition ? ('general.goal1'|translate) : ('general.goal2'|translate) }">open_in_new</mat-icon>
  • Run ngx-translate-lint -p <view_path> -l <keys_file_path>
  • See error: Key: 'open_in_new' doesn't exist in '<...>.json'

Expected behavior

Linter should ignore string inside <mat-icon>, even if element has complex translation logic for its attributes.

@romanrostislavovich
Copy link
Owner

romanrostislavovich commented Nov 16, 2022

Hi @Moritz1409

Looks like a bug, I will check it

romanrostislavovich added a commit that referenced this issue Dec 3, 2022
…plex translation for the value of its attribute/property/directive

Close #145
romanrostislavovich pushed a commit that referenced this issue Dec 3, 2022
## [1.20.5](v1.20.4...v1.20.5) (2022-12-03)

### Bug Fixes

* Incorrect behaviour with component mat-icon which includes a complex translation for the value of its attribute/property/directive ([5f97891](5f97891)), closes [#145](#145)
@romanrostislavovich
Copy link
Owner

🎉 This issue has been resolved in version 1.20.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

romanrostislavovich pushed a commit that referenced this issue Oct 29, 2024
## [1.20.5](v1.20.4...v1.20.5) (2022-12-03)

### Bug Fixes

* Incorrect behaviour with component mat-icon which includes a complex translation for the value of its attribute/property/directive ([5f97891](5f97891)), closes [#145](#145)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants