govuk_document_types 0.8.0 → 0.9.0

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: bb2f822160da7b706b543bc0b58a2470ec172693b9f3f0a89fd5137c0db5367d
4
- data.tar.gz: c947a14e448b6a4fa8aef7415c2a91ae8c87e5895e85a02b382d41bdd921f2b5
3
+ metadata.gz: 4b27d31bc70d8664edb850438dffb0244fa920b9f8f794a51353cd59cc1a4200
4
+ data.tar.gz: 07a577cadf22da3c379bb19336a7fd0990a5ac3808798f3b0567b7c6339ea8be
5
5
  SHA512:
6
- metadata.gz: dd60e6eb75bf94f6eaa380de68917ede7b057beb4f93e8df41cc360d3f136a070b442f7746a509d4407da0ea29e5b5674882f6f8ea38c9829711be02ed6b8b9f
7
- data.tar.gz: 6b7e39e60cd3648499f31d846d31ea8d33d1749599082d0277f5c9099f8b61cf0c473dc5aa72cf642072dbf8c2960b3dd503129d163b66a483e18b5512ea7a8d
6
+ metadata.gz: 4cf7c1a0c355df521179409c029286e5c7b17989b34dc08322c45409783bb4ba7271af7a1b4a92b7126f7e0fbd622e9399011decf7773cf74c46c8312699d984
7
+ data.tar.gz: 1a4bca6b8cf6d15f4ea82c5dada03ee01c5f92dd2a94e71e9bde5c6c16bea448a572def0961cab68ea9c9ff36994e076194301fb37186136fb0ff7f712dfb27c
@@ -1,3 +1,9 @@
1
+ # Unreleased
2
+
3
+ # 0.9.0
4
+
5
+ * Add translations to content purpose supergroup titles
6
+
1
7
  # 0.8.0
2
8
 
3
9
  * Adds `GovukDocumentTypes.supergroup_subgroups` as a way to retrieve
@@ -23,4 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
  spec.add_development_dependency "rspec", "~> 3.0"
25
25
  spec.add_development_dependency "govuk-lint", "~> 3.0"
26
+ spec.add_development_dependency "i18n-spec"
26
27
  end
@@ -1,3 +1,4 @@
1
+ require "govuk_document_types/translations_railtie" if defined?(Rails)
1
2
  require "govuk_document_types/version"
2
3
  require "yaml"
3
4
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module GovukDocumentTypes
2
- VERSION = "0.8.0".freeze
2
+ VERSION = "0.9.0".freeze
3
3
  end
@@ -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.8.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-21 00:00:00.000000000 Z
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