From: Mischa POSLAWSKY Date: Fri, 16 Oct 2020 22:25:18 +0000 (+0200) Subject: word edit: latin language option for scientific names X-Git-Tag: v1.13~197 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/c4ded4553b22504dde319c4e222b98b4c9a13208 word edit: latin language option for scientific names Exact identification of life forms by binomial nomenclature, most similar to latin and represented by a pin. --- diff --git a/writer.js b/writer.js index 6470a39..ebace02 100644 --- a/writer.js +++ b/writer.js @@ -19,6 +19,7 @@ document.addEventListener('DOMContentLoaded', () => { wpbutton.onclick = () => { let wptitle = wpinput.value || document.getElementById('form').value; let wplang = document.getElementById('lang').value; + if (wplang == 'la') wplang = 'en'; // most likely presence of scientific names let wpapi = `https://${wplang}.wikipedia.org/w/api.php`; let wppage = wpapi+'?action=parse&format=json&origin=*&prop=text|langlinks&page='+wptitle; fetch(wppage).then(res => res.json()).then(json => { @@ -62,7 +63,9 @@ document.addEventListener('DOMContentLoaded', () => { wpbutton.onclick = () => { let wptitle = wpinput.value || document.getElementById('form').value; let wplang = document.getElementById('lang').value; - let wpurl = `https://${wplang}.wikipedia.org/wiki/${wptitle}`; + let wpurl = + wplang == 'la' ? `https://species.wikimedia.org/wiki/${wptitle}` : + `https://${wplang}.wikipedia.org/wiki/${wptitle}`; window.open(wpurl, 'sheet-wikipedia').focus(); return false; }; diff --git a/writer.plp b/writer.plp index ad46616..256a074 100644 --- a/writer.plp +++ b/writer.plp @@ -71,6 +71,7 @@ my %lang = ( en => ["\N{REGIONAL INDICATOR SYMBOL LETTER G}\N{REGIONAL INDICATOR SYMBOL LETTER B}", 'english'], eo => ['★', 'esperanto'], ru => ["\N{REGIONAL INDICATOR SYMBOL LETTER R}\N{REGIONAL INDICATOR SYMBOL LETTER U}", 'русский'], + la => ["\N{PUSHPIN}", 'latin'], ); my @wordcols = pairkeys my %wordcol = (