Wednesday, April 18, 2012

How can I identify unused i18n keys?

I'm working on an existing Rails app and am using a localization file, en.yml, to hold most of the app's text. At the moment, we aren't localizing into any other languages, so there's just the one file, but the fact that we're putting translate('some.key') into our views means that adding another language will be as simple as adding another file - say, sp.yml



The problem is, en.yml has grown to the point that I doubt all the keys are being used.



Apart from git grepping for translate calls using each key, is there a quick way to identify localization keys that aren't being explicitly called by the app?





No comments:

Post a Comment