Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Replace hardcoded strings in Devise views with translation keys
Gabriel Z. Lovisone5af0ce1fd4f
diff --git a/core/config/locales/en.yml b/core/config/locales/en.ymlindex e83bd361e8..108956ffe5 100644--- a/core/config/locales/en.yml+++ b/core/config/locales/en.yml@@ -915,6 +915,8 @@ en:destroy: Destroydetails: Detailsdevelopers: Developers+ didn_t_receive_confirmation_instructions: Didn't receive confirmation instructions?+ didn_t_receive_unlock_instructions: Didn't receive unlock instructions?digital:digital_delivery: Digital Deliverydigital_assets: Digital assets@@ -1245,6 +1247,9 @@ en:metadata: Metadatamin: Minminimal_amount: Minimal Amount+ minimum_password_length:+ one: "(%{count} character minimum)"+ other: "(%{count} characters minimum)"missing_return_authorization: Missing Return Authorization for %{item_name}.month: Monthmore: More@@ -1915,6 +1920,7 @@ en:show_store_selector:long: Display the Store selector in the main nav bar of Storefront and allow users to change Store and Currencyshort: Show Store selector+ sign_in_with_provider: Sign in with %{provider}sign_out: Sign outsign_up: Sign Upsite_name: Site namediff --git a/storefront/app/views/devise/passwords/edit.html.erb b/storefront/app/views/devise/passwords/edit.html.erbindex b2235fbd9a..90f0fbdda5 100644--- a/storefront/app/views/devise/passwords/edit.html.erb+++ b/storefront/app/views/devise/passwords/edit.html.erb@@ -6,7 +6,7 @@<div class="flex flex-col mb-4"><%= f.label :password, Spree.t(:password) %><% if @minimum_password_length %>- <em>(<%= @minimum_password_length %> characters minimum)</em>+ <em><%= Spree.t(:minimum_password_length, count: @minimum_password_length) %></em><% end %><%= f.password_field :password, autofocus: true, autocomplete: "new-password", class: 'text-input', required: true %></div>diff --git a/storefront/app/views/devise/registrations/new.html.erb b/storefront/app/views/devise/registrations/new.html.erbindex 2d4258cba4..f61664e162 100755--- a/storefront/app/views/devise/registrations/new.html.erb+++ b/storefront/app/views/devise/registrations/new.html.erb@@ -10,7 +10,7 @@<div class="flex flex-col mb-4"><%= f.label :password, Spree.t(:password) %><% if @minimum_password_length %>- <em>(<%= @minimum_password_length %> characters minimum)</em>+ <em><%= Spree.t(:minimum_password_length, count: @minimum_password_length) %></em><% end %><%= f.password_field :password, autocomplete: "new-password", class: 'text-input', required: true %></div>diff --git a/storefront/app/views/devise/shared/_links.html.erb b/storefront/app/views/devise/shared/_links.html.erbindex c8ce383cc0..5758bf734a 100644--- a/storefront/app/views/devise/shared/_links.html.erb+++ b/storefront/app/views/devise/shared/_links.html.erb@@ -9,14 +9,14 @@<%= link_to Spree.t(:forgot_password), new_password_path(resource_name) %><% end %><%- if devise_mapping.confirmable? && controller_name != 'user_confirmations' %>- <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %>+ <%= link_to Spree.t(:didn_t_receive_confirmation_instructions), new_confirmation_path(resource_name) %><% end %><%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'user_unlocks' %>- <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %>+ <%= link_to Spree.t(:didn_t_receive_unlock_instructions), new_unlock_path(resource_name) %><% end %><%- if devise_mapping.omniauthable? %><%- resource_class.omniauth_providers.each do |provider| %>- <%= button_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), data: { turbo: false } %>+ <%= button_to Spree.t(:sign_in_with_provider, provider: OmniAuth::Utils.camelize(provider)), omniauth_authorize_path(resource_name, provider), data: { turbo: false } %><% end %><% end %></div>