Skip to content

Commit

Permalink
readme: document magic comments
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Jul 22, 2014
1 parent ee6c572 commit c1b819c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,14 @@ See this basic [pattern scanner](/lib/i18n/tasks/scanners/pattern_scanner.rb) fo

### Fine-tuning

Tasks may incorrectly report framework i18n keys as missing, also some patterns may not be detected.
When all else fails, use the options below.
Add hints to static analysis with magic comments (by default, lines starting with `(#|/) i18n-tasks-use`):

```
# i18n-tasks-use t('activerecord.models.user') # let i18n-tasks know the key is used
User.model_name.human
```

You can also explicitly ignore keys appearing in locale files:

```yaml
# config/i18n-tasks.yml
Expand Down

0 comments on commit c1b819c

Please sign in to comment.