From b848e8d346a3382624593c5b236edfd3c7aa7d9c Mon Sep 17 00:00:00 2001 From: kikito Date: Thu, 6 Aug 2015 15:53:31 +0200 Subject: [PATCH 1/8] migration adding nickname to user --- db/migrate/20150806135245_add_nickname_to_user.rb | 5 +++++ db/schema.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20150806135245_add_nickname_to_user.rb diff --git a/db/migrate/20150806135245_add_nickname_to_user.rb b/db/migrate/20150806135245_add_nickname_to_user.rb new file mode 100644 index 000000000..06bf046f9 --- /dev/null +++ b/db/migrate/20150806135245_add_nickname_to_user.rb @@ -0,0 +1,5 @@ +class AddNicknameToUser < ActiveRecord::Migration + def change + add_column :users, :nickname, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index f75de4884..70c3b6de1 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150806111435) do +ActiveRecord::Schema.define(version: 20150806135245) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -80,6 +80,7 @@ ActiveRecord::Schema.define(version: 20150806111435) do t.datetime "confirmed_at" t.datetime "confirmation_sent_at" t.string "unconfirmed_email" + t.string "nickname" end add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree From 23a21d14f2874813db8647dd1cad6b400570cf68 Mon Sep 17 00:00:00 2001 From: kikito Date: Thu, 6 Aug 2015 16:03:54 +0200 Subject: [PATCH 2/8] Migration for user.use_nickname --- .../20150806140048_add_use_nickname_to_users.rb | 5 +++++ db/schema.rb | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 db/migrate/20150806140048_add_use_nickname_to_users.rb diff --git a/db/migrate/20150806140048_add_use_nickname_to_users.rb b/db/migrate/20150806140048_add_use_nickname_to_users.rb new file mode 100644 index 000000000..032a791cd --- /dev/null +++ b/db/migrate/20150806140048_add_use_nickname_to_users.rb @@ -0,0 +1,5 @@ +class AddUseNicknameToUsers < ActiveRecord::Migration + def change + add_column :users, :use_nickname, :boolean, null: false, default: false + end +end diff --git a/db/schema.rb b/db/schema.rb index 70c3b6de1..e5f6f9c0a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150806135245) do +ActiveRecord::Schema.define(version: 20150806140048) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -62,18 +62,18 @@ ActiveRecord::Schema.define(version: 20150806135245) do add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree create_table "users", force: :cascade do |t| - t.string "email", default: "", null: false - t.string "encrypted_password", default: "", null: false + t.string "email", default: "", null: false + t.string "encrypted_password", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.integer "sign_in_count", default: 0, null: false + t.integer "sign_in_count", default: 0, null: false t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip" t.string "last_sign_in_ip" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "first_name" t.string "last_name" t.string "confirmation_token" @@ -81,6 +81,7 @@ ActiveRecord::Schema.define(version: 20150806135245) do t.datetime "confirmation_sent_at" t.string "unconfirmed_email" t.string "nickname" + t.boolean "use_nickname", default: false, null: false end add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree From 72c33330cf2f99d729fc815df2d7ef29a4ea564b Mon Sep 17 00:00:00 2001 From: kikito Date: Thu, 6 Aug 2015 16:53:18 +0200 Subject: [PATCH 3/8] Adds nickname-related validations & name to User --- app/models/user.rb | 6 +++++- spec/models/user_spec.rb | 46 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index da1c3ab8d..2c0c2756b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -2,7 +2,11 @@ class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable, :trackable, :validatable + validates :first_name, presence: true, unless: :use_nickname? + validates :last_name, presence: true, unless: :use_nickname? + validates :nickname, presence: true, if: :use_nickname? + def name - "#{first_name} #{last_name}" + use_nickname? ? nickname : "#{first_name} #{last_name}" end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 80c91c2d4..bad3ac182 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1,4 +1,50 @@ require 'rails_helper' describe User do + subject { build(:user) } + + it "is valid" do + expect(subject).to be_valid + end + + describe 'use_nickname' do + describe 'when true' do + before { subject.use_nickname = true } + + it "activates the validation of nickname" do + subject.nickname = nil + expect(subject).to_not be_valid + + subject.nickname = "dredd" + expect(subject).to be_valid + end + + it "calculates the name using the nickname" do + subject.nickname = "dredd" + expect(subject.name).to eq("dredd") + end + end + + describe 'when false' do + before { subject.use_nickname = false } + + it "activates the validation of first_name and last_name" do + subject.first_name = nil + subject.last_name = nil + expect(subject).to_not be_valid + + subject.first_name = "Joseph" + subject.last_name = "Dredd" + expect(subject).to be_valid + end + + it "calculates the name using first_name and last_name" do + subject.first_name = "Joseph" + subject.last_name = "Dredd" + expect(subject.name).to eq("Joseph Dredd") + end + end + end + + end From b1acbeb39d0997683efbcbc3495f9668aa6457a1 Mon Sep 17 00:00:00 2001 From: kikito Date: Thu, 6 Aug 2015 18:31:26 +0200 Subject: [PATCH 4/8] Adds i18n-tasks --- Gemfile | 1 + Gemfile.lock | 18 ++++++- config/i18n-tasks.yml | 106 ++++++++++++++++++++++++++++++++++++++++++ spec/i18n_spec.rb | 17 +++++++ 4 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 config/i18n-tasks.yml create mode 100644 spec/i18n_spec.rb diff --git a/Gemfile b/Gemfile index a0e612360..d96ea4e03 100644 --- a/Gemfile +++ b/Gemfile @@ -51,6 +51,7 @@ group :development, :test do gem 'launchy' gem 'quiet_assets' gem 'letter_opener_web', '~> 1.2.0' + gem 'i18n-tasks' end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index e1390d4ab..bc4dd1e27 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -94,6 +94,10 @@ GEM docile (1.1.5) domain_name (0.5.24) unf (>= 0.0.5, < 1.0.0) + easy_translate (0.5.0) + json + thread + thread_safe erubis (2.7.0) execjs (2.5.2) factory_girl (4.5.0) @@ -106,9 +110,18 @@ GEM sass (>= 3.3.0, < 3.5) globalid (0.3.5) activesupport (>= 4.1.0) + highline (1.7.3) http-cookie (1.0.2) domain_name (~> 0.5) i18n (0.7.0) + i18n-tasks (0.8.6) + activesupport + easy_translate (>= 0.5.0) + erubis + highline + i18n + term-ansicolor + terminal-table (>= 1.5.1) jbuilder (2.3.1) activesupport (>= 3.0.0, < 5) multi_json (~> 1.2) @@ -221,7 +234,9 @@ GEM sprockets (>= 2.8, < 4.0) term-ansicolor (1.3.2) tins (~> 1.0) + terminal-table (1.5.2) thor (0.19.1) + thread (0.2.2) thread_safe (0.3.5) tilt (1.4.1) tins (1.5.4) @@ -264,6 +279,7 @@ DEPENDENCIES devise factory_girl_rails foundation-rails + i18n-tasks jbuilder (~> 2.0) jquery-rails launchy @@ -283,4 +299,4 @@ DEPENDENCIES web-console (~> 2.0) BUNDLED WITH - 1.10.5 + 1.10.6 diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml new file mode 100644 index 000000000..f9b28d6a2 --- /dev/null +++ b/config/i18n-tasks.yml @@ -0,0 +1,106 @@ +# i18n-tasks finds and manages missing and unused translations: https://github.com/glebm/i18n-tasks + +# The "main" locale. +base_locale: en +## All available locales are inferred from the data by default. Alternatively, specify them explicitly: +# locales: [es, fr] +## Reporting locale, default: en. Available: en, ru. +# internal_locale: en + +# Read and write translations. +data: + ## Translations are read from the file system. Supported format: YAML, JSON. + ## Provide a custom adapter: + # adapter: I18n::Tasks::Data::FileSystem + + # Locale files or `File.find` patterns where translations are read from: + read: + ## Default: + # - config/locales/%{locale}.yml + ## More files: + # - config/locales/**/*.%{locale}.yml + ## Another gem (replace %#= with %=): + # - "<%#= %x[bundle show vagrant].chomp %>/templates/locales/%{locale}.yml" + - config/locales/%{locale}.yml + - config/locales/devise_views.%{locale}.yml + - config/locales/responders.%{locale}.yml + + # Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom: + # `i18n-tasks normalize -p` will force move the keys according to these rules + write: + ## For example, write devise and simple form keys to their respective files: + # - ['{devise, simple_form}.*', 'config/locales/\1.%{locale}.yml'] + ## Catch-all default: + # - config/locales/%{locale}.yml + + ## Specify the router (see Readme for details). Valid values: conservative_router, pattern_router, or a custom class. + # router: convervative_router + + yaml: + write: + # do not wrap lines at 80 characters + line_width: -1 + + ## Pretty-print JSON: + # json: + # write: + # indent: ' ' + # space: ' ' + # object_nl: "\n" + # array_nl: "\n" + +# Find translate calls +search: + ## Paths or `File.find` patterns to search in: + # paths: + # - app/ + + ## Root directories for relative keys resolution. + # relative_roots: + # - app/controllers + # - app/helpers + # - app/mailers + # - app/presenters + # - app/views + + ## Files or `File.fnmatch` patterns to exclude from search. Some files are always excluded regardless of this setting: + ## %w(*.jpg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less *.yml *.json) + exclude: + - app/assets/images + - app/assets/fonts + + ## Alternatively, the only files or `File.fnmatch patterns` to search in `paths`: + ## If specified, this settings takes priority over `exclude`, but `exclude` still applies. + # include: ["*.rb", "*.html.slim"] + + ## Default scanner finds t() and I18n.t() calls. + # scanner: I18n::Tasks::Scanners::PatternWithScopeScanner + +## Google Translate +# translation: +# # Get an API key and set billing info at https://code.google.com/apis/console to use Google Translate +# api_key: "AbC-dEf5" + +## Do not consider these keys missing: +# ignore_missing: +# - 'errors.messages.{accepted,blank,invalid,too_short,too_long}' +# - '{devise,simple_form}.*' + +## Consider these keys used: +# ignore_unused: +# - 'activerecord.attributes.*' +# - '{devise,kaminari,will_paginate}.*' +# - 'simple_form.{yes,no}' +# - 'simple_form.{placeholders,hints,labels}.*' +# - 'simple_form.{error_notification,required}.:' + +## Exclude these keys from the `i18n-tasks eq-base' report: +# ignore_eq_base: +# all: +# - common.ok +# fr,es: +# - common.brand + +## Ignore these keys completely: +# ignore: +# - kaminari.* diff --git a/spec/i18n_spec.rb b/spec/i18n_spec.rb new file mode 100644 index 000000000..5237b7240 --- /dev/null +++ b/spec/i18n_spec.rb @@ -0,0 +1,17 @@ +require 'i18n/tasks' + +RSpec.describe 'I18n' do + let(:i18n) { I18n::Tasks::BaseTask.new } + let(:missing_keys) { i18n.missing_keys } + let(:unused_keys) { i18n.unused_keys } + + it 'does not have missing keys' do + expect(missing_keys).to be_empty, + "Missing #{missing_keys.leaves.count} i18n keys, run `i18n-tasks missing' to show them" + end + + it 'does not have unused keys' do + expect(unused_keys).to be_empty, + "#{unused_keys.leaves.count} unused i18n keys, run `i18n-tasks unused' to show them" + end +end From 17fb44c70bb98e4b4ae3edf32f3bf5170342e2ec Mon Sep 17 00:00:00 2001 From: kikito Date: Thu, 6 Aug 2015 18:31:44 +0200 Subject: [PATCH 5/8] Moves i18n initialisation to application.rb --- config/application.rb | 5 +++++ config/initializers/i18n.rb | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 config/initializers/i18n.rb diff --git a/config/application.rb b/config/application.rb index 4055e45b6..cc325bc6c 100644 --- a/config/application.rb +++ b/config/application.rb @@ -20,6 +20,11 @@ module Participacion # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] config.i18n.default_locale = :es + config.i18n.available_locales = [:en, :es] + + # Add the new directories to the locales load path + config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')] + config.assets.paths << Rails.root.join("app", "assets", "fonts") # Do not swallow errors in after_commit/after_rollback callbacks. diff --git a/config/initializers/i18n.rb b/config/initializers/i18n.rb deleted file mode 100644 index 9aa77cd8b..000000000 --- a/config/initializers/i18n.rb +++ /dev/null @@ -1,6 +0,0 @@ -I18n.available_locales = [:en, :es] - -I18n.default_locale = :es - -# Add the new directories to the locales load path -I18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')] From 5710a5e1348d49b55929075b9c978a13bd08cb4d Mon Sep 17 00:00:00 2001 From: kikito Date: Thu, 6 Aug 2015 18:53:40 +0200 Subject: [PATCH 6/8] Adds missing i18n labels and removes unused ones --- config/locales/devise_views.es.yml | 4 ++-- config/locales/en.yml | 13 +++++++------ config/locales/es.yml | 13 ++++++++----- config/locales/responders.en.yml | 10 +++++----- config/locales/responders.es.yml | 10 +++++----- 5 files changed, 27 insertions(+), 23 deletions(-) diff --git a/config/locales/devise_views.es.yml b/config/locales/devise_views.es.yml index 1fa6fe880..e7adee639 100644 --- a/config/locales/devise_views.es.yml +++ b/config/locales/devise_views.es.yml @@ -55,7 +55,7 @@ es: new: title: "Registrarse" first_name_label: "Nombre" - last_name_label: "Apellido" + last_name_label: "Apellidos" email_label: "Email" password_label: "Contraseña" min_length: "(mínimo %{min} caracteres)" @@ -80,4 +80,4 @@ es: signin_with_provider: "Entrar con %{provider}" new_password: "¿Olvidaste tu contraseña?" new_confirmation: "¿No has recibido instrucciones para confirmar tu cuenta?" - new_unlock: "¿No has recibido instrucciones para desbloquear?" \ No newline at end of file + new_unlock: "¿No has recibido instrucciones para desbloquear?" diff --git a/config/locales/en.yml b/config/locales/en.yml index caf4bdbad..4907f14c0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -20,12 +20,9 @@ en: votes: votes comment: Comment comments: Comments - agree: I agree - disagree: I disagree - leave_comment: Comment form: one_error: error - plural_errors: errors + multiple_errors: errors not_saved: "prohibited this debate from being saved:" debate_title: Debate title title_instructions: "SBe clear and precise with the title, but make it informative" @@ -56,12 +53,16 @@ en: agree: I agree disagree: I disagree supports: Supports - notice_thanks: "Thanks for voting." - notice_already_registered: "Your vote is already registered." account: show: title: "My account" save_changes_submit: "Save changes" + change_credentials_link: "Change my credentials" + first_name_label: "First Name" + last_name_label: "Last Name" + recaptcha: + errors: + verification_failed: "The captcha verification failed" shared: tags_cloud: tags: Tags diff --git a/config/locales/es.yml b/config/locales/es.yml index 98f75bac7..f9f41995e 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -20,11 +20,9 @@ es: votes: votos comment: Comentario comments: Comentarios - agree: Estoy de acuerdo - disagree: No estoy de acuerdo form: one_error: error - plural_errors: errores + multiple_errors: errores not_saved: "impidieron guardar el debate:" debate_title: Título del debate title_instructions: "Sé claro y conciso a la hora de poner un título, pero recuerda que debe explicar bien tu idea, ¡es tu carta de entrada!" @@ -55,12 +53,17 @@ es: agree: Estoy de acuerdo disagree: No estoy de acuerdo supports: Apoyos - notice_thanks: "Gracias por votar." - notice_already_registered: "Tu voto ya ha sido registrado." account: show: title: "Mi cuenta" save_changes_submit: "Guardar cambios" + change_credentials_link: "Cambiar mi contraseña" + first_name_label: "Nombre" + last_name_label: "Apellidos" + recaptcha: + errors: + verification_failed: "La verificación por captcha falló" shared: tags_cloud: tags: Etiquetas + diff --git a/config/locales/responders.en.yml b/config/locales/responders.en.yml index cd0d93fe8..41c13a326 100644 --- a/config/locales/responders.en.yml +++ b/config/locales/responders.en.yml @@ -4,12 +4,12 @@ en: create: notice: '%{resource_name} was successfully created.' # alert: '%{resource_name} could not be created.' - update: - notice: '%{resource_name} was successfully updated.' + # update: + # notice: '%{resource_name} was successfully updated.' # alert: '%{resource_name} could not be updated.' - destroy: - notice: '%{resource_name} was successfully destroyed.' - alert: '%{resource_name} could not be destroyed.' + # destroy: + # notice: '%{resource_name} was successfully destroyed.' + # alert: '%{resource_name} could not be destroyed.' save_changes: notice: "Saved" diff --git a/config/locales/responders.es.yml b/config/locales/responders.es.yml index ad8012f9e..e11fbccbc 100644 --- a/config/locales/responders.es.yml +++ b/config/locales/responders.es.yml @@ -3,10 +3,10 @@ es: actions: create: notice: "%{resource_name} creado correctamente." - update: - notice: "%{resource_name} actualizado correctamente." - destroy: - notice: "%{resource_name} borrado correctamente." - alert: "%{resource_name} no ha podido ser borrado." + # update: + # notice: "%{resource_name} actualizado correctamente." + # destroy: + # notice: "%{resource_name} borrado correctamente." + # alert: "%{resource_name} no ha podido ser borrado." save_changes: notice: "Cambios guardados" From 17a741d838ea4489528aac7a59bad23f9fc623cc Mon Sep 17 00:00:00 2001 From: kikito Date: Thu, 6 Aug 2015 18:54:03 +0200 Subject: [PATCH 7/8] Adds nickname support in the registration form --- app/controllers/registrations_controller.rb | 4 ++-- app/views/devise/registrations/new.html.erb | 16 +++++++++++++++- config/locales/devise_views.en.yml | 2 ++ config/locales/devise_views.es.yml | 2 ++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index c0113de42..4991cdf70 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -15,7 +15,7 @@ class RegistrationsController < Devise::RegistrationsController private def sign_up_params - params.require(:user).permit(:first_name, :last_name, :email, :password, :password_confirmation) + params.require(:user).permit(:first_name, :last_name, :email, :password, :password_confirmation, :use_nickname, :nickname) end -end \ No newline at end of file +end diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index ebeae271b..c7cd839a2 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -21,6 +21,20 @@ +
+
+ <%= f.check_box :use_nickname %> + <%= t("devise_views.registrations.new.use_nickname_label") %> +
+
+ +
+
+ <%= f.label :nickname, t("devise_views.registrations.new.nickname_label") %> + <%= f.text_field :nickname, placeholder: t("devise_views.registrations.new.nickname_label") %> +
+
+
<%= f.label :email, t("devise_views.registrations.new.email_label") %> @@ -58,4 +72,4 @@
- \ No newline at end of file + diff --git a/config/locales/devise_views.en.yml b/config/locales/devise_views.en.yml index d07d487ad..7675a204e 100644 --- a/config/locales/devise_views.en.yml +++ b/config/locales/devise_views.en.yml @@ -56,6 +56,8 @@ en: title: "Sign up" first_name_label: "First name" last_name_label: "Last name" + nickname_label: "Nickname" + use_nickname_label: "Use nickname" email_label: "Email" password_label: "Password" min_length: "(%{min} characters minimum)" diff --git a/config/locales/devise_views.es.yml b/config/locales/devise_views.es.yml index e7adee639..63e3159e0 100644 --- a/config/locales/devise_views.es.yml +++ b/config/locales/devise_views.es.yml @@ -56,6 +56,8 @@ es: title: "Registrarse" first_name_label: "Nombre" last_name_label: "Apellidos" + nickname_label: "Pseudónimo" + use_nickname_label: "Usar pseudónimo" email_label: "Email" password_label: "Contraseña" min_length: "(mínimo %{min} caracteres)" From c4c764df380b30938587710b1a5e53005613a177 Mon Sep 17 00:00:00 2001 From: kikito Date: Thu, 6 Aug 2015 19:19:45 +0200 Subject: [PATCH 8/8] Adds nickname and use_nickname to "my profile" --- app/controllers/account_controller.rb | 2 +- app/views/account/show.html.erb | 9 +++++++++ config/locales/en.yml | 2 ++ config/locales/es.yml | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index fa626ece9..494068476 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -17,7 +17,7 @@ class AccountController < ApplicationController end def account_params - params.require(:account).permit(:first_name, :last_name) + params.require(:account).permit(:first_name, :last_name, :nickname, :use_nickname) end end diff --git a/app/views/account/show.html.erb b/app/views/account/show.html.erb index b3d45d967..da568a9b9 100644 --- a/app/views/account/show.html.erb +++ b/app/views/account/show.html.erb @@ -1,11 +1,20 @@

<%= t("account.show.title") %>

<%= form_for @account, as: :account, url: account_path do |f| %> + <%= f.label :first_name, t("account.show.first_name_label") %> <%= f.text_field :first_name %> <%= f.label :last_name, t("account.show.last_name_label") %> <%= f.text_field :last_name %> +
+ <%= f.check_box :use_nickname %> + <%= t("account.show.use_nickname_label") %> +
+ + <%= f.label :nickname, t("account.show.nickname_label") %> + <%= f.text_field :nickname %> + <%= f.submit t("account.show.save_changes_submit"), class: "button radius" %> <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 4907f14c0..f1496837b 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -60,6 +60,8 @@ en: change_credentials_link: "Change my credentials" first_name_label: "First Name" last_name_label: "Last Name" + use_nickname_label: "Use nickname" + nickname_label: "Nickname" recaptcha: errors: verification_failed: "The captcha verification failed" diff --git a/config/locales/es.yml b/config/locales/es.yml index f9f41995e..995d92fb8 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -60,6 +60,8 @@ es: change_credentials_link: "Cambiar mi contraseña" first_name_label: "Nombre" last_name_label: "Apellidos" + use_nickname_label: "Usar pseudónimo" + nickname_label: "Pseudónimo" recaptcha: errors: verification_failed: "La verificación por captcha falló"