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.locale as default language instead of "it" #21

Closed danielpuglisi closed 2 years ago

danielpuglisi commented 2 years ago

The gem has "it" hardcoded for params[:bill_params][:language] when generating a new qr params hash.

Not a big issue, but this PR switches from the hardcoded "it" to the dynamic I18n.locale. This way one can rely on the current I18n.locale (e.g. in a request cycle) instead of having to add an extra line to adjust the language.

damoiser commented 2 years ago

thx as well, yes I set :it as default locale as sort of default attribute, but your proposal to adjust it dynamically is indeed better!

damoiser commented 2 years ago

FYI @danielpuglisi - just published the locale fix in the v1.0.7