Skip to content

Commit 8e6c12a

Browse files
authored
Merge pull request #124 from cwolfebsco/translation-enhancements
Translation Enhancements (ER#2271841)
2 parents c7a44d1 + 004ecef commit 8e6c12a

18 files changed

Lines changed: 3686 additions & 2447 deletions

Koha/Plugin/EDS.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ $PluginDir = $PluginDir.'/Koha/Plugin/EDS';
3131

3232
################# DO NOT TOUCH - CONTROLLED BY build.py
3333
our $MAJOR_VERSION = "21.11";
34-
our $SUB_VERSION = "003";
34+
our $SUB_VERSION = "004";
3535
our $VERSION = $MAJOR_VERSION . "" . $SUB_VERSION;
3636
our $SHA_ADD = "https://widgets.ebscohost.com/prod/api/koha/sha/1711.json";
37-
our $DATE_UPDATE = '2022-08-12';
37+
our $DATE_UPDATE = '2023-04-04';
3838
######################################################
3939

4040
## Here is our metadata, some keys are required, some are optional
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- DO NOT TOUCH THIS FILE - controlled by build.py -->
33
<kohaplugin>
4-
<latestversion>21.11.003</latestversion>
4+
<latestversion>21.11.004</latestversion>
55
<download>https://github.com/ebsco/edsapi-koha-plugin</download>
6-
<lastupdated>2022/08/12</lastupdated>
6+
<lastupdated>2023/04/04</lastupdated>
77
<releasenotes>
8-
<release version="21.11.003" date="2022/08/12">
9-
<note id="1" author="mabrahamson@ebsco.com">Fixes issue with publication placard.</note>
8+
<release version="21.11.004" date="2023/04/04">
9+
<note id="1" author="cwolf@ebsco.com">Adds additional support for translations.</note>
1010
</release>
1111
</releasenotes>
1212
</kohaplugin>
Lines changed: 154 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,154 @@
1-
<div id="search-facets">
2-
<h2><a href="#" class="menu-collapse-toggle">[% EDSLANG.eds_facets_INC_refine_search %]</a></h2>
3-
<ul class="menu-collapse">
4-
<li id="availability_facet">
5-
[% EDSLANG.eds_facets_INC_current_search %]
6-
7-
[% IF query %]
8-
<ul>
9-
<li>[% EDSLANG.eds_facets_INC_search_term %]</li>
10-
[% FOR searchQuery IN query %]
11-
<li>
12-
<a href="[% searchQuery.RemoveAction %]"><input type="checkbox" checked onchange="window.location.href=($(this).parent().attr('href'));$(this).attr('disabled','disabled');" > [% searchQuery.Query.BooleanOperator %][% IF searchQuery.Query.FieldCode %], [% searchQuery.Query.FieldCode %][% END %] : <span id="searchTerm">[% searchQuery.Query.Term %]</span></a>
13-
</li>
14-
[% END %]
15-
</ul>
16-
[% END %]
17-
18-
19-
[% IF filters %]
20-
<ul>
21-
<li><strong>[% EDSLANG.eds_facets_INC_active_facets %]</strong></li>
22-
[% FOR facetFilter IN filters %]
23-
[% FOR facetFilterItem IN facetFilter.FacetValuesWithAction %]
24-
<li>
25-
<a href="[% facetFilterItem.RemoveAction %]"><input type="checkbox" checked onchange="window.location.href=($(this).parent().attr('href'));$(this).attr('disabled','disabled');" > [% facetFilterItem.FacetValue.Id %] : [% facetFilterItem.FacetValue.Value %]</a>
26-
</li>
27-
[% END %]
28-
[% END %]
29-
</ul>
30-
[% END %]
31-
32-
</li> [% #seperate search criteria and facets %]
33-
34-
[% IF limiters %]
35-
<li>
36-
37-
<ul>
38-
<li><strong>[% EDSLANG.eds_facets_INC_limit_to %]</strong></li>
39-
[% FOR EDSLimit IN limiters %]
40-
[% IF EDSLimit.Type =='select' %]
41-
<li>
42-
<a href="[% EDSLimit.AddAction %]">[% EDSLimit.Label %] </a>
43-
</li>
44-
[% END %]
45-
[% END %]
46-
</ul>
47-
[% FOR EDSLimit IN limiters %][% IF EDSLimit.Type =='ymrange' %]
48-
[% IF daterange %]
49-
<ul>
50-
<li><strong>[% EDSLimit.Label %]</strong> <br>
51-
52-
<div id="eds-dateholder" align="center">
53-
<div class="input-append">
54-
<input id="published-date" name="published-date" title="Enter a date range and press Enter or clear this textbox to remove the date limiter." type="text" onkeypress="DateHandleKeyPress(event,this)" style="text-align:center;font-size:12px;" placeholder="YYYY-MM/YYYY-MM" value="[% EDSLimit.DateValue %]" >
55-
<span id="eds-clear-date" style="cursor:pointer;" class="add-on" title="Clear"><i class="icon-remove"></i></span>
56-
<span id="eds-apply-date" style="cursor:pointer;" class="add-on" title="Apply"><i class="icon-ok"></i></span>
57-
</div>
58-
</div>
59-
60-
<input id="range-published-date" data-mindate="[% daterange.MinDate %]" data-maxdate="[% daterange.MaxDate %]" name="range-published-date" type="text" style="text-align:center;width:80%;" >
61-
62-
63-
[% #action=removelimiter(DT1) %]
64-
<script>var dateAction = "[% EDSLimit.AddAction %]";</script>
65-
</li>
66-
</ul>
67-
[% END %]
68-
[% END %][% END %]
69-
[% IF expanders %]
70-
<ul>
71-
<li><strong>[% EDSLANG.eds_facets_INC_expand_to %]</strong></li>
72-
[% FOR expander IN expanders %]
73-
<li>
74-
<a href="[% expander.AddAction %]">[% expander.Label %] </a>
75-
</li>
76-
[% END %]
77-
</ul>
78-
[% END %]
79-
80-
</li> [% #seperate limit and search criteria %]
81-
[% END %]
82-
83-
[% FOR facets IN facets_loop %]
84-
<li class="eds-facets">
85-
<span class="eds-facet-label">[% facets.Label %]</span>
86-
<div style="max-height:200px;overflow:auto;margin:3px;">
87-
<ul>
88-
[% FOR FacetValues IN facets.AvailableFacetValues %]
89-
<li>
90-
<input type="checkbox" name="filter[]" value="" onChange="SetFacet(this);">
91-
<a href="[% FacetValues.AddAction %]">[% FacetValues.Value %]</a> ([% FacetValues.Count %])
92-
</li>
93-
[% END %]
94-
</ul>
95-
</div>
96-
</li>
97-
[% END %]
98-
99-
100-
</ul>
101-
</div>
102-
103-
[% IF ( OPACResultsSidebar ) %]
104-
<div id="opacresultssidebar">
105-
[% OPACResultsSidebar %]
106-
</div>
107-
[% END %]
1+
<div id="search-facets">
2+
<h2><a href="#" class="menu-collapse-toggle">[% EDSLANG.eds_facets_INC_refine_search %]</a></h2>
3+
<ul class="menu-collapse">
4+
<li id="availability_facet">
5+
[% EDSLANG.eds_facets_INC_current_search %]
6+
7+
[% IF query %]
8+
<ul>
9+
<li>[% EDSLANG.eds_facets_INC_search_term %]</li>
10+
[% FOR searchQuery IN query %]
11+
<li>
12+
<a href="[% searchQuery.RemoveAction %]"><input type="checkbox" checked onchange="window.location.href=($(this).parent().attr('href'));$(this).attr('disabled','disabled');" > [% searchQuery.Query.BooleanOperator %][% IF searchQuery.Query.FieldCode %], [% searchQuery.Query.FieldCode %][% END %] : <span id="searchTerm">[% searchQuery.Query.Term %]</span></a>
13+
</li>
14+
[% END %]
15+
</ul>
16+
[% END %]
17+
18+
19+
[% IF filters %]
20+
<ul>
21+
<li><strong>[% EDSLANG.eds_facets_INC_active_facets %]</strong></li>
22+
[% FOR facetFilter IN filters %]
23+
[% FOR facetFilterItem IN facetFilter.FacetValuesWithAction %]
24+
<li>
25+
<a href="[% facetFilterItem.RemoveAction %]"><input type="checkbox" checked onchange="window.location.href=($(this).parent().attr('href'));$(this).attr('disabled','disabled');" > [% facetFilterItem.FacetValue.Id %] : [% facetFilterItem.FacetValue.Value %]</a>
26+
</li>
27+
[% END %]
28+
[% END %]
29+
</ul>
30+
[% END %]
31+
32+
</li> [% #seperate search criteria and facets %]
33+
34+
[% IF limiters %]
35+
<li>
36+
37+
<ul>
38+
<li><strong>[% EDSLANG.eds_facets_INC_limit_to %]</strong></li>
39+
[% FOR EDSLimit IN limiters %]
40+
[% limiterPrefix = 'eds_limiter_'
41+
limiterId = EDSLimit.Id
42+
limiterMetaKey = limiterPrefix _ limiterId
43+
limiterLabelText = EDSLANG.$limiterMetaKey
44+
%]
45+
[% IF limiterLabelText.empty %]
46+
[% limiterLabelText = EDSLimit.Label %]
47+
[% END %]
48+
[% IF EDSLimit.Type =='select' %]
49+
<li>
50+
<a href="[% EDSLimit.AddAction %]">[% EDSLimit.CheckBox %] [% limiterLabelText %] </a>
51+
</li>
52+
[% END %]
53+
[% END %]
54+
</ul>
55+
[% FOR EDSLimit IN limiters %][% IF EDSLimit.Type =='ymrange' %]
56+
[% IF daterange %]
57+
<ul>
58+
[%
59+
limiterLabelText = EDSLANG.eds_limiter_DT1
60+
%]
61+
[% IF limiterLabelText.empty %]
62+
[% limiterLabelText = EDSLimit.Label %]
63+
[% END %]
64+
<li><strong>[% limiterLabelText %]</strong> <br>
65+
66+
<div id="eds-dateholder" align="center">
67+
<div class="input-append">
68+
<input id="published-date" name="published-date" title="Enter a date range and press Enter or clear this textbox to remove the date limiter." type="text" onkeypress="DateHandleKeyPress(event,this)" style="text-align:center;font-size:12px;" placeholder="YYYY-MM/YYYY-MM" value="[% EDSLimit.DateValue %]" >
69+
<span id="eds-clear-date" style="cursor:pointer;" class="add-on" title="Clear"><i class="icon-remove"></i></span>
70+
<span id="eds-apply-date" style="cursor:pointer;" class="add-on" title="Apply"><i class="icon-ok"></i></span>
71+
</div>
72+
</div>
73+
74+
<input id="range-published-date" data-mindate="[% daterange.MinDate %]" data-maxdate="[% daterange.MaxDate %]" name="range-published-date" type="text" style="text-align:center;width:80%;" >
75+
76+
77+
[% #action=removelimiter(DT1) %]
78+
<script>var dateAction = "[% EDSLimit.AddAction %]";</script>
79+
</li>
80+
</ul>
81+
[% END %]
82+
[% END %][% END %]
83+
[% IF expanders %]
84+
<ul>
85+
<li><strong>[% EDSLANG.eds_facets_INC_expand_to %]</strong></li>
86+
[% FOR expander IN expanders %]
87+
<li>
88+
[% expanderPrefix = 'eds_expander_'
89+
expanderId = expander.Id
90+
expanderMetaKey = expanderPrefix _ expanderId
91+
expanderLabelText = EDSLANG.$expanderMetaKey
92+
%]
93+
[% IF expanderLabelText.empty %]
94+
[% expanderLabelText = expander.Label %]
95+
[% END %]
96+
<li>
97+
<a href="[% expander.AddAction %]">[% expander.CheckBox %] [% expanderLabelText %]</a>
98+
</li>
99+
</li>
100+
[% END %]
101+
</ul>
102+
[% END %]
103+
104+
</li> [% #seperate limit and search criteria %]
105+
[% END %]
106+
107+
[% FOR facets IN facets_loop %]
108+
<li class="eds-facets">
109+
[% metaPrefix = 'eds_facets_'
110+
facetName = facets.Label.replace(' ','_').replace('/','_').replace('-','_').replace('\(','').replace('\)','')
111+
metaKey = metaPrefix _ facetName
112+
labelText = EDSLANG.$metaKey
113+
%]
114+
[% IF labelText.empty %]
115+
[% labelText = facets.Label %]
116+
[% END %]
117+
<span class="eds-facet-label">[% labelText %]</span>
118+
<div style="max-height:200px;overflow:auto;margin:3px;">
119+
<ul>
120+
[% FOR FacetValues IN facets.AvailableFacetValues %]
121+
[% IF facets.Label =='Source Type' %]
122+
[% sourcetypePrefix = 'eds_sourcetypes_'
123+
sourcetypeName = FacetValues.Value.replace(' ','_').replace('/','_').replace('-','_').replace('\(','').replace('\)','')
124+
sourcetypeMetaKey = sourcetypePrefix _ sourcetypeName
125+
sourcetypeLabelText = EDSLANG.$sourcetypeMetaKey
126+
%]
127+
[% IF sourcetypeLabelText.empty %]
128+
[% sourcetypeLabelText = FacetValues.Value %]
129+
[% END %]
130+
<li>
131+
<input type="checkbox" name="filter[]" value="" onChange="SetFacet(this);">
132+
<a href="[% FacetValues.AddAction %]">[% sourcetypeLabelText %]</a> <span dir="ltr">([% FacetValues.Count %])</span>
133+
</li>
134+
[% ELSE %]
135+
<li>
136+
<input type="checkbox" name="filter[]" value="" onChange="SetFacet(this);">
137+
<a href="[% FacetValues.AddAction %]">[% FacetValues.Value %]</a> <span dir="ltr">([% FacetValues.Count %])</span>
138+
</li>
139+
[% END %]
140+
[% END %]
141+
</ul>
142+
</div>
143+
</li>
144+
[% END %]
145+
146+
147+
</ul>
148+
</div>
149+
150+
[% IF ( OPACResultsSidebar ) %]
151+
<div id="opacresultssidebar">
152+
[% OPACResultsSidebar %]
153+
</div>
154+
[% END %]

Koha/Plugin/EDS/bootstrap/includes/eds-resort_form.inc

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,20 @@
6060
[% IF search_modes %]
6161
[% EDSLANG.eds_resort_form_INC_search_mode %]<select id="searchmode" name="searchmode" onChange="getSelectedText('#searchmode')">
6262
[% FOREACH mode IN search_modes %]
63+
64+
[% searchModePrefix = 'eds_resort_form_'
65+
modeId = mode.Mode
66+
searchModeMetaKey = searchModePrefix _ modeId
67+
searchModeLabelText = EDSLANG.$searchModeMetaKey
68+
%]
69+
[% IF searchModeLabelText.empty %]
70+
[% searchModeLabelText = mode.Label %]
71+
[% END %]
72+
6373
[% IF current_mode == mode.Mode %]
64-
<option name="[% mode.Mode %]" selected="selected" value="[% mode.AddAction %]">[% mode.Label %]</option>
74+
<option name="[% mode.Mode %]" selected="selected" value="[% mode.AddAction %]">[% searchModeLabelText %]</option>
6575
[% ELSE %]
66-
<option name="[% mode.Mode %]" value="[% mode.AddAction %]">[% mode.Label %]</option>
76+
<option name="[% mode.Mode %]" value="[% mode.AddAction %]">[% searchModeLabelText %]</option>
6777
[% END %]
6878
[% END %]
6979
</select>
@@ -78,10 +88,20 @@
7888
</script>
7989
[% EDSLANG.eds_resort_form_INC_sort_by %]<select id="sortby" name="sortby" onChange="getSelectedText('#sortby')">
8090
[% FOREACH ind IN sortable_indexes.sort %]
91+
92+
[% sortByPrefix = 'eds_resort_form_'
93+
sortId = ind.Id
94+
sortByMetaKey = sortByPrefix _ sortId
95+
sortByLabelText = EDSLANG.$sortByMetaKey
96+
%]
97+
[% IF sortByLabelText.empty %]
98+
[% sortByLabelText = ind.Label %]
99+
[% END %]
100+
81101
[% IF sort_by == ind.Id %]
82-
<option name="[% ind.Id %]" selected="selected" value="[% ind.AddAction %]">[% ind.Label %]</option>
102+
<option name="[% ind.Id %]" selected="selected" value="[% ind.AddAction %]">[% sortByLabelText %]</option>
83103
[% ELSE %]
84-
<option name="[% ind.Id %]" value="[% ind.AddAction %]">[% ind.Label %]</option>
104+
<option name="[% ind.Id %]" value="[% ind.AddAction %]">[% sortByLabelText %]</option>
85105
[% END %]
86106
[% END %]
87107
</select>

0 commit comments

Comments
 (0)