Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

opoudjis
Copy link
Contributor

@opoudjis opoudjis commented Jan 8, 2025

…/issues/630

Metanorma PR checklist

@opoudjis opoudjis self-assigned this Jan 8, 2025
@i18n = @i18n_lg[lg] if lg && @i18n_lg[lg]
elem.replace(l10n("#{@i18n.source}: #{sources}"))
@i18n = @i18n_lg["default"]
end
Copy link

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"]
Copy link

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}"))
Copy link

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
Copy link

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}: " \
Copy link

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) }
Copy link

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
Copy link

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)
Copy link

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|
Copy link

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),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant