rails_translation_manager 1.6.0 → 1.6.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: 96e105c50ae765f973ec2993ec1321ed96bd41594bca178dea8d7f411bf20414
4
- data.tar.gz: cc4d21ec122aa9f69e33e83793eb8c4f04f70ed07dbba2ebeeb4c17a8c2e436e
3
+ metadata.gz: 4580d7e3e338ff4cccce8e60071752f92d36e592c332c453a741b8680c960108
4
+ data.tar.gz: de4e1e27b0ce7509710228fae3d1ea749fa4a904288a30cbb953f1d18428793d
5
5
  SHA512:
6
- metadata.gz: f19d4c1ad7adbf432fb17143cd3ea7a2c22758ef15b45b6e875f2f53b3bd8010ccf19fc91cb789115c6c3a5b779a14c8d23b21888a3a073295eedc0de6a6f83c
7
- data.tar.gz: 339310d4341e0f77cc6aeacbd06e51da634e251ee164bfd4055a3707d6f38c0fd007623cf9dd548d1d69690c724d3b94bd721d10758ea3e832608299596db5c4
6
+ metadata.gz: ca97bd67bb784adab54ac6fac15abcebb0c99f423b714b887f7a9d6f09f0991c6d584b22f01a102d069828dd1f1e66a03a445aaf64cb6510d97a028d4750a429
7
+ data.tar.gz: 8b0bea5c616e666fad3a73b1fa8d11351456e78fece8c0418f2dbd3c9581c24d3dcd36d581f6d185a2c9ca0ec84777714c6986d6fd89dfd287729ffdd18f6160
@@ -4,3 +4,7 @@ updates:
4
4
  directory: /
5
5
  schedule:
6
6
  interval: daily
7
+ - package-ecosystem: "github-actions"
8
+ directory: /
9
+ schedule:
10
+ interval: daily
@@ -10,7 +10,7 @@ jobs:
10
10
  ruby: [ 2.7, '3.0', 3.1 ]
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - uses: ruby/setup-ruby@v1
15
15
  with:
16
16
  ruby-version: ${{ matrix.ruby }}
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 1.6.1
2
+
3
+ * Audits plural rules and ensures consistent formatting https://github.com/alphagov/rails_translation_manager/pull/57
4
+ * Allows all plural rules to be loaded by setting env variable https://github.com/alphagov/rails_translation_manager/pull/58/
5
+
1
6
  # 1.6.0
2
7
 
3
8
  Update plural file loading https://github.com/alphagov/rails_translation_manager/pull/52
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  {
4
+ # Azerbaijani
5
+ az: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
4
6
  # Welsh
5
7
  cy: { i18n: { plural: { keys: %i[zero one two few many other],
6
8
  rule:
@@ -18,6 +20,8 @@
18
20
  dr: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
19
21
  # Latin America and Caribbean Spanish
20
22
  "es-419": { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
23
+ # Persian
24
+ fa: { i18n: { plural: { keys: %i[one other], rule: ->(n) { [0, 1].include?(n) ? :one : :other } } } },
21
25
  # Gujarati
22
26
  gu: { i18n: { plural: { keys: %i[one other], rule: ->(n) { [0, 1].include?(n) ? :one : :other } } } },
23
27
  # Scottish Gaelic
@@ -37,7 +41,6 @@
37
41
  hy: { i18n: { plural: { keys: %i[one other], rule: ->(n) { [0, 1].include?(n) ? :one : :other } } } },
38
42
  # Kazakh
39
43
  kk: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
40
- # Pashto
41
44
  # Maltese
42
45
  mt: { i18n: { plural: { keys: %i[one few many other],
43
46
  rule:
@@ -55,9 +58,10 @@
55
58
  :other
56
59
  end
57
60
  end } } },
58
- ps: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
59
61
  # Punjabi Shahmukhi
60
62
  "pa-pk": { i18n: { plural: { keys: %i[one other], rule: ->(n) { [0, 1].include?(n) ? :one : :other } } } },
63
+ # Pashto
64
+ ps: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
61
65
  # Sinhalese
62
66
  si: { i18n: { plural: { keys: %i[one other], rule: ->(n) { [0, 1].include?(n) ? :one : :other } } } },
63
67
  # Somali
@@ -73,11 +77,11 @@
73
77
  # Uzbek
74
78
  uz: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
75
79
  # Yiddish
76
- yi: { i18n: { plural: { keys: %i[one other], rule: ->(n) { [0, 1].include?(n) ? :one : :other } } } },
80
+ yi: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },
77
81
  # Chinese
78
- zh: { i18n: { plural: { keys: %i[other], rule: ->(_) { :other } } } },
82
+ zh: { i18n: { plural: { keys: %i[other], rule: -> { :other } } } },
79
83
  # Chinese Hong Kong
80
- 'zh-hk' => { i18n: { plural: { keys: %i[other], rule: -> { :other } } } },
84
+ "zh-hk": { i18n: { plural: { keys: %i[other], rule: -> { :other } } } },
81
85
  # Chinese Taiwan
82
- 'zh-tw' => { i18n: { plural: { keys: %i[other], rule: -> { :other } } } }
86
+ "zh-tw": { i18n: { plural: { keys: %i[other], rule: -> { :other } } } }
83
87
  }
@@ -1,3 +1,3 @@
1
1
  module RailsTranslationManager
2
- VERSION = "1.6.0"
2
+ VERSION = "1.6.1"
3
3
  end
@@ -21,9 +21,13 @@ require "rails_translation_manager/importer"
21
21
 
22
22
  module RailsTranslationManager
23
23
  rails_translation_manager = Gem::Specification.find_by_name("rails_translation_manager").gem_dir
24
-
25
24
  I18n.load_path += ["#{rails_translation_manager}/config/locales/plurals.rb"]
26
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
+
27
31
  def self.locale_root
28
32
  if ENV["RAILS_TRANSLATION_MANAGER_LOCALE_ROOT"]
29
33
  Pathname.new(ENV["RAILS_TRANSLATION_MANAGER_LOCALE_ROOT"])
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.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edd Sowden
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-28 00:00:00.000000000 Z
11
+ date: 2022-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport