calebhearth / formulaic

Simplify form filling with Capybara
MIT License
552 stars 29 forks source link

Add support for additional I18n label scopes #71

Closed seanpdoyle closed 4 years ago

seanpdoyle commented 6 years ago

Prior to this commit, Formulaic assumed that all labels would be declared as part of simple_form configuration.

This commit adds support for extending the list of possible internationalization keys that Formulaic will look up.

For example, to lookup translations with existing Rails conventions, users can configure Formulaic like so:

Formulaic.configure do |config|
  config.translation_scopes << "helpers.label"
  config.translation_scopes << "activerecord.attributes"
end

This is a looser follow-up pull request to #67, which was denied and closed on the grounds of keeping this gem SimpleForm-only.

While this change opens the door for users to extend the gem, it sticks with SimpleForm defaults when un-configured.

seanpdoyle commented 4 years ago

Formulaic feels stable, and is focused on SimpleForm-generated output.

I've re-redirected the motivation and momentum behind these original changes, and have extracted the with_form gem.

Maybe there's a future where the two projects co-exist and share the same foundation. Until then, I think Formulaic works just fine for now.