-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Presentation XML refactor, terms: https://github.com/metanorma/isodoc… #373
base: main
Are you sure you want to change the base?
Conversation
@i18n = @i18n_lg[lg] if lg && @i18n_lg[lg] | ||
elem.replace(l10n("#{@i18n.source}: #{sources}")) | ||
@i18n = @i18n_lg["default"] | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
end at 237, 4 is not aligned with def at 231, 6.
lg = elem&.at("./ancestor::xmlns:term/@language")&.text | ||
@i18n = @i18n_lg[lg] if lg && @i18n_lg[lg] | ||
elem.replace(l10n("#{@i18n.source}: #{sources}")) | ||
@i18n = @i18n_lg["default"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation detected.
@is_iev or return super | ||
lg = elem&.at("./ancestor::xmlns:term/@language")&.text | ||
@i18n = @i18n_lg[lg] if lg && @i18n_lg[lg] | ||
elem.replace(l10n("#{@i18n.source}: #{sources}")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation detected.
node.children =(l10n("<p>#{label}: " \ | ||
"#{to_xml(p)} (#{Common::to_xml(ref)})</p>")) | ||
@i18n = @i18n_lg["default"] | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
end at 204, 6 is not aligned with def at 196, 12.
@i18n = @i18n_lg[lg] if lg && @i18n_lg[lg] | ||
p, ref, orig = related1_prep(node) | ||
label = @i18n.relatedterms[orig["type"]].upcase | ||
node.children =(l10n("<p>#{label}: " \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surrounding space missing for operator =.
def related(docxml) | ||
docxml.xpath(ns("//term[related]")).each { |f| move_related(f) } | ||
#docxml.xpath(ns("//term[related]")).each { |f| move_related(f) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after #.
lg = p.at(ns("./expression/@language"))&.text or next | ||
lgs.include?(lg) and next | ||
s.parent.remove | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
end at 161, 6 is not aligned with term.xpath(ns(".//fmt-preferred/p/semx[@element = 'preferred']")).each do |s| at 156, 8.
@@ -125,18 +152,36 @@ def otherlang_designations1(term, lgs) | |||
term << "<dl type='other-lang'>#{prefs.join}</dl>" | |||
end | |||
|
|||
def remove_otherlang_designations1(term, lgs) | |||
term.xpath(ns(".//fmt-preferred/p/semx[@element = 'preferred']")).each do |s| | |||
p = semx_orig(s, term) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 2 (not 4) spaces for indentation.
@@ -125,18 +152,36 @@ def otherlang_designations1(term, lgs) | |||
term << "<dl type='other-lang'>#{prefs.join}</dl>" | |||
end | |||
|
|||
def remove_otherlang_designations1(term, lgs) | |||
term.xpath(ns(".//fmt-preferred/p/semx[@element = 'preferred']")).each do |s| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [85/80]
e = p.at(ns("./expression")) | ||
e.delete("language") | ||
designation_annotate(p, p.at(ns(".//name")), d.parent) | ||
m << { lang: lg, script: Metanorma::Utils.default_script(lg), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation detected.
…/issues/630
Metanorma PR checklist