From 1d09cfcb18d589ea494bf5223f2eb9e0a773d7c6 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 12 Jun 2019 16:32:52 +0200 Subject: [PATCH 1/1] Use built-in form submit translation keys for oauth client applications --- app/views/oauth_clients/edit.html.erb | 2 +- app/views/oauth_clients/new.html.erb | 4 ++-- config/locales/en.yml | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/views/oauth_clients/edit.html.erb b/app/views/oauth_clients/edit.html.erb index d6211778b..d696baae3 100644 --- a/app/views/oauth_clients/edit.html.erb +++ b/app/views/oauth_clients/edit.html.erb @@ -4,5 +4,5 @@ <%= form_for @client_application, :url => oauth_client_path(@client_application.user.display_name, @client_application), :html => { :method => :put } do |f| %> <%= render :partial => "form", :locals => { :f => f } %> - <%= submit_tag t ".submit" %> + <%= f.submit %> <% end %> diff --git a/app/views/oauth_clients/new.html.erb b/app/views/oauth_clients/new.html.erb index 0a49f48f8..d9cc05d02 100644 --- a/app/views/oauth_clients/new.html.erb +++ b/app/views/oauth_clients/new.html.erb @@ -3,8 +3,8 @@ <% end %>
- <%= form_for :client_application, :url => { :action => :create } do |f| %> + <%= form_for @client_application, :url => { :action => :create } do |f| %> <%= render :partial => "form", :locals => { :f => f } %> - <%= submit_tag t(".submit") %> + <%= f.submit %> <% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 71abe1efe..c835df967 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -16,6 +16,9 @@ en: create: Add Comment message: create: Send + client_application: + create: Register + update: Edit redaction: create: Create redaction update: Save redaction @@ -1891,10 +1894,8 @@ en: oauth_clients: new: title: "Register a new application" - submit: "Register" edit: title: "Edit your application" - submit: "Edit" show: title: "OAuth details for %{app_name}" key: "Consumer Key:" -- 2.43.2