I am wondering if there are any tools available to scan for missing translation keys in a Rails application. eg if I have in my code <%= t :Submit %> but my English translation file does not contain submit: submit, I would like to be able to run a tool that tells me which keys are missing.
A:
This seems to be exactly what you're looking for: http://mentalized.net/journal/2009/08/10/find_missing_translations_in_your_rails_application/
It looks like it's on Github, too: http://github.com/koppen/i18n_missing_keys
EDIT: I answered the wrong question. New answer:
If you have enough integration tests, I think, in theory, all the missing keys should fire their I18n::MissingTranslationData
exceptions. This might be helpful in making that process easier: http://dev.innovationfactory.nl/2009/05/04/rails-i18n-caveats-and-tips/#translations
Sorry that I couldn't be of more help.
Eli
2010-01-25 21:19:27
Yeah, that’s not what I’m looking for – as far as I can tell it just compares translation files and finds keys that are in one but not another. I already have a script to accomplish that. What I need is something that will scan the application itself and find references to keys that do not exist in any translation file.
Gordon Isnor
2010-01-26 06:48:46
Okay, lemme edit my answer.
Eli
2010-01-26 14:57:28