]> git.openstreetmap.org Git - rails.git/commit
Use i18n for submit button for issue comments
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 12 Jun 2019 14:25:19 +0000 (16:25 +0200)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 12 Jun 2019 17:24:06 +0000 (19:24 +0200)
commit085412f6240cf675b3d8fecbace22edf577962b3
tree7bcc5e5e39d3ce98796eddd682488709e29c7fda
parent5450bade1aeb301158a2f5a1de215c7940019b83
Use i18n for submit button for issue comments

Normally when an en-GB.yml translation is missing, rails falls back to en.yml. But when
using the submit helpers, if the en-GB translation is missing, rails knows how to create
a fallback like 'Create {model_name}' without touching the en.yml file. This string might
then be different from what the test expects, e.g. 'Add Comment'.

So it's important to set the language headers, to avoid phantomjs from picking up your desktop
preferences in this specific case.
app/views/issues/_comments.html.erb
config/locales/en.yml
test/application_system_test_case.rb
test/system/issues_test.rb