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

Bibliography always use curly quotes instead of language-dependent quotes #2024

Open
Omikhleia opened this issue May 8, 2024 · 6 comments
Open
Labels
enhancement Software improvement or feature request modules:packages Issue relates to core or 3rd party packages

Comments

@Omikhleia
Copy link
Member

SILE 0.14.17 or 0.15-develop

While the bibliograpĥy package has provision for i18n via fluent, it always use curly quotes for article titles, etc.
That is, “'Title”

quotes = function (...)
local t = {...}
return function(item)
return Bibliography._process(item, t, "", "")
end

This is naive, and wrong:

  • If used in a book in another language, it would be expected that appropriate quotes are used, e.g. « Titre » (French), „Titel“ (German), etc.
  • (If there are quotes in the title, they may also need to be shifted.)
@Omikhleia Omikhleia added enhancement Software improvement or feature request modules:packages Issue relates to core or 3rd party packages labels May 8, 2024
@Omikhleia
Copy link
Member Author

N.B.
I wouldn't be against transferring smartquotes.sile to the SILE organization, if it may help here... But it would need #1631 (#1641) to be sorted out first, so that it can be made independent from the silex.lang adaptation layer...

And since it would still be a 3rd-party dependency outside the core distribution (whether as of today, or as a subproject under the SILE organization), wouldn't it also imply removing the bibtex support from the core distribution to manage it separately? (Which might be a good option anyhow, such things do not really belong to the "core", esp. if we want to consider CSL support at one point...)

@Omikhleia
Copy link
Member Author

Omikhleia commented May 9, 2024

I wouldn't be against transferring smartquotes.sile to the SILE organization, if it may help here

It might not be sufficient,

  • English = Doe, J. and Smith, J. “Awesome Article.” The Journal of Typography 50 no. 7 ...
  • French = “Doe, J. and Smith, J. « Un article formidable ». Le Journal de la Typographie 50 n° 7 ...
    • The period likely does not go inside the quotes if following usual conventions. (EDIT: To check, here might be various schools...)
    • By the way, the issue number should not be prefixed by "no.", but this currently hard-coded in the bibliography style (= not with a fluent key). This could be split as another issue ^^ (EDIT: Erm... as of elementary building blocks... this would be where textsubsuper.sile, with similar questions...)

@Omikhleia
Copy link
Member Author

The period likely does not go inside the quotes if following usual conventions.

Actually, the picture is not obvious either in English, with titles already ending in a punctuation mark:

  • Footnotes: Keep the comma after a title ending in a question or exclamation mark.
  • Bibliography: Omit the period after a title ending in a question or exclamation mark.

See https://universitypark-lonestar.libanswers.com/faq/241427

The devil is in the details as always.

@alerque
Copy link
Member

alerque commented May 28, 2024

A smartquotes package in core (or at least the org) makes a lot of sense to me, but I'm not sure with all the other things going on here that this would actually be a good use case for it. It looks to me like the whole string assembly bit of this code just needs to be refactored into a localized string using Fluent. Just because there is more punctuation involved than words being translated doesn't make in an inappropriate use of the tech: taking a bunch of arguments and outputting them in a certain order with certain marks between them depending on the locale is a localization job. The whole thing should probably be processed at once, not section by section, allowing localizers not just us coders to have easier control over how it all goes together.

@alerque
Copy link
Member

alerque commented May 28, 2024

Any chance I could convince you to work up an MWE with an entry each in English and French for example such that we could test the outcome of any proposed solutions to this?

@Omikhleia
Copy link
Member Author

A smartquotes package in core (or at least the org) makes a lot of sense to me, but I'm not sure with all the other things going on here that this would actually be a good use case for it. It looks to me like the whole string assembly bit of this code just needs to be refactored into a localized string using Fluent.

My current quick experiments lean towards both using smarquotes and Fluent, actually.
But this is a "long-term" project (with bibliographies just on their way being assembled here) - so I wouldn't decide too soon on a solution, but you can count me 'in' at some step (i.e. after shorter term projects get completed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Software improvement or feature request modules:packages Issue relates to core or 3rd party packages
Projects
Status: No status
Development

No branches or pull requests

2 participants