francesc/rails-translate-models — Issue #1: Unable to recognize paths without a locale prefix
Author: ozgun
Created: 2012-01-04 17:01:03+00:00
State: open

routes.rb:

```ruby
Myapp::Application.routes.draw do
resources :posts
end
ActionDispatch::Routing::Translator.translate_from_file('config/i18n-routes.yml', { :prefix_on_default_locale => true })
```

Output of "rake routes" command:

posts_tr GET /tr/posts(.:format) {:action=>"index", :controller=>"posts"}
posts_en GET /en/posts(.:format) {:action=>"index", :controller=>"posts"}
posts_de GET /de/posts(.:format) {:action=>"index", :controller=>"posts"}
posts_fr GET /fr/posts(.:format) {:action=>"index", :controller=>"posts"}
posts_ru GET /ru/posts(.:format) {:action=>"index", :controller=>"posts"}
posts_ar GET /ar/posts(.:format) {:action=>"index", :controller=>"posts"}
posts_es GET /es/posts(.:format) {:action=>"index", :controller=>"posts"}
posts_fi GET /fi/posts(.:format) {:action=>"index", :controller=>"posts"}
posts_it GET /it/posts(.:format) {:action=>"index", :controller=>"posts"}
posts_ja GET /ja/posts(.:format) {:action=>"index", :controller=>"posts"}
posts_pl GET /pl/posts(.:format) {:action=>"index", :controller=>"posts"}
POST /tr/posts(.:format) {:action=>"create", :controller=>"posts"}
POST /en/posts(.:format) {:action=>"create", :controller=>"posts"}
POST /de/posts(.:format) {:action=>"create", :controller=>"posts"}
POST /fr/posts(.:format) {:action=>"create", :controller=>"posts"}
POST /ru/posts(.:format) {:action=>"create", :controller=>"posts"}
POST /ar/posts(.:format) {:action=>"create", :controller=>"posts"}
POST /es/posts(.:format) {:action=>"create", :controller=>"posts"}
POST /fi/posts(.:format) {:action=>"create", :controller=>"posts"}
POST /it/posts(.:format) {:action=>"create", :controller=>"posts"}
POST /ja/posts(.:format) {:action=>"create", :controller=>"posts"}
POST /pl/posts(.:format) {:action=>"create", :controller=>"posts"}
new_post_tr GET /tr/posts/new(.:format) {:action=>"new", :controller=>"posts"}
new_post_en GET /en/posts/new(.:format) {:action=>"new", :controller=>"posts"}
new_post_de GET /de/posts/new(.:format) {:action=>"new", :controller=>"posts"}
new_post_fr GET /fr/posts/new(.:format) {:action=>"new", :controller=>"posts"}
new_post_ru GET /ru/posts/new(.:format) {:action=>"new", :controller=>"posts"}
new_post_ar GET /ar/posts/new(.:format) {:action=>"new", :controller=>"posts"}
new_post_es GET /es/posts/new(.:format) {:action=>"new", :controller=>"posts"}
new_post_fi GET /fi/posts/new(.:format) {:action=>"new", :controller=>"posts"}
new_post_it GET /it/posts/new(.:format) {:action=>"new", :controller=>"posts"}
new_post_ja GET /ja/posts/new(.:format) {:action=>"new", :controller=>"posts"}
new_post_pl GET /pl/posts/new(.:format) {:action=>"new", :controller=>"posts"}
edit_post_tr GET /tr/posts/:id/edit(.:format) {:action=>"edit", :controller=>"posts"}
edit_post_en GET /en/posts/:id/edit(.:format) {:action=>"edit", :controller=>"posts"}
edit_post_de GET /de/posts/:id/edit(.:format) {:action=>"edit", :controller=>"posts"}
edit_post_fr GET /fr/posts/:id/edit(.:format) {:action=>"edit", :controller=>"posts"}
edit_post_ru GET /ru/posts/:id/edit(.:format) {:action=>"edit", :controller=>"posts"}
edit_post_ar GET /ar/posts/:id/edit(.:format) {:action=>"edit", :controller=>"posts"}
edit_post_es GET /es/posts/:id/edit(.:format) {:action=>"edit", :controller=>"posts"}
edit_post_fi GET /fi/posts/:id/edit(.:format) {:action=>"edit", :controller=>"posts"}
edit_post_it GET /it/posts/:id/edit(.:format) {:action=>"edit", :controller=>"posts"}
edit_post_ja GET /ja/posts/:id/edit(.:format) {:action=>"edit", :controller=>"posts"}
edit_post_pl GET /pl/posts/:id/edit(.:format) {:action=>"edit", :controller=>"posts"}
post_tr GET /tr/posts/:id(.:format) {:action=>"show", :controller=>"posts"}
post_en GET /en/posts/:id(.:format) {:action=>"show", :controller=>"posts"}
post_de GET /de/posts/:id(.:format) {:action=>"show", :controller=>"posts"}
post_fr GET /fr/posts/:id(.:format) {:action=>"show", :controller=>"posts"}
post_ru GET /ru/posts/:id(.:format) {:action=>"show", :controller=>"posts"}
post_ar GET /ar/posts/:id(.:format) {:action=>"show", :controller=>"posts"}
post_es GET /es/posts/:id(.:format) {:action=>"show", :controller=>"posts"}
post_fi GET /fi/posts/:id(.:format) {:action=>"show", :controller=>"posts"}
post_it GET /it/posts/:id(.:format) {:action=>"show", :controller=>"posts"}
post_ja GET /ja/posts/:id(.:format) {:action=>"show", :controller=>"posts"}
post_pl GET /pl/posts/:id(.:format) {:action=>"show", :controller=>"posts"}
PUT /tr/posts/:id(.:format) {:action=>"update", :controller=>"posts"}
PUT /en/posts/:id(.:format) {:action=>"update", :controller=>"posts"}
PUT /de/posts/:id(.:format) {:action=>"update", :controller=>"posts"}
PUT /fr/posts/:id(.:format) {:action=>"update", :controller=>"posts"}
PUT /ru/posts/:id(.:format) {:action=>"update", :controller=>"posts"}
PUT /ar/posts/:id(.:format) {:action=>"update", :controller=>"posts"}
PUT /es/posts/:id(.:format) {:action=>"update", :controller=>"posts"}
PUT /fi/posts/:id(.:format) {:action=>"update", :controller=>"posts"}
PUT /it/posts/:id(.:format) {:action=>"update", :controller=>"posts"}
PUT /ja/posts/:id(.:format) {:action=>"update", :controller=>"posts"}
PUT /pl/posts/:id(.:format) {:action=>"update", :controller=>"posts"}
DELETE /tr/posts/:id(.:format) {:action=>"destroy", :controller=>"posts"}
DELETE /en/posts/:id(.:format) {:action=>"destroy", :controller=>"posts"}
DELETE /de/posts/:id(.:format) {:action=>"destroy", :controller=>"posts"}
DELETE /fr/posts/:id(.:format) {:action=>"destroy", :controller=>"posts"}
DELETE /ru/posts/:id(.:format) {:action=>"destroy", :controller=>"posts"}
DELETE /ar/posts/:id(.:format) {:action=>"destroy", :controller=>"posts"}
DELETE /es/posts/:id(.:format) {:action=>"destroy", :controller=>"posts"}
DELETE /fi/posts/:id(.:format) {:action=>"destroy", :controller=>"posts"}
DELETE /it/posts/:id(.:format) {:action=>"destroy", :controller=>"posts"}
DELETE /ja/posts/:id(.:format) {:action=>"destroy", :controller=>"posts"}
DELETE /pl/posts/:id(.:format) {:action=>"destroy", :controller=>"posts"}
root_tr /tr {:controller=>"welcome", :action=>"index"}
root_en /en {:controller=>"welcome", :action=>"index"}
root_de /de {:controller=>"welcome", :action=>"index"}
root_fr /fr {:controller=>"welcome", :action=>"index"}
root_ru /ru {:controller=>"welcome", :action=>"index"}
root_ar /ar {:controller=>"welcome", :action=>"index"}
root_es /es {:controller=>"welcome", :action=>"index"}
root_fi /fi {:controller=>"welcome", :action=>"index"}
root_it /it {:controller=>"welcome", :action=>"index"}
root_ja /ja {:controller=>"welcome", :action=>"index"}
root_pl /pl {:controller=>"welcome", :action=>"index"}
root / {:controller=>"welcome", :action=>"index"}

However, I would expect to see routes for "posts" without a language prefix.