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

i18n rule check-text does not work #497

Open
Martin-Luft opened this issue Jan 22, 2018 · 6 comments
Open

i18n rule check-text does not work #497

Martin-Luft opened this issue Jan 22, 2018 · 6 comments
Labels

Comments

@Martin-Luft
Copy link
Contributor

  • codelyzer 4.1.0
  • Angular 5.2.1
  • TypeScript 2.6.2

"i18n": [true, "check-text"] does not work for this examples:

<label class="checkbox-inline" i18n="Bearbeiten eines Artikels|Veröffentlichung im Internet?">
  <input name="article.publish" [(ngModel)]="article.publish" role="edit" type="checkbox">
  Veröffentlichen
</label>

edit-article.component.html[35, 110]: Each element containing text node should have an i18n attribute

or

<p class="text-muted" i18n="Aktueller Anwender|Auflistung der Rollen" *ngIf="user$ | async as user; else userIsLoading">{{user.firstName}} {{user.lastName}} (Rollen: {{user.roles}})</p>
<ng-template #userIsLoading i18n="Aktueller Anwender|Daten werden geladen">Anwender wird geladen...</ng-template>

ERROR: user.component.html[2, 75]: Each element containing text node should have an i18n attribute

And can you please explain which codelyzer rules are stable and production ready and which not? For example you said that the no-unused-css rule is not stable (here #364) and this i18n rule seems to be unstable as well.

@mgechev
Copy link
Owner

mgechev commented Jan 22, 2018

Thanks for reporting the issue. I will add test for your specific examples and fix the issues. The i18n rules were recently added, we are still figuring out the correct behavior in some cases.

@mgechev mgechev added this to the 4.1.1 - Anne Condon milestone Jan 22, 2018
@wKoza
Copy link
Collaborator

wKoza commented Jan 23, 2018

There is an issue opened concerning the status of each rule #408. In the meantime, maybe can we a this status in our Readme.

@mgechev
Copy link
Owner

mgechev commented Jan 23, 2018

I'll update the readme in a sec.

@Martin-Luft
Copy link
Contributor Author

Martin-Luft commented Jan 24, 2018

@mgechev you missed the following rules:

import-destructuring-spacing, pipe-naming and no-output-named-after-standard-event.

@mgechev and the rules page (http://codelyzer.com/rules/) doesn't contain:

trackBy-function and no-output-named-after-standard-event

Should I open a new issue for that?

@wKoza
Copy link
Collaborator

wKoza commented Jan 24, 2018

Yes @Martin-Wegner , you can !

@Martin-Luft
Copy link
Contributor Author

#501

@mgechev mgechev modified the milestones: 4.1.1 - Anne Condon, 5.0.0 - Fred Brooks Feb 11, 2018
mgechev pushed a commit that referenced this issue Mar 25, 2018
@mgechev mgechev added the bug label May 2, 2018
@mgechev mgechev removed this from the 4.4.0 - Ken Thompson milestone Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants