[openstreetmap/openstreetmap-website] Adjust submit labels to use built-in i18n handling (#2257)

Andy Allan notifications at github.com
Wed Jun 12 17:51:16 UTC 2019

I noticed this while working on the diary entries, so now I'm rolling it out more widely. In many cases we've been avoiding using the built-in translation keys for submit buttons, and hard-coding translations based on the file the form is in (rather than based on the model for the form). This has made some form refactoring harder than it needs to be, as well as just being a bit of a waste of time. Sometimes this has been done just because of copying other places where it was done first.

There's ample opportunity to improve these labels in the future - too many saves and not enough updates in my opinion! But I'll leave the strings mostly unchanged for now.

@nikerabbit this PR contains a few translation key renames:

* `diary_entries.show.save_button` -> `helpers.submit.diary_comment.create`
* `messages.new.send_button` -> `helpers.submit.message.create`
* `oauth_clients.new.submit` -> `helpers.submit.client_application.create`
* `oauth_clients.edit.submit` -> `helpers.submit.client_application.update`
* `redactions.new.submit` -> `helpers.submit.redaction.create`
* `redactions.edit.submit` -> `helpers.submit.redaction.update`
* `traces.new.upload_button` -> `helpers.submit.trace.create`
* `traces.edit.save_button` -> `helpers.submit.trace.update`
* `user_blocks.new.submit` -> `helpers.submit.user_block.create`
* `user_blocks.edit.submit` -> `helpers.submit.user_block.update`
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * Use built-in form sumbit translation keys for user blocks
  * Use built-in form sumbit translation keys for redactions
  * Use built-in form sumbit translation keys for messages
  * Use built-in form sumbit translation keys for diary comments
  * Use i18n for submit button for issue comments
  * Use built-in form submit translation keys for oauth client applications
  * Use built-in form submit translation keys for traces

-- File Changes --

    M app/views/diary_entries/show.html.erb (4)
    M app/views/issues/_comments.html.erb (2)
    M app/views/messages/new.html.erb (2)
    M app/views/oauth_clients/edit.html.erb (2)
    M app/views/oauth_clients/new.html.erb (4)
    M app/views/redactions/edit.html.erb (2)
    M app/views/redactions/new.html.erb (2)
    M app/views/traces/edit.html.erb (2)
    M app/views/traces/new.html.erb (2)
    M app/views/user_blocks/edit.html.erb (2)
    M app/views/user_blocks/new.html.erb (2)
    M config/locales/en.yml (28)
    M test/application_system_test_case.rb (6)
    M test/system/issues_test.rb (4)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190612/41467594/attachment-0001.html>

More information about the rails-dev mailing list