From 49ddf215cc79cb7d04a4b8b249089c0e3203b824 Mon Sep 17 00:00:00 2001 From: funderburkjim Date: Mon, 7 Oct 2024 13:31:07 -0400 Subject: [PATCH] PWG: missing VN Ref: https://github.com/sanskrit-lexicon/PWG/issues/76 --- basicadjust.php | 2 +- basicdisplay.php | 22 +++++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/basicadjust.php b/basicadjust.php index 12ffdb9..9435906 100644 --- a/basicadjust.php +++ b/basicadjust.php @@ -199,7 +199,7 @@ public function line_adjust($line) { // 06-21-2024 For all dictionaries with some metaline with $dicts_with_h = array("ap90", "bhs", "bop", "cae", "ccs", "gra", "gst", "inm", "mci", "md", - "mw", "mw72", "pe", "pui", "pwg", + "mw", "mw72", "pe", "pui", "pwg","pw","pwkvn", "stc", "vei", "lan"); if (in_array($this->getParms->dict, $dicts_with_h)) { $line = preg_replace("|(.*?).*?(.*?)|","$1$2",$line); diff --git a/basicdisplay.php b/basicdisplay.php index f690366..26290f7 100644 --- a/basicdisplay.php +++ b/basicdisplay.php @@ -454,7 +454,21 @@ public function sthndl($xp,$el,$attribs) { // we just display the IAST text, so do nothing with this element } else if ($el == "etym") { $this->row .= ""; - } else if ($el == "info") { + } else if ($el == "info") { + // 10-05-2024 + if (in_array($this->dict,array('pwg'))) { + $attrval = $attribs["n"]; + $x = ''; // text to add + if (in_array($attrval,array("rev","sup"))) { + if ($attrval == "rev") { + $y = "revision"; + }else if ($attrval == "sup") { + $y = "supplement"; + } + $x = " ($y)"; + } + $this->row .= $x; + } } else if ($el == "pc"){ } else if ($el == "to") { } else if ($el == "ns") { @@ -463,9 +477,7 @@ public function sthndl($xp,$el,$attribs) { } else if ($el == "pcol") { } else if ($el == "nsi") { } else if ($el == "pb"){ - if ($this->dict == "mw") { - # do nothing. - }else if (in_array($this->dict,array("bur","stc"))) { + if (in_array($this->dict,array("bur","stc","mw","pwg"))) { # do nothing }else { $this->row .= "
"; @@ -680,7 +692,7 @@ public function endhndl($xp,$el) { } else if ($el == "i"){ $this->row .= "
"; } else if ($el == "pb"){ - if (in_array($this->dict,array("mw","bur","stc","abch","acph","acsj"))) { + if (in_array($this->dict,array("mw","bur","stc","abch","acph","acsj","pwg"))) { # do nothing }else { $this->row .= "
";