francesc/rails-translate-routes — Issue #2: Translating routes which are defined in Rails engines
Author: ozgun
Created: 2012-01-10 09:23:36+00:00
State: open

I have a Rails engine/gem with routes which is required by main Rails app. When I type "bundle exec rake routes" while I'm in the main app's directory, I don't see the translated urls/routes(widgets) which are defined in the Rails engine. In the main app's routes.rb file, routes for "posts" are defined.

Here is the output of "rake routes" command:

````
posts_en GET /en/posts(.:format) {:action=>"index", :controller=>"posts"}
posts_tr GET /tr/posts(.:format) {:action=>"index", :controller=>"posts"}
posts_es GET /es/posts(.:format) {:action=>"index", :controller=>"posts"}
POST /en/posts(.:format) {:action=>"create", :controller=>"posts"}
POST /tr/posts(.:format) {:action=>"create", :controller=>"posts"}
POST /es/posts(.:format) {:action=>"create", :controller=>"posts"}
new_post_en GET /en/posts/new(.:format) {:action=>"new", :controller=>"posts"}
new_post_tr GET /tr/posts/new(.:format) {:action=>"new", :controller=>"posts"}
new_post_es GET /es/posts/new(.:format) {:action=>"new", :controller=>"posts"}
edit_post_en GET /en/posts/:id/edit(.:format) {:action=>"edit", :controller=>"posts"}
edit_post_tr GET /tr/posts/:id/edit(.:format) {:action=>"edit", :controller=>"posts"}
edit_post_es GET /es/posts/:id/edit(.:format) {:action=>"edit", :controller=>"posts"}
post_en GET /en/posts/:id(.:format) {:action=>"show", :controller=>"posts"}
post_tr GET /tr/posts/:id(.:format) {:action=>"show", :controller=>"posts"}
post_es GET /es/posts/:id(.:format) {:action=>"show", :controller=>"posts"}
PUT /en/posts/:id(.:format) {:action=>"update", :controller=>"posts"}
PUT /tr/posts/:id(.:format) {:action=>"update", :controller=>"posts"}
PUT /es/posts/:id(.:format) {:action=>"update", :controller=>"posts"}
DELETE /en/posts/:id(.:format) {:action=>"destroy", :controller=>"posts"}
DELETE /tr/posts/:id(.:format) {:action=>"destroy", :controller=>"posts"}
DELETE /es/posts/:id(.:format) {:action=>"destroy", :controller=>"posts"}
widgets GET /widgets(.:format) {:action=>"index", :controller=>"widgets"}
POST /widgets(.:format) {:action=>"create", :controller=>"widgets"}
new_widget GET /widgets/new(.:format) {:action=>"new", :controller=>"widgets"}
edit_widget GET /widgets/:id/edit(.:format) {:action=>"edit", :controller=>"widgets"}
widget GET /widgets/:id(.:format) {:action=>"show", :controller=>"widgets"}
PUT /widgets/:id(.:format) {:action=>"update", :controller=>"widgets"}
DELETE /widgets/:id(.:format) {:action=>"destroy", :controller=>"widgets"}

````