puppetlabs/rubocop-i18n

Add Documentation with how to trigger the rubocop error

Opened this issue · 1 comments

Excuse me, I really appreciate your project, as I need a linter to enforce i18n translations in my views. But can you actually list how to trigger the Rubocop violations? I've installed your gem and added the necessary configuration to the .rubocop.yml added strings with no translations into my view files but it isn't tripping rubocop. Thank you.

highb commented

Hi @ZASMan ! When you say that you added untranslated strings to your view files, are those ERB templates? If that's the case then I don't think the plugin (or Rubocop itself) will detect those issues. I see there is an ERB lint tool that was written as a wrapper around RuboCop that might help you there https://stackoverflow.com/questions/20025178/rubocop-in-html-erb-files .

If you're not using ERB templates, could I get some more details about what you mean by your "view files"? Thanks!