Project

translates

0.0
No release in over 3 years
Low commit activity in last 3 years
Minimal implementation of backend/plugin-based translation framework.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0

Runtime

< 2, >= 0.6.10
 Project Readme

Translates

Translates is an extremely minimalist implementation of the Mobility translation framework. It is intended to serve as a teaching aid to explain concepts such as Inversion of Control and Separation of Concerns.

Translates is composed of a very small core and some sample backends and plugins you can use to implement storage patterns and access patterns.

Usage

Extend the Translates module in your class and call translates with one or more attribute names as well as a backend class and optional array of plugins. You need to explicitly require each backend and plugin you use since they are not autoloaded.

require 'translates/column_backend'
require 'translates/fallbacks_plugin'

class Post
  extend Translates
  translates :title, backend: Translates::ColumnBackend, plugins: [Translates::FallbacksPlugin]
end

License

The gem is available as open source under the terms of the MIT License.