Skip to content

Commit

Permalink
Add missing translations on edit/new/show actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrluis authored and nickcharlton committed Mar 10, 2017
1 parent e801fbe commit ca38d69
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/views/administrate/application/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ It displays a header, and renders the `_form` partial to do the heavy lifting.
[1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Form
%>

<% content_for(:title) { "Edit #{page.page_title}" } %>
<% content_for(:title) { "#{t("administrate.actions.edit")} #{page.page_title}" } %>

<header class="header">
<h1 class="header__heading"><%= content_for(:title) %></h1>
<div class="header__actions">
<%= link_to(
"Show #{page.page_title}",
"#{t("administrate.actions.show")} #{page.page_title}",
[namespace, page.resource],
class: "button",
) if valid_action? :show %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/administrate/application/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ It renders the `_table` partial to display details about the resources.
<h1 class="header__heading" id="page-title"><%= content_for(:title) %></h1>
<div class="header__actions">
<%= link_to(
"New #{page.resource_name.titleize.downcase}",
"#{t("administrate.actions.new")} #{page.resource_name.titleize.downcase}",
[:new, namespace, page.resource_name],
class: "button",
) if valid_action? :new %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/administrate/application/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ to do the heavy lifting.
[1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Form
%>

<% content_for(:title) { "New #{page.resource_name.titleize}" } %>
<% content_for(:title) { "#{t("administrate.actions.new")} #{page.resource_name.titleize}" } %>

<header class="header">
<h1 class="header__heading"><%= content_for(:title) %></h1>
<div class="header__actions">
<%= link_to 'Back', :back, class: "button" %>
<%= link_to t("administrate.actions.back"), :back, class: "button" %>
</div>
</header>

Expand Down
4 changes: 2 additions & 2 deletions app/views/administrate/application/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ as well as a link to its edit page.
[1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Show
%>

<% content_for(:title) { page.page_title } %>
<% content_for(:title) { "#{t("administrate.actions.show")} #{page.page_title}" } %>

<header class="header">
<h1 class="header__heading"><%= content_for(:title) %></h1>
<div class="header__actions">
<%= link_to(
"Edit",
"#{t("administrate.actions.edit")} #{page.page_title}",
[:edit, namespace, page.resource],
class: "button",
) if valid_action? :edit %>
Expand Down

0 comments on commit ca38d69

Please sign in to comment.