Rails Translation Manager (RTM) provides validation for locale files, and exposes several rake tasks which can be used to manage your translations. It can only be used on Rails apps.
Add this line to your application’s Gemfile:
After a bundle install, this will make a number of rake tasks available to your application.
See the Rake command reference below.
You will now also be able to run tests against your locale files to ensure that they are valid.
Create a test file as follows.
class LocalesValidationTest < ActiveSupport::TestCase
test "should validate all locale files" do
checker = RailsTranslationManager::LocaleChecker.new("config/locales/*.yml")
RSpec.describe "locales files" do
it "should meet all locale validation requirements" do
checker = RailsTranslationManager::LocaleChecker.new("config/locales/*/*.yml")
Running the test suite
To run the test suite just run bundle exec rake from within the