Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport 'Extraction of i18n strings in system panel' to v0.27 #11951

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions decidim-system/app/views/decidim/system/admins/show.html.erb
Expand Up @@ -4,6 +4,6 @@

<div class="actions">
<hr>
<%= link_to "Edit", ["edit", @admin] %>
<%= link_to "Destroy", @admin, method: :delete, class: "alert button", data: { confirm: "Are you sure you want to do this?" } %>
<%= link_to t(".edit"), ["edit", @admin] %>
<%= link_to t(".destroy"), @admin, method: :delete, class: "alert button", data: { confirm: "Are you sure you want to do this?" } %>
</div>
@@ -1,12 +1,12 @@
<h2>Change your password</h2>
<h2> <%= link_to t(".change_your_password") %></h2>

<%= decidim_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>
<%= f.hidden_field :reset_password_token %>

<div class="field">
<% if @minimum_password_length %>
<em>(<%= @minimum_password_length %> characters minimum)</em><br>
<em><%= t(".minimum_characters", minimum: @minimum_password_length) %></em><br>
<% end %>
<%= f.password_field :password, autofocus: true, autocomplete: "off" %>
</div>
Expand Down
@@ -1,4 +1,4 @@
<h2>Forgot your password?</h2>
<h2><%= link_to t(".forgot_your_password") %></h2>

<%= decidim_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>
Expand All @@ -8,7 +8,7 @@
</div>

<div class="actions">
<%= f.submit "Send me reset password instructions" %>
<%= f.submit t(".send_me_reset_password_instructions") %>
</div>
<% end %>

Expand Down
@@ -1,4 +1,4 @@
<h2>Log in</h2>
<h2><%= t("log_in", scope: "decidim.system.devise.shared.links") %></h2>

<%= decidim_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="field">
Expand All @@ -16,7 +16,7 @@
<% end -%>

<div class="actions">
<%= f.submit "Log in" %>
<%= f.submit t("log_in", scope: "decidim.system.devise.shared.links") %>
</div>
<% end %>

Expand Down
@@ -1,25 +1,19 @@
<%- if controller_name != 'sessions' %>
<%= link_to "Log in", new_session_path(resource_name) %><br>
<%= link_to t(".log_in"), new_session_path(resource_name) %>
<% end -%>

<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
<%= link_to "Sign up", new_registration_path(resource_name) %><br>
<%= link_to t(".sign_up"), new_registration_path(resource_name) %>
<% end -%>

<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br>
<%= link_to t(".forgot_your_password?"), new_password_path(resource_name) %>
<% end -%>

<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br>
<%= link_to t(".did_not_receive_confirmation_instructions?"), new_confirmation_path(resource_name) %>
<% end -%>

<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br>
<% end -%>

<%- if devise_mapping.omniauthable? %>
<%- current_organization.enabled_omniauth_providers.keys.each do |provider| %>
<%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %><br>
<% end -%>
<%= link_to t(".did_not_receive_unlock_instructions?"), new_unlock_path(resource_name) %>
<% end -%>
Expand Up @@ -35,9 +35,9 @@
<table>
<thead>
<tr>
<td>Locale</td>
<td>Enabled <%= f.error_for(:available_locales) %></td>
<td>Default? <%= f.error_for(:default_locale) %></td>
<th><%= t(".locale") %></th>
<th><%= t(".enabled") %> <%= f.error_for(:available_locales) %></th>
<th><%= t(".default") %><%= f.error_for(:default_locale) %></th>
</tr>
</thead>
<tbody>
Expand Down
Expand Up @@ -3,6 +3,6 @@
<%= current_admin.email %>
</div>
<div class="sign-out">
<%= link_to("Logout", destroy_admin_session_path, :method => :delete) %>
<%= link_to(t(".logout"), destroy_admin_session_path, :method => :delete) %>
</div>
</div>
Expand Up @@ -8,7 +8,7 @@
<body class="login">
<div class="login-form-wrapper">
<div class="login-form">
<h1>Decidim</h1>
<h1><%= t("decidim", scope: "decidim.system.titles") %></h1>
<%= render "decidim/system/shared/notices" %>
<div class="login-form-inner">
<%= yield %>
Expand Down
31 changes: 29 additions & 2 deletions decidim-system/config/locales/en.yml
Expand Up @@ -55,6 +55,9 @@ en:
new:
create: Create
title: New admin
show:
destroy: Destroy
edit: Edit
update:
error: There was a problem updating this admin.
success: Admin successfully updated
Expand All @@ -65,6 +68,21 @@ en:
placeholders:
content: Please add meaningful content to the %{page} static page on the admin dashboard.
title: Default title for %{page}
devise:
passwords:
edit:
change_your_password: Change your password
minimum_characters: "(%{minimum} characters minimum)"
new:
forgot_your_password: Forgot your password
send_me_reset_password_instructions: Send me reset password instructions
shared:
links:
did_not_receive_confirmation_instructions?: Did not receive confirmation instructions?
did_not_receive_unlock_instructions?: Did not receive unlock instructions?
forgot_your_password?: Forgot your password?
log_in: Log in
sign_up: Sign up
menu:
admins: Admins
dashboard: Dashboard
Expand Down Expand Up @@ -145,8 +163,11 @@ en:
index:
title: Organizations
new:
reference_prefix_hint: The reference prefix is used to uniquely identify resources across all organization
secondary_hosts_hint: Enter each one of them in a new line
default: Default?
enabled: Enabled
locale: Locale
reference_prefix_hint: The reference prefix is used to uniquely identify resources across all organization.
secondary_hosts_hint: Enter each one of them in a new line.
title: New organization
omniauth_settings:
decidim:
Expand Down Expand Up @@ -187,3 +208,9 @@ en:
our_getting_started_guide: our getting started guide
titles:
dashboard: Dashboard
decidim: Decidim
layouts:
decidim:
system:
login_items:
logout: Logout