From 220c6387736a1efb34fd01e4dfbb4075f71b71f6 Mon Sep 17 00:00:00 2001 From: Rodolfo Zitellini Date: Tue, 31 Aug 2021 16:20:28 +0200 Subject: [PATCH 01/10] Better English message --- config/locales/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 321d3c671..a47628baa 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -740,7 +740,7 @@ en: correct: "The record has no validation errors [200]" begins_with_message: "Must begin with \"{0}\"" required_if_message: "Field is mandatory because {0} ${1} is not empty" - cannot_link_to_self: "Cannot create a link to itself (%{id})." + cannot_link_to_self: "The record cannot link to itself (%{id})." incipit_search: incipit_search: "Incipit Search" From 8612a12f16b3d6e144d8bd37639c403ee368c81d Mon Sep 17 00:00:00 2001 From: Rodolfo Zitellini Date: Wed, 1 Sep 2021 09:59:13 +0200 Subject: [PATCH 02/10] Properly localize the "delete tag" message in the marc editor --- app/assets/javascripts/active_admin.js.coffee | 1 - app/assets/javascripts/rism.localisation.js | 9 --------- app/assets/javascripts/tag_header_events.js | 4 ++-- config/locales/de.yml | 4 ++++ config/locales/en.yml | 4 ++++ config/locales/es.yml | 4 ++++ config/locales/fr.yml | 4 ++++ config/locales/it.yml | 4 ++++ config/locales/pl.yml | 3 +++ config/locales/pt.yml | 4 ++++ 10 files changed, 29 insertions(+), 12 deletions(-) delete mode 100644 app/assets/javascripts/rism.localisation.js diff --git a/app/assets/javascripts/active_admin.js.coffee b/app/assets/javascripts/active_admin.js.coffee index 8904892e8..4fed921e5 100644 --- a/app/assets/javascripts/active_admin.js.coffee +++ b/app/assets/javascripts/active_admin.js.coffee @@ -79,7 +79,6 @@ #= require jquery.autosize.min #= require jquery.hotkeys #= require js.cookie -#= require rism.localisation #= require autocomplete-rails #= require inline_autocomplete_ujs #= require tag_header_events diff --git a/app/assets/javascripts/rism.localisation.js b/app/assets/javascripts/rism.localisation.js deleted file mode 100644 index 54d74ac72..000000000 --- a/app/assets/javascripts/rism.localisation.js +++ /dev/null @@ -1,9 +0,0 @@ -select_msg = "Select a value" -new_secondary = "New autority record" -view_secondary = "View autority record" -// -delete_msg = "Delete" -delete_field_confirm = "Are you sure you want to delete this field?" -// -quick_search = "Quick search in the source database" -tips_on_quick_search = "Tips on quick search:" \ No newline at end of file diff --git a/app/assets/javascripts/tag_header_events.js b/app/assets/javascripts/tag_header_events.js index 7e6bb7c94..411ef877b 100644 --- a/app/assets/javascripts/tag_header_events.js +++ b/app/assets/javascripts/tag_header_events.js @@ -41,9 +41,9 @@ used for _tag_header partial function tag_header_delete(button_id) { // FIXME dialog should not be hardcoded - $('#dialog').html('

' + delete_field_confirm + '

'); + $('#dialog').html('

' + I18n.t("marc_editor.delete_field_confirm") + '

'); $("#dialog").dialog(); - $("#dialog").dialog( 'option', 'title', delete_msg ); + $("#dialog").dialog( 'option', 'title', I18n.t("marc_editor.delete_msg") ); $("#dialog").dialog( 'option', 'width', 300); $("#dialog").dialog( 'option', 'buttons', { OK: function() { diff --git a/config/locales/de.yml b/config/locales/de.yml index 31a936240..e6a49e523 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -765,6 +765,10 @@ de: "Number of printed copies": "Anzahl der gedruckten Exemplare" publisher: "Verleger" + marc_editor: + delete_msg: "Löschen" + delete_field_confirm: "Sind Sie sicher, dass Sie dieses Feld löschen möchten?" + cookies: message: "Unsere Website verwendet Cookies, um Ihre Browser-Erfahrung zu verbessern. Durch die Nutzung unserer Website stimmen Sie der Verwendung von Cookies zu." dimiss: "Akzeptieren und schließen" diff --git a/config/locales/en.yml b/config/locales/en.yml index a47628baa..9f241f24a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -310,6 +310,7 @@ en: lib_siglum: "Library Siglum" holding_records: "Exemplar Information" holding_no_siglum: "Holding without silgum" + holding_missing: "This Edition record has no holding records attached yet, please don’t forget to add them." new_holding: "Add holdings" new_holding_page: "New holdings information" new_digital_object_image: "Attach a new image" @@ -766,6 +767,9 @@ en: "Number of printed copies": "Number of printed copies" publisher: "Publisher" + marc_editor: + delete_msg: "Delete" + delete_field_confirm: "Are you sure you want to delete this field?" cookies: message: "Our website uses cookies to make your browsing experience better. By using our site you agree to our use of cookies." diff --git a/config/locales/es.yml b/config/locales/es.yml index 214dd0798..5878732b2 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -764,6 +764,10 @@ es: "Number of printed copies": "Número de copias impresas" publisher: "Publicador" + marc_editor: + delete_msg: "Borrar" + delete_field_confirm: "¿Está seguro de que desea eliminar este campo?" + cookies: message: "Nuestro sitio web utiliza cookies para mejorar su experiencia de navegación. Al usar nuestro sitio, Ud. manifiesta su conformidad con el uso de cookies." dimiss: "Aceptar y cerrar" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 7daaa3955..113264354 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -765,6 +765,10 @@ fr: "Number of printed copies": "Nombre d'exemplaires imprimés" publisher: "Editeur" + marc_editor: + delete_msg: "Supprimer" + delete_field_confirm: "Êtes-vous sûr de vouloir supprimer ce champ?" + cookies: message: "Notre site utilise des cookies pour améliorer votre expérience de navigation. En utilisant notre site, vous acceptez notre utilisation des cookies." dimiss: "Accepter et fermer" diff --git a/config/locales/it.yml b/config/locales/it.yml index 97b751aa2..fbf2e6454 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -767,6 +767,10 @@ it: "Number of printed copies": "Numero di esemplari a stampa" publisher: "Editore" + marc_editor: + delete_msg: "Elimina" + delete_field_confirm: "Sei sicuro di voler eliminare questo campo?" + cookies: message: "Il nostro sito web utilizza cookie per funzionare. Se utilizzate il nostro sito accettata il nostro utilizzo dei cookie." dimiss: "Accetta e chiudi" diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 07270f2fa..136124628 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -767,6 +767,9 @@ pl: "Number of printed copies": "Liczba drukowanych egzemplarzy" publisher: Wydawca + marc_editor: + delete_msg: "Usuń" + delete_field_confirm: "Czy na pewno chcesz usunąć to pole?" cookies: message: "Strona wykorzystuje ciasteczka dla poprawy funkcjonalności. Korzystając z niej, zgadzasz się na to." diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 31c84f8b5..81d74ab41 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -760,6 +760,10 @@ pt: "Number of printed copies": "Número de exemplares impressos" publisher: "Casa editora" + marc_editor: + delete_msg: "Eliminar" + delete_field_confirm: "Tem a certeza que quer apagar este campo?" + cookies: message: "osso sítio web usa cookies para tornar sua navegação melhor. Ao utilizá-lo, o usuário está de acordo com o uso de cookies." dimiss: "Aceitar e Fechar" From 002cbdf1b88641fd6ecf5f063fabe9e7b7f96891 Mon Sep 17 00:00:00 2001 From: Rodolfo Zitellini Date: Wed, 1 Sep 2021 15:01:03 +0200 Subject: [PATCH 03/10] #1035 Add big warning for holdings missing --- app/admin/source.rb | 14 +++++++++++++- app/assets/javascripts/marc_editor.js | 19 ++++++++++++++++++- config/locales/de.yml | 3 +++ config/locales/en.yml | 4 +++- config/locales/es.yml | 3 +++ config/locales/fr.yml | 4 ++++ config/locales/it.yml | 3 +++ config/locales/marc_records/en.yml | 2 +- config/locales/marc_records/pl.yml | 2 +- config/locales/pl.yml | 3 +++ config/locales/pt.yml | 3 +++ 11 files changed, 55 insertions(+), 5 deletions(-) diff --git a/app/admin/source.rb b/app/admin/source.rb index 4b715312e..c94f28d8e 100644 --- a/app/admin/source.rb +++ b/app/admin/source.rb @@ -73,6 +73,12 @@ def show @editor_profile = EditorConfiguration.get_show_layout @item @prev_item, @next_item, @prev_page, @next_page = Source.near_items_as_ransack(params, @item) + if @item.get_record_type == :edition || @item.get_record_type == :libretto_edition || @item.get_record_type == :theoretica_edition + if @item.holdings.empty? + flash.now[:error] = I18n.t(:holding_missing_show, new_holding: I18n.t(:new_holding)) + end + end + respond_to do |format| format.html format.xml { render :xml => @item.marc.to_xml(@item.updated_at, @item.versions) } @@ -81,6 +87,7 @@ def show def edit flash.now[:error] = params[:validation_error] if params[:validation_error] + @item = Source.find(params[:id]) @holdings = @item.holdings @show_history = true if params[:show_history] @@ -91,7 +98,12 @@ def edit @page_title = "#{I18n.t(:edit)}#{record_type} [#{@item.id}]" template = EditorConfiguration.get_source_default_file(@item.get_record_type) + ".marc" - + + if @item.get_record_type == :edition || @item.get_record_type == :libretto_edition || @item.get_record_type == :theoretica_edition + if @item.holdings.empty? + flash.now[:error] = I18n.t(:holding_missing_show, new_holding: I18n.t(:new_holding)) + end + end # Try to load the MARC object. # This is the same trap as in show but here we diff --git a/app/assets/javascripts/marc_editor.js b/app/assets/javascripts/marc_editor.js index d43f32449..18d79dbd3 100644 --- a/app/assets/javascripts/marc_editor.js +++ b/app/assets/javascripts/marc_editor.js @@ -14,7 +14,7 @@ function marc_editor_set_dirty() { } function marc_editor_init_tags( id ) { - + marc_editor_show_last_tab(); // Set event hooks @@ -83,6 +83,12 @@ function marc_editor_get_triggers() { // Ajax sends back and URL to redirect to or an error var savedNr = 0; function _marc_editor_send_form(form_name, rails_model, redirect) { + + // Before saving, if this is a new edition + // nag the user with an alert to remember + // to add holding records + marc_editor_holding_warning(); + savedNr++; redirect = redirect || false; form = $('form', "#" + form_name); @@ -600,6 +606,17 @@ function marc_editor_remove_subfield(id) { } } +function marc_editor_holding_warning() { + var record_type = $("#record_type").val() + var source_id = $("#id").val() + + // Edition, libretto edition and theoretica edition + if (source_id == "" && (record_type == 8 || record_type == 5 || record_type == 7)) { + alert(I18n.t("holding_missing_alert", { new_holding: I18n.t("new_holding") })); + } + +} + // Hardcoded for marc_editor_panel function marc_editor_get_model() { return $("#marc_editor_panel").data("editor-model"); diff --git a/config/locales/de.yml b/config/locales/de.yml index e6a49e523..fff418f42 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -310,6 +310,9 @@ de: lib_siglum: "Bibliothekssigel" holding_records: "Exemplarinformation" holding_no_siglum: "HOLDING WITHOUT SILGUM" + holding_missing: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right." + holding_missing_alert: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right after you save." + holding_missing_show: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by editinf this record and clicking the \"%{new_holding}\\" button on the right." new_holding: "Neuer Examplareintrag" new_holding_page: "Neuer Exemplareintrag" new_digital_object_image: "Neues Bild hinzufügen" diff --git a/config/locales/en.yml b/config/locales/en.yml index 9f241f24a..04bd98423 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -310,7 +310,9 @@ en: lib_siglum: "Library Siglum" holding_records: "Exemplar Information" holding_no_siglum: "Holding without silgum" - holding_missing: "This Edition record has no holding records attached yet, please don’t forget to add them." + holding_missing: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\" button on the right." + holding_missing_alert: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\" button on the right after you save." + holding_missing_show: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by editing this record and clicking the \"%{new_holding}\" button on the right." new_holding: "Add holdings" new_holding_page: "New holdings information" new_digital_object_image: "Attach a new image" diff --git a/config/locales/es.yml b/config/locales/es.yml index 5878732b2..4bd32f9bb 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -311,6 +311,9 @@ es: lib_siglum: "Sigla del repositorio" holding_records: "Información del ejemplar" holding_no_siglum: "EJEMPLAR SIN SIGLA" + holding_missing: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right." + holding_missing_alert: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right after you save." + holding_missing_show: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by editing this record and clicking the \"%{new_holding}\\" button on the right." new_holding: "Crear nuevo registro de ejemplar" new_holding_page: "Nuevo registro de ejemplar" new_digital_object_image: "Añadir una nueva imagen" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 113264354..a7e702d00 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -310,6 +310,10 @@ fr: lib_siglum: "Sigle de bibliothèque" holding_records: "Copie" holding_no_siglum: "Copie sans cote" + holding_missing: "Cette source imprimée n'a pas encore des copies attachés. Veuillez ajouter le sigle de votre bibliothèque, la cote et d'autres informations spécifiques à cet exemplaire à cette fiche en cliquant sur le bouton \"%{new_holding}\" à droite." + holding_missing_alert: "Cette source imprimée n'a pas encore des copies attachés. Veuillez ajouter le sigle de votre bibliothèque, la cote et d'autres informations spécifiques à cet exemplaire à cette fiche en cliquant sur le bouton \"%{new_holding}\" à droite après avoir enregistré." + holding_missing_show: "Cette source imprimée n'a pas encore des copies attachés. Veuillez ajouter le sigle de votre bibliothèque, la cote et d'autres informations sspécifiques à cet exemplaire à cette fiche en entrant en mode édition et en cliquant sur le bouton \"%{new_holding}\" à droite." + new_holding: "Ajouter une copie" new_holding_page: "Copie non enregistré" new_digital_object_image: "Attacher une nouvelle image" diff --git a/config/locales/it.yml b/config/locales/it.yml index fbf2e6454..63da29137 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -312,6 +312,9 @@ it: lib_siglum: "Sigla della biblioteca" holding_records: "Esemplari" holding_no_siglum: "Esemplare senza sigla di biblioteca" + holding_missing: "Questa fonte stampata non ha ancora nessun esemplare allegato. Per favore, aggiungi la sigla della tua biblioteca, la segnatura e altre informazioni specifiche su questa copia in questo record cliccando il pulsante \"%{new_holding}\" sulla destra." + holding_missing_alert: "Questa fonte stampata non ha ancora nessun esemplare allegato. Per favore, aggiungi la sigla della tua biblioteca, la segnatura e altre informazioni specifiche su questa copia in questo record cliccando il pulsante \"%{new_holding}\" sulla destra dopo aver salvato" + holding_missing_show: "Questa fonte stampata non ha ancora nessun esemplare allegato. Per favore, aggiungi la sigla della tua biblioteca, la segnatura e altre informazioni specifiche su questa copia in questo record entrando nella modalità di modifica e cliccando il pulsante \"%{new_holding}\" sulla destra." new_holding: "Nuovo Esemplare" new_holding_page: "Esemplare non salvato" new_digital_object_image: "Aggiungi una nuova immagine" diff --git a/config/locales/marc_records/en.yml b/config/locales/marc_records/en.yml index ca58bf3e8..24a0a1191 100644 --- a/config/locales/marc_records/en.yml +++ b/config/locales/marc_records/en.yml @@ -740,7 +740,7 @@ en: series_statement: Series statement fields set: Set shelfmark: Shelfmark - shelfmark_olim: Shelfmark (olim) + shelfmark_olim: Former shelfmark (olim) short_title: Short title sigla: Sigla siglum: Siglum diff --git a/config/locales/marc_records/pl.yml b/config/locales/marc_records/pl.yml index 8fc92d2de..446b7e898 100644 --- a/config/locales/marc_records/pl.yml +++ b/config/locales/marc_records/pl.yml @@ -740,7 +740,7 @@ pl: series_statement: Pola uwag do serii set: Zbiór shelfmark: Sygnatura - shelfmark_olim: Sygnatura (wcześniejsza) + shelfmark_olim: Dawna sygnatura (wcześniejsza) short_title: Skrócony tytuł sigla: Sigla siglum: Siglum diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 136124628..0e0e8c988 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -311,6 +311,9 @@ pl: lib_siglum: Siglum holding_records: Informacje o egzemplarzu holding_no_siglum: Egzemplarz bez siglum + holding_missing: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right." + holding_missing_alert: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right after you save." + holding_missing_show: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by editinf this record and clicking the \"%{new_holding}\\" button on the right." new_holding: Dodaj egzemplarz new_holding_page: Nowe informacje o egzemplarzu new_digital_object_image: Dołącz nowy obraz diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 81d74ab41..a31f323c2 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -307,6 +307,9 @@ pt: lib_siglum: "Sigla da Instituição" holding_records: "Informação do exemplar" holding_no_siglum: "Materia sem sigla" + holding_missing: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right." + holding_missing_alert: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right after you save." + holding_missing_show: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by editinf this record and clicking the \"%{new_holding}\\" button on the right." new_holding: "Adicionar material" new_holding_page: "Informação de novo material" new_digital_object_image: "Adicionar uma nova imagem" From 0beb3ba5f64bebf16518043891cc19192fcb248d Mon Sep 17 00:00:00 2001 From: Rodolfo Zitellini Date: Wed, 1 Sep 2021 15:11:51 +0200 Subject: [PATCH 04/10] Fix invalid yml in locale files --- config/locales/de.yml | 6 +++--- config/locales/es.yml | 6 +++--- config/locales/pl.yml | 6 +++--- config/locales/pt.yml | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/config/locales/de.yml b/config/locales/de.yml index fff418f42..004411298 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -310,9 +310,9 @@ de: lib_siglum: "Bibliothekssigel" holding_records: "Exemplarinformation" holding_no_siglum: "HOLDING WITHOUT SILGUM" - holding_missing: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right." - holding_missing_alert: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right after you save." - holding_missing_show: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by editinf this record and clicking the \"%{new_holding}\\" button on the right." + holding_missing: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\" button on the right." + holding_missing_alert: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\" button on the right after you save." + holding_missing_show: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by editinf this record and clicking the \"%{new_holding}\" button on the right." new_holding: "Neuer Examplareintrag" new_holding_page: "Neuer Exemplareintrag" new_digital_object_image: "Neues Bild hinzufügen" diff --git a/config/locales/es.yml b/config/locales/es.yml index 4bd32f9bb..05e733cd5 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -311,9 +311,9 @@ es: lib_siglum: "Sigla del repositorio" holding_records: "Información del ejemplar" holding_no_siglum: "EJEMPLAR SIN SIGLA" - holding_missing: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right." - holding_missing_alert: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right after you save." - holding_missing_show: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by editing this record and clicking the \"%{new_holding}\\" button on the right." + holding_missing: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\" button on the right." + holding_missing_alert: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\" button on the right after you save." + holding_missing_show: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by editing this record and clicking the \"%{new_holding}\" button on the right." new_holding: "Crear nuevo registro de ejemplar" new_holding_page: "Nuevo registro de ejemplar" new_digital_object_image: "Añadir una nueva imagen" diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 0e0e8c988..469d7982f 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -311,9 +311,9 @@ pl: lib_siglum: Siglum holding_records: Informacje o egzemplarzu holding_no_siglum: Egzemplarz bez siglum - holding_missing: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right." - holding_missing_alert: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right after you save." - holding_missing_show: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by editinf this record and clicking the \"%{new_holding}\\" button on the right." + holding_missing: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\" button on the right." + holding_missing_alert: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\" button on the right after you save." + holding_missing_show: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by editinf this record and clicking the \"%{new_holding}\" button on the right." new_holding: Dodaj egzemplarz new_holding_page: Nowe informacje o egzemplarzu new_digital_object_image: Dołącz nowy obraz diff --git a/config/locales/pt.yml b/config/locales/pt.yml index a31f323c2..9dcc2c448 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -307,9 +307,9 @@ pt: lib_siglum: "Sigla da Instituição" holding_records: "Informação do exemplar" holding_no_siglum: "Materia sem sigla" - holding_missing: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right." - holding_missing_alert: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\\" button on the right after you save." - holding_missing_show: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by editinf this record and clicking the \"%{new_holding}\\" button on the right." + holding_missing: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\" button on the right." + holding_missing_alert: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by clicking the \"%{new_holding}\" button on the right after you save." + holding_missing_show: "This printed source does not have any holdings attached yet. Please add your library siglum, shelfmark, and other copy-specific information to this record by editinf this record and clicking the \"%{new_holding}\" button on the right." new_holding: "Adicionar material" new_holding_page: "Informação de novo material" new_digital_object_image: "Adicionar uma nova imagem" From f84055b13192bbbd2958465d9dc15fa6f9729133 Mon Sep 17 00:00:00 2001 From: Rodolfo Zitellini Date: Wed, 1 Sep 2021 15:26:48 +0200 Subject: [PATCH 05/10] Show the right message in edit --- app/admin/source.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/source.rb b/app/admin/source.rb index c94f28d8e..f2410190e 100644 --- a/app/admin/source.rb +++ b/app/admin/source.rb @@ -101,7 +101,7 @@ def edit if @item.get_record_type == :edition || @item.get_record_type == :libretto_edition || @item.get_record_type == :theoretica_edition if @item.holdings.empty? - flash.now[:error] = I18n.t(:holding_missing_show, new_holding: I18n.t(:new_holding)) + flash.now[:error] = I18n.t(:holding_missing, new_holding: I18n.t(:new_holding)) end end From b106a69d8760d67dfefb31f808da7e00404b7d88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 23:30:15 +0000 Subject: [PATCH 06/10] Bump rdoc from 6.2.1 to 6.3.2 Bumps [rdoc](https://github.com/ruby/rdoc) from 6.2.1 to 6.3.2. - [Release notes](https://github.com/ruby/rdoc/releases) - [Changelog](https://github.com/ruby/rdoc/blob/master/History.rdoc) - [Commits](https://github.com/ruby/rdoc/compare/v6.2.1...v6.3.2) --- updated-dependencies: - dependency-name: rdoc dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index c9c61c136..9c5fbbcb2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -341,7 +341,7 @@ GEM rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - rdoc (6.2.1) + rdoc (6.3.2) recaptcha (5.6.0) json redcarpet (3.5.1) From 6573f5960460f4a2dd32ef4b5c5ba8c1e105b9d6 Mon Sep 17 00:00:00 2001 From: Rodolfo Zitellini Date: Mon, 6 Sep 2021 12:32:14 +0200 Subject: [PATCH 07/10] Update Verovio to version 3.6.0 --- app/assets/javascripts/marc_editor.js | 7 +- app/assets/javascripts/mei_transformations.js | 8 +- app/assets/javascripts/verovio_preload.js | 6 +- .../advanced/_advanced_search_form.html.erb | 7 +- app/views/marc_show/_show_incipit.html.erb | 6 +- public/javascripts/verovio-toolkit.js | 392 +++++++++++------- public/javascripts/verovio-toolkit.js.gz | Bin 1540801 -> 1841601 bytes 7 files changed, 244 insertions(+), 182 deletions(-) diff --git a/app/assets/javascripts/marc_editor.js b/app/assets/javascripts/marc_editor.js index 18d79dbd3..0bf100107 100644 --- a/app/assets/javascripts/marc_editor.js +++ b/app/assets/javascripts/marc_editor.js @@ -525,13 +525,10 @@ function marc_editor_incipit(clef, keysig, timesig, incipit, target, width) { // width is option width = typeof width !== 'undefined' ? width : 720; - var pae = "@start:pae-file\n"; - pae = pae + "@clef:" + clef + "\n"; + var pae = "@clef:" + clef + "\n"; pae = pae + "@keysig:" + keysig + "\n"; - pae = pae + "@key:\n"; pae = pae + "@timesig:" + timesig + "\n"; - pae = pae + "@data: " + incipit + "\n"; - pae = pae + "@end:pae-file\n"; + pae = pae + "@data: " + incipit; // Do the call to the verovio helper render_music(pae, 'pae', target, width); diff --git a/app/assets/javascripts/mei_transformations.js b/app/assets/javascripts/mei_transformations.js index 9c275bd8b..c76258329 100644 --- a/app/assets/javascripts/mei_transformations.js +++ b/app/assets/javascripts/mei_transformations.js @@ -32,9 +32,7 @@ function translateIncipCode(incip, out_format) { continue; } - pae = "@start:pae-file\n"; - pae = pae + "@data: " + incipcode.textContent + "\n"; - pae = pae + "@end:pae-file\n"; + var pae = "@data: " + incipcode.textContent + "\n"; globalIncipitStrings.push(pae); @@ -78,9 +76,7 @@ function typesetIncipits(incip, out_format) { continue; } - pae = "@start:pae-file\n"; - pae = pae + "@data: " + incipcode.textContent + "\n"; - pae = pae + "@end:pae-file\n"; + var pae = "@data: " + incipcode.textContent + "\n"; in_data = pae; } else { incipcode = incip[index].getElementsByTagName('score')[0]; diff --git a/app/assets/javascripts/verovio_preload.js b/app/assets/javascripts/verovio_preload.js index 7bfe73797..2c4ba6635 100644 --- a/app/assets/javascripts/verovio_preload.js +++ b/app/assets/javascripts/verovio_preload.js @@ -37,7 +37,7 @@ function load_verovio() { // an incipit into a target div. It will do the preloading // in the background function render_music(music, format, target, width) { - width = typeof width !== 'undefined' ? width : 720; + var width = typeof width !== 'undefined' ? width : 720; if (vrvToolkit == null) { deferred_render_data.push({ @@ -52,7 +52,7 @@ function render_music(music, format, target, width) { if (format === "pae") { var options = { - from: 'pae', + inputFrom: 'pae', pageMarginTop: 40, pageMarginBottom: 60, pageMarginLeft: 20, @@ -64,7 +64,7 @@ function render_music(music, format, target, width) { }; vrvToolkit.setOptions( options ); - vrvToolkit.loadData(music + "\n" ); + vrvToolkit.loadData(music); var svg = vrvToolkit.renderToSVG(1, {}); $(target).html(svg); } else { diff --git a/app/views/advanced/_advanced_search_form.html.erb b/app/views/advanced/_advanced_search_form.html.erb index 9e41ab007..a60beef3a 100644 --- a/app/views/advanced/_advanced_search_form.html.erb +++ b/app/views/advanced/_advanced_search_form.html.erb @@ -176,13 +176,10 @@ link = send(search_function) pae_incipit = "1-" } - pae = "@start:pae-file\n"; - pae = pae + "@clef:" + pae_clef + "\n"; + var pae = "@clef:" + pae_clef + "\n"; pae = pae + "@keysig:" + pae_keysig + "\n"; - pae = pae + "@key:\n"; pae = pae + "@timesig:" + pae_timesig + "\n"; - pae = pae + "@data: " + pae_incipit + "\n"; - pae = pae + "@end:pae-file\n" + pae = pae + "@data: " + pae_incipit; render_music(pae, 'pae'); } diff --git a/app/views/marc_show/_show_incipit.html.erb b/app/views/marc_show/_show_incipit.html.erb index 93b47ecb8..0b2c9c6a5 100644 --- a/app/views/marc_show/_show_incipit.html.erb +++ b/app/views/marc_show/_show_incipit.html.erb @@ -84,13 +84,11 @@