refinerycms
refinerycms copied to clipboard
Refinery engine generator only creates pages for one language
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?
Hmm.. that's a tricky one.. I would suppose that the link URL should namespace itself under the locale's path.
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 ?
Can someone help me to understand the issue? I'd like to work on this one.
Thanks!!
You could try adding this to the generated db/seeds.rb
:
I18n.locale = Refinery::I18n.default_locale