question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[template/i18n] reports error for interpolation

See original GitHub issue

Description and reproduction of the issue

{
  "rules": {
        "@angular-eslint/template/i18n": [
          "error",
          {
            "checkId": true,
            "checkAttributes": false,
            "ignoreTags": [":svg:title", ":svg:desc", ":svg:tspan"]
          }
        ],
  }
}

Interpolation bindings get reported by the rule with Each element containing text node should have an i18n attribute. but this is no actual english text in there to extract. This was working ok with 12.3.x so I guess it was caused by https://github.com/angular-eslint/angular-eslint/pull/665

<ng-template #errorMessage>
  {{ error.title }}
</ng-template>

Versions

package version
@angular-eslint/eslint-plugin-template 12.4.1
@angular-eslint/template-parser 12.4.1
@typescript-eslint/parser 4.28.5
ESLint 7.29.0
node 14.17.0
# Please run `npx ng version` in your project and paste the full output here:
Angular CLI: 12.2.6
Node: 14.17.0
Package Manager: npm 6.14.13
OS: darwin x64

Angular: 12.2.6
... animations, cli, common, compiler, compiler-cli, core
... elements, forms, language-service, localize
... platform-browser, platform-browser-dynamic, router
... service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1202.1
@angular-devkit/build-angular   12.2.6
@angular-devkit/core            12.1.4
@angular-devkit/schematics      12.2.6
@angular/cdk                    12.2.1
@angular/google-maps            12.2.1
@schematics/angular             12.2.6
ng-packagr                      12.2.1
rxjs                            7.3.0
typescript                      4.3.5
  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest supported version of the packages and checked my ng version output per the instructions given here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JamesHenrycommented, Sep 22, 2021

@DDeivid It was available in a published version (as all successful master commits are) a few minutes after it was merged.

We outline this approach in the README - https://github.com/angular-eslint/angular-eslint#package-versions

You can install any of the canary releases that have been published since #683 was merged a couple of days ago

1reaction
mattlewis92commented, Sep 20, 2021

Sorry for that, @mattlewis92. Unfortunately, I got confused by the name DEFAULT_BOUND_TEXT_ALLOWED_PATTERN as I described at #683 (comment) and messed up this.

It should be solved by #683.

Thanks for the super quick turnaround on a fix, it’s much appreciated!! 🙌

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug in Checkout template: 'I18n Error: Missing interpolation ...
Hi,. Saw this bug appear today, it's within the checkout process that currently is not within our plan to edit:
Read more >
Errors in Polynomial Interpolation
In this lecture we shall quantify the errors that can occur in polynomial interpolation and develop techniques to minimize such errors. We shall...
Read more >
Errors when computing the interpolation function - COMSOL
Greetings, COMSOL user. I have experiencing problems when computing a COMSOL + MATLAB code. The error that occurs (with or without MATLAB) ...
Read more >
Compute the measure of error of an interpolation - MathWorks
I am trying to compute the measure of error between my interpolant and the actual function. I was told to use the norm(gn...
Read more >
Chapter 4. Interpolation - TAMU Math
Can we estimate the error of approximation f(x) − p(x) for values of x = xi, i = 0, 1,..., n? It is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found