rails_translation_manager 1.6.1 → 1.6.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b22e022079868b0d53fef06e6ff5b01dcaead0581e83717129bdcd7390b052c9
|
4
|
+
data.tar.gz: 88132ad55d9464db0d5ada804264839d7229f47d30e2960ced17a16e198be63d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3ee1b5e7edfbbb85e954d76670eb11fef58c78e364fff488802cf2adbcaec9be9712cf28751025cfb57dbd3f82f71d84cdd0a015080ecd2d4fdaec0226a6dc9
|
7
|
+
data.tar.gz: c3436392abd8892303c3708ffc9bd54e140f1bd7d461b62bca4a12a6722781341458ce7257f4457d234633dc785e3185da23eef57fefeff9d43c65334db2dd66
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 1.6.3
|
2
|
+
|
3
|
+
* Use proc for single plural languages https://github.com/alphagov/rails_translation_manager/pull/62
|
4
|
+
|
5
|
+
# 1.6.2
|
6
|
+
|
7
|
+
* Load plural rules after initialising app https://github.com/alphagov/rails_translation_manager/pull/61
|
8
|
+
|
1
9
|
# 1.6.1
|
2
10
|
|
3
11
|
* Audits plural rules and ensures consistent formatting https://github.com/alphagov/rails_translation_manager/pull/57
|
data/config/locales/plurals.rb
CHANGED
@@ -79,9 +79,9 @@
|
|
79
79
|
# Yiddish
|
80
80
|
yi: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
|
81
81
|
# Chinese
|
82
|
-
zh: { i18n: { plural: { keys: %i[other], rule:
|
82
|
+
zh: { i18n: { plural: { keys: %i[other], rule: proc { :other } } } },
|
83
83
|
# Chinese Hong Kong
|
84
|
-
"zh-hk": { i18n: { plural: { keys: %i[other], rule:
|
84
|
+
"zh-hk": { i18n: { plural: { keys: %i[other], rule: proc { :other } } } },
|
85
85
|
# Chinese Taiwan
|
86
|
-
"zh-tw": { i18n: { plural: { keys: %i[other], rule:
|
86
|
+
"zh-tw": { i18n: { plural: { keys: %i[other], rule: proc { :other } } } }
|
87
87
|
}
|
@@ -5,5 +5,15 @@ module RailsTranslationManager
|
|
5
5
|
rake_tasks do
|
6
6
|
Dir[File.expand_path('../tasks/*.rake', File.dirname(__FILE__))].each { |f| load f }
|
7
7
|
end
|
8
|
+
|
9
|
+
config.after_initialize do
|
10
|
+
if ENV["RAILS_TRANSLATION_MANAGER_LOAD_ALL_PLURAL_RULES"]
|
11
|
+
rails_i18n_path = Gem::Specification.find_by_name("rails-i18n").gem_dir
|
12
|
+
I18n.load_path += Dir["#{rails_i18n_path}/rails/pluralization/*.rb"]
|
13
|
+
end
|
14
|
+
|
15
|
+
rails_translation_manager = Gem::Specification.find_by_name("rails_translation_manager").gem_dir
|
16
|
+
I18n.load_path += ["#{rails_translation_manager}/config/locales/plurals.rb"]
|
17
|
+
end
|
8
18
|
end
|
9
19
|
end
|
@@ -20,14 +20,6 @@ require "rails_translation_manager/exporter"
|
|
20
20
|
require "rails_translation_manager/importer"
|
21
21
|
|
22
22
|
module RailsTranslationManager
|
23
|
-
rails_translation_manager = Gem::Specification.find_by_name("rails_translation_manager").gem_dir
|
24
|
-
I18n.load_path += ["#{rails_translation_manager}/config/locales/plurals.rb"]
|
25
|
-
|
26
|
-
if ENV["RAILS_TRANSLATION_MANAGER_LOAD_ALL_PLURAL_RULES"]
|
27
|
-
rails_i18n_path = Gem::Specification.find_by_name("rails-i18n").gem_dir
|
28
|
-
I18n.load_path += Dir["#{rails_i18n_path}/rails/pluralization/*.rb"]
|
29
|
-
end
|
30
|
-
|
31
23
|
def self.locale_root
|
32
24
|
if ENV["RAILS_TRANSLATION_MANAGER_LOCALE_ROOT"]
|
33
25
|
Pathname.new(ENV["RAILS_TRANSLATION_MANAGER_LOCALE_ROOT"])
|
@@ -6,8 +6,8 @@ require 'rails_translation_manager/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "rails_translation_manager"
|
8
8
|
spec.version = RailsTranslationManager::VERSION
|
9
|
-
spec.authors = ["
|
10
|
-
spec.email = ["
|
9
|
+
spec.authors = ["GOV.UK Dev"]
|
10
|
+
spec.email = ["govuk-dev@digital.cabinet-office.gov.uk"]
|
11
11
|
spec.summary = %q{Tasks to manage translation files}
|
12
12
|
spec.description = ""
|
13
13
|
spec.homepage = ""
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_translation_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -152,7 +152,7 @@ dependencies:
|
|
152
152
|
version: '0'
|
153
153
|
description: ''
|
154
154
|
email:
|
155
|
-
-
|
155
|
+
- govuk-dev@digital.cabinet-office.gov.uk
|
156
156
|
executables: []
|
157
157
|
extensions: []
|
158
158
|
extra_rdoc_files: []
|