Nested resources and member methods

57 views
Skip to first unread message

johno

unread,
Apr 13, 2011, 8:09:32 AM4/13/11
to I18n Routing
Hi,

Ihave localized nested resources like this:

resources :projects do
resources :procurements do
member do
post :mark
post :unmark
get :history
end
end
end

How do I define translation for :mark, :unmark, :history for such
nested resources?

Kwi

unread,
Apr 13, 2011, 1:32:57 PM4/13/11
to I18n Routing
Hi,

Have a look at this translation file:
https://github.com/kwi/i18n_routing/blob/master/spec/locales/fr.yml
I think you just need to use path_names translations. (Long time I
haven't play with the gem sorry)

Jan Suchal

unread,
Apr 13, 2011, 4:13:15 PM4/13/11
to i18n-r...@googlegroups.com, Kwi
Hmm, what if i have two different nested resources with different
translations?

resources :projects do
resources :procurements do
member do
post :mark
post :unmark
get :history
end
end

resources :milestones do


member do
post :mark
post :unmark
get :history
end
end

Reply all
Reply to author
Forward
0 new messages