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

Support for i18n :html subkeys in help text #455

Merged
merged 3 commits into from
Mar 21, 2018
Merged

Support for i18n :html subkeys in help text #455

merged 3 commits into from
Mar 21, 2018

Conversation

jsaraiva
Copy link
Contributor

This adds support for help text using :html subkey instead of the "_html" suffix to the attribute name.
Both are supported by i18n, actually: http://guides.rubyonrails.org/i18n.html#using-safe-html-translations .

This code just makes an additional check for an html subkey. If none is found, it continues in the regular fashion.

Copy link
Contributor

@lcreid lcreid left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! This is a nice first contribution! Everything looks fine to me. I'll ask @mattbrictson to take a quick look at this and we should be able to merge it soon.

@jsaraiva
Copy link
Contributor Author

Hi, @lcreid !
You're very welcome. :-)

It is possible that the change could benefit from some small refactoring, but I opted to keep it as simple as possible, for now.

@lcreid
Copy link
Contributor

lcreid commented Mar 20, 2018

@jsaraiva that was the right call. At the moment, we're just trying to make this work for Bootstrap 4, with minimal code changes. Thanks again!

@mattbrictson
Copy link
Contributor

@jsaraiva thanks, and congrats on your first contribution to the project! I will merge this in.

@mattbrictson mattbrictson merged commit b88d0dc into bootstrap-ruby:master Mar 21, 2018
xire28 pushed a commit to xire28/bootstrap_form that referenced this pull request Mar 30, 2018
* Support for i18n :html subkeys in help text
* added info to changelog, as per bot instructions
* Tweak changelog
lcreid pushed a commit to lcreid/rails-bootstrap-forms that referenced this pull request Jun 4, 2018
* Support for i18n :html subkeys in help text
* added info to changelog, as per bot instructions
* Tweak changelog
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.

None yet

3 participants