i18n_routing 0.3.0 → 0.3.1
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 +4 -0
- data/lib/i18n_routing_common.rb +1 -0
- data/lib/i18n_routing_rails3.rb +1 -1
- metadata +2 -2
data/CHANGELOG.rdoc
CHANGED
data/lib/i18n_routing_common.rb
CHANGED
@@ -13,6 +13,7 @@ module I18nRouting
|
|
13
13
|
else
|
14
14
|
# Try to get the translation in routes namescope first
|
15
15
|
t = I18n.t(:as, :scope => "routes.#{name}".to_sym, :default => name.to_s)
|
16
|
+
|
16
17
|
return t if t and t != name.to_s
|
17
18
|
|
18
19
|
I18n.t(name.to_s, :scope => type, :default => name.to_s)
|
data/lib/i18n_routing_rails3.rb
CHANGED
@@ -36,7 +36,7 @@ module I18nRouting
|
|
36
36
|
localized_path = I18nRouting.translation_for(resource.name, type)
|
37
37
|
|
38
38
|
# A translated route exists :
|
39
|
-
if localized_path and localized_path != resource.name.to_s
|
39
|
+
if localized_path and localized_path != resource.name.to_s and String === localized_path
|
40
40
|
puts("[I18n] > localize %-10s: %40s (%s) => /%s" % [type, resource.name, locale, localized_path]) if @i18n_verbose
|
41
41
|
opts = options.dup
|
42
42
|
opts[:path] = localized_path.to_sym
|