qa_server 7.5.0 → 7.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b6bf0cabbc1c7f810733789f43c7f0b253f71b0d887fd5be6638aacd3a7e6be
4
- data.tar.gz: '0988c35dcea9f1dd1dc565db686835bd63a5812c5ed198f0d39f3e83a055e684'
3
+ metadata.gz: 8c0138684332f934add8000e85d76c86264162963e7df49fa170ee894783aa17
4
+ data.tar.gz: 2f9e19975f53fa4e0d34feb8e4423f203e0d46bafe6bc30af614459256a6b66f
5
5
  SHA512:
6
- metadata.gz: ee5d4b62a4176cdc00a31446541a9e421506cc1ceca98066ff684a51346c976ced23a6778931365f5023ede8ec4d52784326b0af52865599c078401363e34444
7
- data.tar.gz: 545ee665c7eceb70ed8459033d86247eeb4a414010b95a41f2cfe4393983e809e9b7756027c6da115df3ea6452f2f97643ba53e2976614f151a2b9578ec59a68
6
+ metadata.gz: bd9de3a942001f3e6eca2790441fa2ea2f8d386033c4af93cca230ac2ee3dbb357d44378535bdf521a89e196d29b6fd7308b1f1a6246ece9c1293c6c521deb7d
7
+ data.tar.gz: 933c7742a774144186e9a63f749a2b4d01c89c76b7849d8c18419e0ea95d0df28158ce5286ca694d516fa994f14796c8f668708e907ca2c037e880b101afc5e9
@@ -1,3 +1,9 @@
1
+ ### 7.5.1 (2020-12-08)
2
+
3
+ * define missing i18n translations
4
+ * add i18n-tasks gem for managing translations
5
+ * add spec test to check for missing translations
6
+
1
7
  ### 7.5.0 (2020-12-07)
2
8
 
3
9
  * UI improvements of check_status page
@@ -0,0 +1,133 @@
1
+ # i18n-tasks finds and manages missing and unused translations: https://github.com/glebm/i18n-tasks
2
+
3
+ # The "main" locale.
4
+ base_locale: en
5
+ ## All available locales are inferred from the data by default. Alternatively, specify them explicitly:
6
+ # locales: [es, fr]
7
+ ## Reporting locale, default: en. Available: en, ru.
8
+ # internal_locale: en
9
+
10
+ # Read and write translations.
11
+ data:
12
+ ## Translations are read from the file system. Supported format: YAML, JSON.
13
+ ## Provide a custom adapter:
14
+ # adapter: I18n::Tasks::Data::FileSystem
15
+
16
+ # Locale files or `File.find` patterns where translations are read from:
17
+ read:
18
+ ## Default:
19
+ # - config/locales/%{locale}.yml
20
+ ## More files:
21
+ - config/locales/**/*.%{locale}.yml
22
+
23
+ # Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom:
24
+ # `i18n-tasks normalize -p` will force move the keys according to these rules
25
+ write:
26
+ ## For example, write devise and simple form keys to their respective files:
27
+ # - ['{devise, simple_form}.*', 'config/locales/\1.%{locale}.yml']
28
+ ## Catch-all default:
29
+ # - config/locales/%{locale}.yml
30
+
31
+ # External locale data (e.g. gems).
32
+ # This data is not considered unused and is never written to.
33
+ external:
34
+ ## Example (replace %#= with %=):
35
+ # - "<%#= %x[bundle show vagrant].chomp %>/templates/locales/%{locale}.yml"
36
+
37
+ ## Specify the router (see Readme for details). Valid values: conservative_router, pattern_router, or a custom class.
38
+ # router: conservative_router
39
+
40
+ yaml:
41
+ write:
42
+ # do not wrap lines at 80 characters
43
+ line_width: -1
44
+
45
+ ## Pretty-print JSON:
46
+ # json:
47
+ # write:
48
+ # indent: ' '
49
+ # space: ' '
50
+ # object_nl: "\n"
51
+ # array_nl: "\n"
52
+
53
+ # Find translate calls
54
+ search:
55
+ ## Paths or `File.find` patterns to search in:
56
+ # paths:
57
+ # - app/
58
+
59
+ ## Root directories for relative keys resolution.
60
+ # relative_roots:
61
+ # - app/controllers
62
+ # - app/helpers
63
+ # - app/mailers
64
+ # - app/presenters
65
+ # - app/views
66
+
67
+ ## Files or `File.fnmatch` patterns to exclude from search. Some files are always excluded regardless of this setting:
68
+ ## %w(*.jpg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less *.yml *.json)
69
+ exclude:
70
+ - app/assets/images
71
+ - app/assets/fonts
72
+ - app/assets/videos
73
+
74
+ ## Alternatively, the only files or `File.fnmatch patterns` to search in `paths`:
75
+ ## If specified, this settings takes priority over `exclude`, but `exclude` still applies.
76
+ # only: ["*.rb", "*.html.slim"]
77
+
78
+ ## If `strict` is `false`, guess usages such as t("categories.#{category}.title"). The default is `true`.
79
+ # strict: true
80
+
81
+ ## Multiple scanners can be used. Their results are merged.
82
+ ## The options specified above are passed down to each scanner. Per-scanner options can be specified as well.
83
+ ## See this example of a custom scanner: https://github.com/glebm/i18n-tasks/wiki/A-custom-scanner-example
84
+
85
+ ## Translation Services
86
+ # translation:
87
+ # # Google Translate
88
+ # # Get an API key and set billing info at https://code.google.com/apis/console to use Google Translate
89
+ # google_translate_api_key: "AbC-dEf5"
90
+ # # DeepL Pro Translate
91
+ # # Get an API key and subscription at https://www.deepl.com/pro to use DeepL Pro
92
+ # deepl_api_key: "48E92789-57A3-466A-9959-1A1A1A1A1A1A"
93
+
94
+ ## Do not consider these keys missing:
95
+ # ignore_missing:
96
+ # - 'errors.messages.{accepted,blank,invalid,too_short,too_long}'
97
+ # - '{devise,simple_form}.*'
98
+
99
+ ## Consider these keys used:
100
+ # ignore_unused:
101
+ # - 'activerecord.attributes.*'
102
+ # - '{devise,kaminari,will_paginate}.*'
103
+ # - 'simple_form.{yes,no}'
104
+ # - 'simple_form.{placeholders,hints,labels}.*'
105
+ # - 'simple_form.{error_notification,required}.:'
106
+
107
+ ## Exclude these keys from the `i18n-tasks eq-base' report:
108
+ # ignore_eq_base:
109
+ # all:
110
+ # - common.ok
111
+ # fr,es:
112
+ # - common.brand
113
+
114
+ ## Exclude these keys from the `i18n-tasks check-consistent-interpolations` report:
115
+ # ignore_inconsistent_interpolations:
116
+ # - 'activerecord.attributes.*'
117
+
118
+ ## Ignore these keys completely:
119
+ # ignore:
120
+ # - kaminari.*
121
+
122
+ ## Sometimes, it isn't possible for i18n-tasks to match the key correctly,
123
+ ## e.g. in case of a relative key defined in a helper method.
124
+ ## In these cases you can use the built-in PatternMapper to map patterns to keys, e.g.:
125
+ #
126
+ # <%# I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
127
+ # only: %w(*.html.haml *.html.slim),
128
+ # patterns: [['= title\b', '.page_title']] %>
129
+ #
130
+ # The PatternMapper can also match key literals via a special %{key} interpolation, e.g.:
131
+ #
132
+ # <%# I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
133
+ # patterns: [['\bSpree\.t[( ]\s*%{key}', 'spree.%{key}']] %>
@@ -1,6 +1,12 @@
1
1
  ---
2
2
  en:
3
3
  qa_server:
4
+ application_name: "Replace with your application's name"
5
+ application_version: "Replace with your application's version"
6
+ footer:
7
+ attribution_html: This service is supported by work on <a href="http://ld4l.org" class="navbar-link" target="_blank">Linked Data for Libraries - Labs</a> and <br> <a href="https://wiki.duraspace.org/x/9xgRBg" class="navbar-link" target="_blank">Linked Data for Production</a> funded by <a href="https://mellon.org/" class="navbar-link" target="_blank">Andrew W. Mellon Foundation</a>, <br>and by work on Questioning Authority in <a href="http://samvera.org" class="navbar-link" target="_blank">Samvera</a>, an open source community.
8
+ copyright_html: <strong>Copyright &copy; 2018-2020 Your Institution</strong> Licensed under the Apache License, Version 2.0
9
+ service_html: A service of <a href="http://your.institution.website/" class="navbar-link" target="_blank">Your Institution Name</a>.
4
10
  menu:
5
11
  home: Home
6
12
  usage: Usage
@@ -22,11 +28,15 @@ en:
22
28
  show_all: ALL Authorities (SLOW)
23
29
  connections: Check Connection Status only
24
30
  accuracy: Check Accuracy only
31
+ comparison: Compare Accuracy
25
32
  all_checks: Run all checks
26
33
  wait_message: "Please wait while the status is verified. This will be slow if you selected ALL Authorities."
27
34
  connection_checks: Connection Checks
28
35
  accuracy_checks: Accuracy Checks for Search Results
36
+ comparison_checks: Comparison of Accuracy Checks
29
37
  status_table:
38
+ before: Before
39
+ after: After
30
40
  action: Action
31
41
  actual_position: Actual Position
32
42
  authority: Authority
@@ -98,6 +108,10 @@ en:
98
108
  now: NOW
99
109
  today: TODAY
100
110
  datatable_desc: 'Performance tabulated data'
111
+ datatable_all_desc: 'All Data'
112
+ datatable_day_desc: 'Day'
113
+ datatable_month_desc: 'Month'
114
+ datatable_year_desc: 'Year'
101
115
  datarange: 'From %{from} to %{to}'
102
116
  authority: Authority
103
117
  average_times: Average (ms)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module QaServer
3
- VERSION = '7.5.0'
3
+ VERSION = '7.5.1'
4
4
  end
@@ -41,6 +41,7 @@ Gem::Specification.new do |spec|
41
41
  spec.add_development_dependency 'deprecation'
42
42
  spec.add_development_dependency 'engine_cart', '~> 2.0'
43
43
  spec.add_development_dependency "factory_bot", '~> 4.4'
44
+ spec.add_development_dependency 'i18n-tasks'
44
45
  spec.add_development_dependency 'simplecov'
45
46
  spec.add_development_dependency 'sqlite3'
46
47
  spec.add_development_dependency 'rails-controller-testing', '~> 1'
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'i18n/tasks'
4
+
5
+ RSpec.describe I18n do
6
+ let(:i18n) { I18n::Tasks::BaseTask.new }
7
+ let(:missing_keys) { i18n.missing_keys }
8
+ let(:unused_keys) { i18n.unused_keys }
9
+ let(:inconsistent_interpolations) { i18n.inconsistent_interpolations }
10
+
11
+ it 'does not have missing keys' do
12
+ expect(missing_keys).to be_empty,
13
+ "Missing #{missing_keys.leaves.count} i18n keys, run `i18n-tasks missing' to show them"
14
+ end
15
+
16
+ it 'does not have unused keys' do
17
+ pending 'need to explore unused keys further'
18
+ expect(unused_keys).to be_empty,
19
+ "#{unused_keys.leaves.count} unused i18n keys, run `i18n-tasks unused' to show them"
20
+ end
21
+
22
+ it 'files are normalized' do # rubocop:disable RSpec/ExampleLength
23
+ pending 'need to explore further normalization process'
24
+ non_normalized = i18n.non_normalized_paths
25
+ error_message = "The following files need to be normalized:\n" \
26
+ "#{non_normalized.map { |path| " #{path}" }.join("\n")}\n" \
27
+ "Please run `i18n-tasks normalize' to fix"
28
+ expect(non_normalized).to be_empty, error_message
29
+ end
30
+
31
+ it 'does not have inconsistent interpolations' do
32
+ error_message = "#{inconsistent_interpolations.leaves.count} i18n keys have inconsistent interpolations.\n" \
33
+ "Run `i18n-tasks check-consistent-interpolations' to show them"
34
+ expect(inconsistent_interpolations).to be_empty, error_message
35
+ end
36
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qa_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.5.0
4
+ version: 7.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - E. Lynette Rayle
@@ -164,6 +164,20 @@ dependencies:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '4.4'
167
+ - !ruby/object:Gem::Dependency
168
+ name: i18n-tasks
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
167
181
  - !ruby/object:Gem::Dependency
168
182
  name: simplecov
169
183
  requirement: !ruby/object:Gem::Requirement
@@ -418,6 +432,7 @@ files:
418
432
  - app/views/qa_server/monitor_status/index.html.erb
419
433
  - app/views/qa_server/usage/index.html.erb
420
434
  - app/views/shared/_footer.html.erb
435
+ - config/i18n-tasks.yml
421
436
  - config/locales/qa_server.en.yml
422
437
  - config/routes.rb
423
438
  - lib/generators/qa_server/assets_generator.rb
@@ -508,6 +523,7 @@ files:
508
523
  - spec/.gitignore
509
524
  - spec/cache_processors/qa_server/cache_expiry_service_spec.rb
510
525
  - spec/feature/accuracy_spec.rb
526
+ - spec/i18n_spec.rb
511
527
  - spec/lib/configuration_spec.rb
512
528
  - spec/lib/qa_server_spec.rb
513
529
  - spec/rails_helper.rb
@@ -545,6 +561,7 @@ test_files:
545
561
  - spec/.gitignore
546
562
  - spec/cache_processors/qa_server/cache_expiry_service_spec.rb
547
563
  - spec/feature/accuracy_spec.rb
564
+ - spec/i18n_spec.rb
548
565
  - spec/lib/configuration_spec.rb
549
566
  - spec/lib/qa_server_spec.rb
550
567
  - spec/rails_helper.rb