word edit: latin language option for scientific names
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 16 Oct 2020 22:25:18 +0000 (00:25 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 20 Oct 2020 20:49:11 +0000 (22:49 +0200)
Exact identification of life forms by binomial nomenclature, most similar to
latin and represented by a pin.

writer.js
writer.plp

index 6470a3957c0b1051b6dd95d0532d858ce4ccd94a..ebace02f376569c53a99f00a0ce6f342b5a51b4c 100644 (file)
--- 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;
                };
index ad46616fb348260530eed9f5f494900b57491cc1..256a074369a3c00c5754e8cdfa4a4de735dcc684 100644 (file)
@@ -71,6 +71,7 @@ my %lang = (
        en => ["\N{REGIONAL INDICATOR SYMBOL LETTER G}\N{REGIONAL INDICATOR SYMBOL LETTER B}", 'english'],
        eo => ['<span style="color:green">★</span>', 'esperanto'],
        ru => ["\N{REGIONAL INDICATOR SYMBOL LETTER R}\N{REGIONAL INDICATOR SYMBOL LETTER U}", 'русский'],
+       la => ["\N{PUSHPIN}", 'latin'],
 );
 my @wordcols = pairkeys
 my %wordcol = (