kriss-gettext_i18n 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +8 -0
- data/TODO.rdoc +2 -1
- data/VERSION.yml +3 -3
- data/gettext_i18n.gemspec +1 -1
- data/lib/rails/extend.rb +4 -1
- data/test/test_helper.rb +2 -4
- metadata +1 -1
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
== 0.2.2
|
2
|
+
* Fixed rails extend for ActionController
|
3
|
+
|
4
|
+
== 0.2.1
|
5
|
+
* Fixed rails extend for TranslationHelper and ActiveRecord
|
6
|
+
* Changes in documentation
|
7
|
+
* Fixes in tests
|
8
|
+
|
1
9
|
== 0.2.0
|
2
10
|
* Integrated with globalize2
|
3
11
|
* Simple backend extension moved to Gettext backend
|
data/TODO.rdoc
CHANGED
data/VERSION.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
minor: 2
|
3
|
+
patch: 2
|
4
|
+
major: 0
|
data/gettext_i18n.gemspec
CHANGED
data/lib/rails/extend.rb
CHANGED
@@ -4,7 +4,10 @@ class ActiveRecord::Base
|
|
4
4
|
end
|
5
5
|
|
6
6
|
ActionController::Translation.module_eval do
|
7
|
-
|
7
|
+
def gettext(key, options={})
|
8
|
+
I18n.gettext(key, options)
|
9
|
+
end
|
10
|
+
alias :_ :gettext
|
8
11
|
end
|
9
12
|
|
10
13
|
# Extending with I18n::Gettext is not working for translation helper
|
data/test/test_helper.rb
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
ENV['RAILS_ENV'] = 'test'
|
2
|
-
ENV['RAILS_ROOT'] ||= File.dirname(__FILE__)
|
2
|
+
ENV['RAILS_ROOT'] ||= File.join(File.dirname(__FILE__), '../../../../')
|
3
3
|
|
4
4
|
require 'rubygems'
|
5
|
-
gem 'rspec'
|
6
|
-
gem 'rspec-rails'
|
7
|
-
gem 'thoughtbot-shoulda'
|
8
5
|
require 'shoulda'
|
9
6
|
require 'test/unit'
|
7
|
+
|
10
8
|
require File.expand_path(File.join(ENV['RAILS_ROOT'], 'config/environment.rb'))
|
11
9
|
|
12
10
|
I18n.load_path << Dir[File.join(File.dirname(__FILE__), 'locales', '*.{rb,yml}')]
|