Bugzilla – Attachment 71404 Details for
Bug 20166
Untranslatable course reserves delete prompt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20166: Untranslatable course reserves delete prompt
Bug-20166-Untranslatable-course-reserves-delete-pr.patch (text/plain), 2.91 KB, created by
Katrin Fischer
on 2018-02-11 15:30:42 UTC
(
hide
)
Description:
Bug 20166: Untranslatable course reserves delete prompt
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-02-11 15:30:42 UTC
Size:
2.91 KB
patch
obsolete
>From f9d98b5838905cfc353baf3a1ae2362c96851c7a Mon Sep 17 00:00:00 2001 >From: Pasi Kallinen <pasi.kallinen@joensuu.fi> >Date: Fri, 9 Feb 2018 08:35:18 +0200 >Subject: [PATCH] Bug 20166: Untranslatable course reserves delete prompt > >Having a Template Toolkit statements inside the javascript >translation function _() prevents it from being picked for >translation. > >The only example of such is the course reserve delete prompt. >Move the TT statement outside the string. > >Test plan: > >1) Update and install language xx-YY. Check that the msgids > "Are you sure you want to delete this course? There is %s attached item." > and > "Are you sure you want to delete this course? There are %s attached items." > do not exist in the xx-YY-staff-prog.po >2) Check the translated file > intranet-tmpl/prog/fi-FI/modules/course_reserves/course-details.tt > It should have two prompt texts above in English >3) Install patch >4) Update the language. Check that the msgids show up in > xx-YY-staff-prog.po, translate them, and install the language. >5) Repeat 2, the prompts should now show up in the correct language. >6) Enable UsecourseReserves >7) Go to Home -> Course reserves >8) Create a new course, and add reserves to it >9) See the course details. Click on Delete course, the prompt > should be correctly translated >10) Remove all but one of the reserves from the course >11) Repeat 9 > >To see if there are other such TT statements: > > rgrep -E '\b_\("[^"]*\[%' koha-tmpl/ > >Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> >Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> >--- > .../intranet-tmpl/prog/en/modules/course_reserves/course-details.tt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >index a995262..bdddeb5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >@@ -211,9 +211,9 @@ > $("#delete_course").click(function(){ > [% SET count = course_reserves.size || 0 %] > [% IF count == 1 %] >- return confirmDelete(_("Are you sure you want to delete this course? There is [% count %] attached item.") ); >+ return confirmDelete(_("Are you sure you want to delete this course? There is %s attached item.").format([% count %]) ); > [% ELSIF count > 1 %] >- return confirmDelete(_("Are you sure you want to delete this course? There are [% count %] attached items.") ); >+ return confirmDelete(_("Are you sure you want to delete this course? There are %s attached items.").format([% count %]) ); > [% ELSE %] > return confirmDelete(_("Are you sure you want to delete this course?")); > [% END %] >-- >2.1.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 20166
:
71364
|
71391
| 71404