moneropedia.rb: If an entry is not present in LANG.yml, use English one

This commit is contained in:
erciccione 2020-09-17 15:37:49 +02:00
parent ce5cc96aa4
commit 82726e9fd2
No known key found for this signature in database
GPG key ID: 762AF8C608E56CDF

View file

@ -65,6 +65,9 @@ module Jekyll
if !entry.empty?
baseName = File.basename(entry_file, ".*")
displayName = @@localConfig[lang]["moneropedia"]["entries"][baseName]
if displayName == nil
displayName = @@localConfig["en"]["moneropedia"]["entries"][baseName]
end
@@moneropedia[lang].push({ :terms => entry['terms'], :summary => entry['summary'], :file => baseName })
@@moneropedia_ordered[lang] = @@moneropedia_ordered[lang].merge({ displayName => baseName })
end