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. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jan Kissig <jkissig@th-wildau.de> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
c5a98fe574
commit
b1cd199aaa
1 changed files with 41 additions and 13 deletions
|
@ -3,6 +3,7 @@
|
||||||
[% USE Asset %]
|
[% USE Asset %]
|
||||||
[% USE Koha %]
|
[% USE Koha %]
|
||||||
[% USE KohaSpan %]
|
[% USE KohaSpan %]
|
||||||
|
[% USE Categories %]
|
||||||
[% PROCESS 'i18n.inc' %]
|
[% PROCESS 'i18n.inc' %]
|
||||||
[% PROCESS 'i18n.inc' %]
|
[% PROCESS 'i18n.inc' %]
|
||||||
[% SET footerjs = 1 %]
|
[% SET footerjs = 1 %]
|
||||||
|
@ -99,7 +100,7 @@
|
||||||
<th>
|
<th>
|
||||||
<select name="module">
|
<select name="module">
|
||||||
<option value="source">Source</option>
|
<option value="source">Source</option>
|
||||||
<option value="categorycode">User category</option>
|
<option value="categorycode">Patron category</option>
|
||||||
<option value="userid">Username</option>
|
<option value="userid">Username</option>
|
||||||
</select>
|
</select>
|
||||||
</th>
|
</th>
|
||||||
|
@ -231,8 +232,35 @@
|
||||||
<td></td>
|
<td></td>
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
<td>[% rule.id | html %]</td>
|
<td>[% rule.id | html %]</td>
|
||||||
<td class="rule-module">[% rule.module | html %]</td>
|
<td class="rule-module">
|
||||||
<td class="rule-filter">[% rule.filter | html %]</td>
|
[% 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>[% rule.tag | html %]</td>
|
||||||
<td class="rule-preset"></td>
|
<td class="rule-preset"></td>
|
||||||
<td class="rule-operation-action" data-operation="add">[% IF rule.add %]Add[% ELSE %]Skip[% END %]</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 = {};
|
var overlay_rules_presets = {};
|
||||||
overlay_rules_presets[_("protect")] = {
|
overlay_rules_presets["protect"] = {
|
||||||
'add': 0,
|
'add': 0,
|
||||||
'append': 0,
|
'append': 0,
|
||||||
'remove': 0,
|
'remove': 0,
|
||||||
'delete': 0
|
'delete': 0
|
||||||
};
|
};
|
||||||
overlay_rules_presets[_("overwrite")] = {
|
overlay_rules_presets["overwrite"] = {
|
||||||
'add': 1,
|
'add': 1,
|
||||||
'append': 1,
|
'append': 1,
|
||||||
'remove': 1,
|
'remove': 1,
|
||||||
'delete': 1
|
'delete': 1
|
||||||
};
|
};
|
||||||
overlay_rules_presets[_("add")] = {
|
overlay_rules_presets["add"] = {
|
||||||
'add': 1,
|
'add': 1,
|
||||||
'append': 0,
|
'append': 0,
|
||||||
'remove': 0,
|
'remove': 0,
|
||||||
'delete': 0
|
'delete': 0
|
||||||
};
|
};
|
||||||
overlay_rules_presets[_("addappend")] = {
|
overlay_rules_presets["addappend"] = {
|
||||||
'add': 1,
|
'add': 1,
|
||||||
'append': 1,
|
'append': 1,
|
||||||
'remove': 0,
|
'remove': 0,
|
||||||
'delete': 0
|
'delete': 0
|
||||||
};
|
};
|
||||||
overlay_rules_presets[_("protectfromdeletion")] = {
|
overlay_rules_presets["protectfromdeletion"] = {
|
||||||
'add': 1,
|
'add': 1,
|
||||||
'append': 1,
|
'append': 1,
|
||||||
'remove': 1,
|
'remove': 1,
|
||||||
|
@ -403,11 +431,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
var overlay_rules_label_to_value = {};
|
var overlay_rules_label_to_value = {};
|
||||||
overlay_rules_label_to_value[_("Add")] = 1;
|
overlay_rules_label_to_value["add"] = 1;
|
||||||
overlay_rules_label_to_value[_("Append")] = 1;
|
overlay_rules_label_to_value["append"] = 1;
|
||||||
overlay_rules_label_to_value[_("Remove")] = 1;
|
overlay_rules_label_to_value["remove"] = 1;
|
||||||
overlay_rules_label_to_value[_("Delete")] = 1;
|
overlay_rules_label_to_value["delete"] = 1;
|
||||||
overlay_rules_label_to_value[_("Skip")] = 0;
|
overlay_rules_label_to_value["skip"] = 0;
|
||||||
|
|
||||||
function hash_config(config) {
|
function hash_config(config) {
|
||||||
return JSON.stringify(config, Object.keys(config).sort());
|
return JSON.stringify(config, Object.keys(config).sort());
|
||||||
|
|
Loading…
Reference in a new issue