From ed4e55992e671cb3c9281cd10a4f5c26e7f1c02d Mon Sep 17 00:00:00 2001 From: Vasily Polovnyov Date: Wed, 24 Jun 2015 16:58:53 +0300 Subject: [PATCH] rip off config/locales/helpers, use plain strings instead It's not worth it, i18n for `submit` tag is dumb and nonflexible: * https://github.com/rails/rails/blob/v4.2.2/actionview/lib/action_view/helpers/form_helper.rb#L1883-L1884 It relies on a model, so you can't define it depending on the current view. Such behavior is very fragile, see: https://github.com/fs/rails-base/pull/287/files#r33035107 --- app/views/users/passwords/edit.html.slim | 2 +- app/views/users/registrations/edit.html.slim | 2 +- app/views/users/registrations/new.html.slim | 2 +- config/locales/helpers.en.yml | 6 ------ 4 files changed, 3 insertions(+), 9 deletions(-) delete mode 100644 config/locales/helpers.en.yml diff --git a/app/views/users/passwords/edit.html.slim b/app/views/users/passwords/edit.html.slim index 504fd5bf..998ca2aa 100644 --- a/app/views/users/passwords/edit.html.slim +++ b/app/views/users/passwords/edit.html.slim @@ -17,7 +17,7 @@ = f.input :password_confirmation, required: true .form-actions - = f.button :submit + = f.button :submit, 'Update password' .medium-6.columns.end = render 'users/shared/links' diff --git a/app/views/users/registrations/edit.html.slim b/app/views/users/registrations/edit.html.slim index e6ea221d..6ce4d0c2 100644 --- a/app/views/users/registrations/edit.html.slim +++ b/app/views/users/registrations/edit.html.slim @@ -21,7 +21,7 @@ required: true .form-actions - = f.button :submit + = f.button :submit, 'Update' .medium-6.columns.end h6 diff --git a/app/views/users/registrations/new.html.slim b/app/views/users/registrations/new.html.slim index 911e0cf4..5b49bed2 100644 --- a/app/views/users/registrations/new.html.slim +++ b/app/views/users/registrations/new.html.slim @@ -22,7 +22,7 @@ = f.input :password_confirmation, required: true .form-actions - = f.button :submit + = f.button :submit, 'Sign up' .medium-6.columns.end = render 'users/shared/links' diff --git a/config/locales/helpers.en.yml b/config/locales/helpers.en.yml deleted file mode 100644 index 00cad84d..00000000 --- a/config/locales/helpers.en.yml +++ /dev/null @@ -1,6 +0,0 @@ -en: - helpers: - submit: - user: - create: 'Sign up' - update: 'Update'