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

IndexError: string not matched #7

Open
tleish opened this issue Feb 5, 2015 · 0 comments
Open

IndexError: string not matched #7

tleish opened this issue Feb 5, 2015 · 0 comments

Comments

@tleish
Copy link

tleish commented Feb 5, 2015

Discovered an issue where one yaml language file was accidentally formatted in such a way that it invalidated another language yaml file.

file: common.en.yml

en:
  common:
    shopping:
      cart: 'Cart'
      ...

file: new.en.yml

en:
  common:
  shopping:
    checkout: 'Checkout'
    ...

Note that the 2nd yaml format is valid, but shopping key was not indented enough to make it valid. This overwrote en.common values in the application to be invalid.

When using i18n_tools to check translations, an error was returned:

$ rake translations:missing
rake aborted!
IndexError: string not matched
/Users/tleishman/.rvm/gems/ruby-2.1.2/gems/i18n_tools-0.1.6/lib/i18n_tools/missing_scanner.rb:45:in `[]='
/Users/tleishman/.rvm/gems/ruby-2.1.2/gems/i18n_tools-0.1.6/lib/i18n_tools/missing_scanner.rb:45:in `block in results'
/Users/tleishman/.rvm/gems/ruby-2.1.2/gems/i18n_tools-0.1.6/lib/i18n_tools/missing_scanner.rb:16:in `each'
/Users/tleishman/.rvm/gems/ruby-2.1.2/gems/i18n_tools-0.1.6/lib/i18n_tools/missing_scanner.rb:16:in `results'
/Users/tleishman/.rvm/gems/ruby-2.1.2/gems/i18n_tools-0.1.6/tasks/i18n_tools.rake:26:in `block (2 levels) in <top (required)>'
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

1 participant