Bugzilla – Attachment 140193 Details for
Bug 30517
Translation breaks editing parent type circulation rule
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30517: Translation breaks editing parent type circulation rule fix
Bug-30517-Translation-breaks-editing-parent-type-c.patch (text/plain), 2.83 KB, created by
ByWater Sandboxes
on 2022-09-03 08:25:39 UTC
(
hide
)
Description:
Bug 30517: Translation breaks editing parent type circulation rule fix
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2022-09-03 08:25:39 UTC
Size:
2.83 KB
patch
obsolete
>From 6e76edbb9b51809b456aa48bd41726981105289e Mon Sep 17 00:00:00 2001 >From: Shi Yao Wang <shi-yao.wang@inlibro.com> >Date: Tue, 19 Apr 2022 11:52:42 -0400 >Subject: [PATCH] Bug 30517: Translation breaks editing parent type circulation > rule fix >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Test plan: >1. Install another language in the staff interface > 1. in commandline: `cd misc/translator/; ./translate install xx-XX` > 2. Check the box of the language in the 'language' system preference >and save > 3. Refresh and you should be able to choose languages >2. Create an item type with a parent > 1. Go to Administration > Item types > 2. Create a new item type or modify an existing one, assigning a parent type (I created a 'Children's books' type and assigned 'Books' as its parent) >3. Create a circulation rule for the parent type (I created All/Books, with 10 checkouts allowed) >4. Create a circulation rule for All/All (I created All/All with 30 checkouts allowed) >5. In English, click on "Edit" next to the parent type rule (All/Books) >--> Note that the item type in the bottom row (the modifiable row) is changed to 'Books (All)' >6. Modify the number of checkouts allowed (e.g. 99) >--> The All/Books rule is modified >7. Switch the interface to the other language >8. Click on "Edit" next to the parent type rule (All/Books) >--> Note that the item type in the bottom row stays on 'All' >9. Modify the number of checkouts allowed (e.g. 88) >--> The All/All rule is modified >10. Apply the patch, translate again and refresh the page >11. Do step 8-9 again and notice it now behaves as it should > >Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index ff0a54a56b..5e7a34005e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -1428,7 +1428,7 @@ > // select the corresponding option > $(current_column).find("select option").each(function(){ > opt = $(this).text().toLowerCase(); >- opt = opt.replace(/ \(all\)$/,""); //If option is a parent, compare without (All) >+ opt = opt.replace(/ \(\w*?\)$/,""); //If option is a parent, compare without (All) or the equivalent in other languages > itm = itm.replace(/.*->(.*)/,"$1"); //If item type is part of a group we need to clear the parent description > opt = opt.replace(/^\s*|\s*$/g,''); > if ( opt == itm.toLowerCase() ) { >-- >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 30517
:
133364
|
133404
|
139718
|
140091
|
140193
|
141202