mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
ensure locales are not overwritten
This commit is contained in:
parent
04c6087ef0
commit
6dab9927c6
1 changed files with 12 additions and 0 deletions
|
@ -21,5 +21,17 @@ describe "i18n integrity checks" do
|
|||
end
|
||||
end
|
||||
|
||||
it "does not overwrite another language" do
|
||||
Dir["#{Rails.root}/config/locales/*.yml"].each do |f|
|
||||
locale = /.*\.([^.]{2,})\.yml$/.match(f)[1] + ':'
|
||||
IO.foreach(f) do |line|
|
||||
next if line.start_with? "#"
|
||||
next if line.start_with? "---"
|
||||
next if line.strip!.blank?
|
||||
line.should eq locale
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue