From 55fa158ce2cad04d0b4d21a4d763666f5459939f Mon Sep 17 00:00:00 2001 From: LaRita Robinson Date: Wed, 20 Dec 2023 16:34:13 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Handle=20missing=20labels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adjust paths and keys to look for labels. --- app/controllers/identity_providers_controller.rb | 1 + .../dashboard/sidebar/_configuration.html.erb | 2 +- app/views/identity_providers/_form.html.erb | 8 ++++---- app/views/identity_providers/index.html.erb | 14 +++++++------- config/locales/de.yml | 2 +- config/locales/en.yml | 6 +++++- config/locales/es.yml | 2 +- config/locales/fr.yml | 2 +- config/locales/it.yml | 2 +- config/locales/pt-BR.yml | 2 +- config/locales/zh.yml | 2 +- 11 files changed, 24 insertions(+), 19 deletions(-) diff --git a/app/controllers/identity_providers_controller.rb b/app/controllers/identity_providers_controller.rb index 06cedfb20..7656e9c6e 100644 --- a/app/controllers/identity_providers_controller.rb +++ b/app/controllers/identity_providers_controller.rb @@ -7,6 +7,7 @@ class IdentityProvidersController < ApplicationController before_action :set_identity_provider, only: %i[edit update destroy] def index + add_breadcrumbs @identity_providers = IdentityProvider.all end diff --git a/app/views/hyrax/dashboard/sidebar/_configuration.html.erb b/app/views/hyrax/dashboard/sidebar/_configuration.html.erb index 8e31594a1..85184aab0 100644 --- a/app/views/hyrax/dashboard/sidebar/_configuration.html.erb +++ b/app/views/hyrax/dashboard/sidebar/_configuration.html.erb @@ -16,7 +16,7 @@ <% end %> <%= menu.nav_link(main_app.identity_providers_path, class: "nav-link") do %> - <%= t('hyrax.admin.sidebar.identity_providers') %> + <%= t('hyrax.admin.sidebar.identity_provider') %> <% end %> <%= menu.nav_link(main_app.edit_site_labels_path, diff --git a/app/views/identity_providers/_form.html.erb b/app/views/identity_providers/_form.html.erb index 5958f3105..499cc0fbe 100644 --- a/app/views/identity_providers/_form.html.erb +++ b/app/views/identity_providers/_form.html.erb @@ -11,7 +11,7 @@ <% end %> - <%= f.input :name %> + <%= f.input :name, label: t('hyku.identity_provider.label.name'), required: true %> <%= f.input :provider, collection: Devise.omniauth_providers.map {|o| [o, o.upcase]}, label_method: :second, @@ -38,12 +38,12 @@

Metadata is available <%= link_to 'here', "/users/auth/saml/#{@identity_provider.id}/metadata", data: { turbolinks: false } %>

<% end %> - <%= f.input :options, input_html: {value: @identity_provider.options&.to_json } %> + <%= f.input :options, label: t('hyku.identity_provider.label.options'), input_html: {value: @identity_provider.options&.to_json } %> <%# Upload Logo Image %> - <%= f.input :logo_image, as: :file, wrapper: :vertical_file_input, hint: t('hyrax.admin.appearances.show.forms.logo_image.hint') %> - <%= f.input :logo_image_text, as: :text %> + <%= f.input :logo_image, label: t('hyku.identity_provider.label.logo_image'), as: :file, wrapper: :vertical_file_input, hint: t('hyrax.admin.appearances.show.forms.logo_image.hint') %> + <%= f.input :logo_image_text, label: t('hyku.identity_provider.label.logo_image_alt_text'), as: :text %> <%= image_tag f.object.logo_image.url(:medium), class: "img-responsive", alt: f.object.logo_image_text if f.object.logo_image? %> diff --git a/app/views/identity_providers/index.html.erb b/app/views/identity_providers/index.html.erb index d56219c3d..80a459f93 100644 --- a/app/views/identity_providers/index.html.erb +++ b/app/views/identity_providers/index.html.erb @@ -1,5 +1,5 @@ <% content_for :page_header do %> -

<%= t(:'hyrax.admin.sidebar.identity_providers_and_permissions') %>

+

<%= t('hyku.identity_provider.header') %>

<% end %>
@@ -9,10 +9,10 @@ - - - - + + + + @@ -24,7 +24,7 @@ @@ -32,7 +32,7 @@
NameProviderUpdated AtLogo<%= t('hyku.identity_provider.label.name') %><%= t('hyku.identity_provider.label.provider') %><%= t('hyku.identity_provider.label.updated_at') %><%= t('hyku.identity_provider.label.logo') %>
<%= u.updated_at %> <%= image_tag u.logo_image.url(:thumb), class: "img-fluid", alt: u.logo_image_text if u.logo_image? %> - <%= link_to t('.edit'), edit_identity_provider_path(u) %> |  + <%= link_to t('hyku.identity_provider.label.edit'), edit_identity_provider_path(u) %> |  <%= link_to t('helpers.action.delete'), identity_provider_path(u), method: :delete, data: { confirm: t('.confirm_delete') } %>
<%= link_to new_identity_provider_path, class: 'btn btn-primary' do %> - <%= t('.create_new') %> + <%= t('hyku.identity_provider.label.create_new') %> <% end %>
diff --git a/config/locales/de.yml b/config/locales/de.yml index 50c856db8..597465395 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -120,7 +120,7 @@ de: logo_image: Bild für die SSO-Seite logo_image_alt_text: Alternativtext für Bild name: Name oder Beschreibung - optoins: Optionen + options: Optionen provider: Anbieter proprietor: accounts: diff --git a/config/locales/en.yml b/config/locales/en.yml index 035f347fe..e02788b72 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -122,9 +122,13 @@ en: label: name: Name or Description provider: Provider - optoins: Options + options: Options + logo: Logo + updated_at: Updated At logo_image: Image for SSO Page logo_image_alt_text: Alt Text for Image + create_new: New + edit: Edit footer: admin_login: Administrator login proprietor: diff --git a/config/locales/es.yml b/config/locales/es.yml index 83a7512f6..b838588b3 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -120,7 +120,7 @@ es: logo_image: Imagen para la página SSO logo_image_alt_text: Texto alternativo para imagen name: Nombre o descripción - optoins: Opciones + options: Opciones provider: Proveedor proprietor: accounts: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 9da57b8c7..ea9e6ae57 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -120,7 +120,7 @@ fr: logo_image: Image de la page SSO logo_image_alt_text: Texte alternatif pour l'image name: Nom ou description - optoins: Possibilités + options: Possibilités provider: Fournisseur proprietor: accounts: diff --git a/config/locales/it.yml b/config/locales/it.yml index 79a0b66f9..b60179053 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -120,7 +120,7 @@ it: logo_image: Immagine per la pagina SSO logo_image_alt_text: Testo alternativo per l'immagine name: Nome o descrizione - optoins: Opzioni + options: Opzioni provider: Fornitore proprietor: accounts: diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index f3fb64ddb..a7ae33b68 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -120,7 +120,7 @@ pt-BR: logo_image: Imagem para página SSO logo_image_alt_text: Texto alternativo para imagem name: Nome ou Descrição - optoins: Opções + options: Opções provider: Fornecedor proprietor: accounts: diff --git a/config/locales/zh.yml b/config/locales/zh.yml index c21428bd8..9cc0d6f7b 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -120,7 +120,7 @@ zh: logo_image: SSO 页面的图像 logo_image_alt_text: 图像的替代文本 name: 名称或描述 - optoins: 选项 + options: 选项 provider: 提供者 proprietor: accounts: