Skip to content

Commit

Permalink
Adding i18n terms to remaining dashboard items
Browse files Browse the repository at this point in the history
  • Loading branch information
awead committed Jun 9, 2016
1 parent 4fe2a7c commit 61e81ec
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 38 deletions.
2 changes: 1 addition & 1 deletion app/views/dashboard/_index_partials/_contents.html.erb
Expand Up @@ -19,7 +19,7 @@

<div class="panel panel-default" id="proxy_management">
<div class="panel-heading dashboard-panel">
<h3 class="panel-title ">Manage Proxies</h3>
<h3 class="panel-title "><%= t("sufia.dashboard.manage_proxies") %></h3>
</div>
<div class="panel-body">
<%= render partial: 'dashboard/_index_partials/proxy_rights' %>
Expand Down
6 changes: 3 additions & 3 deletions app/views/dashboard/_index_partials/_proxy_rights.html.erb
@@ -1,13 +1,13 @@
<div class="clearfix proxy-rights">

<div class="col-xs-6 proxy-search">
<h3 class="panel-title">Authorize Proxy</h3>
<label class="sr-only" for="user">Proxy User</label>
<h3 class="panel-title"><%= t("sufia.dashboard.authorize_proxies") %></h3>
<label class="sr-only" for="user"><%= t("sufia.dashboard.proxy_user") %></label>
<%= hidden_field_tag :user, nil, data: { grantor: current_user.to_param } %>
</div>

<div class="col-xs-6">
<h3 class="panel-title">Current Proxies</h3>
<h3 class="panel-title"><%= t("sufia.dashboard.current_proxies") %></h3>
<table class="table table-condensed table-striped" id="authorizedProxies">
<tbody>
<% @user.can_receive_deposits_from.each do |depositor| %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/dashboard/_index_partials/_transfers.html.erb
@@ -1,6 +1,6 @@
<div class="row">
<div class="col-xs-12 col-sm-9">
<h4>Sent</h4>
<h4><%= t("sufia.dashboard.transfers_sent") %></h4>
</div>
<div class="col-xs-12 col-sm-3 transfer_link">
<%= link_to sufia.dashboard_works_path do %>
Expand All @@ -10,5 +10,5 @@
</div>
<%= render_sent_transfers %>

<h4>Received</h4>
<h4><%= t("sufia.dashboard.transfers_received") %></h4>
<%= render_received_transfers %>
14 changes: 7 additions & 7 deletions app/views/my/_collection_action_menu.html.erb
@@ -1,24 +1,24 @@
<div class="btn-group">
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%= id %>" aria-haspopup="true">
<span class="sr-only">Press to </span>
Select an action <span class="caret" aria-hidden="true"></span>
<span class="sr-only"><%= t("sufia.dashboard.my.sr.press_to") %> </span>
<%= t("sufia.dashboard.my.action.select") %> <span class="caret" aria-hidden="true"></span>
</button>
<ul role="menu" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%= id %>">
<li role="menuitem" tabindex="-1">
<%= link_to edit_collection_path(id),
class: 'itemicon itemedit',
title: 'Edit Collection' do %>
<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i> Edit Collection
title: t("sufia.dashboard.my.action.edit_collection") do %>
<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i> <%= t("sufia.dashboard.my.action.edit_collection") %>
<% end %>
</li>
<li role="menuitem" tabindex="-1">
<%= link_to collection_path(id),
class: 'itemicon itemtrash',
title: 'Delete Collection',
title: t("sufia.dashboard.my.action.delete_collection"),
method: :delete,
data: {
confirm: "Deleting a collection from #{application_name} is permanent. Click OK to delete this collection from #{application_name}, or Cancel to cancel this operation" } do %>
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i> Delete Collection
confirm: t("sufia.dashboard.my.action.collection_confirmation", application_name: application_name) } do %>
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i> <%= t("sufia.dashboard.my.action.delete_collection") %>
<% end %>
</li>
</ul>
Expand Down
10 changes: 5 additions & 5 deletions app/views/my/_index_partials/_default_group.html.erb
@@ -1,13 +1,13 @@
<table class="table table-striped">
<caption class="sr-only">Listing of items you have deposited in <%= application_name %></caption>
<caption class="sr-only"><%= t("sufia.dashboard.my.sr.listing") %> <%= application_name %></caption>
<% unless params[:display_type] == 'list' %>
<thead>
<tr>
<th><label for="check_all" class="sr-only"><%= t("sufia.dashboard.my.sr.check_all_label") %></label><%= render_check_all %></th>
<th>Title</th>
<th class="sorts-dash"><i id="<%= CatalogController.uploaded_field %>" class="<%=params[:sort]== "#{CatalogController.uploaded_field} desc" ? 'caret' : params[:sort]== "#{CatalogController.uploaded_field} asc" ? 'caret up' : ''%>"></i>Date Uploaded</th>
<th>Visibility</th>
<th>Action</th>
<th><%= t("sufia.dashboard.my.heading.title") %></th>
<th class="sorts-dash"><i id="<%= CatalogController.uploaded_field %>" class="<%=params[:sort]== "#{CatalogController.uploaded_field} desc" ? 'caret' : params[:sort]== "#{CatalogController.uploaded_field} asc" ? 'caret up' : ''%>"></i><%= t("sufia.dashboard.my.heading.date_uploaded") %></th>
<th><%= t("sufia.dashboard.my.heading.visibility") %></th>
<th><%= t("sufia.dashboard.my.heading.action") %></th>
</tr>
</thead>
<% end %>
Expand Down
12 changes: 6 additions & 6 deletions app/views/my/_index_partials/_list_collections.html.erb
Expand Up @@ -31,15 +31,15 @@
<tr id="detail_<%= id %>"> <!-- collection detail"> -->
<td colspan="6">
<dl class="expanded-details row">
<dt class="col-xs-3 col-lg-2">Description:</dt>
<dt class="col-xs-3 col-lg-2"><%= t("sufia.dashboard.my.collection_list.description") %></dt>
<dd class="col-xs-9 col-lg-10"> <%= document.description%></dd>
<dt class="col-xs-3 col-lg-2">Edit Access:</dt>
<dt class="col-xs-3 col-lg-2"><%= t("sufia.dashboard.my.collection_list.edit_access") %></dt>
<dd class="col-xs-9 col-lg-10">
<% if document.edit_groups.present? %>
Groups: <%= document.edit_groups.join(', ') %>
<br/>
<% end %>
Users: <%= document.edit_people.join(', ') %>
<%= t("sufia.dashboard.my.collection_list.groups") %> <%= document.edit_groups.join(', ') %>
<br/>
<% end %>
<%= t("sufia.dashboard.my.collection_list.users") %> <%= document.edit_people.join(', ') %>
</dd>
</dl>
</td>
Expand Down
17 changes: 10 additions & 7 deletions app/views/my/_work_action_menu.html.erb
@@ -1,8 +1,8 @@
<div class="btn-group">

<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%= document.id %>" aria-haspopup="true">
<span class="sr-only">Press to </span>
Select an action
<span class="sr-only"><%= t("sufia.dashboard.my.sr.press_to") %> </span>
<%= t("sufia.dashboard.my.action.select") %>
<span class="caret" aria-hidden="true"></span>
</button>

Expand All @@ -11,14 +11,17 @@
<li role="menuitem" tabindex="-1">
<%= link_to(edit_curation_concerns_generic_work_path(document.id)) do %>
<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i>
<span> Edit Work </span>
<span> <%= t("sufia.dashboard.my.action.edit_work") %> </span>
<% end %>
</li>

<li role="menuitem" tabindex="-1">
<%= link_to(curation_concerns_generic_work_path(document.id), method: :delete, data: { confirm: "Deleting a work from #{application_name} is permanent. Click OK to delete this work from #{application_name}, or Cancel to cancel this operation" }) do %>
<%= link_to curation_concerns_generic_work_path(document.id),
method: :delete,
data: {
confirm: t("sufia.dashboard.my.action.work_confirmation", application_name: application_name) } do %>
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
<span> Delete Work </span>
<span> <%= t("sufia.dashboard.my.action.delete_work") %> </span>
<% end %>
</li>

Expand All @@ -28,9 +31,9 @@
<% end %>
</li>
<li role="menuitem" tabindex="-1">
<%= link_to(sufia.new_generic_work_transfer_path(document.id), class: 'itemicon itemtransfer', title: 'Transfer Ownership of Work') do %>
<%= link_to(sufia.new_generic_work_transfer_path(document.id), class: 'itemicon itemtransfer', title: t("sufia.dashboard.my.action.transfer")) do %>
<i aria-hidden="true" class='glyphicon glyphicon-transfer'></i>
<span> Transfer Ownership of Work </span>
<span> <%= t("sufia.dashboard.my.action.transfer") %> </span>
<% end %>
</li>
</ul>
Expand Down
6 changes: 3 additions & 3 deletions app/views/transfers/index.html.erb
@@ -1,7 +1,7 @@
<h1>Transfer of Ownership</h1>
<h1><%= t("sufia.dashboard.transfer_of_ownership") %></h1>

<h2>Sent</h2>
<h2><%= t("sufia.dashboard.transfers_sent") %></h2>
<%= render_sent_transfers %>

<h2>Received</h2>
<h2><%= t("sufia.dashboard.transfers_received") %></h2>
<%= render_received_transfers %>
36 changes: 32 additions & 4 deletions config/locales/sufia.en.yml
Expand Up @@ -104,8 +104,14 @@ en:
user_notifications: "User Notifications"
no_notifications: "User has no notifications"
additional_notifications: "See all notifications"
manage_proxies: "Manage Proxies"
proxy_activity: "Proxy Activity"
authorize_proxies: "Authorize Proxies"
current_proxies: "Current Proxies"
proxy_user: "Proxy User"
transfer_of_ownership: "Transfer of Ownership"
transfers_sent: "Sent"
transfers_received: "Received"
transfer_works_link: "Select works to transfer"
no_transfer_requests: "You haven't received any work transfer requests"
no_transfers: "You haven't transferred any work"
Expand All @@ -129,10 +135,32 @@ en:
shared: "Filter your shares"
works: "Filter your works"
sr:
show_label: "Display all details of"
detail_label: "Display summary details of"
batch_checkbox: "Check to add to a collection or edit list"
check_all_label: "Select all files to be added to a collection or edited"
show_label: "Display all details of"
detail_label: "Display summary details of"
batch_checkbox: "Check to add to a collection or edit list"
check_all_label: "Select all files to be added to a collection or edited"
listing: "Listing of items you have deposited in"
press_to: "Press to"
heading:
title: "Title"
date_uploaded: "Date Uploaded"
visibility: "Visibility"
action: "Action"
collection_list:
description: "Description:"
edit_access: "Edit Access:"
groups: "Groups:"
users: "Users:"
action:
select: "Select an action"
edit_collection: "Edit Collection"
delete_collection: "Delete Collection"
edit_work: "Edit Work"
delete_work: "Delete Work"
transfer: "Transfer Ownership of Work"
work_confirmation: "Deleting a work from %{application_name} is permanent. Click OK to delete this work from %{application_name}, or Cancel to cancel this operation"
collection_confirmation: "Deleting a collection from %{application_name} is permanent. Click OK to delete this collection from %{application_name}, or Cancel to cancel this operation"

messages:
success:
single: "has been saved."
Expand Down

0 comments on commit 61e81ec

Please sign in to comment.