You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then my label ends up being "Status eq" rather than "Status equal". This is due to not using the translation support in Ransack. This could be an issue for SimpleForm rather than Ransack. But since the existing integration between the two systems has Ransack modifying itself for SimpleForm rather than the other way around it seemed perhaps start with an issue here.
I do have a monkey-patch to fix it up but it involves monkey-patching a SimpleForm method so not sure it is a suitable strategy. If you don't see another strategy from the Ransack side I can try opening a ticket with SimpleForm to see if they would be willing to modify their method.
My monkey-patch:
moduleSimpleFormRansackTranslate# Adapted from:# https://github.com/activerecord-hackery/ransack/blob/master/lib/ransack/helpers/form_builder.rb#L35-L37## Decorating:# https://github.com/heartcombo/simple_form/blob/master/lib/simple_form/components/labels.rb#L75-L83## NOTE: Decorated method is protected so higher risk of breakage on upgradedeflabel_translationifobject.respond_to?:translateobject.translatereflection_or_attribute_name.to_s,include_associations: trueelsesuperendendendSimpleForm::Inputs::Base.prependSimpleFormRansackTranslate
This related to PR #341 where support for SimpleForm was added.
The text was updated successfully, but these errors were encountered:
When using Ransack with SimpleForm the translation is not working. If I do:
Then my label ends up being "Status eq" rather than "Status equal". This is due to not using the translation support in Ransack. This could be an issue for SimpleForm rather than Ransack. But since the existing integration between the two systems has Ransack modifying itself for SimpleForm rather than the other way around it seemed perhaps start with an issue here.
I do have a monkey-patch to fix it up but it involves monkey-patching a SimpleForm method so not sure it is a suitable strategy. If you don't see another strategy from the Ransack side I can try opening a ticket with SimpleForm to see if they would be willing to modify their method.
My monkey-patch:
This related to PR #341 where support for SimpleForm was added.
The text was updated successfully, but these errors were encountered: