public
Fork of rails/rails
Description: Ruby on Rails - forked for implementing I18n patch
Homepage: http://rubyonrails.org
Clone URL: git://github.com/svenfuchs/rails.git
I18n: move old-style interpolation syntax deprecation to activerecord
svenfuchs (author)
Sun Sep 14 04:36:06 -0700 2008
commit  5ba6598e4ca08b3bc721fe92c1ed13bae1a87e3b
tree    06454268e4f1be53d4bca21ae8723b6f346cc24b
parent  fa174dfd24117455b6b5982a4b19a653dcc14b69
...
77
78
79
 
80
81
...
77
78
79
80
81
 
0
@@ -77,5 +77,5 @@ require 'active_record/connection_adapters/abstract_adapter'
0
 
0
 require 'active_record/schema_dumper'
0
 
0
+require 'active_record/i18n_interpolation_deprecation'
0
 I18n.load_translations File.dirname(__FILE__) + '/active_record/locale/en-US.yml'
0
-
...
4
5
6
7
8
9
10
...
120
121
122
123
124
125
126
127
128
129
130
131
...
4
5
6
 
7
8
9
...
119
120
121
 
 
 
 
 
 
122
123
124
0
@@ -4,7 +4,6 @@ module I18n
0
   module Backend
0
     class Simple
0
       INTERPOLATION_RESERVED_KEYS = %w(scope default)
0
- DEPRECATED_INTERPOLATORS = { '%d' => '{{count}}', '%s' => '{{value}}' }
0
       MATCH = /(\\\\)?\{\{([^\}]+)\}\}/
0
 
0
       # Accepts a list of paths to translation files. Loads translations from
0
@@ -120,12 +119,6 @@ module I18n
0
         def interpolate(locale, string, values = {})
0
           return string unless string.is_a?(String)
0
 
0
- string = string.gsub(/%d|%s/) do |s|
0
- instead = DEPRECATED_INTERPOLATORS[s]
0
- ActiveSupport::Deprecation.warn "using #{s} in messages is deprecated; use #{instead} instead."
0
- instead
0
- end
0
-
0
           if string.respond_to?(:force_encoding)
0
             original_encoding = string.encoding
0
             string.force_encoding(Encoding::BINARY)

Comments

    No one has commented yet.