Coder Social home page Coder Social logo

rails_translation_manager's Introduction

Rails Translation Manager

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.

Technical documentation

Installation

Add this line to your application's Gemfile:

gem 'rails_translation_manager'

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.

Minitest

class LocalesValidationTest < ActiveSupport::TestCase
  test "should validate all locale files" do
    checker = RailsTranslationManager::LocaleChecker.new("config/locales/*.yml")
    assert checker.validate_locales
  end
end

RSpec

RSpec.describe "locales files" do
  it "should meet all locale validation requirements" do
    checker = RailsTranslationManager::LocaleChecker.new("config/locales/*/*.yml")
    expect(checker.validate_locales).to be_truthy
  end
end

Running the test suite

To run the test suite just run bundle exec rake from within the rails_translation_manager directory.

Further documentation

i18n-tasks

RTM uses i18n-tasks under the hood. For advanced tasks, refer to the i18n-tasks documentation:

Read why we architected RTM in this way.

Licence

MIT License

rails_translation_manager's People

Contributors

1pretz1 avatar agadufrat avatar aocole avatar baisa avatar beckal avatar benjamineskola avatar bradwright avatar catalinailie avatar cbaines avatar chao-xian avatar chrisbashton avatar deborahchua avatar dependabot[bot] avatar edds avatar fredericfran-gds avatar hannako avatar heathd avatar jamiecobbett avatar kevindew avatar mahmudh avatar mattbostock avatar murilodalri avatar robinjam avatar theseanything avatar tijmenb avatar vinayvinay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.