Skip to content

Commit

Permalink
Add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
bbpennel committed Apr 3, 2023
1 parent 4d3effa commit 9ed2e4e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/views/hyrax/admin/workflows/_tabs.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<ul class="nav nav-tabs" id="my_nav" role="list">
<li<%= ' class="nav-item"'.html_safe if @response.viewing_under_review? %>>
<%= link_to 'Under Review',
<%= link_to t('.under_review'),
hyrax.admin_workflows_path(state: 'under-review'), class: "nav-link#{' active' if @response.viewing_under_review?}" %>
</li>
<li<%= ' class="nav-item"'.html_safe if !@response.viewing_under_review? %>>
<%= link_to 'Published', hyrax.admin_workflows_path(state: 'published'), class: "nav-link#{' active' if !@response.viewing_under_review?}" %>
<%= link_to t('.published'), hyrax.admin_workflows_path(state: 'published'), class: "nav-link#{' active' if !@response.viewing_under_review?}" %>
</li>
</ul>
18 changes: 12 additions & 6 deletions app/views/hyrax/admin/workflows/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
<%= render 'tabs' %>
<div class="card">
<div class="card-header">
<span class="count-display"><%= I18n.t('hyrax.my.count.works.you_manage', total_count: @response.total_count).html_safe %></span>
<span class="count-display">
<% if @response.viewing_under_review? %>
<%= I18n.t('hyrax.admin.workflows.index.works_under_review', total_count: @response.total_count).html_safe %>
<% else %>
<%= I18n.t('hyrax.admin.workflows.index.works_published', total_count: @response.total_count).html_safe %>
<% end %>
</span>
</div>
<div class="card-body">
<div class="row">
Expand All @@ -29,14 +35,14 @@
<%= render 'hyrax/my/search_form' %>
</div>
</div>
<h2 class="sr-only"><%= t('hyrax.my.count.works.works_listing') %></h2>
<h2 class="sr-only"><%= t('.works_listing') %></h2>
<table class="table table-sm table-striped works-list">
<thead>
<tr>
<th width="40%">Work</th>
<th width="20%">Depositor</th>
<th width="20%">Submission Date</th>
<th width="20%">Status</th>
<th width="40%"><%= t(".heading.work") %></th>
<th width="20%"><%= t(".heading.depositor") %></th>
<th width="20%"><%= t(".heading.submission_date") %></th>
<th width="20%"><%= t(".heading.status") %></th>
</tr>
</thead>
<tbody>
Expand Down
14 changes: 11 additions & 3 deletions config/locales/hyrax.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,17 @@ en:
workflows:
index:
header: Review Submissions
tabs:
published: Published
under_review: Under Review
heading:
work: Work
depositor: Depositor
submission_date: Submission Date
status: status
works_published: "<strong>%{total_count} works</strong> published"
works_under_review: "<strong>%{total_count} works</strong> under review"
works_listing: Works listing
tabs:
published: Published
under_review: Under Review
api:
accepted:
default: Your request has been accepted for processing, but processing is not complete. See job for more info.
Expand Down

0 comments on commit 9ed2e4e

Please sign in to comment.