Bugzilla – Attachment 34607 Details for
Bug 13341
Hard-coded "Preview" text in OPAC openlibrary.js
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed-off] Bug 13341 - Hard-coded "Preview" text in OPAC openlibrary.js
Signed-off-Bug-13341---Hard-coded-Preview-text-in-.patch (text/plain), 2.75 KB, created by
Marc Véron
on 2014-12-20 19:04:51 UTC
(
hide
)
Description:
[Signed-off] Bug 13341 - Hard-coded "Preview" text in OPAC openlibrary.js
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2014-12-20 19:04:51 UTC
Size:
2.75 KB
patch
obsolete
>From 53db493c4774fb102d15f2dfeaea96c0b4673cec Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 10 Dec 2014 09:02:57 -0500 >Subject: [PATCH] [Signed-off] Bug 13341 - Hard-coded "Preview" text in OPAC > openlibrary.js >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The OpenLibrary JavaScript includes an untranslated string, "Preview." >This patch move the string to the template so that it can be translated. > >To test, apply the patch and test that the translator picks up the >string: > >1. From misc/translator run 'perl translate update [lang]' (e.g. de-DE) >2. Edit misc/translator/po/[lang]-opac-bootstrap.po and add a > translation for the updated "Preview" string >3. Remove the "#, fuzzy" marker from that entry >4. From misc/translator run 'perl translate install [lang]' >5. Enable the [lang] translation for the OPAC in system preferences >6. Enable the OpenLibraryCovers system preference. >7. In the OPAC switch to the [lang] translation. >7. View the detail page for a title for which there is an OpenLibrary > cover image. Below it you should see a preview link with the > translated string you added in step 2. > >Works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc | 1 + > koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >index f4c35c2..0220d26 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >@@ -170,6 +170,7 @@ $.widget.bridge('uitooltip', $.ui.tooltip); > <script type="text/javascript"> > //<![CDATA[ > var NO_OL_JACKET = _("No cover image available"); >+ var OL_PREVIEW = _("Preview"); > //]]> > </script> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js b/koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js >index 9142273..995cb6b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js >@@ -49,7 +49,7 @@ KOHA.OpenLibrary = { > if (is_opacdetail) { > img.src = book.cover.medium; > $(this).empty().append(img); >- $(this).append('<div class="results_summary">' + '<a href="' + book.url + '">Preview</a></div>'); >+ $(this).append('<div class="results_summary">' + '<a href="' + book.url + '">' + OL_PREVIEW + '</a></div>'); > } else { > img.src = book.cover.medium; > img.height = '110'; >-- >1.7.10.4
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 13341
:
34279
|
34607
|
34714