Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Commit

Permalink
Update UI labels.
Browse files Browse the repository at this point in the history
Mainly changing work to resource, updating visibility to access, sundry other tweaks.

Updates test to reflect the changes to the UI labels.
  • Loading branch information
ntallman authored and Michael Tribone committed Mar 20, 2019
1 parent 2ffb849 commit 7c54613
Show file tree
Hide file tree
Showing 31 changed files with 121 additions and 121 deletions.
82 changes: 41 additions & 41 deletions config/locales/cho.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,85 +11,85 @@ en:
form:
metadata: "Basic Metadata"
workflow: "Workflow"
visibility: "Visibility"
visibility: "Access Level"
file_selection: "File Selection"
field_label:
# For fields that are not in the data dictionary
collection_type: "Collection Type"
work_type: "Work Type"
work_type: "Resource Type"
workflow: "Workflow"
default: "Publish immediately"
default: "Publish Immediately"
mediated: "Mediated"
visibility: "Visibility"
public: "Public"
authenticated: "Authenticated"
private: "Private"
visibility: "Access Level"
public: "Public Access"
authenticated: "PSU Access"
private: "Restricted Access"
title: "Title"
required: "required"
member_of_collections: "Collections"
role: "Role"
header_links:
create_collection: "Create Collection"
create_submission: "Create Work"
create_submission: "Create Resource"
data_dictionary: "Data Dictionary"
select: "Select Resources"
work:
csv_create: "Import New Works"
csv_update: "Update Works"
csv_create: "Import New Resources"
csv_update: "Update Resources"
agent:
list: "List Agents"
csv_create: "Import New Agents"
csv_update: "Update Existing Agents"
manage: "Manage"
work:
new:
heading: "New %{type} Work"
submit: "Create Work"
no_type: "Unable to find work type"
heading: "New %{type} Resource"
submit: "Create Resource"
no_type: "Unable to find resource type"
back_link: "Back"
edit:
heading: "Editing Work"
submit: "Update Work"
heading: "Editing Resource"
submit: "Update Resource"
show_link: "Show"
delete_link: "Delete Work"
delete_link: "Delete Resource"
delete_confirmation: "Are you sure?"
error: "%{count} prohibited this work from being saved:"
error: "%{count} prohibited this resource from being saved:"
show:
files_heading: "Files"
files_heading: "Parts"
collection:
members:
title: "Title"
date_created: "Date Created"
heading: "Items in this Collection"
heading: "Resources in this Collection"
archival_collection:
edit:
delete_link: "Delete Archival collection"
delete_link: "Delete Archival Collection"
library_collection:
edit:
delete_link: "Delete Library collection"
delete_link: "Delete Library Collection"
curated_collection:
edit:
delete_link: "Delete Curated collection"
delete_link: "Delete Curated Collection"
agent:
index:
heading: "Agents"
download: "Download Agents"
new: "Create New Agent"
show: "Show"
edit: "Edit"
destroy: "Destroy"
destroy: "Delete"
confirm: "Are you sure you want to delete this agent?"
given_name: "Given Name"
surname: "Surname"
csv:
agent:
create:
heading: 'CSV Agent Import'
description: 'Import a csv that creates new agents.'
description: 'Import a CSV that creates new agents.'
submit: 'Preview Import'
update:
heading: 'CSV Agent Import'
description: 'Import a csv that updates existing agents.'
description: 'Import a CSV that updates existing agents.'
submit: 'Preview Import'
dry_run:
heading: 'Agent Import Preview'
Expand All @@ -106,17 +106,17 @@ en:
work:
create:
heading: 'CSV Import'
description: 'Import a csv that creates new works.'
description: 'Import a CSV that creates new resources.'
submit: 'Preview Import'
update:
heading: 'CSV Import'
description: 'Import a csv that updates existing works.'
description: 'Import a CSV that updates existing resources.'
submit: 'Preview Import'
dry_run:
heading: 'Import Preview'
create_description: 'The following new works will be created'
update_description: 'The following works will be updated'
error_count_message: "Total Number of Works with Errors %{count}"
create_description: 'The following new resources will be created'
update_description: 'The following resources will be updated'
error_count_message: "Total Number of Resources with Errors %{count}"
preview_table:
title: "Title"
status: "Status"
Expand All @@ -131,29 +131,29 @@ en:
header: "Failed Import"
success:
header: "Successful Import"
new_import: "Perform Additional Import"
new_import: "Perform Another Import"
metrics:
benchmark_heading: "User,System,Total,Real"
collection:
title: "Test Collection with Many Works"
description: "An example collection used for benchmarking with many works not containing files."
work_title: "Sample Work %{count}"
title: "Test Collection with Many Resources Without Files"
description: "An example collection used for benchmarking with many resources not containing files."
work_title: "Sample Resource %{count}"
work:
title: "Test Collection with Works Containing Files"
description: "An example collection used for benchmarking with many works that each contain a 50 MB file."
work_title: "Sample Work with File %{count}"
title: "Test Collection with Many Resources With Files"
description: "An example collection used for benchmarking with many resources that each contain a 50 MB file."
work_title: "Sample Resource with File %{count}"
batch:
select:
heading: "Select Resources"
message: "Search for items to delete from the repository"
message: "Search for resources to delete."
delete:
heading: "Delete Confirmation"
message: "The following resources will be deleted"
message: "The following resources will be deleted:"
continue: "Continue"
success: "You have successfully deleted the following items: %{list}"
success: "You have successfully deleted the following: %{list}"
cancel: "Cancel"
submit: "Delete Selected Resources"
title: "%{title} (%{count} items)"
title: "%{title} (%{count})"
stale_object_error: ": the %{object_name} object you tried to save is stale. Please reload the form to see the latest data."
validation:
creator:
Expand Down
2 changes: 1 addition & 1 deletion spec/blacklight/catalog_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
expect(page).to have_link('Searching Collection')
end
within('div.blacklight-work_type_ssim') do
expect(page).to have_selector('h3', text: 'Work Type')
expect(page).to have_selector('h3', text: 'Resource Type')
expect(page).to have_link('Generic')
end
within('div.blacklight-collection_type_ssim') do
Expand Down
2 changes: 1 addition & 1 deletion spec/cho/agent/import/update_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
it 'successfully updates the works' do
visit(csv_agents_update_path)
expect(page).to have_selector('h1', text: 'CSV Agent Import')
expect(page).to have_content('Import a csv that updates existing agents')
expect(page).to have_content('Import a CSV that updates existing agents')
attach_file('csv_file_file', csv_file.path)
click_button('Preview Import')
expect(page).to have_selector('h1', text: 'Import Preview')
Expand Down
2 changes: 1 addition & 1 deletion spec/cho/batch/delete_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
delete :destroy, params: { delete: { ids: [work.to_param, collection.to_param] } }
}.to change { metadata_adapter.query_service.find_all.to_a.count }.by(-2)
expect(flash[:success]).to eq(
I18n.t('cho.batch.delete.success', list: 'Sample Generic Work (0 items), Archival Collection (0 items)')
I18n.t('cho.batch.delete.success', list: 'Sample Generic Work (0), Archival Collection (0)')
)
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/cho/batch/delete_presenter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

let(:work) { build(:work) }

its(:confirmation_title) { is_expected.to eq('Sample Generic Work (0 items)') }
its(:confirmation_title) { is_expected.to eq('Sample Generic Work (0)') }
end

describe '#children' do
Expand Down
4 changes: 2 additions & 2 deletions spec/cho/batch/select_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
find("input[id='delete_ids_#{work.id}']").click
click_button('Delete Selected Resources')
expect(page).to have_content('The following resources will be deleted')
expect(page).to have_selector('h2', text: 'Resource to delete (3 items)')
expect(page).to have_selector('h2', text: 'Resource to delete (3)')
click_button('Continue')
expect(page).to have_content('You have successfully deleted the following items: Resource to delete ')
expect(page).to have_content('You have successfully deleted the following: Resource to delete (3)')
end
end
end
4 changes: 2 additions & 2 deletions spec/cho/collection/archival_collections/edit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
context 'when deleting the collection' do
it 'removes it from the system' do
visit(edit_archival_collection_path(resource))
click_button('Delete Archival collection')
click_button('Delete Archival Collection')
expect(page).to have_content('The following resources will be deleted')
expect(page).to have_content(resource.title.first)
click_button('Continue')
expect(page).to have_content('You have successfully deleted the following items')
expect(page).to have_content('You have successfully deleted the following')
expect(page).to have_content(resource.title.first)
expect(Collection::Archival.all.count).to eq(0)
expect(adapter.index_adapter.query_service.find_all.count).to eq(0)
Expand Down
2 changes: 1 addition & 1 deletion spec/cho/collection/archival_collections/new_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
fill_in('archival_collection[subtitle]', with: 'new subtitle')
fill_in('archival_collection[description]', with: 'Description of new collection')
choose('Mediated')
choose('Authenticated')
choose('PSU Access')
click_button('Create Archival collection')
expect(page).to have_content('New Title')
expect(page).to have_content('new subtitle')
Expand Down
4 changes: 2 additions & 2 deletions spec/cho/collection/curated_collections/edit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
context 'when deleting the collection' do
it 'removes it from the system' do
visit(edit_curated_collection_path(resource))
click_button('Delete Curated collection')
click_button('Delete Curated Collection')
expect(page).to have_content('The following resources will be deleted')
expect(page).to have_content(resource.title.first)
click_button('Continue')
expect(page).to have_content('You have successfully deleted the following items')
expect(page).to have_content('You have successfully deleted the following')
expect(page).to have_content(resource.title.first)
expect(Collection::Curated.all.count).to eq(0)
expect(adapter.index_adapter.query_service.find_all.count).to eq(0)
Expand Down
2 changes: 1 addition & 1 deletion spec/cho/collection/curated_collections/new_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
fill_in('curated_collection[subtitle]', with: 'new subtitle')
fill_in('curated_collection[description]', with: 'Description of new collection')
choose('Mediated')
choose('Authenticated')
choose('PSU Access')
click_button('Create Curated collection')
expect(page).to have_content('New Title')
expect(page).to have_content('new subtitle')
Expand Down
4 changes: 2 additions & 2 deletions spec/cho/collection/library_collections/edit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
context 'when deleting the collection' do
it 'removes it from the system' do
visit(edit_library_collection_path(resource))
click_button('Delete Library collection')
click_button('Delete Library Collection')
expect(page).to have_content('The following resources will be deleted')
expect(page).to have_content(resource.title.first)
click_button('Continue')
expect(page).to have_content('You have successfully deleted the following items')
expect(page).to have_content('You have successfully deleted the following')
expect(page).to have_content(resource.title.first)
expect(Collection::Library.all.count).to eq(0)
expect(adapter.index_adapter.query_service.find_all.count).to eq(0)
Expand Down
2 changes: 1 addition & 1 deletion spec/cho/collection/library_collections/new_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
fill_in('library_collection[subtitle]', with: 'new subtitle')
fill_in('library_collection[description]', with: 'Description of new collection')
choose('Mediated')
choose('Authenticated')
choose('PSU Access')
click_button('Create Library collection')
expect(page).to have_content('New Title')
expect(page).to have_content('new subtitle')
Expand Down
6 changes: 3 additions & 3 deletions spec/cho/home_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
expect(page).to have_content('New Library Collection')
click_link('Curated Collection')
expect(page).to have_content('New Curated Collection')
expect(page).to have_link('Create Work')
expect(page).to have_link('Create Resource')
click_link('Generic')
expect(page).to have_content('New Generic Work')
expect(page).to have_content('New Generic Resource')
click_link('Document')
expect(page).to have_content('New Document Work')
expect(page).to have_content('New Document Resource')
end
end
2 changes: 1 addition & 1 deletion spec/cho/metrics/collection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
header, results = report.string.split("\n")
expect(header).to eq(' User,System,Total,Real')
expect(results.split(',').count).to eq(4)
expect(collection.members.first.title).to contain_exactly('Sample Work 1')
expect(collection.members.first.title).to contain_exactly('Sample Resource 1')
expect($stdout).to be(STDOUT)
end
end
4 changes: 2 additions & 2 deletions spec/cho/work/file_set/delete_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
expect(page).to have_content(resource.title.first)
expect(page).to have_selector('li', text: 'File: hello_world.txt')
click_button('Continue')
expect(page).to have_content('You have successfully deleted the following items')
expect(page).to have_content('File Set to Delete (1 items)')
expect(page).to have_content('You have successfully deleted the following')
expect(page).to have_content('File Set to Delete (1)')
expect(Work::File.all.count).to eq(0)
expect(Work::FileSet.all.count).to eq(0)
expect(adapter.index_adapter.query_service.find_all.count).to eq(2)
Expand Down
14 changes: 7 additions & 7 deletions spec/cho/work/import/create_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
expect(page).to have_selector('h2', text: 'Bag Status')
expect(page).to have_selector('h2', text: 'CSV Status')
expect(page).to have_content('The bag is valid and contains no errors')
expect(page).to have_content('The following new works will be created')
expect(page).to have_content('Total Number of Works with Errors 0')
expect(page).to have_content('The following new resources will be created')
expect(page).to have_content('Total Number of Resources with Errors 0')
within('table') do
expect(page).to have_selector('th', text: 'Title')
expect(page).to have_selector('th', text: 'Status')
Expand Down Expand Up @@ -139,8 +139,8 @@
expect(page).to have_selector('h2', text: 'Bag Status')
expect(page).to have_selector('h2', text: 'CSV Status')
expect(page).to have_content('The bag is valid and contains no errors')
expect(page).to have_content('The following new works will be created')
expect(page).to have_content('Total Number of Works with Errors 0')
expect(page).to have_content('The following new resources will be created')
expect(page).to have_content('Total Number of Resources with Errors 0')
within('table') do
expect(page).to have_selector('th', text: 'Title')
expect(page).to have_selector('th', text: 'Status')
Expand Down Expand Up @@ -238,8 +238,8 @@
expect(page).to have_selector('h2', text: 'Bag Status')
expect(page).to have_selector('h2', text: 'CSV Status')
expect(page).to have_content('The bag is valid and contains no errors')
expect(page).to have_content('The following new works will be created')
expect(page).to have_content('Total Number of Works with Errors 0')
expect(page).to have_content('The following new resources will be created')
expect(page).to have_content('Total Number of Resources with Errors 0')
click_button('Perform Import')
expect(page).to have_selector('h1', text: 'Successful Import')
within('ul.result-list') do
Expand Down Expand Up @@ -298,7 +298,7 @@
attach_file('csv_file_file', csv_file.path)
click_button('Preview Import')
expect(page).to have_selector('h1', text: 'Import Preview')
expect(page).to have_content('Total Number of Works with Errors 3')
expect(page).to have_content('Total Number of Resources with Errors 3')
within('table.table') do
expect(page).to have_content("Work type can't be blank")
expect(page).to have_content("Title can't be blank")
Expand Down
8 changes: 4 additions & 4 deletions spec/cho/work/import/update_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
it 'successfully updates the works' do
visit(csv_works_update_path)
expect(page).to have_selector('h1', text: 'CSV Import')
expect(page).to have_content('Import a csv that updates existing works')
expect(page).to have_content('Import a CSV that updates existing resources')
attach_file('csv_file_file', csv_file.path)
click_button('Preview Import')
expect(page).to have_selector('h1', text: 'Import Preview')
expect(page).to have_content('The following works will be updated')
expect(page).to have_content('Total Number of Works with Errors 0')
expect(page).to have_content('The following resources will be updated')
expect(page).to have_content('Total Number of Resources with Errors 0')
within('table') do
expect(page).to have_selector('th', text: 'Title')
expect(page).to have_selector('th', text: 'Status')
Expand Down Expand Up @@ -72,7 +72,7 @@
attach_file('csv_file_file', csv_file.path)
click_button('Preview Import')
expect(page).to have_selector('h1', text: 'Import Preview')
expect(page).to have_content('Total Number of Works with Errors 1')
expect(page).to have_content('Total Number of Resources with Errors 1')
within('table.table') do
expect(page).to have_content("Title can't be blank")
end
Expand Down
Loading

0 comments on commit 7c54613

Please sign in to comment.