mirror of
https://github.com/monero-project/monero-site.git
synced 2025-01-10 21:05:04 +00:00
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:
commit
9514823c44
1 changed files with 3 additions and 0 deletions
|
@ -65,6 +65,9 @@ module Jekyll
|
||||||
if !entry.empty?
|
if !entry.empty?
|
||||||
baseName = File.basename(entry_file, ".*")
|
baseName = File.basename(entry_file, ".*")
|
||||||
displayName = @@localConfig[lang]["moneropedia"]["entries"][baseName]
|
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[lang].push({ :terms => entry['terms'], :summary => entry['summary'], :file => baseName })
|
||||||
@@moneropedia_ordered[lang] = @@moneropedia_ordered[lang].merge({ displayName => baseName })
|
@@moneropedia_ordered[lang] = @@moneropedia_ordered[lang].merge({ displayName => baseName })
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue