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

[RFC] Add per-store configurable locales #2627

Closed
wants to merge 4 commits into from

Conversation

jhawthorn
Copy link
Contributor

@jhawthorn jhawthorn commented Mar 13, 2018

Built on top of #2626 and #2559

This attempts to replicate the feature added to solidus_i18n in solidusio/solidus_i18n#95. I think this is a feature which we might as well support by default, and I think the implementation is simplified by implementing it in core rather than an extension.

This is just the last two commits here (but relies on features from my other open i18n-related PRs)

  • Add available_locales to Stores f57c315b4ad01fb6a45978afdc6a433d237284b3
  • Add available_locales selection to backend e2e536163182ecc8c3e40e8024aef258d45e29a2
  • The final step would be adding a locale selector to frontend which uses this data (which I intend to do in a future PR)

cc @DanielePalombo @kennyadsl

@jhawthorn jhawthorn added the WIP label Mar 13, 2018
@@ -0,0 +1,7 @@
class AddAvailableLocalesToStores < ActiveRecord::Migration[5.1]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing magic comment # frozen_string_literal: true.

@@ -0,0 +1,7 @@
class AddAvailableLocalesToStores < ActiveRecord::Migration[5.1]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing magic comment # frozen_string_literal: true.

@@ -0,0 +1,7 @@
class AddAvailableLocalesToStores < ActiveRecord::Migration[5.1]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing magic comment # frozen_string_literal: true.

John Hawthorn and others added 4 commits April 4, 2018 16:02
This allows storing an array of available locales per-Store. An empty
array, or nil, is interpreted as allowing all locales on a store. This
is the default.
@jhawthorn jhawthorn force-pushed the per_store_locales branch from ac3139d to 06772db Compare April 4, 2018 23:03
@jhawthorn jhawthorn closed this Apr 4, 2018
@jhawthorn jhawthorn reopened this Apr 4, 2018
@jhawthorn jhawthorn closed this Apr 4, 2018
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

Successfully merging this pull request may close these issues.

2 participants