damoiser / qr-bills

Ruby Gem to generate QR-Bills for Swiss payments
BSD 3-Clause "New" or "Revised" License
21 stars 15 forks source link

Use I18n.with_locale to not overwrite I18n.locale during html generation #20

Closed danielpuglisi closed 2 years ago

danielpuglisi commented 2 years ago

Hey @damoiser

Thanks for creating this gem. I'm currently implementing it and noticed that https://github.com/damoiser/qr-bills/blob/master/lib/qr-bills/qr-html-layout.rb#L11 overwrites the I18n.locale.

This PR fixes that by using I18n.with_locale by only using the provided locale params[:bill_params][:language] within the wrapped code.

This should also fix #16

damoiser commented 2 years ago

thanks for the PR @danielpuglisi ! will check your PRs in the following days and revert to you in case will have feedback

damoiser commented 2 years ago

thx - it looks good!