i18n_routing 0.3.6 → 0.3.7
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/CHANGELOG.rdoc +6 -1
- data/README.rdoc +2 -1
- data/lib/i18n_routing_rails3.rb +3 -2
- data/spec/spec_helper.rb +1 -0
- metadata +3 -3
data/CHANGELOG.rdoc
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.7 (August 26, 2010)
|
|
2
|
+
|
|
3
|
+
* Support Rails3 RC2 thanks to fwalch / Rails3 final will probably require a new version of i18n_routing
|
|
4
|
+
* Not everything works on RC2 (nested resources), will be fixed when Rails3 will be officially released.
|
|
5
|
+
|
|
6
|
+
0.3.6 (June 13, 2010)
|
|
2
7
|
|
|
3
8
|
* Works even if translations are the same as the translated name
|
|
4
9
|
|
data/README.rdoc
CHANGED
|
@@ -6,7 +6,7 @@ All necessary informations are available on the wiki: http://wiki.github.com/kwi
|
|
|
6
6
|
|
|
7
7
|
For any question, use the i18_routing google group: http://groups.google.com/group/i18n-routing
|
|
8
8
|
|
|
9
|
-
Works with Rails 2.3 and Rails3
|
|
9
|
+
Works with Rails 2.3 and Rails3 RC2 ! (nested resources currently do not work on Rails3 RC2, will be fixed when Rails3 is released)
|
|
10
10
|
|
|
11
11
|
== TODO for next releases (written the 9th of June)
|
|
12
12
|
|
|
@@ -24,5 +24,6 @@ Furthermore, if the i18n gem is present on your system, Rails will load it and s
|
|
|
24
24
|
* kwi (Guillaume Luccisano)
|
|
25
25
|
* bigtiger (Jim Remsik)
|
|
26
26
|
* mixr (Reiner Dieterich)
|
|
27
|
+
* fwalch
|
|
27
28
|
|
|
28
29
|
Copyright (c) 2010 Guillaume Luccisano - g-mai|: guillaume.luccisano, released under the MIT license
|
data/lib/i18n_routing_rails3.rb
CHANGED
|
@@ -119,6 +119,7 @@ module I18nRouting
|
|
|
119
119
|
# Add i18n as valid conditions for Rack::Mount
|
|
120
120
|
@valid_conditions = @set.instance_eval { @set }.instance_eval { @valid_conditions }
|
|
121
121
|
@valid_conditions << :i18n_locale if !@valid_conditions.include?(:i18n_locale)
|
|
122
|
+
@set.valid_conditions << :i18n_locale if !@set.valid_conditions.include?(:i18n_locale)
|
|
122
123
|
|
|
123
124
|
# Extends the current RouteSet in order to define localized helper for named routes
|
|
124
125
|
# When calling define_url_helper, it calls define_localized_url_helper too.
|
|
@@ -146,7 +147,7 @@ module I18nRouting
|
|
|
146
147
|
def localized(locales = I18n.available_locales, opts = {})
|
|
147
148
|
# Add if not added Rails.root/config/locales/*.yml in the I18n.load_path
|
|
148
149
|
if !@i18n_routing_path_set and defined?(Rails) and Rails.respond_to?(:root) and Rails.root
|
|
149
|
-
I18n.load_path = (I18n.load_path << Dir[Rails.root.join('config', 'locales', '*.yml')
|
|
150
|
+
I18n.load_path = (I18n.load_path << Dir[Rails.root.join('config', 'locales', '*.yml')]).flatten.uniq
|
|
150
151
|
@i18n_routing_path_set = true
|
|
151
152
|
end
|
|
152
153
|
|
|
@@ -373,4 +374,4 @@ module I18nRouting
|
|
|
373
374
|
end
|
|
374
375
|
|
|
375
376
|
ActionDispatch::Routing::Mapper.send :include, I18nRouting::Mapper
|
|
376
|
-
Rack::Mount::Route.send :include, I18nRouting::RackMountRoute
|
|
377
|
+
Rack::Mount::Route.send :include, I18nRouting::RackMountRoute
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 3
|
|
8
|
-
-
|
|
9
|
-
version: 0.3.
|
|
8
|
+
- 7
|
|
9
|
+
version: 0.3.7
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Guillaume Luccisano
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date: 2010-
|
|
17
|
+
date: 2010-08-26 00:00:00 +02:00
|
|
18
18
|
default_executable:
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|