-
Notifications
You must be signed in to change notification settings - Fork 47
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
Bug: Entire HTML template ignored when key with {{...}}
used
#130
Comments
Interestingly, this happens even when I use the directive Scenario 5: Use transloco directive + {{ in key <a *transloco="let t">{{ t('{{count}} items', {count: 1}) }}</a>
{{ 'key2' | transloco }} Scenario 6: Use transloco directive + {{ in key + without a hashmap as argument <a *transloco="let t">{{ t('{{count}} items', 1) }}</a>
{{ 'key2' | transloco }} |
@AbdealiJK Why would you use this convention? this is the first time I have seen someone defining keys that way. |
I've explained why I define keys like this in jsverse/transloco#555 (comment) |
@AbdealiJK Want to take this? 🙂 |
@shaharkazaz I tried looking into it briefly - and I found that the issue was from the angular So, first issue I feel is that when The error coming in was that the |
@AbdealiJK Nice summary 🔥
I think you are correct and we need to inform you that a parsing error has occurred within a certain file and log it, but it should continue with the processing.
I don't have any objection to upgrading the compiler to v13. |
Is there an existing issue for this?
Is this a regression?
No
Current behavior
When I was running
transloco-keys-manager extract
- I found that some of my .html files were being skipped and keys from those html files were not being extracted into my en.json file.I tried a bunch of variations and finally found:
Scenario 1: Use transloco with a
{{
in the keyResult: 0 keys found ... expected 2 keys to be found
Scenario 2: Use transloco with a
{
in the keyResult: 2 keys found
Scenario 3: Use transloco with
{{
in key + without a dict as the argumentResult: 2 keys found
Scenario 4: Use transloco with
{{
in key + add as attribute in a tagResult: 2 keys found
Expected behavior
All the keys should have been found and added to my en.json file
I was not able to create an easy minimal example, but I simply created a folder
transloco_testing
and added a single filetesting.html
And then ran:
Please provide a link to a minimal reproduction of the bug
Described above
Transloco Config
No response
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: