r18n-rails 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +4 -0
- data/lib/r18n-rails/translated.rb +32 -0
- data/lib/r18n-rails.rb +1 -0
- data/spec/app/log/test.log +3166 -0
- data/spec/rails_spec.rb +5 -0
- metadata +39 -38
data/README.rdoc
CHANGED
@@ -216,6 +216,10 @@ to send e-mail for English admin on error with French user:
|
|
216
216
|
You can use <tt>R18n::Translated</tt> mixin for any Ruby class, not only for
|
217
217
|
ActiveRecord models.
|
218
218
|
|
219
|
+
8. Download translations for Rails system messages (validation, etc) from
|
220
|
+
https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale and
|
221
|
+
put them to <tt>config/locales/</tt> (because them use Rails I18n format).
|
222
|
+
|
219
223
|
== License
|
220
224
|
|
221
225
|
R18n is licensed under the GNU Lesser General Public License version 3.
|
@@ -0,0 +1,32 @@
|
|
1
|
+
=begin
|
2
|
+
ActiveRecord fix mixin to R18n::Translated.
|
3
|
+
|
4
|
+
Copyright (C) 2011 Andrey “A.I.” Sitnik <andrey@sitnik.ru>
|
5
|
+
|
6
|
+
This program is free software: you can redistribute it and/or modify
|
7
|
+
it under the terms of the GNU Lesser General Public License as published by
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
9
|
+
(at your option) any later version.
|
10
|
+
|
11
|
+
This program is distributed in the hope that it will be useful,
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
GNU Lesser General Public License for more details.
|
15
|
+
|
16
|
+
You should have received a copy of the GNU Lesser General Public License
|
17
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
=end
|
19
|
+
|
20
|
+
module R18n
|
21
|
+
module Translated
|
22
|
+
module Base
|
23
|
+
def unlocalized_methods
|
24
|
+
if ancestors.include? ActiveRecord::Base
|
25
|
+
column_names + column_names.map { |i| i + '=' } + instance_methods
|
26
|
+
else
|
27
|
+
instance_methods
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/r18n-rails.rb
CHANGED