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

remove-unused removing used keys #96

Closed
michaelwebb76 opened this issue Oct 6, 2014 · 1 comment
Closed

remove-unused removing used keys #96

michaelwebb76 opened this issue Oct 6, 2014 · 1 comment
Milestone

Comments

@michaelwebb76
Copy link

We have the following line in HAML:

#instructions= t('translation.key')

i18n-tasks remove-unused removed the associated translation key, saying it was unused. i18n-tasks missing doesn't show the key as missing once removed. Strangely, if I modify the line to read as either of the following examples, it DOES report the key as missing.

#instructions
    = t('translation.key')
%div#instructions= t('translation.key')
@glebm
Copy link
Owner

glebm commented Oct 6, 2014

This is caused by the scanner skipping lines starting with # or / by default. To prevent this set ignore_lines: [] in the config. This is because currently i18n-tasks uses a filetype-agnostic Regex scanner, but there are plans to rework this.

@glebm glebm closed this as completed Oct 11, 2014
glebm added a commit that referenced this issue Oct 22, 2014
Quick fix to the regexp until we have a real SEXP scanner
@glebm glebm added this to the v0.7.8 milestone Oct 22, 2014
bartimaeus added a commit to bartimaeus/i18n-tasks that referenced this issue Dec 1, 2014
* upstream/master: (39 commits)
  Tidy up the spec template indentation, use let(:unused_keys).
  Update README.md
  Added Gitter badge
  minor fix ignore_lines pattern
  travis: 2.1.1 -> 2.1.3
  .travis latest jruby
  Bump to 0.7.8
  Google Translate fixnum spec glebm#100
  Improve ignore_lines glebm#96 glebm#102
  initialize @key_filter glebm#101
  Lines in HAML that start with # are skipped
  ignore config: better examples
  ru copy fix
  move error message to i18n
  YARD signatures for GoogleTranslation methods
  Possible fix for glebm#99
  README: small fixes for defining custom commands
  Remove unused keys
  fix typo in gemspec [ci skip]
  Simplify commands DSL i18n
  ...

Conflicts:
	spec/google_translate_spec.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants