0.0
No commit activity in last 3 years
No release in over 3 years
Provides automated pseudolocalization capabilities to Ruby on Rails applications.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

Rails::Pseudoloc

Provides automated pseudolocalization to Ruby on Rails applications.

Installation

Add this line to your application's Gemfile:

gem 'rails-pseudoloc'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rails-pseudoloc

Usage

Rails 4

Create an initializer under config/initializers that looks like this:

if ENV['PSEUDOLOC']
  require 'rails/pseudoloc'

  I18n.backend = Rails::Pseudoloc::Backend.new(I18n.backend)
end

Set the environment variable to turn on pseudoloc and then restart the Rails application. To turn it off, simply clear the environment variable and restart the Rails application.

Limitations

The gem currently does not pseudolocalize everything. Specifically it does not pseudolocalize anything that goes through the I18n#localize method or l helper. It also does not currently pseudolocalize strings consisting entirely of capital letters because I haven't gotten around to expanding out the translation table to include capital letters yet.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request