govuk_document_types 0.8.0 → 0.9.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/govuk_document_types.gemspec +1 -0
- data/lib/govuk_document_types.rb +1 -0
- data/lib/govuk_document_types/translations_railtie.rb +21 -0
- data/lib/govuk_document_types/version.rb +1 -1
- data/rails/locale/en.yml +28 -0
- metadata +18 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4b27d31bc70d8664edb850438dffb0244fa920b9f8f794a51353cd59cc1a4200
|
|
4
|
+
data.tar.gz: 07a577cadf22da3c379bb19336a7fd0990a5ac3808798f3b0567b7c6339ea8be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4cf7c1a0c355df521179409c029286e5c7b17989b34dc08322c45409783bb4ba7271af7a1b4a92b7126f7e0fbd622e9399011decf7773cf74c46c8312699d984
|
|
7
|
+
data.tar.gz: 1a4bca6b8cf6d15f4ea82c5dada03ee01c5f92dd2a94e71e9bde5c6c16bea448a572def0961cab68ea9c9ff36994e076194301fb37186136fb0ff7f712dfb27c
|
data/CHANGELOG.md
CHANGED
data/lib/govuk_document_types.rb
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'rails'
|
|
2
|
+
module GovukDocumentTypes
|
|
3
|
+
class TranslationsRailtie < ::Rails::Railtie
|
|
4
|
+
initializer 'govuk_document_types' do |app|
|
|
5
|
+
GovukDocumentTypes::TranslationsRailtie.instance_eval do
|
|
6
|
+
pattern = pattern_from app.config.i18n.available_locales
|
|
7
|
+
add("rails/locale/#{pattern}.yml")
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def self.add(pattern)
|
|
12
|
+
files = Dir[File.join(File.dirname(__FILE__), '../..', pattern)]
|
|
13
|
+
I18n.load_path.concat(files)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.pattern_from(args)
|
|
17
|
+
array = Array(args || [])
|
|
18
|
+
array.blank? ? '*' : "{#{array.join ','}}"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/rails/locale/en.yml
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
en:
|
|
3
|
+
content_purpose_supergroup:
|
|
4
|
+
guidance_and_regulation: Guidance and regulation
|
|
5
|
+
news_and_communications: News and communications
|
|
6
|
+
policy_and_engagement: Policy papers and consultations
|
|
7
|
+
research_and_statistics: "Research and statistics"
|
|
8
|
+
services: Services
|
|
9
|
+
transparency: Transparency and freedom of information releases
|
|
10
|
+
content_purpose_subgroup:
|
|
11
|
+
announcements: Announcements
|
|
12
|
+
business_support: Business funds and grants
|
|
13
|
+
consultations: Consultations
|
|
14
|
+
decisions: Decisions
|
|
15
|
+
freedom_of_information_releases: Freedom of information releases
|
|
16
|
+
guidance: Guidance
|
|
17
|
+
incidents: Incident reports
|
|
18
|
+
news: News
|
|
19
|
+
policy: Policy papers
|
|
20
|
+
regulation: Regulation
|
|
21
|
+
research: Research
|
|
22
|
+
safety_alerts: Safety alerts
|
|
23
|
+
services: Services
|
|
24
|
+
speeches_and_statements: Speeches and statements
|
|
25
|
+
statistics: Statistics
|
|
26
|
+
transactions: Transactions
|
|
27
|
+
transparency_data: Transparency data
|
|
28
|
+
updates_and_alerts: Updates and alerts
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: govuk_document_types
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GOV.UK Dev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-09-
|
|
11
|
+
date: 2018-09-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -52,6 +52,20 @@ dependencies:
|
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '3.0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: i18n-spec
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
55
69
|
description: Gem to share document type groupings
|
|
56
70
|
email:
|
|
57
71
|
- govuk-dev@digital.cabinet-office.gov.uk
|
|
@@ -75,7 +89,9 @@ files:
|
|
|
75
89
|
- data/supertypes.yml
|
|
76
90
|
- govuk_document_types.gemspec
|
|
77
91
|
- lib/govuk_document_types.rb
|
|
92
|
+
- lib/govuk_document_types/translations_railtie.rb
|
|
78
93
|
- lib/govuk_document_types/version.rb
|
|
94
|
+
- rails/locale/en.yml
|
|
79
95
|
homepage: https://github.com/alphagov/govuk_document_types
|
|
80
96
|
licenses:
|
|
81
97
|
- MIT
|