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

deal with XML in l10n_zh #10

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

deal with XML in l10n_zh #10

opoudjis opened this issue Nov 15, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@opoudjis
Copy link
Contributor

Because of metanorma/isodoc#617, we are now putting XML markup in xrefs in Japanese. l10n needs to convert Latin punctuation into full-width punctuation, sensitive to context, but ignoring XML tags

So:

  • In 箇条1)のa) , the parentheses are correctly being left half-width, because they are next to Latin text
  • But we now have 箇条<semx>1</semx><span>)</span><semx>の</semx>a<span>)</span>. Currently that is being by node.traverse. That means that the <span>)</span> is being processed without access to its context outside the span, and as a result, it is always being converted to fullwidth.

To fix this, we need to pass the preceding and following text nodes in to the traverse loop.

@opoudjis opoudjis added the bug Something isn't working label Nov 15, 2024
@opoudjis opoudjis self-assigned this Nov 15, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Nov 15, 2024
@opoudjis
Copy link
Contributor Author

Implemented, now tidying

@opoudjis
Copy link
Contributor Author

generalised to French localisation of punct

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Metanorma Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

1 participant