ai/r18n — pull request #121 by sinobra (2014-12-16 01:09:35+00:00)
Title: Ignore faker files

A small addition to r18-rails-api/loader.rb...
I recently added the faker gem to my Gemfile to aid in testing. The faker gem contains 'non-standard' (at least for R18n) I18n *.yml files that it uses to generate strings for testing. Rather than containing strings, they contain arrays of strings. Additionally the file-names contain upper and lowercase letters, which the load method defined in r18-rails-api/loader.rb, won't find. Even if a file name is all lower-case letters, the @backend.translations method called in reload! (same file) picks them up and R18n subsequently chokes on them. I added a small method to filter out the contents of this faker *.yml files.