refinerycms icon indicating copy to clipboard operation
refinerycms copied to clipboard

Refinery engine generator only creates pages for one language

Open awagener opened this issue 10 years ago • 4 comments

Pretty sure this is because it's doing a find_or_create on the unique link_url:

https://github.com/refinery/refinerycms/blob/master/core/lib/generators/refinery/engine/templates/db/seeds.rb.erb#L11

I'm happy to fix it (I'm assuming it should be fixed, as it loops through the frontend languages), but what should the default behaviour be?

awagener avatar Sep 10 '14 07:09 awagener

Hmm.. that's a tricky one.. I would suppose that the link URL should namespace itself under the locale's path.

parndt avatar Sep 10 '14 13:09 parndt

Issue is not only for one language... Seed is only in EN language for me, but I have set :cs locale as default...

  config.default_locale = :cs

  config.current_locale = :cs

  config.default_frontend_locale = :cs

  config.frontend_locales = [:cs, :en, :de, :ru]

Should it be as separated issue?

As a workaround I would add in seed.rb a row e.g.:

I18n.locale = Refinery::I18n.default_locale

@parndt ?

prokopsimek avatar Dec 12 '14 10:12 prokopsimek

Can someone help me to understand the issue? I'd like to work on this one.

rubynho avatar Nov 17 '19 22:11 rubynho

Thanks!! You could try adding this to the generated db/seeds.rb:

I18n.locale = Refinery::I18n.default_locale

parndt avatar Nov 18 '19 22:11 parndt