rails-i18n 7.0.6 → 7.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/lib/rails_i18n/common_pluralizations/east_slavic.rb +2 -2
  4. data/lib/rails_i18n/common_pluralizations/one_few_other.rb +2 -1
  5. data/lib/rails_i18n/common_pluralizations/one_other.rb +1 -1
  6. data/lib/rails_i18n/common_pluralizations/one_two_other.rb +5 -7
  7. data/lib/rails_i18n/common_pluralizations/one_upto_two_other.rb +4 -2
  8. data/lib/rails_i18n/common_pluralizations/one_with_zero_other.rb +6 -1
  9. data/lib/rails_i18n/common_pluralizations/romanian.rb +5 -2
  10. data/lib/rails_i18n/common_pluralizations/west_slavic.rb +4 -6
  11. data/rails/locale/af.yml +19 -19
  12. data/rails/locale/az.yml +12 -12
  13. data/rails/locale/bg.yml +12 -12
  14. data/rails/locale/bs.yml +6 -6
  15. data/rails/locale/ca.yml +17 -17
  16. data/rails/locale/cy.yml +251 -0
  17. data/rails/locale/da.yml +3 -3
  18. data/rails/locale/de-AT.yml +4 -4
  19. data/rails/locale/de-CH.yml +4 -4
  20. data/rails/locale/de-DE.yml +4 -4
  21. data/rails/locale/de.yml +4 -4
  22. data/rails/locale/el-CY.yml +9 -9
  23. data/rails/locale/el.yml +9 -9
  24. data/rails/locale/en-AU.yml +15 -15
  25. data/rails/locale/en-CA.yml +15 -15
  26. data/rails/locale/en-CY.yml +15 -15
  27. data/rails/locale/en-GB.yml +15 -15
  28. data/rails/locale/en-IE.yml +15 -15
  29. data/rails/locale/en-IN.yml +15 -15
  30. data/rails/locale/en-NZ.yml +15 -15
  31. data/rails/locale/en-TT.yml +15 -15
  32. data/rails/locale/en-US.yml +15 -15
  33. data/rails/locale/en-ZA.yml +18 -18
  34. data/rails/locale/en.yml +15 -15
  35. data/rails/locale/eo.yml +5 -5
  36. data/rails/locale/es-419.yml +16 -16
  37. data/rails/locale/es-AR.yml +16 -16
  38. data/rails/locale/es-CL.yml +16 -16
  39. data/rails/locale/es-CO.yml +16 -16
  40. data/rails/locale/es-CR.yml +16 -16
  41. data/rails/locale/es-EC.yml +16 -16
  42. data/rails/locale/es-ES.yml +16 -16
  43. data/rails/locale/es-MX.yml +16 -16
  44. data/rails/locale/es-NI.yml +16 -16
  45. data/rails/locale/es-PA.yml +16 -16
  46. data/rails/locale/es-PE.yml +16 -16
  47. data/rails/locale/es-US.yml +16 -16
  48. data/rails/locale/es-VE.yml +16 -16
  49. data/rails/locale/es.yml +19 -18
  50. data/rails/locale/eu.yml +4 -4
  51. data/rails/locale/fa.yml +2 -2
  52. data/rails/locale/fi.yml +3 -3
  53. data/rails/locale/fr-CA.yml +7 -7
  54. data/rails/locale/fr-CH.yml +7 -7
  55. data/rails/locale/fr-FR.yml +7 -7
  56. data/rails/locale/fr.yml +9 -9
  57. data/rails/locale/gd.yml +252 -0
  58. data/rails/locale/gl.yml +9 -9
  59. data/rails/locale/hi-IN.yml +2 -2
  60. data/rails/locale/hi.yml +2 -2
  61. data/rails/locale/hr.yml +46 -46
  62. data/rails/locale/hu.yml +12 -12
  63. data/rails/locale/id.yml +7 -7
  64. data/rails/locale/is.yml +14 -14
  65. data/rails/locale/it-CH.yml +10 -10
  66. data/rails/locale/it.yml +9 -9
  67. data/rails/locale/ja.yml +2 -0
  68. data/rails/locale/ka.yml +16 -16
  69. data/rails/locale/kn.yml +5 -5
  70. data/rails/locale/ko.yml +3 -3
  71. data/rails/locale/lb.yml +7 -7
  72. data/rails/locale/lv.yml +1 -2
  73. data/rails/locale/mg.yml +6 -6
  74. data/rails/locale/ml.yml +11 -11
  75. data/rails/locale/mn.yml +15 -15
  76. data/rails/locale/mr-IN.yml +2 -2
  77. data/rails/locale/ms.yml +13 -13
  78. data/rails/locale/nb.yml +16 -16
  79. data/rails/locale/ne.yml +15 -15
  80. data/rails/locale/nl.yml +7 -7
  81. data/rails/locale/nn.yml +10 -10
  82. data/rails/locale/oc.yml +1 -1
  83. data/rails/locale/or.yml +12 -12
  84. data/rails/locale/pa.yml +15 -15
  85. data/rails/locale/pap-AW.yml +16 -16
  86. data/rails/locale/pap-CW.yml +16 -16
  87. data/rails/locale/pl.yml +4 -4
  88. data/rails/locale/pt-BR.yml +18 -17
  89. data/rails/locale/pt.yml +15 -14
  90. data/rails/locale/rm.yml +2 -2
  91. data/rails/locale/ro.yml +6 -6
  92. data/rails/locale/ru.yml +17 -15
  93. data/rails/locale/sl.yml +10 -10
  94. data/rails/locale/sq.yml +15 -19
  95. data/rails/locale/sw.yml +9 -9
  96. data/rails/locale/ta.yml +10 -10
  97. data/rails/locale/tr.yml +16 -16
  98. data/rails/locale/uz.yml +1 -1
  99. data/rails/locale/wo.yml +15 -15
  100. data/rails/ordinals/de-AT.rb +15 -0
  101. data/rails/ordinals/de-CH.rb +15 -0
  102. data/rails/ordinals/de-DE.rb +15 -0
  103. data/rails/ordinals/de.rb +15 -0
  104. data/rails/ordinals/gd.rb +24 -0
  105. data/rails/pluralization/ar.rb +3 -2
  106. data/rails/pluralization/gd.rb +29 -0
  107. data/rails/pluralization/hsb.rb +7 -9
  108. data/rails/pluralization/lt.rb +3 -2
  109. data/rails/pluralization/lv.rb +1 -2
  110. data/rails/pluralization/mk.rb +2 -3
  111. data/rails/pluralization/pl.rb +4 -3
  112. data/rails/pluralization/sl.rb +7 -11
  113. metadata +10 -2
data/rails/locale/tr.yml CHANGED
@@ -63,41 +63,41 @@ tr:
63
63
  datetime:
64
64
  distance_in_words:
65
65
  about_x_hours:
66
- one: yaklaşık 1 saat
66
+ one: yaklaşık %{count} saat
67
67
  other: yaklaşık %{count} saat
68
68
  about_x_months:
69
- one: yaklaşık 1 ay
69
+ one: yaklaşık %{count} ay
70
70
  other: yaklaşık %{count} ay
71
71
  about_x_years:
72
- one: yaklaşık 1 yıl
72
+ one: yaklaşık %{count} yıl
73
73
  other: yaklaşık %{count} yıl
74
74
  almost_x_years:
75
- one: neredeyse 1 yıl
75
+ one: neredeyse %{count} yıl
76
76
  other: neredeyse %{count} yıl
77
77
  half_a_minute: yarım dakika
78
78
  less_than_x_seconds:
79
- one: 1 saniyeden az
79
+ one: "%{count} saniyeden az"
80
80
  other: "%{count} saniyeden az"
81
81
  less_than_x_minutes:
82
- one: 1 dakikadan az
82
+ one: "%{count} dakikadan az"
83
83
  other: "%{count} dakikadan az"
84
84
  over_x_years:
85
- one: 1 yıldan fazla
85
+ one: "%{count} yıldan fazla"
86
86
  other: "%{count} yıldan fazla"
87
87
  x_seconds:
88
- one: 1 saniye
88
+ one: "%{count} saniye"
89
89
  other: "%{count} saniye"
90
90
  x_minutes:
91
- one: 1 dakika
91
+ one: "%{count} dakika"
92
92
  other: "%{count} dakika"
93
93
  x_days:
94
- one: 1 gün
94
+ one: "%{count} gün"
95
95
  other: "%{count} gün"
96
96
  x_months:
97
- one: 1 ay
97
+ one: "%{count} ay"
98
98
  other: "%{count} ay"
99
99
  x_years:
100
- one: 1 yıl
100
+ one: "%{count} yıl"
101
101
  other: "%{count} yıl"
102
102
  prompts:
103
103
  second: Saniye
@@ -131,18 +131,18 @@ tr:
131
131
  required: doldurulmalı
132
132
  taken: hali hazırda kullanılmakta
133
133
  too_long:
134
- one: çok uzun (en fazla 1 karakter)
134
+ one: çok uzun (en fazla %{count} karakter)
135
135
  other: çok uzun (en fazla %{count} karakter)
136
136
  too_short:
137
- one: çok kısa (en az 1 karakter)
137
+ one: çok kısa (en az %{count} karakter)
138
138
  other: çok kısa (en az %{count} karakter)
139
139
  wrong_length:
140
- one: hatalı uzunlukta (1 karakter olmalı)
140
+ one: hatalı uzunlukta (%{count} karakter olmalı)
141
141
  other: hatalı uzunlukta (%{count} karakter olmalı)
142
142
  template:
143
143
  body: 'Lütfen aşağıdaki hataları düzeltiniz:'
144
144
  header:
145
- one: 1 hata oluştuğu için %{model} kaydedilemedi
145
+ one: "%{count} hata oluştuğu için %{model} kaydedilemedi"
146
146
  other: "%{count} hata oluştuğu için %{model} kaydedilemedi"
147
147
  helpers:
148
148
  select:
data/rails/locale/uz.yml CHANGED
@@ -75,7 +75,7 @@ uz:
75
75
  many: chamasi %{count} yil
76
76
  other: chamasi %{count} yil
77
77
  almost_x_years:
78
- one: deyarli 1 yil
78
+ one: deyarli %{count} yil
79
79
  few: deyarli %{count} yil
80
80
  many: deyarli %{count} yil
81
81
  other: deyarli %{count} yil
data/rails/locale/wo.yml CHANGED
@@ -63,41 +63,41 @@ wo:
63
63
  datetime:
64
64
  distance_in_words:
65
65
  about_x_hours:
66
- one: about 1 hour
66
+ one: about %{count} hour
67
67
  other: about %{count} hours
68
68
  about_x_months:
69
- one: about 1 month
69
+ one: about %{count} month
70
70
  other: about %{count} months
71
71
  about_x_years:
72
- one: about 1 year
72
+ one: about %{count} year
73
73
  other: about %{count} years
74
74
  almost_x_years:
75
- one: almost 1 year
75
+ one: almost %{count} year
76
76
  other: almost %{count} years
77
77
  half_a_minute: half a minute
78
78
  less_than_x_seconds:
79
- one: less than 1 second
79
+ one: less than %{count} second
80
80
  other: less than %{count} seconds
81
81
  less_than_x_minutes:
82
82
  one: less than a minute
83
83
  other: less than %{count} minutes
84
84
  over_x_years:
85
- one: over 1 year
85
+ one: over %{count} year
86
86
  other: over %{count} years
87
87
  x_seconds:
88
- one: 1 second
88
+ one: "%{count} second"
89
89
  other: "%{count} seconds"
90
90
  x_minutes:
91
- one: 1 minute
91
+ one: "%{count} minute"
92
92
  other: "%{count} minutes"
93
93
  x_days:
94
- one: 1 day
94
+ one: "%{count} day"
95
95
  other: "%{count} days"
96
96
  x_months:
97
- one: 1 month
97
+ one: "%{count} month"
98
98
  other: "%{count} months"
99
99
  x_years:
100
- one: 1 year
100
+ one: "%{count} year"
101
101
  other: "%{count} years"
102
102
  prompts:
103
103
  second: Second
@@ -127,18 +127,18 @@ wo:
127
127
  odd: must be odd
128
128
  taken: has already been taken
129
129
  too_long:
130
- one: is too long (maximum is 1 character)
130
+ one: is too long (maximum is %{count} character)
131
131
  other: is too long (maximum is %{count} characters)
132
132
  too_short:
133
- one: is too short (minimum is 1 character)
133
+ one: is too short (minimum is %{count} character)
134
134
  other: is too short (minimum is %{count} characters)
135
135
  wrong_length:
136
- one: is the wrong length (should be 1 character)
136
+ one: is the wrong length (should be %{count} character)
137
137
  other: is the wrong length (should be %{count} characters)
138
138
  template:
139
139
  body: 'There were problems with the following fields:'
140
140
  header:
141
- one: 1 error prohibited this %{model} from being saved
141
+ one: "%{count} error prohibited this %{model} from being saved"
142
142
  other: "%{count} errors prohibited this %{model} from being saved"
143
143
  helpers:
144
144
  select:
@@ -0,0 +1,15 @@
1
+ {
2
+ de: {
3
+ number: {
4
+ nth: {
5
+ ordinals: -> (_key, number:, **_options) {
6
+ '.'
7
+ },
8
+
9
+ ordinalized: -> (_key, number:, **_options) {
10
+ "#{number}#{ActiveSupport::Inflector.ordinal(number)}"
11
+ }
12
+ }
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ de: {
3
+ number: {
4
+ nth: {
5
+ ordinals: -> (_key, number:, **_options) {
6
+ '.'
7
+ },
8
+
9
+ ordinalized: -> (_key, number:, **_options) {
10
+ "#{number}#{ActiveSupport::Inflector.ordinal(number)}"
11
+ }
12
+ }
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ de: {
3
+ number: {
4
+ nth: {
5
+ ordinals: -> (_key, number:, **_options) {
6
+ '.'
7
+ },
8
+
9
+ ordinalized: -> (_key, number:, **_options) {
10
+ "#{number}#{ActiveSupport::Inflector.ordinal(number)}"
11
+ }
12
+ }
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ de: {
3
+ number: {
4
+ nth: {
5
+ ordinals: -> (_key, number:, **_options) {
6
+ '.'
7
+ },
8
+
9
+ ordinalized: -> (_key, number:, **_options) {
10
+ "#{number}#{ActiveSupport::Inflector.ordinal(number)}"
11
+ }
12
+ }
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ gd: {
3
+ number: {
4
+ nth: {
5
+ ordinals: -> (_key, number:, **_options) {
6
+ case number.to_i.abs
7
+ when 1
8
+ 'ᵈ'
9
+ when 2
10
+ 'ⁿᵃ'
11
+ when 3
12
+ 'ˢ'
13
+ else
14
+ 'ᵐʰ'
15
+ end
16
+ },
17
+
18
+ ordinalized: -> (_key, number:, **_options) {
19
+ "#{number}#{ActiveSupport::Inflector.ordinal(number)}"
20
+ }
21
+ }
22
+ }
23
+ }
24
+ }
@@ -3,7 +3,8 @@ module RailsI18n
3
3
  module Arabic
4
4
  def self.rule
5
5
  lambda do |n|
6
- n ||= 0
6
+ return :other unless n.is_a?(Numeric)
7
+
7
8
  mod100 = n % 100
8
9
 
9
10
  if n == 0
@@ -29,4 +30,4 @@ end
29
30
  :'i18n' => {
30
31
  :plural => {
31
32
  :keys => [:zero, :one, :two, :few, :many, :other],
32
- :rule => RailsI18n::Pluralization::Arabic.rule }}}}
33
+ :rule => RailsI18n::Pluralization::Arabic.rule }}}}
@@ -0,0 +1,29 @@
1
+ module RailsI18n
2
+ module Pluralization
3
+ module ScottishGaelic
4
+ def self.rule
5
+ lambda do |n|
6
+ return :other unless n.is_a?(Numeric)
7
+
8
+ floorn = n.floor
9
+
10
+ if floorn == 1 || floorn == 11
11
+ :one
12
+ elsif floorn == 2 || floorn == 12
13
+ :two
14
+ elsif (3..19).member?(floorn)
15
+ :few
16
+ else
17
+ :other
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+
25
+ { :gd => {
26
+ :'i18n' => {
27
+ :plural => {
28
+ :keys => [:one, :two, :few, :other],
29
+ :rule => RailsI18n::Pluralization::ScottishGaelic.rule }}}}
@@ -3,17 +3,15 @@ module RailsI18n
3
3
  module UpperSorbian
4
4
  def self.rule
5
5
  lambda do |n|
6
- n ||= 0
6
+ return :other unless n.is_a?(Numeric)
7
+
7
8
  mod100 = n % 100
8
9
 
9
- if mod100 == 1
10
- :one
11
- elsif mod100 == 2
12
- :two
13
- elsif mod100 == 3 || mod100 == 4
14
- :few
15
- else
16
- :other
10
+ case mod100
11
+ when 1 then :one
12
+ when 2 then :two
13
+ when 3, 4 then :few
14
+ else :other
17
15
  end
18
16
  end
19
17
  end
@@ -3,7 +3,8 @@ module RailsI18n
3
3
  module Lithuanian
4
4
  def self.rule
5
5
  lambda do |n|
6
- n ||= 0
6
+ return :other unless n.is_a?(Numeric)
7
+
7
8
  mod10 = n % 10
8
9
  mod100 = n % 100
9
10
 
@@ -24,4 +25,4 @@ end
24
25
  :'i18n' => {
25
26
  :plural => {
26
27
  :keys => [:one, :few, :other],
27
- :rule => RailsI18n::Pluralization::Lithuanian.rule }}}}
28
+ :rule => RailsI18n::Pluralization::Lithuanian.rule }}}}
@@ -3,8 +3,7 @@ module RailsI18n
3
3
  module Latvian
4
4
  def self.rule
5
5
  lambda do |n|
6
- n ||= 0
7
- if n % 10 == 1 && n % 100 != 11
6
+ if n.is_a?(Numeric) && n % 10 == 1 && n % 100 != 11
8
7
  :one
9
8
  else
10
9
  :other
@@ -3,8 +3,7 @@ module RailsI18n
3
3
  module Macedonian
4
4
  def self.rule
5
5
  lambda do |n|
6
- n ||= 0
7
- if n % 10 == 1 && n != 11
6
+ if n.is_a?(Numeric) && n % 10 == 1 && n != 11
8
7
  :one
9
8
  else
10
9
  :other
@@ -19,4 +18,4 @@ end
19
18
  :'i18n' => {
20
19
  :plural => {
21
20
  :keys => [:one, :other],
22
- :rule => RailsI18n::Pluralization::Macedonian.rule }}}}
21
+ :rule => RailsI18n::Pluralization::Macedonian.rule }}}}
@@ -3,7 +3,8 @@ module RailsI18n
3
3
  module Polish
4
4
  def self.rule
5
5
  lambda do |n|
6
- n ||= 0
6
+ return :other unless n.is_a?(Numeric)
7
+
7
8
  mod10 = n % 10
8
9
  mod100 = n % 100
9
10
 
@@ -11,7 +12,7 @@ module RailsI18n
11
12
  :one
12
13
  elsif [2, 3, 4].include?(mod10) && ![12, 13, 14].include?(mod100)
13
14
  :few
14
- elsif ([0, 1] + (5..9).to_a).include?(mod10) || [12, 13, 14].include?(mod100)
15
+ elsif [0, 1, 5, 6, 7, 8, 9].include?(mod10) || [12, 13, 14].include?(mod100)
15
16
  :many
16
17
  else
17
18
  :other
@@ -26,4 +27,4 @@ end
26
27
  :'i18n' => {
27
28
  :plural => {
28
29
  :keys => [:one, :few, :many, :other],
29
- :rule => RailsI18n::Pluralization::Polish.rule }}}}
30
+ :rule => RailsI18n::Pluralization::Polish.rule }}}}
@@ -3,17 +3,13 @@ module RailsI18n
3
3
  module Slovenian
4
4
  def self.rule
5
5
  lambda do |n|
6
- n ||= 0
7
- mod100 = n % 100
6
+ return :other unless n.is_a?(Numeric)
8
7
 
9
- if mod100 == 1
10
- :one
11
- elsif mod100 == 2
12
- :two
13
- elsif mod100 == 3 || mod100 == 4
14
- :few
15
- else
16
- :other
8
+ case n % 100
9
+ when 1 then :one
10
+ when 2 then :two
11
+ when 3, 4 then :few
12
+ else :other
17
13
  end
18
14
  end
19
15
  end
@@ -25,4 +21,4 @@ end
25
21
  :'i18n' => {
26
22
  :plural => {
27
23
  :keys => [:one, :two, :few, :other],
28
- :rule => RailsI18n::Pluralization::Slovenian.rule }}}}
24
+ :rule => RailsI18n::Pluralization::Slovenian.rule }}}}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.6
4
+ version: 7.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rails I18n Group
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-08 00:00:00.000000000 Z
11
+ date: 2023-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -123,6 +123,7 @@ files:
123
123
  - rails/locale/bs.yml
124
124
  - rails/locale/ca.yml
125
125
  - rails/locale/cs.yml
126
+ - rails/locale/cy.yml
126
127
  - rails/locale/da.yml
127
128
  - rails/locale/de-AT.yml
128
129
  - rails/locale/de-CH.yml
@@ -166,6 +167,7 @@ files:
166
167
  - rails/locale/fr-FR.yml
167
168
  - rails/locale/fr.yml
168
169
  - rails/locale/fy.yml
170
+ - rails/locale/gd.yml
169
171
  - rails/locale/gl.yml
170
172
  - rails/locale/he.yml
171
173
  - rails/locale/hi-IN.yml
@@ -233,10 +235,15 @@ files:
233
235
  - rails/locale/zh-HK.yml
234
236
  - rails/locale/zh-TW.yml
235
237
  - rails/locale/zh-YUE.yml
238
+ - rails/ordinals/de-AT.rb
239
+ - rails/ordinals/de-CH.rb
240
+ - rails/ordinals/de-DE.rb
241
+ - rails/ordinals/de.rb
236
242
  - rails/ordinals/fr-CA.rb
237
243
  - rails/ordinals/fr-CH.rb
238
244
  - rails/ordinals/fr-FR.rb
239
245
  - rails/ordinals/fr.rb
246
+ - rails/ordinals/gd.rb
240
247
  - rails/pluralization/ar.rb
241
248
  - rails/pluralization/az.rb
242
249
  - rails/pluralization/be.rb
@@ -287,6 +294,7 @@ files:
287
294
  - rails/pluralization/fr-FR.rb
288
295
  - rails/pluralization/fr.rb
289
296
  - rails/pluralization/fy.rb
297
+ - rails/pluralization/gd.rb
290
298
  - rails/pluralization/gl.rb
291
299
  - rails/pluralization/he.rb
292
300
  - rails/pluralization/hi-IN.rb