FIX: i18n integrity check was not ignoring comments properly
This commit is contained in:
parent
b95db5fcae
commit
16c6759818
|
@ -46,9 +46,10 @@ describe "i18n integrity checks" do
|
||||||
Dir["#{Rails.root}/config/locales/*.yml"].each do |f|
|
Dir["#{Rails.root}/config/locales/*.yml"].each do |f|
|
||||||
locale = /.*\.([^.]{2,})\.yml$/.match(f)[1] + ':'
|
locale = /.*\.([^.]{2,})\.yml$/.match(f)[1] + ':'
|
||||||
IO.foreach(f) do |line|
|
IO.foreach(f) do |line|
|
||||||
|
line.strip!
|
||||||
next if line.start_with? "#"
|
next if line.start_with? "#"
|
||||||
next if line.start_with? "---"
|
next if line.start_with? "---"
|
||||||
next if line.strip!.blank?
|
next if line..blank?
|
||||||
line.should eq locale
|
line.should eq locale
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue