Skip to content

Commit

Permalink
https://github.com/metanorma/isodoc/issues/630
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Jan 1, 2025
1 parent 7693cb0 commit a01c830
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 40 deletions.
4 changes: 2 additions & 2 deletions lib/isodoc/presentation_function/concepts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ def related1(node)
p, ref, orig = related1_prep(node)
label = @i18n.relatedterms[orig["type"]].upcase
if p && ref
node.replace(l10n("<p><strong>#{label}:</strong> " \
node.children =(l10n("<p><strong>#{label}:</strong> " \
"<em>#{to_xml(p)}</em> (#{Common::to_xml(ref)})</p>"))
else
node.replace(l10n("<p><strong>#{label}:</strong> " \
node.children = (l10n("<p><strong>#{label}:</strong> " \
"<strong>**RELATED TERM NOT FOUND**</strong></p>"))
end
end
Expand Down
82 changes: 44 additions & 38 deletions spec/isodoc/terms_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1879,12 +1879,12 @@
<usage-info>Usage Info 1</usage-info>
</preferred>
<fmt-preferred>
<p>
<semx element="preferred" source="_">
<strong>Second Term</strong>
, &lt;Field, Usage Info 1&gt;
</semx>
</p>
<p>
<semx element="preferred" source="_">
<strong>Second Term</strong>
, &lt;Field, Usage Info 1&gt;
</semx>
</p>
</fmt-preferred>
<definition id="_">
<verbal-definition>Definition 1</verbal-definition>
Expand Down Expand Up @@ -1914,11 +1914,11 @@
</expression>
</preferred>
<fmt-preferred>
<p>
<semx element="preferred" source="_">
<strong>First Designation</strong>
</semx>
</p>
<p>
<semx element="preferred" source="_">
<strong>First Designation</strong>
</semx>
</p>
</fmt-preferred>
<related type="contrast" id="_">
<preferred>
Expand All @@ -1945,33 +1945,39 @@
<xref target="second"/>
</related>
<fmt-related>
<p>
<strong>CONTRAST:</strong>
<em>
<fmt-preferred>
<semx element="preferred" source="_">
<strong>Fifth Designation</strong>
, n
</semx>
</fmt-preferred>
</em>
(
<xref target="second">
<span class="fmt-element-name">Clause</span>
<semx element="autonum" source="A">1</semx>
<span class="fmt-autonum-delim">.</span>
<semx element="autonum" source="second">1</semx>
</xref>
)
</p>
<p>
<strong>SEE:</strong>
<strong>**RELATED TERM NOT FOUND**</strong>
</p>
<p>
<strong>SEE ALSO:</strong>
<strong>**RELATED TERM NOT FOUND**</strong>
</p>
<semx element="related" source="_">
<p>
<strong>CONTRAST:</strong>
<em>
<fmt-preferred>
<semx element="preferred" source="_">
<strong>Fifth Designation</strong>
, n
</semx>
</fmt-preferred>
</em>
(
<xref target="second">
<span class="fmt-element-name">Clause</span>
<semx element="autonum" source="A">1</semx>
<span class="fmt-autonum-delim">.</span>
<semx element="autonum" source="second">1</semx>
</xref>
)
</p>
</semx>
<semx element="related" source="_">
<p>
<strong>SEE:</strong>
<strong>**RELATED TERM NOT FOUND**</strong>
</p>
</semx>
<semx element="related" source="_">
<p>
<strong>SEE ALSO:</strong>
<strong>**RELATED TERM NOT FOUND**</strong>
</p>
</semx>
</fmt-related>
<definition id="_">
<verbal-definition>Definition 2</verbal-definition>
Expand Down

0 comments on commit a01c830

Please sign in to comment.