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

Annotate connectives in xrefs #619

Closed
opoudjis opened this issue Nov 13, 2024 · 2 comments
Closed

Annotate connectives in xrefs #619

opoudjis opened this issue Nov 13, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@opoudjis
Copy link
Contributor

Crossreferences autogenerate with internationalisation connectives and nesting of cross-reference text:

<xref target="note1"><location target="note1" connective="and"/><location target="note2" connective="and"/></xref>

can end up rendered as:

 <xref target="note1">Clause 2.1, Note 1</xref> and <xref target="note2">Clause 2.2, Note 1</xref>
      Clause 2.2, <xref target="note2">Note 1</xref> and <xref target="note3">Note 2</xref>

As we are semantically annotating cross-reference text out of #617, it would make sense to annotation the inserted "and" and "," in the foregoing, as spans of class fmt-xref-connective. Doing so would involve updating isodoc-i18n, since it is internationalised, so I will delay it.

@opoudjis opoudjis added the enhancement New feature or request label Nov 13, 2024
@opoudjis opoudjis self-assigned this Nov 13, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Nov 13, 2024
@opoudjis opoudjis moved this from 🆕 New to 🏗 In progress in Metanorma Nov 18, 2024
@opoudjis
Copy link
Contributor Author

Bringing this forward, since it's just going to make rewriting test cases quicker to do it now.

@opoudjis
Copy link
Contributor Author

opoudjis commented Nov 18, 2024

The syntax of i18n connective templates is:

%1, %2
%1, and %2
%1の%2

It will become:

%1<conn>, </conn>%2
%1<conn>, and</conn>%2
%1<conn>の</conn>%2

It will be the responsibility of the caller to replace <conn>,</conn> with appropriate markup; in our case, <span class='fmt-connective'>, </span>

Adding <enum-comma></enum-comma> for "a, b, and c", and <comma></comma> for "Clause 1, Table 2".

opoudjis added a commit to metanorma/isodoc-i18n that referenced this issue Nov 18, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Metanorma Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant