Bugzilla – Attachment 155124 Details for
Bug 31694
MARC overlay rules presets don't change anything if presets are translated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31694: (follow-up) Further improve translatability
Bug-31694-follow-up-Further-improve-translatabilit.patch (text/plain), 6.31 KB, created by
Shi Yao Wang
on 2023-09-01 14:37:55 UTC
(
hide
)
Description:
Bug 31694: (follow-up) Further improve translatability
Filename:
MIME Type:
Creator:
Shi Yao Wang
Created:
2023-09-01 14:37:55 UTC
Size:
6.31 KB
patch
obsolete
>From ec5d9d2710fbfbcd21dc14fd1d7a91315417ae13 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Mon, 24 Oct 2022 22:40:28 +0000 >Subject: [PATCH] Bug 31694: (follow-up) Further improve translatability > >To test: >* Add rules fo different modules and with different settings >* Verify the saved module description for a saved rule matches the pull down >* Verify the saved filter matches the pull downs (especially for source and patron category) > >Also: >* Renames 'User category' to 'Patron category' >* Remove some values from translations, that shouldn't be translated, like value attributs for options. >--- > .../en/modules/admin/marc-overlay-rules.tt | 54 ++++++++++++++----- > 1 file changed, 41 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt >index 54851518bd..3c1aa17671 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt >@@ -3,6 +3,7 @@ > [% USE Asset %] > [% USE Koha %] > [% USE KohaSpan %] >+[% USE Categories %] > [% PROCESS 'i18n.inc' %] > [% PROCESS 'i18n.inc' %] > [% SET footerjs = 1 %] >@@ -99,7 +100,7 @@ > <th> > <select name="module"> > <option value="source">Source</option> >- <option value="categorycode">User category</option> >+ <option value="categorycode">Patron category</option> > <option value="userid">Username</option> > </select> > </th> >@@ -231,8 +232,35 @@ > <td></td> > [% ELSE %] > <td>[% rule.id | html %]</td> >- <td class="rule-module">[% rule.module | html %]</td> >- <td class="rule-filter">[% rule.filter | html %]</td> >+ <td class="rule-module"> >+ [% SWITCH rule.module %] >+ [% CASE 'source' %]<span>Source</span> >+ [% CASE 'categorycode' %]<span>Patron category</span> >+ [% CASE 'userid' %]<span>Username</span> >+ [% CASE %]<span>[% rule.module | html %]</span> >+ [% END %] >+ </td> >+ <td class="rule-filter"> >+ [% IF rule.module == "source" %] >+ [% SWITCH rule.filter %] >+ [% CASE 'batchmod' %]<span>Batch record modification</span> >+ [% CASE 'intranet' %]<span>Staff interface MARC editor</span> >+ [% CASE 'batchimport' %]<span>Staged MARC import</span> >+ [% CASE 'z3950' %]<span>Z39.50</span> >+ [% CASE 'bulkmarkimport' %]<span>bulkmarkimport.pl</span> >+ [% CASE 'import_lexile' %]<span>import_lexile.pl</span> >+ [% CASE %]<span>[% rule.filter | html %]</span> >+ [% END %] >+ [% ELSIF rule.module == "categorycode" %] >+ [% IF rule.filter != "*" %] >+ [% Categories.GetName( rule.filter ) | html %] >+ [% ELSE %] >+ [% rule.filter %] >+ [% END %] >+ [% ELSE %] >+ [% rule.filter | html %] >+ [% END %] >+ </td> > <td>[% rule.tag | html %]</td> > <td class="rule-preset"></td> > <td class="rule-operation-action" data-operation="add">[% IF rule.add %]Add[% ELSE %]Skip[% END %]</td> >@@ -371,31 +399,31 @@ > })); > > var overlay_rules_presets = {}; >- overlay_rules_presets[_("protect")] = { >+ overlay_rules_presets["protect"] = { > 'add': 0, > 'append': 0, > 'remove': 0, > 'delete': 0 > }; >- overlay_rules_presets[_("overwrite")] = { >+ overlay_rules_presets["overwrite"] = { > 'add': 1, > 'append': 1, > 'remove': 1, > 'delete': 1 > }; >- overlay_rules_presets[_("add")] = { >+ overlay_rules_presets["add"] = { > 'add': 1, > 'append': 0, > 'remove': 0, > 'delete': 0 > }; >- overlay_rules_presets[_("addappend")] = { >+ overlay_rules_presets["addappend"] = { > 'add': 1, > 'append': 1, > 'remove': 0, > 'delete': 0 > }; >- overlay_rules_presets[_("protectfromdeletion")] = { >+ overlay_rules_presets["protectfromdeletion"] = { > 'add': 1, > 'append': 1, > 'remove': 1, >@@ -403,11 +431,11 @@ > }; > > var overlay_rules_label_to_value = {}; >- overlay_rules_label_to_value[_("Add")] = 1; >- overlay_rules_label_to_value[_("Append")] = 1; >- overlay_rules_label_to_value[_("Remove")] = 1; >- overlay_rules_label_to_value[_("Delete")] = 1; >- overlay_rules_label_to_value[_("Skip")] = 0; >+ overlay_rules_label_to_value["add"] = 1; >+ overlay_rules_label_to_value["append"] = 1; >+ overlay_rules_label_to_value["remove"] = 1; >+ overlay_rules_label_to_value["delete"] = 1; >+ overlay_rules_label_to_value["skip"] = 0; > > function hash_config(config) { > return JSON.stringify(config, Object.keys(config).sort()); >-- >2.34.1
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 31694
:
141401
|
142579
|
142580
|
142598
|
144407
|
144408
|
144409
|
149601
|
149602
|
155123
|
155124
|
155125
|
155126
|
159121
|
159122
|
159123
|
159124
|
159192
|
159250
|
159251
|
159252
|
159253
|
160194
|
160195
|
160196
|
160197
|
160198