mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 19:27:52 +01:00
Add some missing translations and limit locale selection only to available locales (#313)
This commit is contained in:
committed by
GitHub
parent
d1f04ef2ed
commit
d47c70f576
@@ -18,6 +18,7 @@ class Tenant < ApplicationRecord
|
|||||||
|
|
||||||
validates :site_name, presence: true
|
validates :site_name, presence: true
|
||||||
validates :subdomain, presence: true, uniqueness: true
|
validates :subdomain, presence: true, uniqueness: true
|
||||||
|
validates :locale, inclusion: { in: I18n.available_locales.map(&:to_s) }
|
||||||
|
|
||||||
accepts_nested_attributes_for :tenant_setting, update_only: true
|
accepts_nested_attributes_for :tenant_setting, update_only: true
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,13 @@
|
|||||||
<%= f.email_field :email, autocomplete: "email", class: "form-control" %>
|
<%= f.email_field :email, autocomplete: "email", class: "form-control" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
||||||
|
<div>
|
||||||
|
<b><%= t('common.forms.auth.waiting_confirmation', email: resource.unconfirmed_email) %></b>
|
||||||
|
<br /><br />
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label :notifications_enabled, t('common.forms.auth.notifications_enabled') %>
|
<%= f.label :notifications_enabled, t('common.forms.auth.notifications_enabled') %>
|
||||||
|
|
||||||
@@ -22,15 +29,11 @@
|
|||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
|
||||||
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label :password, t('common.forms.auth.password') %>
|
<%= f.label :password, t('common.forms.auth.password') %>
|
||||||
<%= f.password_field :password, autocomplete: "new-password", class: "form-control" %>
|
<%= f.password_field :password, autocomplete: "new-password", class: "form-control" %>
|
||||||
<small id="passwordEditHelp" class="form-text text-muted">
|
<small id="passwordEditHelp" class="form-text text-muted">
|
||||||
leave blank if you don't want to change your password
|
<%= t('common.forms.auth.password_leave_blank_help') %>
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -43,7 +46,7 @@
|
|||||||
<%= f.label :current_password, t('common.forms.auth.current_password') %>
|
<%= f.label :current_password, t('common.forms.auth.current_password') %>
|
||||||
<%= f.password_field :current_password, autocomplete: "current-password", class: "form-control" %>
|
<%= f.password_field :current_password, autocomplete: "current-password", class: "form-control" %>
|
||||||
<small id="currentPasswordHelp" class="form-text text-muted">
|
<small id="currentPasswordHelp" class="form-text text-muted">
|
||||||
we need your current password to confirm your changes
|
<%= t('common.forms.auth.current_password_required_help') %>
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ en:
|
|||||||
current_password: 'Current password'
|
current_password: 'Current password'
|
||||||
notifications_enabled: 'Notifications enabled'
|
notifications_enabled: 'Notifications enabled'
|
||||||
notifications_enabled_help: "if disabled, you won't receive any notification"
|
notifications_enabled_help: "if disabled, you won't receive any notification"
|
||||||
|
waiting_confirmation: 'Currently waiting confirmation for %{email}'
|
||||||
|
password_leave_blank_help: "leave blank if you don't want to change your password"
|
||||||
|
current_password_required_help: 'we need your current password to confirm your changes'
|
||||||
remember_me: 'Remember me'
|
remember_me: 'Remember me'
|
||||||
log_in: 'Log in'
|
log_in: 'Log in'
|
||||||
sign_up: 'Sign up'
|
sign_up: 'Sign up'
|
||||||
|
|||||||
Reference in New Issue
Block a user