Merge pull request #1198 from erciccione/mp-trim

moneropedia.rb: If an entry is not present in LANG.yml, use English one
This commit is contained in:
luigi1111 2020-10-21 15:44:17 -05:00 committed by GitHub
commit 9514823c44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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