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 9, 2025
1 parent e687aa2 commit a90c3fc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions lib/isodoc/presentation_function/concepts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,9 @@ def designation1(desgn)
def designation_annotate(desgn, name, orig)
designation_boldface(desgn)
designation_field(desgn, name, orig)
g = desgn.at(ns("./expression/grammar")) and
name << ", #{designation_grammar(g).join(', ')}"
#g = desgn.at(ns("./expression/grammar")) and
#name << ", #{designation_grammar(g).join(', ')}"
designation_grammar(desgn, name)
designation_localization(desgn, name, orig)
designation_pronunciation(desgn, name)
designation_bookmarks(desgn, name)
Expand All @@ -195,17 +196,17 @@ def designation_field(desgn, name, orig)
name << "<span class='fmt-designation-field'>, &#x3c;#{f}&#x3e;</span>"
end

def designation_grammar(grammar)
def designation_grammar(desgn, name)
g = desgn.at(ns("./expression/grammar")) or return
ret = []
grammar.xpath(ns("./gender | ./number")).each do |x|
g.xpath(ns("./gender | ./number")).each do |x|
ret << @i18n.grammar_abbrevs[x.text]
end
%w(isPreposition isParticiple isAdjective isVerb isAdverb isNoun)
.each do |x|
grammar.at(ns("./#{x}[text() = 'true']")) and
ret << @i18n.grammar_abbrevs[x]
g.at(ns("./#{x}[text() = 'true']")) and ret << @i18n.grammar_abbrevs[x]
end
ret
name << ", #{ret.join(', ')}"
end

def designation_localization(desgn, name, orig_desgn)
Expand Down

0 comments on commit a90c3fc

Please sign in to comment.