<commit_before># RemoteI18n #

RemoteI18n helps developer export translated messages from a Rails server to a Javascript/HTML client application. More and more we need to use templates in javascript to create new HTML segments, but when you are building an I18n application you need to make sure that those segments contains the right language. This is what this project is for. For now it bundle the Rails translations into different javascript file ready for consumption.

## Getting started
*For Rails 3 only*

1. Add `gem 'remote_i18n' to your Gemfile
2. Run `bundle install`
3. Create a "remote_i18n" in /config/initializers with the following

    RemoteI18n.configure do |config|
      config.translate :name=>:date, :i18n_path=>"date", :only=>["en", "fr-CA"]
      config.translate :name=>:errors, :i18n_path=>"errors", :only=>["en", "fr-CA"]
    end

The configuration can't be simpler
 - _name_ is the name of the resulting file in /public/javascripts
 - _i18n_path_ is the path to use in the Rails i18n module
 - _only_ is to specify languages, by default it is all configured ones
 
The output of this configuration would be:

   - /public/javascripts/date.en.js
   - /public/javascripts/date.fr-CA.js
   - /public/javascripts/errors.en.js
   - /public/javascripts/errors.fr-CA.js
   
In Javascript the _T_ object is created to access the translations:

   blank_error = T.errors.message.blank;
   january = T.date.month_names[1];

## More Details
<commit_msg>Read me change<commit_after># RemoteI18n #

RemoteI18n helps developer export translated messages from a Rails server to a Javascript/HTML client application. More and more we need to use templates in javascript to create new HTML segments, but when you are building an I18n application you need to make sure that those segments contains the right language. This is what this project is for. For now it bundle the Rails translations into different javascript file ready for consumption.

## Getting started
*For Rails 3 only*

1. Add `gem 'remote_i18n' to your Gemfile
2. Run `bundle install`
3. Create a "remote_i18n" in /config/initializers with the following

    RemoteI18n.configure do |config|
      config.translate :name=>:date, :i18n_path=>"date", :only=>["en", "fr-CA"]
      config.translate :name=>:errors, :i18n_path=>"errors", :only=>["en", "fr-CA"]
    end

The configuration can't be simpler
-  _name_ is the name of the resulting file in /public/javascripts
-  _i18n_path_ is the path to use in the Rails i18n module
-  _only_ is to specify languages, by default it is all configured ones
 
The output of this configuration would be:

    - /public/javascripts/date.en.js
    - /public/javascripts/date.fr-CA.js
    - /public/javascripts/errors.en.js
    - /public/javascripts/errors.fr-CA.js
   
In Javascript the _T_ object is created to access the translations:

    blank_error = T.errors.message.blank;
    january = T.date.month_names[1];

## More Details

{'fraction_non_alphanumeric': 0.08403930870891223, 'fraction_numerical': 0.016943409013893594, 'mean_word_length': 3.8955223880597014, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6970703', 'n_tokens_mistral': 912, 'n_tokens_neox': 851, 'n_words': 360}