Configurable translatable fields#1
Open
harmonymjb wants to merge 24 commits intokennyadsl/solidus-3from
Open
Conversation
benjaminwil
approved these changes
Sep 28, 2021
jarednorman
approved these changes
Sep 28, 2021
…adsl/solidus-3 Update solidus_globalize to use Solidus 3.0
…-for-dev/support_forked_solidus_frontend Update to use forked solidus_frontend when needed
Update gemspec to allow Ruby 3.x
The override allows the product name search term to be retained after search results are shown. This was not working because the search param is for the product translations and did not match the field name.
…t-name-search-retention Fix product name search retention
Reinitialize the extension with the new defaults of solidus_dev_support, and update gemspec to allow Solidus 4.
This is a blind conversion, only needed to remove that tech from the stack. Also the content has been moved to the main JS file, which is the one being loaded by applications.
…adsl/allow-solidus-4 Make the extension compatible with Solidus 4
d7a8427 to
a175167
Compare
added 4 commits
January 21, 2025 13:56
This is no longer available for any supported solidus version
After ransack v4, we need to declare these methods on the Translation model if they are ransackable associations. activeadmin/activeadmin#8033 (comment)
Routing translations is not directly supported by solidus globalize and the upstream dependency doesn not support rails 7. In order to test against newer versions of solidus, these tests are changed to use the query param instead.
This gem was only utilized in the test sandbox, but users are expected to configure locale routing themselves. Since this gem does not support rails 7. svenfuchs/routing-filter#87
aa26654 to
ab8abd1
Compare
Globalize 6 provides an override for serialize that only suits the deprecated signature. This override is applied only if Rails is >= 7.1 and Globalize is < 7 Since globalize 6 does not support Rails 7.2, no handling of Globalize 6 with Rails 7.2 is needed. The override here is from Globalize v7.0.0 and will be modified in the next commit.
The Globalize 6 override that exists in the ancestor chain requires this value to be passed from :type.
Previously, translatable fields were hard-coded in the various decorators. With this change, they can be overridden with configuration in the client application using similar configuration patterns to other solidus extensions.
ab8abd1 to
6327114
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This small change allows application configuration of translatable fields on Spree models decorated with globalize.
I've tested this in our client app as follows, which removes
:namefrom translatable fields forSpree::OptionValue.I was unable to bundle and test this repo, as there are dependency version issues.
P.S.
Not sure of where would be the best place to PR this as we use a non-main branch (
kennyadsl/solidus-3)