diff --git a/lib/generators/refinery/i18n_generator.rb b/lib/generators/refinery/i18n_generator.rb index 93eb558..da6d3ff 100644 --- a/lib/generators/refinery/i18n_generator.rb +++ b/lib/generators/refinery/i18n_generator.rb @@ -5,6 +5,8 @@ class I18nGenerator < Rails::Generators::Base def generate_refinery_i18n_initializer template "config/initializers/refinery/i18n.rb.erb", File.join(destination_root, "config", "initializers", "refinery", "i18n.rb") + template "config/initializers/route_translator.rb.erb", + File.join(destination_root, "config", "initializers", "route_translator.rb") end end diff --git a/lib/generators/refinery/templates/config/initializers/route_translator.rb.erb b/lib/generators/refinery/templates/config/initializers/route_translator.rb.erb new file mode 100644 index 0000000..4f4412a --- /dev/null +++ b/lib/generators/refinery/templates/config/initializers/route_translator.rb.erb @@ -0,0 +1,5 @@ +# encoding: utf-8 + +RouteTranslator.config do |config| + config.hide_locale = true +end \ No newline at end of file diff --git a/lib/refinery/i18n.rb b/lib/refinery/i18n.rb index ca25b9a..e10b569 100644 --- a/lib/refinery/i18n.rb +++ b/lib/refinery/i18n.rb @@ -2,6 +2,7 @@ require 'refinerycms-core' require 'routing-filter' require 'rails-i18n' +require 'route_translator' module Refinery autoload :I18nGenerator, 'generators/refinery/i18n_generator' diff --git a/refinerycms-i18n.gemspec b/refinerycms-i18n.gemspec index fa02f32..0e574d6 100644 --- a/refinerycms-i18n.gemspec +++ b/refinerycms-i18n.gemspec @@ -18,4 +18,5 @@ Gem::Specification.new do |s| s.add_dependency 'routing-filter', '>= 0.4.0.dev' s.add_dependency 'rails-i18n', '~> 4.0.1' + s.add_dependency 'route_translator', '~> 3.2.4' end