govuk_app_config 9.16.11 → 9.17.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 +4 -0
- data/README.md +12 -2
- data/lib/govuk_app_config/govuk_i18n/docs/example.yml +113 -0
- data/lib/govuk_app_config/govuk_i18n.rb +7 -0
- data/lib/govuk_app_config/version.rb +1 -1
- data/lib/govuk_app_config.rb +5 -4
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5130dcd8e16063ab71e12f3d0dce77b28c0d4f83b4d7ea7a60c530f914d69e7d
|
4
|
+
data.tar.gz: 7d16c3739eaadebaabb1c6e4f62ae2c63f0bc7f05551bf55b2190d345db76637
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2f2de9a6e91294a626277231414f90b8ea58911683b12c7ab84daec70f4fb13cd817fc8652faea32372ca7debff613c4b9f15358bdb7ab6230f4571ff0898a9
|
7
|
+
data.tar.gz: 9f0dfbff9e68c7d600dc90a4038acaee82620daae3cf52b0a35dfdfe56a65f196b59a2eff876b549a899022a659d35d87e50cb328ed45420612a0f172146554f
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -178,9 +178,19 @@ app with the following content:
|
|
178
178
|
GovukContentSecurityPolicy.configure
|
179
179
|
```
|
180
180
|
|
181
|
-
## Internationalisation
|
181
|
+
## Internationalisation
|
182
182
|
|
183
|
-
Some frontend apps support languages that are not defined in the i18n gem
|
183
|
+
Some frontend apps support languages that are not yet defined in the [rails-i18n](https://github.com/svenfuchs/rails-i18n) gem that is bundled with Rails.
|
184
|
+
|
185
|
+
The missing translations can be added to a locale file in the folder [`lib/govuk_app_config/govuk_i8n`](lib/govuk_app_config/govuk_i18n/). The [`:en`](https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/en-GB.yml) locale file in the Rails repo can be used as a guide to key names, as it contains all the keys that Rails uses for a fully internationalised language. It is not necessary to add all of these keys to your file.
|
186
|
+
|
187
|
+
See [example.yml](lib/govuk_app_config/govuk_i18n/docs/example.yml) for the most likely structure.
|
188
|
+
|
189
|
+
The translations can be enabled in the frontend application by creating a file at `config/initializers/govuk_i18n.rb` with the following content:
|
190
|
+
|
191
|
+
```ruby
|
192
|
+
GovukI18n.configure
|
193
|
+
```
|
184
194
|
|
185
195
|
## Time zone
|
186
196
|
|
@@ -0,0 +1,113 @@
|
|
1
|
+
## Example locale file structure
|
2
|
+
---
|
3
|
+
# example:
|
4
|
+
# date:
|
5
|
+
# abbr_day_names:
|
6
|
+
# - Sun
|
7
|
+
# - Mon
|
8
|
+
# - Tue
|
9
|
+
# - Wed
|
10
|
+
# - Thu
|
11
|
+
# - Fri
|
12
|
+
# - Sat
|
13
|
+
# abbr_month_names:
|
14
|
+
# - Jan
|
15
|
+
# - Feb
|
16
|
+
# - Mar
|
17
|
+
# - Apr
|
18
|
+
# - May
|
19
|
+
# - Jun
|
20
|
+
# - Jul
|
21
|
+
# - Aug
|
22
|
+
# - Sep
|
23
|
+
# - Oct
|
24
|
+
# - Nov
|
25
|
+
# - Dec
|
26
|
+
# day_names:
|
27
|
+
# - Sunday
|
28
|
+
# - Monday
|
29
|
+
# - Tuesday
|
30
|
+
# - Wednesday
|
31
|
+
# - Thursday
|
32
|
+
# - Friday
|
33
|
+
# - Saturday
|
34
|
+
# formats:
|
35
|
+
# default: "%Y-%m-%d"
|
36
|
+
# long: "%B %d, %Y"
|
37
|
+
# short: "%b %d"
|
38
|
+
# month_names:
|
39
|
+
# -
|
40
|
+
# - January
|
41
|
+
# - February
|
42
|
+
# - માર્ચ
|
43
|
+
# - April
|
44
|
+
# - May
|
45
|
+
# - જૂન
|
46
|
+
# - July
|
47
|
+
# - August
|
48
|
+
# - September
|
49
|
+
# - October
|
50
|
+
# - November
|
51
|
+
# - December
|
52
|
+
# order:
|
53
|
+
# - year
|
54
|
+
# - month
|
55
|
+
# - day
|
56
|
+
# datetime:
|
57
|
+
# distance_in_words:
|
58
|
+
# about_x_hours:
|
59
|
+
# one: about %{count} hour
|
60
|
+
# other: about %{count} hours
|
61
|
+
# about_x_months:
|
62
|
+
# one: about %{count} month
|
63
|
+
# other: about %{count} months
|
64
|
+
# about_x_years:
|
65
|
+
# one: about %{count} year
|
66
|
+
# other: about %{count} years
|
67
|
+
# almost_x_years:
|
68
|
+
# one: almost %{count} year
|
69
|
+
# other: almost %{count} years
|
70
|
+
# half_a_minute: half a minute
|
71
|
+
# less_than_x_seconds:
|
72
|
+
# one: less than %{count} second
|
73
|
+
# other: less than %{count} seconds
|
74
|
+
# less_than_x_minutes:
|
75
|
+
# one: less than a minute
|
76
|
+
# other: less than %{count} minutes
|
77
|
+
# over_x_years:
|
78
|
+
# one: over %{count} year
|
79
|
+
# other: over %{count} years
|
80
|
+
# x_seconds:
|
81
|
+
# one: "%{count} second"
|
82
|
+
# other: "%{count} seconds"
|
83
|
+
# x_minutes:
|
84
|
+
# one: "%{count} minute"
|
85
|
+
# other: "%{count} minutes"
|
86
|
+
# x_days:
|
87
|
+
# one: "%{count} day"
|
88
|
+
# other: "%{count} days"
|
89
|
+
# x_months:
|
90
|
+
# one: "%{count} month"
|
91
|
+
# other: "%{count} months"
|
92
|
+
# x_years:
|
93
|
+
# one: "%{count} year"
|
94
|
+
# other: "%{count} years"
|
95
|
+
# prompts:
|
96
|
+
# second: Seconds
|
97
|
+
# minute: Minute
|
98
|
+
# hour: Hour
|
99
|
+
# day: Day
|
100
|
+
# month: Month
|
101
|
+
# year: Year
|
102
|
+
# support:
|
103
|
+
# array:
|
104
|
+
# last_word_connector: ", and "
|
105
|
+
# two_words_connector: " and "
|
106
|
+
# words_connector: ", "
|
107
|
+
# time:
|
108
|
+
# am: am
|
109
|
+
# formats:
|
110
|
+
# default: "%a, %d %b %Y %H:%M:%S %z"
|
111
|
+
# long: "%B %d, %Y %H:%M"
|
112
|
+
# short: "%d %b %H:%M"
|
113
|
+
# pm: pm
|
data/lib/govuk_app_config.rb
CHANGED
@@ -1,14 +1,15 @@
|
|
1
|
-
require "govuk_app_config/version"
|
2
|
-
require "govuk_app_config/govuk_statsd"
|
3
1
|
require "govuk_app_config/govuk_error"
|
4
|
-
require "govuk_app_config/govuk_proxy/static_proxy"
|
5
2
|
require "govuk_app_config/govuk_healthcheck"
|
6
3
|
require "govuk_app_config/govuk_open_telemetry"
|
7
4
|
require "govuk_app_config/govuk_prometheus_exporter"
|
5
|
+
require "govuk_app_config/govuk_proxy/static_proxy"
|
6
|
+
require "govuk_app_config/govuk_statsd"
|
7
|
+
require "govuk_app_config/version"
|
8
8
|
|
9
9
|
if defined?(Rails)
|
10
|
-
require "govuk_app_config/govuk_json_logging"
|
11
10
|
require "govuk_app_config/govuk_content_security_policy"
|
11
|
+
require "govuk_app_config/govuk_i18n"
|
12
|
+
require "govuk_app_config/govuk_json_logging"
|
12
13
|
require "govuk_app_config/govuk_timezone"
|
13
14
|
require "govuk_app_config/railtie"
|
14
15
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_app_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
@@ -366,6 +366,8 @@ files:
|
|
366
366
|
- lib/govuk_app_config/govuk_healthcheck/rails_cache.rb
|
367
367
|
- lib/govuk_app_config/govuk_healthcheck/redis.rb
|
368
368
|
- lib/govuk_app_config/govuk_healthcheck/sidekiq_redis.rb
|
369
|
+
- lib/govuk_app_config/govuk_i18n.rb
|
370
|
+
- lib/govuk_app_config/govuk_i18n/docs/example.yml
|
369
371
|
- lib/govuk_app_config/govuk_json_logging.rb
|
370
372
|
- lib/govuk_app_config/govuk_json_logging/rails_ext/action_controller/metal/instrumentation.rb
|
371
373
|
- lib/govuk_app_config/govuk_open_telemetry.rb
|
@@ -394,7 +396,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
394
396
|
- !ruby/object:Gem::Version
|
395
397
|
version: '0'
|
396
398
|
requirements: []
|
397
|
-
rubygems_version: 3.6.
|
399
|
+
rubygems_version: 3.6.8
|
398
400
|
specification_version: 4
|
399
401
|
summary: Base configuration for GOV.UK applications
|
400
402
|
test_files: []
|