Skip to content

Commit

Permalink
Merge pull request #1087 from jlduran/fix-thor-locales-complete
Browse files Browse the repository at this point in the history
Fix thor locales:complete
  • Loading branch information
pama committed Jun 5, 2023
2 parents 8888195 + 2bd4e64 commit 6eea72c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rails/test/lib/key_structure.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'rubygems'
require 'i18n'
require 'date'

I18n.enforce_available_locales = false

Expand All @@ -24,6 +25,7 @@ def check(locale)

I18n.locale = locale.to_sym
translations = flatten_hash(I18n.backend.translations[:en])
translations.delete('i18n.plural.rule')
pluralizations = find_pluralizations(I18n.backend.translations[:en])
translations.keys.sort.each do |key|
begin
Expand All @@ -38,7 +40,7 @@ def check(locale)

if pluralizations.has_key?(key)
[0, 1, 2, 3, 5, 6, 10, 11, 100, 1000000, 10.2].each do |count|
I18n.t key, :count => count, :raise => true
I18n.t key, :count => count, :model => 'model', :raise => true
end
end
rescue I18n::InvalidPluralizationData => e
Expand Down

0 comments on commit 6eea72c

Please sign in to comment.