Skip to content

Commit

Permalink
Support additional view i18n labels (#858)
Browse files Browse the repository at this point in the history
Trying to sync up with existing support for changing these labels in different views
  • Loading branch information
mcritchlow committed Sep 27, 2023
1 parent da1d418 commit ed38bac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
10 changes: 5 additions & 5 deletions app/views/bulkrax/entries/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<div class="panel panel-default">
<div class="panel-body">
<p class='bulkrax-p-align'>
<strong>Identifier:</strong>
<strong><%= t('bulkrax.importer.labels.identifier') %>:</strong>
<%= @entry.identifier %>
</p>

<p class='bulkrax-p-align'>
<strong>Entry ID:</strong>
<strong><%= t('bulkrax.importer.labels.entry_id') %>:</strong>
<%= @entry.id %>
</p>

<p class='bulkrax-p-align'>
<strong>Type:</strong>
<strong><%= t('bulkrax.importer.labels.type') %>:</strong>
<%= @entry.factory_class || 'Unknown' %>
</p>
<%= render partial: 'raw_metadata'%>
Expand All @@ -23,10 +23,10 @@

<p class="bulkrax-p-align">
<% if @importer.present? %>
<strong>Importer:</strong>
<strong><%= t('bulkrax.importer.labels.importer') %>:</strong>
<%= link_to @importer.name, importer_path(@importer) %>
<% elsif @exporter.present? %>
<strong>Exporter:</strong>
<strong><%= t('bulkrax.importer.labels.exporter') %>:</strong>
<%= link_to @exporter.name, exporter_path(@exporter) %>
<% end %>
</p>
Expand Down
17 changes: 11 additions & 6 deletions config/locales/bulkrax.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,23 @@ en:
generated_metadata: "These exported fields currently cannot be imported."
importer:
labels:
name: Name
user: User
admin_set: Admin set
collection_entries: Collection Entries
entry_id: Entry ID
exporter: Exporter
file_set_entries: File Set Entries
frequency: Frequency
parser_klass: Parser klass
identifier: Identifier
importer: Importer
limit: Limit
total_work_entries: Total Works
name: Name
parser_klass: Parser klass
total_collections: Total Collections
total_file_sets: Total File Sets
total_work_entries: Total Works
type: Type
user: User
work_entries: Work Entries
collection_entries: Collection Entries
file_set_entries: File Set Entries
table_header:
labels:
identifier: Identifier
Expand Down

0 comments on commit ed38bac

Please sign in to comment.