Git Product home page Git Product logo

puttext-rails's Introduction

Gem Version Build Status Code Climate Test Coverage

puttext-rails

Rails integrations for the puttext gem (https://github/mntnorv/puttext).

What this provides for Rails applications, compared to the plain Ruby gem:

  • Simplified usage.
  • Extracts validation error messages from Rails validator and all used gems.

Installation

Add it to your Gemfile:

group :development do
  # Other development gems
  # ...

  gem 'puttext-rails'
end

Usage

Just run the puttext:extract rake task in your Rails root directory:

$ rake puttext:extract

The translations will be saved in config/locale/template.pot. For example:

#: ./app/views/hello_world/index.slim:8
msgid "Hello world!"
msgstr ""

Contributing

Before submitting an Issue or Pull Request always check if your issue is already being discussed or if someone has already submitted a pull request with the feature you want to add. Also, before doing bigger changes, it's always good to discuss the changes you're going to make in an Issue.

Code style

PutText::Rails uses RuboCop (https://github.com/bbatsov/rubocop) to check and enforce code style. Before submitting a pull request, make sure that RuboCop does not find any offenses.

Running RuboCop

$ bundle exec rubocop

Testing

PutText::Rails uses RSpec (http://rspec.info/) for testing. Pull requests with Ruby code changes must include RSpec tests that check the new functionality or changed code. Also, make sure that your changes do not break any existing tests.

Running RSpec

$ bundle exec rspec

puttext-rails's People

Contributors

mntnorv avatar

Watchers

James Cloos 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.