blacklight 6.13.0 → 6.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f8e150bbc29ab7fea77523b447dddfc11c32c7d
4
- data.tar.gz: 5e9a545db8bf223f3ebf452464055408739d2620
3
+ metadata.gz: c80294fa4aef88bdf6ec8a3f7690825a05840f77
4
+ data.tar.gz: fb9bbf2a541804e29c34ad99c0e7eab733647c74
5
5
  SHA512:
6
- metadata.gz: a412554969d9774294084579801d8b35804d741952a8795fd45cd0d8c810c66c3a63e96c8611ef9663ecf1574e0ff0e2dc05dda706b2ed778ec0afec332babd8
7
- data.tar.gz: 2ab4d5eaf1663d0557f4d196f475f4819d816211b1006cbbc9caa406075c0d7f5c1a9a744de458e5a667ca5f7ecc6f9de6d0a159b57ce062d82c8265b1974695
6
+ metadata.gz: 1992d1b06cba55d9e3e1be01cb117631e211567e1a5b2c730d9b52a7a9d4c1229c83035bbe75530cdd1613105e110bd91e6b552a2828c692226eef38e9823c92
7
+ data.tar.gz: ba9c70f09afc9d98de7ec6340bca9884ca1d4f29980d6ea81c2ae8e2fc1a1a130a4d705902dfb853e5d2a90f0364691a157bd14b33fd0716f3332716e039d876
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.13.0
1
+ 6.14.0
@@ -0,0 +1,234 @@
1
+ zh:
2
+ views:
3
+ pagination:
4
+ first: '« 首页'
5
+ last: '末页 »'
6
+ previous: '« 上一页'
7
+ next: '下一页 »'
8
+ truncate: '…'
9
+
10
+ pagination_compact:
11
+ previous: '« 上一页'
12
+ next: '下一页 »'
13
+
14
+ blacklight:
15
+ application_name: 'Blacklight'
16
+
17
+ header_links:
18
+ login: '登陆'
19
+ logout: '注销'
20
+ bookmarks: '书签'
21
+ saved_searches: '保存的搜索'
22
+ search_history: '搜索历史'
23
+
24
+ welcome: '欢迎!'
25
+ and: '和'
26
+ or: '或'
27
+
28
+ modal:
29
+ close: "关闭"
30
+
31
+ bookmarks:
32
+ title: '书签'
33
+ page_title: '书签 - %{application_name}'
34
+ no_bookmarks: '你还没有任何书签'
35
+ add:
36
+ button: '书签'
37
+ success:
38
+ one: '成功添加书签。'
39
+ other: '成功添加书签。'
40
+ failure: '抱歉,保存书签时出错。'
41
+ remove:
42
+ button: '删除书签'
43
+ success: '成功删除书签。'
44
+ failure: '抱歉,删除书签时出错。'
45
+ action_confirm: '删除这个书签?'
46
+ clear:
47
+ action_title: '清除书签'
48
+ action_confirm: '清除所有书签?'
49
+ success: '已经清除了所有书签。'
50
+ failure: '抱歉,清除书签时出错。'
51
+ need_login: '登陆后才能访问你的书签功能。'
52
+ list_title: '你的书签'
53
+ delete: '删除'
54
+
55
+ saved_searches:
56
+ add:
57
+ success: '成功保存了您的搜索。'
58
+ failure: '保存搜索时出现问题。'
59
+ remove:
60
+ success: '成功删除保存的搜索。'
61
+ failure: '删除您的搜索时出现问题。'
62
+ clear:
63
+ action_title: '清除保存的搜索'
64
+ action_confirm: '清除您保存的搜索?'
65
+ success: '清除您保存的搜索。'
66
+ failure: '清除搜索时出现问题。'
67
+ title: '保存的搜索'
68
+ page_title: '保存的搜索 - %{application_name}'
69
+ need_login: '请登录来管理和查看您保存的搜索。'
70
+ no_searches: '您没有保存的搜索'
71
+ list_title: '您保存的搜索'
72
+ delete: '删除'
73
+
74
+ search_history:
75
+ clear:
76
+ action_title: '清除搜索历史'
77
+ action_confirm: '清除搜索历史?'
78
+ success: '已经清除搜索历史。'
79
+ failure: '清除搜索历史时出错。'
80
+ title: ''
81
+ page_title: '搜索历史 - %{application_name}'
82
+ no_history: '你没有任何搜索历史'
83
+ recent: '你最近搜索历史'
84
+ forget: '去除'
85
+ save: '保存'
86
+
87
+ tools:
88
+ title: '工具'
89
+ citation: '引用'
90
+ email: '电子邮件'
91
+ sms: '发送短信'
92
+ clear: '清除'
93
+
94
+ citation:
95
+ mla: 'MLA'
96
+ apa: 'APA'
97
+ chicago: 'Chicago'
98
+
99
+ email:
100
+ form:
101
+ title: '通过电子邮件发送'
102
+ to: '电子邮件:'
103
+ message: '正文:'
104
+ submit: '发送'
105
+ text:
106
+ default_title: '无'
107
+ title: '标题: %{value}'
108
+ author: '作者: %{value}'
109
+ format: '格式: %{value}'
110
+ language: '语言: %{value}'
111
+ subject:
112
+ one: '记录: %{title}'
113
+ other: '记录'
114
+ url: '网址: %{url}'
115
+ message: '正文: %{message}'
116
+
117
+ success: "已发送电子邮件"
118
+
119
+ errors:
120
+ to:
121
+ invalid: '请输入合法电子邮件地址'
122
+ blank: '请输入电子邮件接收人才能发送'
123
+ sms:
124
+ form:
125
+ title: '通过短信发送'
126
+ to: '电话号码:'
127
+ carrier: '运营商'
128
+ carrier_prompt: '请选择运营商'
129
+ submit: '发送'
130
+ text:
131
+ title: '%{value}'
132
+ author: ' 来自 %{value}'
133
+ url: '链接: %{url}'
134
+ success: "已发送短信"
135
+ errors:
136
+ to:
137
+ invalid: '请输入10位正确电话号码'
138
+ blank: "请输入接收人电话号码才能发送短信"
139
+ carrier:
140
+ blank: '你必须选择一个运营商'
141
+ invalid: "你必须输入一个运营商"
142
+
143
+ back_to_search: '返回搜索页面'
144
+ back_to_bookmarks: '返回书签页面'
145
+
146
+ search:
147
+ # i18n key 'title' is deprecated and will be removed in Blacklight 6.0
148
+ title: '%{application_name} 搜索结果'
149
+ page_title:
150
+ title: '%{constraints} - %{application_name} 搜索结果'
151
+ constraint: '%{label}: %{value}'
152
+ many_constraint_values: '%{values} 已选'
153
+ search_results_header: '搜索条件'
154
+ search_results: '搜索结果'
155
+ errors:
156
+ request_error: "抱歉,我不明白你要找什么。"
157
+ invalid_solr_id: "抱歉,你要找的结果不存在。"
158
+ per_page:
159
+ label: '%{count}<span class="sr-only"> 每页</span>'
160
+ button_label: '%{count} 每页'
161
+ title: '每页显示结果数'
162
+ submit: '更新'
163
+ sort:
164
+ label: '按 %{field} 排序'
165
+ submit: '排序'
166
+ form:
167
+ search_field:
168
+ label: '搜索字段'
169
+ title: '设定的搜索选项'
170
+ post_label: '为'
171
+ search:
172
+ label: '搜索'
173
+ placeholder: '搜索...'
174
+ submit: '搜索'
175
+ pagination:
176
+ title: '搜索结果导航'
177
+ pagination_info:
178
+ no_items_found: '没有找到 %{entry_name} '
179
+ single_item_found: '找到 <strong>1</strong> %{entry_name}'
180
+ pages:
181
+ one: '<strong>%{start_num}</strong> - <strong>%{end_num}</strong> 共 <strong>%{total_num}</strong>'
182
+ other: '<strong>%{start_num}</strong> - <strong>%{end_num}</strong> 共 <strong>%{total_num}</strong>'
183
+ entry_pagination_info:
184
+ one: '<strong>1 / 1</strong>'
185
+ other: '<strong>%{current}</strong> / <strong>%{total}</strong>'
186
+ documents:
187
+ counter: '%{counter}. '
188
+ facets:
189
+ title: '限定搜索'
190
+ clear: '清除搜索条件'
191
+ sort:
192
+ count: '按数量排序'
193
+ index: '按字母排序'
194
+ count: '%{number}'
195
+ more_html: '更多 <span class="sr-only">%{field_name}</span> »'
196
+ selected:
197
+ remove: '[删除]'
198
+ missing: "[未找到]"
199
+ group:
200
+ more: '更多 »'
201
+ filters:
202
+ title: '你在搜索:'
203
+ label: '%{label}:'
204
+ remove:
205
+ value: '删除限定条件 %{value}'
206
+ label_value: '删除限定条件 %{label}: %{value}'
207
+ start_over: '重新开始'
208
+ index:
209
+ label: '%{label}:'
210
+ show:
211
+ title: '%{document_title} - %{application_name}'
212
+ label: '%{label}:'
213
+ rss_feed: '搜索结果RSS'
214
+ atom_feed: '搜索结果Atom'
215
+ fields:
216
+ default: '关键词'
217
+ bookmarks:
218
+ present: "在书签中"
219
+ absent: "加入书签"
220
+ inprogress: "保存..."
221
+ zero_results:
222
+ title: "未找到任何结果"
223
+ modify_search: "请更改你的搜索条件"
224
+ use_fewer_keywords: "使用更少的搜索条件,使用左边的链接来筛选搜索结果。"
225
+ search_fields: "你在搜索如下字段 %{search_fields}"
226
+ search_everything: "试一试搜索所有记录"
227
+ view_title: "以如下方式察看搜索结果: "
228
+ view:
229
+ list: "列表"
230
+
231
+ entry_name:
232
+ default: '条目'
233
+
234
+ did_you_mean: '你是要输入: %{options} 吗?'
@@ -74,6 +74,7 @@ module Blacklight::Solr
74
74
  end.join(" AND ")
75
75
  end
76
76
 
77
+ solr_parameters[:defType] = 'lucene'
77
78
  solr_parameters[:spellcheck] = 'false'
78
79
  elsif blacklight_params[:q]
79
80
  solr_parameters[:q] = blacklight_params[:q]
@@ -147,23 +147,18 @@ class <%= controller_name.classify %>Controller < ApplicationController
147
147
 
148
148
  config.add_search_field('title') do |field|
149
149
  # solr_parameters hash are sent to Solr as ordinary url query params.
150
- field.solr_parameters = { :'spellcheck.dictionary' => 'title' }
151
-
152
- # :solr_local_parameters will be sent using Solr LocalParams
153
- # syntax, as eg {! qf=$title_qf }. This is neccesary to use
154
- # Solr parameter de-referencing like $title_qf.
155
- # See: http://wiki.apache.org/solr/LocalParams
156
- field.solr_local_parameters = {
157
- qf: '$title_qf',
158
- pf: '$title_pf'
150
+ field.solr_parameters = {
151
+ 'spellcheck.dictionary': 'title',
152
+ qf: '${title_qf}',
153
+ pf: '${title_pf}'
159
154
  }
160
155
  end
161
156
 
162
157
  config.add_search_field('author') do |field|
163
- field.solr_parameters = { :'spellcheck.dictionary' => 'author' }
164
- field.solr_local_parameters = {
165
- qf: '$author_qf',
166
- pf: '$author_pf'
158
+ field.solr_parameters = {
159
+ 'spellcheck.dictionary': 'author',
160
+ qf: '${author_qf}',
161
+ pf: '${author_pf}'
167
162
  }
168
163
  end
169
164
 
@@ -171,11 +166,11 @@ class <%= controller_name.classify %>Controller < ApplicationController
171
166
  # tests can test it. In this case it's the same as
172
167
  # config[:default_solr_parameters][:qt], so isn't actually neccesary.
173
168
  config.add_search_field('subject') do |field|
174
- field.solr_parameters = { :'spellcheck.dictionary' => 'subject' }
175
169
  field.qt = 'search'
176
- field.solr_local_parameters = {
177
- qf: '$subject_qf',
178
- pf: '$subject_pf'
170
+ field.solr_parameters = {
171
+ 'spellcheck.dictionary': 'subject',
172
+ qf: '${subject_qf}',
173
+ pf: '${subject_pf}'
179
174
  }
180
175
  end
181
176
 
@@ -64,7 +64,7 @@ describe "Facets" do
64
64
  expect(page).to have_selector("span.selected", :text => "Tibetan")
65
65
  expect(page).to have_selector("span.facet-count.selected", :text => "1")
66
66
  end
67
- within(".blacklight-pub_date") do
67
+ within(".blacklight-pub_date") do
68
68
  expect(page).to have_selector("span.selected", :text => "2004")
69
69
  expect(page).to have_selector("span.facet-count.selected", :text => "1")
70
70
  end
@@ -104,7 +104,7 @@ describe "Facets" do
104
104
  expect(page).to have_selector("span.selected", :text => "Tibetan")
105
105
  expect(page).to have_selector("span.facet-count.selected", :text => "1")
106
106
  end
107
- within(".blacklight-pub_date") do
107
+ within(".blacklight-pub_date") do
108
108
  expect(page).to have_selector("span.selected", :text => "2004")
109
109
  expect(page).to have_selector("span.facet-count.selected", :text => "1")
110
110
  end
@@ -115,7 +115,7 @@ describe "Facets" do
115
115
  expect(page).to have_selector("span.selected", :text => "Tibetan")
116
116
  expect(page).to have_selector("span.facet-count.selected", :text => "1")
117
117
  end
118
- within(".blacklight-pub_date") do
118
+ within(".blacklight-pub_date") do
119
119
  expect(page).to have_selector("span.selected", :text => "2004")
120
120
  expect(page).to have_selector("span.facet-count.selected", :text => "1")
121
121
  end
@@ -187,7 +187,7 @@ describe "Facets" do
187
187
  visit root_path
188
188
  within(".blacklight-subject_topic_facet") do
189
189
  expect(page).not_to have_selector(".panel-collapse", :visible => true)
190
- click_link "Topic"
190
+ find(".panel-heading").click
191
191
  expect(page).to have_selector(".panel-collapse", :visible => true)
192
192
  end
193
193
  end
@@ -195,8 +195,10 @@ describe "Facets" do
195
195
  skip("Test passes locally but not on Travis.") if ENV['TRAVIS']
196
196
  visit root_path
197
197
  within(".blacklight-subject_topic_facet") do
198
- click_link "Topic"
198
+ find(".panel-heading").click
199
199
  expect(page).to have_selector(".panel-collapse", :visible => true)
200
+ end
201
+ within(".blacklight-subject_topic_facet") do
200
202
  click_link "Japanese drama"
201
203
  end
202
204
  within(".blacklight-subject_topic_facet") do
@@ -253,6 +253,14 @@ describe Blacklight::Solr::SearchBuilderBehavior do
253
253
  describe "solr parameters for a field search from config (subject)" do
254
254
  let(:user_params) { subject_search_params }
255
255
 
256
+ before do
257
+ # The tests below expect pre-solr-7.2 queries with local params
258
+ blacklight_config.search_fields['subject'].solr_local_parameters = {
259
+ qf: '$subject_qf',
260
+ pf: '$subject_pf'
261
+ }
262
+ end
263
+
256
264
  it "should look up qt from field definition" do
257
265
  expect(subject[:qt]).to eq "search"
258
266
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.13.0
4
+ version: 6.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
@@ -17,7 +17,7 @@ authors:
17
17
  autorequire:
18
18
  bindir: exe
19
19
  cert_chain: []
20
- date: 2017-12-06 00:00:00.000000000 Z
20
+ date: 2018-01-09 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rails
@@ -552,6 +552,7 @@ files:
552
552
  - config/locales/blacklight.it.yml
553
553
  - config/locales/blacklight.pt-BR.yml
554
554
  - config/locales/blacklight.sq.yml
555
+ - config/locales/blacklight.zh.yml
555
556
  - config/routes.rb
556
557
  - db/migrate/20140202020201_create_searches.rb
557
558
  - db/migrate/20140202020202_create_bookmarks.rb