ruby-i18n / i18n

Internationalization (i18n) library for Ruby
MIT License
976 stars 408 forks source link

Simplify the "Translation missing" message when default is an empty Array #662

Closed amatsuda closed 1 year ago

amatsuda commented 1 year ago

654 changed the "Tranlation missing" message to show all the potential keys when an Array was given for :default, but this enhancement is not necessary if the :default Array was an empty Array.

Giving an empty Array for :default is actually done inside Action View translation helper: https://github.com/rails/rails/blob/254f1d8ded07dfd73462b40d6aaa8c19032259f6/actionview/lib/action_view/helpers/translation_helper.rb#L125 and so this causes this build error there in Rails repo. https://buildkite.com/rails/rails/builds/96893#01887b39-855d-4c78-a6ac-0c90889025fd

kbrock commented 1 year ago

This seemingly innocuous change is causing us issues as well. Our build went red the minute 1.14 was released.

Please reach out if you have any questions

Thanks for the great Gem

radar commented 1 year ago

@kbrock please test this PR against your code and let me know if that solved your issue. I’ll merge to master now.

radar commented 1 year ago

I have released i18n 1.14.1 with this change included.