mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 05:01:13 +08:00
Merge pull request #502 from ZogStriP/ensure-locales-are-not-overwritten
ensure locales are not overwritten
This commit is contained in:
commit
7ca2f7d331
@ -21,5 +21,17 @@ describe "i18n integrity checks" do
|
|||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user