Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate engines routes #50

Open
bricesanchez opened this issue Oct 21, 2014 · 28 comments
Open

Translate engines routes #50

bricesanchez opened this issue Oct 21, 2014 · 28 comments
Assignees

Comments

@bricesanchez
Copy link
Member

Hi all!

I would like to have multi-language routes for refinerycms engines, like refinerycms-inquiries :

/fr/nous-joindre
/en/contact

/fr/nous-joindre/merci
/en/contact/thank_you

I started the discussion here : refinery/refinerycms-inquiries#155 (comment)

I've seen :
https://github.com/enriclluelles/route_translator
and
https://github.com/warantesbr/refinerycms-translate-routes

I like the fact to translate routes in a locale .yml file.

How and where could we implement this feature?

@simi @parndt

@bricesanchez bricesanchez changed the title Translated engines routes Translate engines routes Oct 21, 2014
@simi
Copy link
Member

simi commented Oct 21, 2014

@parndt feel free to assign me. I have few ideas.

@parndt
Copy link
Member

parndt commented Oct 21, 2014

@simi done.. thanks 😄

@bricesanchez
Copy link
Member Author

Instead of translated routes, could we mount engines as a page part ?

No more hardcoded links in link_url and we could mount multiple engines on a page.

We could also mount engine as we display them in /refinery/users/my-username/edit

What do you think of that ?

@parndt
Copy link
Member

parndt commented Oct 21, 2014

@bricesanchez what do you mean "as a page part"?

@bricesanchez
Copy link
Member Author

@parndt

We have 2 features :

  • page parts and the ability to add and remove page parts in a content page,
  • and we have the tab of refinerycms-page-images.

Could we develop a way to add an engine on a content page when we add a page part and display it on admin like a tab and call for it on frontend with a new method?

It's a huge change in the way we use page parts... :(

@parndt
Copy link
Member

parndt commented Oct 23, 2014

Oh, you mean custom tabs like refinerycms-page-images has. There's an API and everything, just nothing hooks to it and it's probably not built well enough.. Do you have any suggestions for implementation?

@bricesanchez
Copy link
Member Author

@parndt no, i'm sorry. My hope is on @simi idea

@simi
Copy link
Member

simi commented Oct 23, 2014

My initial idea is to mock localized in routes with simple yield when it is undefined and wrap all routes with localized. You can use some gem using localized in routing to translate routes. But I'm trying to dig more into routing. Maybe some cleaner way should be accessible.

@parndt
Copy link
Member

parndt commented Oct 23, 2014

Can we do this transparently to the developer? This is something like what the routing-filter extension gave us previously.

@simi
Copy link
Member

simi commented Oct 23, 2014

I think it is. I'll ping you with another ideas soon.

@simi
Copy link
Member

simi commented Oct 23, 2014

routing-filter was able to add :locale prefix for example, but it wasn't able to translate route.

@parndt
Copy link
Member

parndt commented Oct 23, 2014

Very true. Your solution would be even better.

@bricesanchez
Copy link
Member Author

Hi @simi and @parndt,

Do you have news about this issue ?

Thank you!

@parndt
Copy link
Member

parndt commented Nov 4, 2014

Not me

@simi
Copy link
Member

simi commented Nov 13, 2014

My idea was to use probably https://github.com/enriclluelles/route_translator, but without need to use localized block in routes.rb, but instead of that force all routes are localized. I need to test performance for this idea, but AFAIK routes are generated on startup (or first request?).

@bricesanchez
Copy link
Member Author

@simi, i'm agree to find a way to not need to use localized block but i don't know how to do it.
I'm searching...

PR reference : #51

@parndt
Copy link
Member

parndt commented Nov 13, 2014

@simi yeah that'd be my preferred method, too

@bricesanchez
Copy link
Member Author

@simi
Copy link
Member

simi commented Nov 13, 2014

That's reloader for dev env IMHO (or explicit call of reload_routes!).

@bricesanchez
Copy link
Member Author

😢

@bricesanchez
Copy link
Member Author

Hello all ! Could you help me to resolve this issue ? 😗

@simi
Copy link
Member

simi commented Nov 26, 2014

@bricesanchez feel free to test my idea:

# Gemfile
gem 'route_translator', github: 'simi/route_translator', branch: 'force-all-localized '

# config/initializers/route_translator.rb
RouteTranslator.config do |config|
  config.force_all_localized = true
end

And try to translate any route like it was wrapped in localized block and test result via bin/rake routes.

@bricesanchez
Copy link
Member Author

bricesanchez commented Nov 28, 2014

Unfortunately, with this approach we have to translate all frontend and backend routes to make it working. It's a big work to translate all routes instead of translating only wanted routes.

I prefer to test if @localized is defined so if it's true it localized the routes inside the block, if it's false it write route without localization.

How could we do this ?

@simi, @parndt

@simi
Copy link
Member

simi commented Nov 28, 2014

You don't need to localize all. It will use defaults, when translation is not provided. I can take a look if the code already knows that translation is missing and avoid creating translated routes. So only translated routes will be created as translated.

Does it makes sense @bricesanchez ?

@bricesanchez
Copy link
Member Author

At this time, i've this error :

NoMethodError in Refinery::Admin::CoreController#index
undefined method `segment_keys' for nil:NilClass

Rails.root: /Users/bricesanchez/Sites/***

Application Trace | Framework Trace | Full Trace
.gems/gems/actionpack-4.1.6/lib/action_dispatch/routing/mapper.rb:582:in `block (2 levels) in define_generate_prefix'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/routing/route_set.rb:656:in `url_for'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/routing/route_set.rb:397:in `url_for'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/routing/route_set.rb:230:in `call'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/routing/route_set.rb:270:in `block (2 levels) in define_url_helper'
.gems/bundler/gems/route_translator-43e24e32b96b/lib/route_translator/translator.rb:30:in `block (2 levels) in add_untranslated_helpers_to_controllers_and_views'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/routing/routes_proxy.rb:31:in `new_refinery_user_session_url'
.gems/gems/devise-3.4.1/lib/devise/failure_app.rb:119:in `scope_url'
.gems/gems/devise-3.4.1/lib/devise/failure_app.rb:104:in `redirect_url'
.gems/gems/devise-3.4.1/lib/devise/failure_app.rb:64:in `redirect'
.gems/gems/devise-3.4.1/lib/devise/failure_app.rb:39:in `respond'
.gems/gems/actionpack-4.1.6/lib/abstract_controller/base.rb:189:in `process_action'
.gems/gems/actionpack-4.1.6/lib/abstract_controller/base.rb:136:in `process'
.gems/gems/actionpack-4.1.6/lib/action_controller/metal.rb:196:in `dispatch'
.gems/gems/actionpack-4.1.6/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
.gems/gems/actionpack-4.1.6/lib/action_controller/metal.rb:232:in `block in action'
.gems/gems/devise-3.4.1/lib/devise/failure_app.rb:22:in `call'
.gems/gems/devise-3.4.1/lib/devise/failure_app.rb:22:in `call'
.gems/gems/devise-3.4.1/lib/devise/delegator.rb:5:in `call'
.gems/gems/warden-1.2.3/lib/warden/manager.rb:130:in `call_failure_app'
.gems/gems/warden-1.2.3/lib/warden/manager.rb:116:in `process_unauthenticated'
.gems/gems/warden-1.2.3/lib/warden/manager.rb:47:in `call'
.gems/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
.gems/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'
.gems/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/middleware/flash.rb:254:in `call'
.gems/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
.gems/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/middleware/cookies.rb:560:in `call'
.gems/gems/activerecord-4.1.6/lib/active_record/query_cache.rb:36:in `call'
.gems/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
.gems/gems/activerecord-4.1.6/lib/active_record/migration.rb:380:in `call'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
.gems/gems/activesupport-4.1.6/lib/active_support/callbacks.rb:82:in `run_callbacks'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/middleware/reloader.rb:73:in `call'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
.gems/gems/railties-4.1.6/lib/rails/rack/logger.rb:38:in `call_app'
.gems/gems/railties-4.1.6/lib/rails/rack/logger.rb:20:in `block in call'
.gems/gems/activesupport-4.1.6/lib/active_support/tagged_logging.rb:68:in `block in tagged'
.gems/gems/activesupport-4.1.6/lib/active_support/tagged_logging.rb:26:in `tagged'
.gems/gems/activesupport-4.1.6/lib/active_support/tagged_logging.rb:68:in `tagged'
.gems/gems/railties-4.1.6/lib/rails/rack/logger.rb:20:in `call'
.gems/gems/quiet_assets-1.0.3/lib/quiet_assets.rb:23:in `call_with_quiet_assets'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/middleware/request_id.rb:21:in `call'
.gems/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
.gems/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
.gems/gems/activesupport-4.1.6/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
.gems/gems/dragonfly-1.0.7/lib/dragonfly/cookie_monster.rb:9:in `call'
.gems/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
.gems/gems/actionpack-4.1.6/lib/action_dispatch/middleware/static.rb:64:in `call'
.gems/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
.gems/gems/railties-4.1.6/lib/rails/engine.rb:514:in `call'
.gems/gems/railties-4.1.6/lib/rails/application.rb:144:in `call'
.gems/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
.gems/gems/puma-2.9.2/lib/puma/server.rb:490:in `handle_request'
.gems/gems/puma-2.9.2/lib/puma/server.rb:361:in `process_client'
.gems/gems/puma-2.9.2/lib/puma/server.rb:254:in `block in run'
.gems/gems/puma-2.9.2/lib/puma/thread_pool.rb:92:in `call'
.gems/gems/puma-2.9.2/lib/puma/thread_pool.rb:92:in `block in spawn_thread'

@bricesanchez
Copy link
Member Author

This is my rake routes :

Routes for Refinery::Core::Engine:
                          wymiframe_en GET    /en/wymiframe(/:id)(.:format)                       refinery/fast#wymiframe {:locale=>"en"}
                          wymiframe_fr GET    /wymiframe(/:id)(.:format)                          refinery/fast#wymiframe {:locale=>"fr"}
                          fans_fans_en GET    /en/fans(.:format)                                  refinery/fans/fans#index {:locale=>"en"}
                          fans_fans_fr GET    /fans(.:format)                                     refinery/fans/fans#index {:locale=>"fr"}
                           fans_fan_en GET    /en/fans/:id(.:format)                              refinery/fans/fans#show {:locale=>"en"}
                           fans_fan_fr GET    /fans/:id(.:format)                                 refinery/fans/fans#show {:locale=>"fr"}
   update_positions_fans_admin_fans_en POST   /en/refinery/fans/update_positions(.:format)        refinery/fans/admin/fans#update_positions {:locale=>"en"}
   update_positions_fans_admin_fans_fr POST   /refinery/fans/update_positions(.:format)           refinery/fans/admin/fans#update_positions {:locale=>"fr"}
                    fans_admin_fans_en GET    /en/refinery/fans(.:format)                         refinery/fans/admin/fans#index {:locale=>"en"}
                    fans_admin_fans_fr GET    /refinery/fans(.:format)                            refinery/fans/admin/fans#index {:locale=>"fr"}
                                       POST   /en/refinery/fans(.:format)                         refinery/fans/admin/fans#create {:locale=>"en"}
                                       POST   /refinery/fans(.:format)                            refinery/fans/admin/fans#create {:locale=>"fr"}
                 new_fans_admin_fan_en GET    /en/refinery/fans/new(.:format)                     refinery/fans/admin/fans#new {:locale=>"en"}
                 new_fans_admin_fan_fr GET    /refinery/fans/new(.:format)                        refinery/fans/admin/fans#new {:locale=>"fr"}
                edit_fans_admin_fan_en GET    /en/refinery/fans/:id/edit(.:format)                refinery/fans/admin/fans#edit {:locale=>"en"}
                edit_fans_admin_fan_fr GET    /refinery/fans/:id/edit(.:format)                   refinery/fans/admin/fans#edit {:locale=>"fr"}
                     fans_admin_fan_en PATCH  /en/refinery/fans/:id(.:format)                     refinery/fans/admin/fans#update {:locale=>"en"}
                     fans_admin_fan_fr PATCH  /refinery/fans/:id(.:format)                        refinery/fans/admin/fans#update {:locale=>"fr"}
                                       PUT    /en/refinery/fans/:id(.:format)                     refinery/fans/admin/fans#update {:locale=>"en"}
                                       PUT    /refinery/fans/:id(.:format)                        refinery/fans/admin/fans#update {:locale=>"fr"}
                                       DELETE /en/refinery/fans/:id(.:format)                     refinery/fans/admin/fans#destroy {:locale=>"en"}
                                       DELETE /refinery/fans/:id(.:format)                        refinery/fans/admin/fans#destroy {:locale=>"fr"}
                         teams_root_en GET    /en/teams(.:format)                                 refinery/teams/teams#index {:locale=>"en"}
                         teams_root_fr GET    /teams(.:format)                                    refinery/teams/teams#index {:locale=>"fr"}
                        teams_teams_en GET    /en/teams(.:format)                                 refinery/teams/teams#index {:locale=>"en"}
                        teams_teams_fr GET    /teams(.:format)                                    refinery/teams/teams#index {:locale=>"fr"}
                         teams_team_en GET    /en/teams/:id(.:format)                             refinery/teams/teams#show {:locale=>"en"}
                         teams_team_fr GET    /teams/:id(.:format)                                refinery/teams/teams#show {:locale=>"fr"}
 update_positions_teams_admin_teams_en POST   /en/refinery/teams/update_positions(.:format)       refinery/teams/admin/teams#update_positions {:locale=>"en"}
 update_positions_teams_admin_teams_fr POST   /refinery/teams/update_positions(.:format)          refinery/teams/admin/teams#update_positions {:locale=>"fr"}
                  teams_admin_teams_en GET    /en/refinery/teams(.:format)                        refinery/teams/admin/teams#index {:locale=>"en"}
                  teams_admin_teams_fr GET    /refinery/teams(.:format)                           refinery/teams/admin/teams#index {:locale=>"fr"}
                                       POST   /en/refinery/teams(.:format)                        refinery/teams/admin/teams#create {:locale=>"en"}
                                       POST   /refinery/teams(.:format)                           refinery/teams/admin/teams#create {:locale=>"fr"}
               new_teams_admin_team_en GET    /en/refinery/teams/new(.:format)                    refinery/teams/admin/teams#new {:locale=>"en"}
               new_teams_admin_team_fr GET    /refinery/teams/new(.:format)                       refinery/teams/admin/teams#new {:locale=>"fr"}
              edit_teams_admin_team_en GET    /en/refinery/teams/:id/edit(.:format)               refinery/teams/admin/teams#edit {:locale=>"en"}
              edit_teams_admin_team_fr GET    /refinery/teams/:id/edit(.:format)                  refinery/teams/admin/teams#edit {:locale=>"fr"}
                   teams_admin_team_en PATCH  /en/refinery/teams/:id(.:format)                    refinery/teams/admin/teams#update {:locale=>"en"}
                   teams_admin_team_fr PATCH  /refinery/teams/:id(.:format)                       refinery/teams/admin/teams#update {:locale=>"fr"}
                                       PUT    /en/refinery/teams/:id(.:format)                    refinery/teams/admin/teams#update {:locale=>"en"}
                                       PUT    /refinery/teams/:id(.:format)                       refinery/teams/admin/teams#update {:locale=>"fr"}
                                       DELETE /en/refinery/teams/:id(.:format)                    refinery/teams/admin/teams#destroy {:locale=>"en"}
                                       DELETE /refinery/teams/:id(.:format)                       refinery/teams/admin/teams#destroy {:locale=>"fr"}
          copywriting_admin_phrases_en GET    /en/refinery/copywriting/phrases(.:format)          refinery/copywriting/admin/phrases#index {:locale=>"en"}
          copywriting_admin_phrases_fr GET    /refinery/copywriting/phrases(.:format)             refinery/copywriting/admin/phrases#index {:locale=>"fr"}
      edit_copywriting_admin_phrase_en GET    /en/refinery/copywriting/phrases/:id/edit(.:format) refinery/copywriting/admin/phrases#edit {:locale=>"en"}
      edit_copywriting_admin_phrase_fr GET    /refinery/copywriting/phrases/:id/edit(.:format)    refinery/copywriting/admin/phrases#edit {:locale=>"fr"}
           copywriting_admin_phrase_en PATCH  /en/refinery/copywriting/phrases/:id(.:format)      refinery/copywriting/admin/phrases#update {:locale=>"en"}
           copywriting_admin_phrase_fr PATCH  /refinery/copywriting/phrases/:id(.:format)         refinery/copywriting/admin/phrases#update {:locale=>"fr"}
                                       PUT    /en/refinery/copywriting/phrases/:id(.:format)      refinery/copywriting/admin/phrases#update {:locale=>"en"}
                                       PUT    /refinery/copywriting/phrases/:id(.:format)         refinery/copywriting/admin/phrases#update {:locale=>"fr"}
                                       DELETE /en/refinery/copywriting/phrases/:id(.:format)      refinery/copywriting/admin/phrases#destroy {:locale=>"en"}
                                       DELETE /refinery/copywriting/phrases/:id(.:format)         refinery/copywriting/admin/phrases#destroy {:locale=>"fr"}
              inquiries_new_inquiry_en GET    /en/contact-us(.:format)                            refinery/inquiries/inquiries#new {:locale=>"en"}
              inquiries_new_inquiry_fr GET    /nous-joindre(.:format)                             refinery/inquiries/inquiries#new {:locale=>"fr"}
                inquiries_inquiries_en POST   /en/contact-us(.:format)                            refinery/inquiries/inquiries#create {:locale=>"en"}
                inquiries_inquiries_fr POST   /nous-joindre(.:format)                             refinery/inquiries/inquiries#create {:locale=>"fr"}
      thank_you_inquiries_inquiries_en GET    /en/contact-us/thank-you(.:format)                  refinery/inquiries/inquiries#thank_you {:locale=>"en"}
      thank_you_inquiries_inquiries_fr GET    /nous-joindre/merci(.:format)                       refinery/inquiries/inquiries#thank_you {:locale=>"fr"}
     spam_inquiries_admin_inquiries_en GET    /en/refinery/inquiries/spam(.:format)               refinery/inquiries/admin/inquiries#spam {:locale=>"en"}
     spam_inquiries_admin_inquiries_fr GET    /refinery/inquiries/spam(.:format)                  refinery/inquiries/admin/inquiries#spam {:locale=>"fr"}
toggle_spam_inquiries_admin_inquiry_en GET    /en/refinery/inquiries/:id/toggle_spam(.:format)    refinery/inquiries/admin/inquiries#toggle_spam {:locale=>"en"}
toggle_spam_inquiries_admin_inquiry_fr GET    /refinery/inquiries/:id/toggle_spam(.:format)       refinery/inquiries/admin/inquiries#toggle_spam {:locale=>"fr"}
          inquiries_admin_inquiries_en GET    /en/refinery/inquiries(.:format)                    refinery/inquiries/admin/inquiries#index {:locale=>"en"}
          inquiries_admin_inquiries_fr GET    /refinery/inquiries(.:format)                       refinery/inquiries/admin/inquiries#index {:locale=>"fr"}
            inquiries_admin_inquiry_en GET    /en/refinery/inquiries/:id(.:format)                refinery/inquiries/admin/inquiries#show {:locale=>"en"}
            inquiries_admin_inquiry_fr GET    /refinery/inquiries/:id(.:format)                   refinery/inquiries/admin/inquiries#show {:locale=>"fr"}
                                       DELETE /en/refinery/inquiries/:id(.:format)                refinery/inquiries/admin/inquiries#destroy {:locale=>"en"}
                                       DELETE /refinery/inquiries/:id(.:format)                   refinery/inquiries/admin/inquiries#destroy {:locale=>"fr"}
       edit_inquiries_admin_setting_en GET    /en/refinery/inquiries/settings/:id/edit(.:format)  refinery/inquiries/admin/settings#edit {:locale=>"en"}
       edit_inquiries_admin_setting_fr GET    /refinery/inquiries/settings/:id/edit(.:format)     refinery/inquiries/admin/settings#edit {:locale=>"fr"}
            inquiries_admin_setting_en PATCH  /en/refinery/inquiries/settings/:id(.:format)       refinery/inquiries/admin/settings#update {:locale=>"en"}
            inquiries_admin_setting_fr PATCH  /refinery/inquiries/settings/:id(.:format)          refinery/inquiries/admin/settings#update {:locale=>"fr"}
                                       PUT    /en/refinery/inquiries/settings/:id(.:format)       refinery/inquiries/admin/settings#update {:locale=>"en"}
                                       PUT    /refinery/inquiries/settings/:id(.:format)          refinery/inquiries/admin/settings#update {:locale=>"fr"}
                     admin_settings_en GET    /en/refinery/settings(.:format)                     refinery/admin/settings#index {:locale=>"en"}
                     admin_settings_fr GET    /refinery/settings(.:format)                        refinery/admin/settings#index {:locale=>"fr"}
                                       POST   /en/refinery/settings(.:format)                     refinery/admin/settings#create {:locale=>"en"}
                                       POST   /refinery/settings(.:format)                        refinery/admin/settings#create {:locale=>"fr"}
                  new_admin_setting_en GET    /en/refinery/settings/new(.:format)                 refinery/admin/settings#new {:locale=>"en"}
                  new_admin_setting_fr GET    /refinery/settings/new(.:format)                    refinery/admin/settings#new {:locale=>"fr"}
                 edit_admin_setting_en GET    /en/refinery/settings/:id/edit(.:format)            refinery/admin/settings#edit {:locale=>"en"}
                 edit_admin_setting_fr GET    /refinery/settings/:id/edit(.:format)               refinery/admin/settings#edit {:locale=>"fr"}
                      admin_setting_en PATCH  /en/refinery/settings/:id(.:format)                 refinery/admin/settings#update {:locale=>"en"}
                      admin_setting_fr PATCH  /refinery/settings/:id(.:format)                    refinery/admin/settings#update {:locale=>"fr"}
                                       PUT    /en/refinery/settings/:id(.:format)                 refinery/admin/settings#update {:locale=>"en"}
                                       PUT    /refinery/settings/:id(.:format)                    refinery/admin/settings#update {:locale=>"fr"}
                                       DELETE /en/refinery/settings/:id(.:format)                 refinery/admin/settings#destroy {:locale=>"en"}
                                       DELETE /refinery/settings/:id(.:format)                    refinery/admin/settings#destroy {:locale=>"fr"}
                               root_en GET    /en                                                 refinery/pages#home {:locale=>"en"}
                               root_fr GET    /                                                   refinery/pages#home {:locale=>"fr"}
                               page_en GET    /en/pages/:id(.:format)                             refinery/pages#show {:locale=>"en"}
                               page_fr GET    /pages/:id(.:format)                                refinery/pages#show {:locale=>"fr"}
          pages_admin_preview_pages_en POST   /en/refinery/pages/preview(.:format)                refinery/pages/admin/preview#show {:locale=>"en"}
          pages_admin_preview_pages_fr POST   /refinery/pages/preview(.:format)                   refinery/pages/admin/preview#show {:locale=>"fr"}
           pages_admin_preview_page_en PATCH  /en/refinery/pages/preview/*path(.:format)          refinery/pages/admin/preview#show {:locale=>"en"}
           pages_admin_preview_page_fr PATCH  /refinery/pages/preview/*path(.:format)             refinery/pages/admin/preview#show {:locale=>"fr"}
                    admin_edit_page_en GET    /en/refinery/pages/*path/edit(.:format)             refinery/admin/pages#edit {:locale=>"en"}
                    admin_edit_page_fr GET    /refinery/pages/*path/edit(.:format)                refinery/admin/pages#edit {:locale=>"fr"}
               admin_children_pages_en GET    /en/refinery/pages/*path/children(.:format)         refinery/admin/pages#children {:locale=>"en"}
               admin_children_pages_fr GET    /refinery/pages/*path/children(.:format)            refinery/admin/pages#children {:locale=>"fr"}
                  admin_update_page_en PATCH  /en/refinery/pages/*path(.:format)                  refinery/admin/pages#update {:locale=>"en"}
                  admin_update_page_fr PATCH  /refinery/pages/*path(.:format)                     refinery/admin/pages#update {:locale=>"fr"}
                  admin_delete_page_en DELETE /en/refinery/pages/*path(.:format)                  refinery/admin/pages#destroy {:locale=>"en"}
                  admin_delete_page_fr DELETE /refinery/pages/*path(.:format)                     refinery/admin/pages#destroy {:locale=>"fr"}
       update_positions_admin_pages_en POST   /en/refinery/pages/update_positions(.:format)       refinery/admin/pages#update_positions {:locale=>"en"}
       update_positions_admin_pages_fr POST   /refinery/pages/update_positions(.:format)          refinery/admin/pages#update_positions {:locale=>"fr"}
                        admin_pages_en GET    /en/refinery/pages(.:format)                        refinery/admin/pages#index {:locale=>"en"}
                        admin_pages_fr GET    /refinery/pages(.:format)                           refinery/admin/pages#index {:locale=>"fr"}
                                       POST   /en/refinery/pages(.:format)                        refinery/admin/pages#create {:locale=>"en"}
                                       POST   /refinery/pages(.:format)                           refinery/admin/pages#create {:locale=>"fr"}
                     new_admin_page_en GET    /en/refinery/pages/new(.:format)                    refinery/admin/pages#new {:locale=>"en"}
                     new_admin_page_fr GET    /refinery/pages/new(.:format)                       refinery/admin/pages#new {:locale=>"fr"}
                    edit_admin_page_en GET    /en/refinery/pages/:id/edit(.:format)               refinery/admin/pages#edit {:locale=>"en"}
                    edit_admin_page_fr GET    /refinery/pages/:id/edit(.:format)                  refinery/admin/pages#edit {:locale=>"fr"}
                         admin_page_en PATCH  /en/refinery/pages/:id(.:format)                    refinery/admin/pages#update {:locale=>"en"}
                         admin_page_fr PATCH  /refinery/pages/:id(.:format)                       refinery/admin/pages#update {:locale=>"fr"}
                                       PUT    /en/refinery/pages/:id(.:format)                    refinery/admin/pages#update {:locale=>"en"}
                                       PUT    /refinery/pages/:id(.:format)                       refinery/admin/pages#update {:locale=>"fr"}
                                       DELETE /en/refinery/pages/:id(.:format)                    refinery/admin/pages#destroy {:locale=>"en"}
                                       DELETE /refinery/pages/:id(.:format)                       refinery/admin/pages#destroy {:locale=>"fr"}
        link_to_admin_pages_dialogs_en GET    /en/refinery/pages_dialogs/link_to(.:format)        refinery/admin/pages_dialogs#link_to {:locale=>"en"}
        link_to_admin_pages_dialogs_fr GET    /refinery/pages_dialogs/link_to(.:format)           refinery/admin/pages_dialogs#link_to {:locale=>"fr"}
                   admin_page_parts_en POST   /en/refinery/page_parts(.:format)                   refinery/admin/page_parts#create {:locale=>"en"}
                   admin_page_parts_fr POST   /refinery/page_parts(.:format)                      refinery/admin/page_parts#create {:locale=>"fr"}
                new_admin_page_part_en GET    /en/refinery/page_parts/new(.:format)               refinery/admin/page_parts#new {:locale=>"en"}
                new_admin_page_part_fr GET    /refinery/page_parts/new(.:format)                  refinery/admin/page_parts#new {:locale=>"fr"}
                    admin_page_part_en DELETE /en/refinery/page_parts/:id(.:format)               refinery/admin/page_parts#destroy {:locale=>"en"}
                    admin_page_part_fr DELETE /refinery/page_parts/:id(.:format)                  refinery/admin/page_parts#destroy {:locale=>"fr"}
                                       GET    /en/system/resources/*dragonfly(.:format)           <Dragonfly::App name=:refinery_resources > {:locale=>"en"}
                                       GET    /system/resources/*dragonfly(.:format)              <Dragonfly::App name=:refinery_resources > {:locale=>"fr"}
             insert_admin_resources_en GET    /en/refinery/resources/insert(.:format)             refinery/admin/resources#insert {:locale=>"en"}
             insert_admin_resources_fr GET    /refinery/resources/insert(.:format)                refinery/admin/resources#insert {:locale=>"fr"}
                    admin_resources_en GET    /en/refinery/resources(.:format)                    refinery/admin/resources#index {:locale=>"en"}
                    admin_resources_fr GET    /refinery/resources(.:format)                       refinery/admin/resources#index {:locale=>"fr"}
                                       POST   /en/refinery/resources(.:format)                    refinery/admin/resources#create {:locale=>"en"}
                                       POST   /refinery/resources(.:format)                       refinery/admin/resources#create {:locale=>"fr"}
                 new_admin_resource_en GET    /en/refinery/resources/new(.:format)                refinery/admin/resources#new {:locale=>"en"}
                 new_admin_resource_fr GET    /refinery/resources/new(.:format)                   refinery/admin/resources#new {:locale=>"fr"}
                edit_admin_resource_en GET    /en/refinery/resources/:id/edit(.:format)           refinery/admin/resources#edit {:locale=>"en"}
                edit_admin_resource_fr GET    /refinery/resources/:id/edit(.:format)              refinery/admin/resources#edit {:locale=>"fr"}
                     admin_resource_en PATCH  /en/refinery/resources/:id(.:format)                refinery/admin/resources#update {:locale=>"en"}
                     admin_resource_fr PATCH  /refinery/resources/:id(.:format)                   refinery/admin/resources#update {:locale=>"fr"}
                                       PUT    /en/refinery/resources/:id(.:format)                refinery/admin/resources#update {:locale=>"en"}
                                       PUT    /refinery/resources/:id(.:format)                   refinery/admin/resources#update {:locale=>"fr"}
                                       DELETE /en/refinery/resources/:id(.:format)                refinery/admin/resources#destroy {:locale=>"en"}
                                       DELETE /refinery/resources/:id(.:format)                   refinery/admin/resources#destroy {:locale=>"fr"}
                                       GET    /en/system/images/*dragonfly(.:format)              <Dragonfly::App name=:refinery_images > {:locale=>"en"}
                                       GET    /system/images/*dragonfly(.:format)                 <Dragonfly::App name=:refinery_images > {:locale=>"fr"}
                insert_admin_images_en GET    /en/refinery/images/insert(.:format)                refinery/admin/images#insert {:locale=>"en"}
                insert_admin_images_fr GET    /refinery/images/insert(.:format)                   refinery/admin/images#insert {:locale=>"fr"}
                       admin_images_en GET    /en/refinery/images(.:format)                       refinery/admin/images#index {:locale=>"en"}
                       admin_images_fr GET    /refinery/images(.:format)                          refinery/admin/images#index {:locale=>"fr"}
                                       POST   /en/refinery/images(.:format)                       refinery/admin/images#create {:locale=>"en"}
                                       POST   /refinery/images(.:format)                          refinery/admin/images#create {:locale=>"fr"}
                    new_admin_image_en GET    /en/refinery/images/new(.:format)                   refinery/admin/images#new {:locale=>"en"}
                    new_admin_image_fr GET    /refinery/images/new(.:format)                      refinery/admin/images#new {:locale=>"fr"}
                   edit_admin_image_en GET    /en/refinery/images/:id/edit(.:format)              refinery/admin/images#edit {:locale=>"en"}
                   edit_admin_image_fr GET    /refinery/images/:id/edit(.:format)                 refinery/admin/images#edit {:locale=>"fr"}
                        admin_image_en PATCH  /en/refinery/images/:id(.:format)                   refinery/admin/images#update {:locale=>"en"}
                        admin_image_fr PATCH  /refinery/images/:id(.:format)                      refinery/admin/images#update {:locale=>"fr"}
                                       PUT    /en/refinery/images/:id(.:format)                   refinery/admin/images#update {:locale=>"en"}
                                       PUT    /refinery/images/:id(.:format)                      refinery/admin/images#update {:locale=>"fr"}
                                       DELETE /en/refinery/images/:id(.:format)                   refinery/admin/images#destroy {:locale=>"en"}
                                       DELETE /refinery/images/:id(.:format)                      refinery/admin/images#destroy {:locale=>"fr"}
                              login_en GET    /en/refinery/login(.:format)                        refinery/sessions#new {:locale=>"en"}
                              login_fr GET    /refinery/login(.:format)                           refinery/sessions#new {:locale=>"fr"}
                             logout_en GET    /en/refinery/logout(.:format)                       refinery/sessions#destroy {:locale=>"en"}
                             logout_fr GET    /refinery/logout(.:format)                          refinery/sessions#destroy {:locale=>"fr"}
                         new_signup_en GET    /en/refinery/users/register(.:format)               refinery/users#new {:locale=>"en"}
                         new_signup_fr GET    /refinery/users/register(.:format)                  refinery/users#new {:locale=>"fr"}
                             signup_en POST   /en/refinery/users/register(.:format)               refinery/users#create {:locale=>"en"}
                             signup_fr POST   /refinery/users/register(.:format)                  refinery/users#create {:locale=>"fr"}
          new_refinery_user_session_en GET    /en/refinery/users/login(.:format)                  refinery/sessions#new {:locale=>"en"}
          new_refinery_user_session_fr GET    /refinery/users/login(.:format)                     refinery/sessions#new {:locale=>"fr"}
              refinery_user_session_en POST   /en/refinery/users/login(.:format)                  refinery/sessions#create {:locale=>"en"}
              refinery_user_session_fr POST   /refinery/users/login(.:format)                     refinery/sessions#create {:locale=>"fr"}
      destroy_refinery_user_session_en DELETE /en/refinery/users/logout(.:format)                 refinery/sessions#destroy {:locale=>"en"}
      destroy_refinery_user_session_fr DELETE /refinery/users/logout(.:format)                    refinery/sessions#destroy {:locale=>"fr"}
             refinery_user_password_en POST   /en/refinery/users/password(.:format)               refinery/passwords#create {:locale=>"en"}
             refinery_user_password_fr POST   /refinery/users/password(.:format)                  refinery/passwords#create {:locale=>"fr"}
         new_refinery_user_password_en GET    /en/refinery/users/password/new(.:format)           refinery/passwords#new {:locale=>"en"}
         new_refinery_user_password_fr GET    /refinery/users/password/new(.:format)              refinery/passwords#new {:locale=>"fr"}
        edit_refinery_user_password_en GET    /en/refinery/users/password/edit(.:format)          refinery/passwords#edit {:locale=>"en"}
        edit_refinery_user_password_fr GET    /refinery/users/password/edit(.:format)             refinery/passwords#edit {:locale=>"fr"}
                                       PATCH  /en/refinery/users/password(.:format)               refinery/passwords#update {:locale=>"en"}
                                       PATCH  /refinery/users/password(.:format)                  refinery/passwords#update {:locale=>"fr"}
                                       PUT    /en/refinery/users/password(.:format)               refinery/passwords#update {:locale=>"en"}
                                       PUT    /refinery/users/password(.:format)                  refinery/passwords#update {:locale=>"fr"}
                        admin_users_en GET    /en/refinery/users(.:format)                        refinery/admin/users#index {:locale=>"en"}
                        admin_users_fr GET    /refinery/users(.:format)                           refinery/admin/users#index {:locale=>"fr"}
                                       POST   /en/refinery/users(.:format)                        refinery/admin/users#create {:locale=>"en"}
                                       POST   /refinery/users(.:format)                           refinery/admin/users#create {:locale=>"fr"}
                     new_admin_user_en GET    /en/refinery/users/new(.:format)                    refinery/admin/users#new {:locale=>"en"}
                     new_admin_user_fr GET    /refinery/users/new(.:format)                       refinery/admin/users#new {:locale=>"fr"}
                    edit_admin_user_en GET    /en/refinery/users/:id/edit(.:format)               refinery/admin/users#edit {:locale=>"en"}
                    edit_admin_user_fr GET    /refinery/users/:id/edit(.:format)                  refinery/admin/users#edit {:locale=>"fr"}
                         admin_user_en PATCH  /en/refinery/users/:id(.:format)                    refinery/admin/users#update {:locale=>"en"}
                         admin_user_fr PATCH  /refinery/users/:id(.:format)                       refinery/admin/users#update {:locale=>"fr"}
                                       PUT    /en/refinery/users/:id(.:format)                    refinery/admin/users#update {:locale=>"en"}
                                       PUT    /refinery/users/:id(.:format)                       refinery/admin/users#update {:locale=>"fr"}
                                       DELETE /en/refinery/users/:id(.:format)                    refinery/admin/users#destroy {:locale=>"en"}
                                       DELETE /refinery/users/:id(.:format)                       refinery/admin/users#destroy {:locale=>"fr"}
                            message_en GET    /en/refinery/message(.:format)                      refinery/fast#message {:locale=>"en"}
                            message_fr GET    /refinery/message(.:format)                         refinery/fast#message {:locale=>"fr"}
                         admin_root_en GET    /en/refinery(.:format)                              refinery/admin/core#index {:locale=>"en"}
                         admin_root_fr GET    /refinery(.:format)                                 refinery/admin/core#index {:locale=>"fr"}
                      admin_dialogs_en GET    /en/refinery/dialogs(.:format)                      refinery/admin/dialogs#index {:locale=>"en"}
                      admin_dialogs_fr GET    /refinery/dialogs(.:format)                         refinery/admin/dialogs#index {:locale=>"fr"}
                       admin_dialog_en GET    /en/refinery/dialogs/:id(.:format)                  refinery/admin/dialogs#show {:locale=>"en"}
                       admin_dialog_fr GET    /refinery/dialogs/:id(.:format)                     refinery/admin/dialogs#show {:locale=>"fr"}
     refinery_update_menu_positions_en POST   /en/refinery/update_menu_positions(.:format)        refinery/admin/core#update_plugin_positions {:locale=>"en"}
     refinery_update_menu_positions_fr POST   /refinery/update_menu_positions(.:format)           refinery/admin/core#update_plugin_positions {:locale=>"fr"}
                                       GET    /en/sitemap/xml(.:format)                           refinery/sitemap#index {:locale=>"en", :format=>"xml"}
                                       GET    /sitemap/xml(.:format)                              refinery/sitemap#index {:locale=>"fr", :format=>"xml"}
                                       GET    /en/refinery/*path(.:format)                        refinery/admin#error_404 {:locale=>"en"}
                                       GET    /refinery/*path(.:format)                           refinery/admin#error_404 {:locale=>"fr"}
                    marketable_page_en GET    /en/*path(.:format)                                 refinery/pages#show {:locale=>"en"}
                    marketable_page_fr GET    /*path(.:format)                                    refinery/pages#show {:locale=>"fr"}

@Danpiel
Copy link

Danpiel commented Jan 19, 2016

So is there working solution for translating engine routes for menu inside refinery ?

Got translated routes by route_translator, but refinery doesn't look for translations.

@bricesanchez
Copy link
Member Author

Sorry @Danpiel, i have no news for this feature.

But you could try this extension https://github.com/the-cocktail/refinerycms-translate-routes.

Let me know if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants