Skip to content

Commit

Permalink
Merge pull request #2609 from nebulon42/2584_i18n_new_records
Browse files Browse the repository at this point in the history
add proper i18n for titles of new records
  • Loading branch information
Brian Hoffman committed Feb 1, 2022
2 parents 5abb1b5 + 1ec70cd commit 2b3d379
Show file tree
Hide file tree
Showing 19 changed files with 50 additions and 19 deletions.
13 changes: 13 additions & 0 deletions common/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ de:
subject:
_singular: Thema
_plural: Themen
new_title: Neues Thema
authority_id: Autoritäts-ID
authority_id_tooltip: "<p>Der eindeutige Bezeichner für den Datensatz innerhalb der Quelle, aus der\
\ er bezogen wurde (z.B. eine LCSH-Nummer). Die Kennung kann als URI dargestellt werden.</p>\n"
Expand Down Expand Up @@ -275,6 +276,7 @@ de:
publish_tooltip: "<p>Gibt an, ob dieser Aufbewahrungsort und jede darin enthaltene Aufzeichnung auf\
\ öffentlichen Besucher-Schnittstellen veröffentlicht wird.</p>\n"
_plural: Aufbewahrungsorte
new_title: Neuer Aufbewahrungsort
publish: Veröffentlichen?
email_signature: E-Mail-Signatur
repo_code: Aufbewahrungsort-Kurzname
Expand All @@ -298,6 +300,7 @@ de:
creator: Urheber
_singular: Klassifizierung
_plural: Klassifizierungen
new_title: Neue Klassifizierung
identifier: Bezeichner
title: Titel
description: Beschreibung
Expand Down Expand Up @@ -469,6 +472,7 @@ de:
create_time: Erstellt
user_mtime: Geändert
_plural: Eingänge
new_title: Neuer Eingang
accession_date_unknown: unbekannt
accession_date: Datum des Eingangs
accession_date_inline_help: z.B. JJJJ-MM-TT
Expand Down Expand Up @@ -513,6 +517,7 @@ de:
file_versions_tooltip: "<p>Verknüpft ein digitales Objekt oder eine digitale Objektkomponente mit\
\ einer zugehörigen Inhaltsdatei, adressierbar über einen URI.</p>\n"
_singular: Digitales Objekt
new_title: Neues digitales Objekt
title_tooltip: "<p>Ein Titelausdruck für das digitale Objekt. Kann aus dem Objekt transkribiert oder\
\ von einer Quellressourcen-/Ressourcenkomponenten-Aufzeichnung geerbt oder vom Aufbewahrungsort\
\ bereitgestellt werden.</p>\n<p>Der Titel des digitalen Objekts als Ganzes kann derselbe sein wie\
Expand Down Expand Up @@ -595,6 +600,7 @@ de:
owner_repo_tooltip: Ein Aufbewahrungsort, der diesen Standort reserviert hat
_singular: Standort
_plural: Standorte
new_title: Neuer Standort
coordinate_1_indicator_tooltip: "<p>BEDINGT ERFORDERLICHES FELD: Entweder Strichcode, Klassifizierung\
\ oder Koordinate 1 Bezeichner und Koordinate 1 Indikator müssen Daten enthalten.</p>\n<p>Zur Erfassung\
\ eines Indikators wie einer Zahl oder eines Buchstabens, der einen Standort in Verbindung mit dem\
Expand Down Expand Up @@ -755,6 +761,7 @@ de:
\ Ressourcen mit diesem Ereignis.</p>\n"
_singular: Ereignis
_plural: Ereignisse
new_title: Neues Ereignis
outcome_tooltip: "<p>Eine Kategorisierung des Gesamtergebnisses des Ereignisses in Form von Erfolg,\
\ Teilerfolg oder Misserfolg. Es wird empfohlen, ein kontrolliertes Vokabular zu verwenden, auf\
\ das ein System automatisch reagieren kann. Weitere Einzelheiten über das Ergebnis können in einer\
Expand Down Expand Up @@ -1782,6 +1789,7 @@ de:
user_mtime: Geändert
_singular: Ressource
_plural: Ressourcen
new_title: Neue Ressource
id_0_tooltip: "<p>ERFORDERLICHES FELD. Die Identifikationsnummer, die jeder einzelnen Ressource innerhalb\
\ eines Aufbewahrungsorts zugewiesen wird.</p>\n<p>Siehe DACS 2.1.3, ISAD(G) 3.1.1</p>\n<p>Beispiele</p>\n\
<ul>\n<li>R.001 (Zwei Elemente \"R\" + \"001\")</li>\n<li>MSS 025 (Ein einzelnes Element)</li>\n\
Expand Down Expand Up @@ -2241,6 +2249,7 @@ de:
status: Status
_singular: Hintergrund-Aufgabe
_plural: Hintergrund-Aufgaben
new_title: Neue Hintergrund-Aufgabe
print_to_pdf_job:
source: Quelle
include_unpublished: Unveröffentlichte einschließen
Expand Down Expand Up @@ -2362,6 +2371,7 @@ de:
\ Einschränkungen oder Bedingungen für Archivgut, die während einer Begutachtung aktiv geprüft werden.</p>\n"
research_value: Forschungswert
_singular: Begutachtung
new_title: Neue Begutachtung
research_value_tooltip: <p>Dieser Wert wird automatisch berechnet, indem der Wert im Feld Dokumentationsqualität
mit dem Wert im Feld Interesse addiert wird.</p>
general_assessment_note_tooltip: <p>Weitere Anmerkungen zu einer Begutachtung.</p>
Expand Down Expand Up @@ -2800,3 +2810,6 @@ de:
_plural: Reserviert für
container_profile:
title: "%{name} [%{depth}t, %{height}h, %{width}b %{dimension_units}] Umfang gemessen durch %{extent_dimension}"
new_title: Neues Behältnis-Profil
location_profile:
new_title: Neues Standort-Profil
18 changes: 18 additions & 0 deletions common/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ en:
<p>Links a digital object or digital object component to an associated content file, addressable by URI.</p>
_singular: Digital Object
_plural: Digital Objects
new_title: New Digital Object

digital_object_component:
<<: *digital_object_attributes
Expand Down Expand Up @@ -204,6 +205,7 @@ en:
owner_repo_tooltip: A repository that has reserved this location
_singular: Location
_plural: Locations
new_title: New Location

location_batch:
<<: *location_attributes
Expand Down Expand Up @@ -371,6 +373,7 @@ en:
virus_check: Virus Check
_singular: Event
_plural: Events
new_title: New Event

linked_event:
<<: *event
Expand Down Expand Up @@ -1659,6 +1662,7 @@ en:
user_mtime: Modified
_singular: Accession
_plural: Accessions
new_title: New Accession

interrelated_accession:
_plural: Related Accessions
Expand Down Expand Up @@ -1716,6 +1720,11 @@ en:
publish: Publish
_singular: Agent
_plural: Agents
new_title:
agent_family: New Family
agent_person: New Person
agent_corporate_entity: New Corporate Entity
agent_software: New Software
agent_record_controls_tooltip: |
<p>Information about the record describing the Agent.</p>
agent_alternate_sets_tooltip: |
Expand Down Expand Up @@ -2026,6 +2035,7 @@ en:
user_mtime: Modified
_singular: Resource
_plural: Resources
new_title: New Resource

resource_and_archival_object:
_singular: Resource and/or Archival Object
Expand Down Expand Up @@ -2119,6 +2129,7 @@ en:
<p>A remote URL or path to a local file that contains a branding image (like a logo or seal) to be used in the repository's online finding aids. This image appears on the public side PDFs, staff side PDFs and on the repositories page.</p>
_singular: Repository
_plural: Repositories
new_title: New Repository
publish: Publish?
publish_tooltip: |
<p>Determines whether this Repository and any record it contains will be published to public (patron) interfaces.</p>
Expand Down Expand Up @@ -2166,6 +2177,7 @@ en:
heading: Subject Heading
_singular: Subject
_plural: Subjects
new_title: New Subject

user:
username: Username
Expand Down Expand Up @@ -2299,6 +2311,7 @@ en:
<<: *slug_attributes
_singular: Classification
_plural: Classifications
new_title: New Classification
identifier: Identifier
title: Title
description: Description
Expand Down Expand Up @@ -2466,6 +2479,7 @@ en:
job:
_singular: Background Job
_plural: Background Jobs
new_title: New Background Job
job_type: Job Type
types:
print_to_pdf_job: Generate PDF
Expand Down Expand Up @@ -2707,6 +2721,7 @@ en:
rating_note: "%{label} Note"
_singular: Assessment
_plural: Assessments
new_title: New Assessment

assessment_attribute:
rating:
Expand Down Expand Up @@ -3018,3 +3033,6 @@ en:

container_profile:
title: "%{name} [%{depth}d, %{height}h, %{width}w %{dimension_units}] extent measured by %{extent_dimension}"
new_title: New Container Profile
location_profile:
new_title: New Location Profile
2 changes: 1 addition & 1 deletion frontend/app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def setup_context(options)
set_title("#{I18n.t("#{type}._plural")} | #{title}")
end
else # new object
breadcrumb_trail.push([options[:title] || "#{I18n.t("actions.new_prefix")} #{I18n.t("#{type}._singular")}"])
breadcrumb_trail.push([options[:title] || "#{I18n.t("#{type}.new_title")}"])
set_title("#{I18n.t("#{controller.to_s.singularize}._plural")} | #{options[:title] || I18n.t("actions.new_prefix")}")
end
elsif options.has_key? :title
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/accessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<%= render_aspace_partial :partial => "shared/toolbar_new_records" %>
<div class="record-pane">
<%= link_to_help :topic => "accession" %>
<h2><%= I18n.t("actions.new_prefix") %> <%= I18n.t("accession._singular") %> <span class="label label-info"><%= I18n.t("accession._singular") %></span></h2>
<h2><%= I18n.t("accession.new_title") %> <span class="label label-info"><%= I18n.t("accession._singular") %></span></h2>
<%= render_aspace_partial :partial => "accessions/form", :locals => {:form => form} %>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/views/agents/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= setup_context :object => @agent, :controller => :agents, :agent_type => @agent.agent_type, :title => "#{I18n.t("actions.new_prefix")} #{I18n.t("agent.agent_type.#{@agent.agent_type}")}" %>
<%= setup_context :object => @agent, :controller => :agents, :agent_type => @agent.agent_type, :title => "#{I18n.t("agent.new_title.#{@agent.agent_type}")}" %>
<%= form_for @agent, :as => "agent", :url => {:action => :create}, :html => {:class => 'form-horizontal aspace-record-form', :id => "agent_form"} do |f| %>
<%= form_context :agent, @agent do |form| %>
Expand All @@ -10,7 +10,7 @@
<%= render_aspace_partial :partial => "shared/toolbar_new_records" %>
<div class="record-pane">
<%= link_to_help :topic => "#{@agent.agent_type}" %>
<h2><%= "#{I18n.t("actions.new_prefix")} #{I18n.t("agent.agent_type.#{@agent.agent_type}")}" %> <span class="label label-info"><%= I18n.t("agent._singular") %></span></h2>
<h2><%= "#{I18n.t("agent.new_title.#{@agent.agent_type}")}" %> <span class="label label-info"><%= I18n.t("agent._singular") %></span></h2>
<%= render_aspace_partial :partial => "agents/form", :locals => {:form => form} %>
<div class="form-actions">
<div class="btn-group">
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/assessments/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<%= render_aspace_partial :partial => "shared/toolbar_new_records" %>
<div class="record-pane">
<%= link_to_help :topic => "assessment" %>
<h2><%= I18n.t("actions.new_prefix") %> <%= I18n.t("assessment._singular") %> <span class="label label-info"><%= I18n.t("assessment._singular") %></span></h2>
<h2><%= I18n.t("assessment.new_title") %> <span class="label label-info"><%= I18n.t("assessment._singular") %></span></h2>
<%= render_aspace_partial :partial => "assessments/form", :locals => {:form => form} %>

<div class="form-actions">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%= link_to_help :topic => "classification" %>

<h2>
<%= @form_title ? @form_title : @classification.title.blank? ? "#{I18n.t("actions.new_prefix")} #{I18n.t("classification._singular")}" : @classification.title %> <span class="label label-info"><%= I18n.t("classification._singular") %></span>
<%= @form_title ? @form_title : @classification.title.blank? ? "#{I18n.t("classification.new_title")}" : @classification.title %> <span class="label label-info"><%= I18n.t("classification._singular") %></span>
</h2>

<%= render_aspace_partial :partial => "shared/form_messages", :locals => {:form => form} %>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/classifications/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<%= render_aspace_partial :partial => "classifications/form_container", :locals => {:form => form} %>

<div class="form-actions">
<button type="submit" class="btn btn-primary"><%= I18n.t("actions.save_prefix") %> <%= I18n.t("classification._singular") %></button>
<button type="submit" class="btn btn-primary"><%= I18n.t("classification._frontend.action.save") %></button>
<%= link_to I18n.t("actions.cancel"), :back, :class => "btn btn-cancel btn-default" %>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/container_profiles/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<%= render_aspace_partial :partial => "toolbar" %>
<div class="record-pane">
<%= link_to_help :topic => "container_profile" %>
<h2><%= I18n.t("actions.new_prefix") %> <%= I18n.t("container_profile._singular") %> <span class="label label-info"><%= I18n.t("container_profile._singular") %></span></h2>
<h2><%= I18n.t("container_profile.new_title") %> <span class="label label-info"><%= I18n.t("container_profile._singular") %></span></h2>

<%= render_aspace_partial :partial => "container_profiles/form", :locals => {:form => form} %>
<div class="form-actions">
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/digital_objects/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="record-pane" id="object_container">
<%= link_to_help :topic => "digital_object" %>
<h2>
<%= @form_title ? @form_title : @digital_object.title.blank? ? I18n.t("digital_object._singular") : @digital_object.title %>
<%= @form_title ? @form_title : @digital_object.title.blank? ? I18n.t("digital_object.new_title") : @digital_object.title %>
<span class="label label-info"><%= I18n.t("digital_object._singular") %></span>
</h2>

Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/enumerations/_list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<% if @enumeration['editable']%>

<div class="btn-group pull-right">
<%= link_to "#{I18n.t("actions.create")} #{I18n.t("enumeration.value")}", {:controller => :enumerations, :action => :new, :id => JSONModel(:enumeration).id_for(@enumeration["uri"])}, "data-toggle" => "modal-ajax", :class=> "btn btn-sm btn-default" %>
<%= link_to "#{I18n.t("enumeration._frontend.action.create_value")}", {:controller => :enumerations, :action => :new, :id => JSONModel(:enumeration).id_for(@enumeration["uri"])}, "data-toggle" => "modal-ajax", :class=> "btn btn-sm btn-default" %>
</div>
<br style="clear:both" /> <!-- So dirty! -->

Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/events/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<%= render_aspace_partial :partial => "shared/toolbar_new_records" %>
<div class="record-pane">
<%= link_to_help :topic => "event" %>
<h2><%= I18n.t("actions.new_prefix") %> <%= I18n.t("event._singular") %> <span class="label label-info"><%= I18n.t("event._singular") %></span></h2>
<h2><%= I18n.t("event.new_title") %> <span class="label label-info"><%= I18n.t("event._singular") %></span></h2>

<%= render_aspace_partial :partial => "events/form", :locals => {:form => form} %>
<div class="form-actions">
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/location_profiles/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<%= render_aspace_partial :partial => "toolbar" %>
<div class="record-pane">
<%= link_to_help :topic => "location_profile" %>
<h2><%= I18n.t("actions.new_prefix") %> <%= I18n.t("location_profile._singular") %> <span class="label label-info"><%= I18n.t("location_profile._singular") %></span></h2>
<h2><%= I18n.t("location_profile.new_title") %> <span class="label label-info"><%= I18n.t("location_profile._singular") %></span></h2>

<%= render_aspace_partial :partial => "location_profiles/form", :locals => {:form => form} %>
<div class="form-actions">
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/views/locations/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
<div class="col-md-9">
<div class="record-pane">
<%= link_to_help :topic => "location" %>
<h2><%= I18n.t("actions.new_prefix") %> <%= I18n.t("location._singular") %> <span class="label label-info"><%= I18n.t("location._singular") %></span></h2>
<h2><%= I18n.t("location.new_title") %> <span class="label label-info"><%= I18n.t("location._singular") %></span></h2>
<br/>

<%= render_aspace_partial :partial => "locations/form", :locals => {:form => form} %>

<div class="form-actions">
<div class="btn-group">
<button type="submit" class="btn btn-primary"><%= I18n.t("actions.save_prefix") %> <%= I18n.t("location._singular") %></button>
<button type="submit" class="btn btn-primary"><%= I18n.t("location._frontend.action.save") %></button>
<button type="submit" id="createPlusOne" name="plus_one" class="btn btn-primary createPlusOneBtn"><%= I18n.t("actions.save_plus_one") %></button>
</div>
<%= link_to I18n.t("actions.cancel"), :back, :class => "btn btn-cancel btn-default" %>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/repositories/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<%= render_aspace_partial :partial => "shared/toolbar_new_records" %>
<div class="record-pane">
<%= link_to_help :topic => "repository" %>
<h2><%= I18n.t("actions.new_prefix") %> <%= I18n.t("repository._singular") %> <span class="label label-info"><%= I18n.t("repository._singular") %></span></h2>
<h2><%= I18n.t("repository.new_title") %> <span class="label label-info"><%= I18n.t("repository._singular") %></span></h2>
<br/>
<%= render_aspace_partial :partial => "repositories/form_container", :locals => {:form => form} %>
<div class="form-actions">
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/resources/_form_container.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%= link_to_help :topic => "resource" %>

<h2>
<%= @form_title ? @form_title : @resource.title.blank? ? "#{I18n.t("actions.new_prefix")} #{I18n.t("resource._singular")}" : clean_mixed_content( @resource.title) %> <span class="label label-info"><%= I18n.t("resource._singular") %></span>
<%= @form_title ? @form_title : @resource.title.blank? ? "#{I18n.t("resource.new_title")}" : clean_mixed_content( @resource.title) %> <span class="label label-info"><%= I18n.t("resource._singular") %></span>
</h2>

<%= render_aspace_partial :partial => "shared/form_messages", :locals => {:form => form} %>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/resources/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<%= render_aspace_partial :partial => "resources/form_container", :locals => {:form => form} %>

<div class="form-actions">
<button type="submit" class="btn btn-primary"><%= I18n.t("actions.save_prefix") %> <%= I18n.t("resource._singular") %></button>
<button type="submit" class="btn btn-primary"><%= I18n.t("resource._frontend.action.save") %></button>
<%= link_to I18n.t("actions.cancel"), :back, :class => "btn btn-cancel btn-default" %>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/subjects/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<%= render_aspace_partial :partial => "shared/toolbar_new_records" %>
<div class="record-pane">
<%= link_to_help :topic => "subject" %>
<h2><%= I18n.t("actions.new_prefix") %> <%= I18n.t("subject._singular") %> <span class="label label-info"><%= I18n.t("subject._singular") %></span></h2>
<h2><%= I18n.t("subject.new_title") %> <span class="label label-info"><%= I18n.t("subject._singular") %></span></h2>
<br/>
<%= render_aspace_partial :partial => "subjects/form", :locals => {:form => form} %>
<div class="form-actions">
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/users/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<%= render_aspace_partial :partial => "toolbar" %>
<div class="record-pane">
<% if session['user'] %><%= link_to_help :topic => "user" %><% end %>
<h2><%= I18n.t("actions.new_prefix") %> <%= I18n.t("user._frontend.section.account") %></h2>
<h2><%= I18n.t("user._frontend.section.new_account") %></h2>
<%= form_context :user, @user do |form| %>
<%= render_aspace_partial :partial => "users/form", :locals => {:form => form} %>

Expand Down

0 comments on commit 2b3d379

Please sign in to comment.