Add this line to your application's Gemfile:

gem 'babel_diff'

And then execute:

$ bundle

Or install it yourself as:

$ gem install babel_diff


Running the above command from the Rails console will create two files, "phrases.en.additions.yml" and "phrases.en.updates.yml", in your locales directory.

These files will contain all added and updated translation keys, respectively. If this is your first time running BabelDiff, the additions file will contain all of your translation keys.

The file "phrases.en.previous_version.yml" will also be created to serve as the benchmark against which future diffs will be compared.

If you want to run BabelDiff on a different locale file, you can pass it to the "#run" method. The default file path is "config/locales/phrases.en.yml".

The following code:"config/locales/random_folder/")

would produce the following files:

Additions => config/locales/random_folder/ Updates => config/locales/random_folder/ Previous Version => config/locales/random_folder/