Closed muitocomplicado closed 14 years ago
it's the check in line 39 http://github.com/kwi/i18n_routing/blob/master/lib/i18n_routing_rails3.rb#L39
you could pass in a force parameter to a resource like: resources :kits, :force => [:pt] and check for that; but this is not a good solution. experiment goes here: http://github.com/mixr/i18n_routing/tree/forced_routes
Hi,
Yes, when a translation is not found or is the same, i18n_routing does not translate the route.
I will try to find a clean way to handle this soon.
Thanks for the feedback.
Fixed ! Try it and tell me if something goes wrong :)
It works great for resources, singleton resources seem to work too!
but extra methods on a singleton resource get no named route, independent of the actual translation. resource :foo do resource :bar do get :thing ...
'rake routes' outputs: thing_foo_bar GET /foo/bar/thing(.:format) GET /foo_en/bar_en/thing(.:format) GET /foo_de/bar_de/thing(.:format)
I will check this out soon :) Thanks !
hey,
looks like false alarm. I couldn't reproduce my problem in the tests: http://github.com/mixr/i18n_routing/commit/51b71b055f8ca75637708c897555aa00404aa5cb
In my app, rails3 beta3 and beta4 made all the difference!
Thanks, it's working fine now. =)
I have a resource called "kits" that is the same in both english and portuguese. The plugin doesn't create the localized paths like pt_kits, new_pt_kit, etc. This is an issue because I want localized path_names, like this:
English: /kits/new and /kits/1/edit Portuguese: /kits/criar and /kits/1/editar
Any ideas?