Bugzilla – Attachment 157358 Details for
Bug 35081
"Your concern was sucessfully submitted." untranslatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35081: Make it possible to translate catalog concern status messages
Bug-35081-Make-it-possible-to-translate-catalog-co.patch (text/plain), 4.88 KB, created by
Katrin Fischer
on 2023-10-18 20:22:06 UTC
(
hide
)
Description:
Bug 35081: Make it possible to translate catalog concern status messages
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-10-18 20:22:06 UTC
Size:
4.88 KB
patch
obsolete
>From e5d85c6b04632dd5494dca0d4de69452c100f290 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 17 Oct 2023 17:43:45 +0000 >Subject: [PATCH] Bug 35081: Make it possible to translate catalog concern > status messages > >The JavaScript in both OPAC and staff interface for submitting catalog >concerns contains English strings which are not properly wrapped with >the __() function to allow for translation. This patch fixes both >affected files. > >The patch also modifies the dialog classes used in the staff interface >so that the messages are styled consistently. > >To test, apply the patch and update a translation, e.g. fr-FR: > - perl misc/translator/translate update fr-FR >- Edit the updated po file for the language you chose, e.g. > misc/translator/po/fr-FR-messages-js.po, to fill in translated > strings for the two catalog concern entries. For example: > > koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js:38 > koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js:55 > msgid "Your concern was sucessfully submitted." > msgstr "" > >- Install the updated po file: > - perl misc/translator/translate install fr-FR >- Enable the translation if necessary under Administration -> System > preferences -> language. >- Enable the "opaclanguagesdisplay" preference if necessary. >- Enable the " CatalogConcerns" preference if necessary. >- Locate a bibliographic record in the staff interface and view the > detail page > - From the toolbar, choose New -> New catalog concern. > - Test submitting the form. When the form is submitted a message > should display on the page: "Your concern was sucessfully submitted" > >- Perform the same test in the OPAC, where the "Report a concern" link > is in the right-hand sidebar menu of the bibliographic detail page. > >- Perform the same tests, in both OPAC and staff interface, in your > translated language to confirm that the translations show up > correctly. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js | 4 ++-- > koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js b/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js >index 10e2536fc2..3c48f67afb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js >@@ -35,7 +35,7 @@ $(document).ready(function() { > $('#addConcernModal').modal('hide'); > $('#concern_body').val(''); > $('#concern_title').val(''); >- $('#toolbar').before('<div class="alert alert-success">Your concern was sucessfully submitted.</div>'); >+ $('#toolbar').before('<div class="dialog message">' + __("Your concern was sucessfully submitted.") + '</div>'); > if ($.fn.dataTable.isDataTable("#table_concerns")) { > $("#table_concerns").DataTable().ajax.reload(); > } >@@ -43,7 +43,7 @@ $(document).ready(function() { > error: function(data) { > $('#concern-submit-spinner').hide(); > $('#addConcernModal').modal('hide'); >- $('#toolbar').before('<div class="alert alert-error">There was an error when submitting your concern, please contact a librarian.</div>'); >+ $('#toolbar').before('<div class="dialog alert">' + __("There was an error when submitting your concern, please contact a librarian.") + '</div>'); > }, > contentType: "json" > }); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js b/koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js >index 817c9dd4a3..18e60156f4 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js >@@ -52,12 +52,12 @@ $(document).ready(function() { > $('#addConcernModal').modal('hide'); > $('#concern_body').val(''); > $('#concern_title').val(''); >- $('h1:first').before('<div class="alert alert-success">Your concern was sucessfully submitted.</div>'); >+ $('h1:first').before('<div class="alert alert-success">' + __("Your concern was sucessfully submitted.") + '</div>'); > }, > error: function(data) { > $('#concern-submit-spinner').hide(); > $('#addConcernModal').modal('hide'); >- $('h1:first').before('<div class="alert alert-error">There was an error when submitting your concern, please contact a librarian.</div>'); >+ $('h1:first').before('<div class="alert alert-error">' + __("There was an error when submitting your concern, please contact a librarian.") + '</div>'); > }, > contentType: "json" > }); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35081
:
157306
|
157358
|
157479