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
I need to implement a linter that checks if there is any hard coded text (instead of i18n translations or method calls in general) for a project. So I wondered whether this project is a good place for this linter to live.
Here are some examples:
.foo
| This is bad
.foo
= t('.this_is_good').foo
= this_is_also_ok(42)
The text was updated successfully, but these errors were encountered:
This is doable with Slim-Lint, but I think you will find edge cases where static text is indeed what you want, which will lead you to do something silly like = 'My text'.
Open to a pull request that adds a linter checking this, but we'd have it disabled by default. Thanks!
@sds Yeah, sure. There will be also some cases where it's impossible to detect whether static text is being used, like = link_to 'Untranslated text here' ..., but I think detecting the type I mentioned is a good start.
I need to implement a linter that checks if there is any hard coded text (instead of i18n translations or method calls in general) for a project. So I wondered whether this project is a good place for this linter to live.
Here are some examples:
The text was updated successfully, but these errors were encountered: