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

Update Chinese language output to support Traditional and Simplified references #21

Closed
ronaldtse opened this issue Apr 5, 2022 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@ronaldtse
Copy link

ronaldtse commented Apr 5, 2022

Right now Relaton::Render produces this i18n output for Chinese:

RAMSEY, J. K. 和 W. C. MCGREW. Object play in great apes: Studies in nature and captivity. 在: PELLEGRINI, Anthony D. 和 Peter K. SMITH (编辑): <em>The nature of play: Great apes and humans</em> [electronic resource, 8vo]. 第第3版。 New York, NY: Guilford Press. 2005. 第89–112页。【看过: 2019年9月3日】.

The bibliographic practices for Traditional and Simplified Chinese are slightly different:

Traditional:

RAMSEY, J. K. 與 MCGREW, W. C.。〈Object play in great apes: Studies in nature and captivity〉。收錄於: PELLEGRINI, Anthony D.、SMITH, Peter K.(編)。《The nature of play: Great apes and humans》[電子資源,8vo]。第3版。 New York, NY: Guilford Press。 2005。 頁89-112。[閱:2019年9月3日]。

Simplified:

RAMSEY, J. K.,MCGREW, W. C.  Object play in great apes: Studies in nature and captivity. 见: PELLEGRINI, Anthony D.、SMITH, Peter K.(编). <em>The nature of play: Great apes and humans</em>[电子资源,8vo]. 第3版. New York, NY:Guilford Press 2005. 页89~112.[阅:2019年9月3日].
@ronaldtse ronaldtse added the enhancement New feature or request label Apr 5, 2022
@opoudjis opoudjis moved this to In Progress in Metanorma Apr 6, 2022
@opoudjis opoudjis moved this from In Progress to Low priority in Metanorma Apr 6, 2022
@opoudjis opoudjis moved this from 🏝 Low priority to 🏗 In progress in Metanorma Nov 12, 2022
@opoudjis
Copy link
Contributor

opoudjis commented Nov 15, 2022

This actually raises a lot of questions about Chinese localisation, which I'm trying (obviously) to keep as generic as possible, governed by isodoc-i18n, and which was based on the experience of metanorma-iso

  • Right now, two generic words in a list are joined by 和. You have Traditional joining two authors (but not two editors!) by 與, and Simplified not joining them by anything. Is that a general rule of lists (e.g. applicable to clauses?) Or just bibliographies?
  • Also, need to ensure the enumeration comma is being used for lists, 、. @ronaldtse, you are ignoring that in Simplified?
  • Right now, punctuation is localised, but only before or after a Chinese character (第第3版。 New York; 第89–112页。【看过:) You have Traditional overriding that and using 。 as a delimiter throughout, and Simplified not use 。at all. Are you sure about this? GB standards used 。 consistently.
  • I localise [ ] as 【 】. You correct that to [ ]. Is that universally the case?
  • Is ~ the universal Simplified localisation of en-dash?

The variation between no-quote, italics and single-guillemot, double-guillemot is something that I think is beyond the scope of localisation; English after all has styles that do different things with quoting journal titles. I see that 《 is specific to titles, so no problem having it globally replace italics -- except that you're allowing cases it doesn't; should I treat 《 as Traditional-only?

And yes, I am studying https://en.wikipedia.org/wiki/Chinese_punctuation and https://www.w3.org/TR/clreq/ :)

@opoudjis
Copy link
Contributor

opoudjis commented Nov 15, 2022

I think I'll introduce an i18n of primary and secondary quote, specific to each style. There will be a default rendering of primary and secondary quote (empty, <em> in the foregoing), but there can also be language-overrides (〈, 《 for zh-Hant).

So articles would become:

{{ author }}. {{ opensecondaryquote }} {{ title }}} {{ closesecondaryquote }}. {{ openprimaryquote }} {{ series }} {{ closeprimaryquote }}.

Where the stylesheet would have:

opensecondaryquote:
  default: 
  zh-Hant: 〈
openprimaryquote:
  default: <em>
  zh-Hant: 《

@opoudjis
Copy link
Contributor

Ordinals for Traditional Chinese not working with twitter-cldr-rb: the rbnf.yaml files are not defined for locales, but are meant to be generic to the language, so the number localisation needs to be reverted to "generic" Chinese.

This is almost certainly an error for Traditional Chinese, and is a bad way of handling locales even in harmless cases like Flemish vs Dutch—I should not have to undo localisation to get results. But given current events at Twitter, now is not a good time to lodge PRs to enhance their functionality...

opoudjis added a commit to metanorma/isodoc-i18n that referenced this issue Nov 15, 2022
opoudjis added a commit to metanorma/isodoc-i18n that referenced this issue Nov 15, 2022
opoudjis added a commit that referenced this issue Nov 17, 2022
@opoudjis opoudjis moved this from 🏗 In progress to 👀 In review in Metanorma Nov 17, 2022
@opoudjis
Copy link
Contributor

和 "foreigners' logical and"

與 "together" is more correct, but is more restricted semantically (e.g. authorship), and is Traditional only.

Both appear between two final items.

Simplified ignores enum comma (verify).

Traditional is hollow dot. Simplified is normal dot, but fullwidth (verify).

Chinese citation, use fullwidth punct in citation language.

Lenticular/straight bracket is only style difference.

Is ~ the universal Simplified localisation of en-dash? Yes.

@opoudjis opoudjis moved this from 👀 In review to 🏗 In progress in Metanorma Nov 22, 2022
@opoudjis
Copy link
Contributor

opoudjis commented Nov 26, 2022

So:

  • Separate label for authorship "and" in relaton-render, realised in zh-Hant as 與
  • Ensure that enumeration comma is used in lists in zh-Hant
  • Confirm whether enumeration comma is used in lists in zh-Hans
  • Do not localise punctuation by context, but impose Chinese full-width punctuation universally (confirmed in W3C, §3.2.1.)
  • Confirm use of fulldwidth dot instead of hollow dot in zh-Hant (reportedly to avoid ambiguity with 0 in technical writing) (W3C, §3.1.1.1 Note)
  • Use straight instead of lenticular bracket, as style difference (confirm)
  • Use tilde instead of en-dash
  • Implement internationalisable secondary and primary quotes in relaton-render
  • Implement single and double guillemots as zh-Hans primary quotes
  • Implement wavy underline as zh-Hant primary quotes, and (somehow) introduce them into Metanorma markup

@opoudjis
Copy link
Contributor

opoudjis added a commit to metanorma/isodoc-i18n that referenced this issue Nov 26, 2022
opoudjis added a commit to metanorma/isodoc-i18n that referenced this issue Nov 26, 2022
opoudjis added a commit to metanorma/isodoc-i18n that referenced this issue Nov 26, 2022
@opoudjis
Copy link
Contributor

The use of filled dot instead of hollow in technical writing does not appear constrained to Simplified Chinese.

I would feel more comfortable if the choice of full stop was a customisation option, but I'm deferring that extension until it is needed.

opoudjis added a commit to metanorma/isodoc-i18n that referenced this issue Nov 28, 2022
@opoudjis
Copy link
Contributor

In order to deal with wavy underline, introducing CSS style attribute to underline element.

@opoudjis
Copy link
Contributor

I am not currently implementing underline style in Asciidoctor markup; underline is marked up as [underline]#xxx#. If this is felt useful, I will introduce hyphenation, e.g. [underline-wavy]#xxx#.

opoudjis added a commit to metanorma/isodoc that referenced this issue Nov 28, 2022
opoudjis added a commit to metanorma/isodoc that referenced this issue Nov 28, 2022
Repository owner moved this from 🏗 In progress to ✅ Done in Metanorma Nov 28, 2022
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
None yet
Development

No branches or pull requests

2 participants