Closed Omikhleia closed 2 weeks ago
a possible quick fix would be
N.B. Now that we have hooks on settings, it might also be possible to switch fluent's global locale in such a hook...
Using a setting hook for this makes a lot of sense now that we have that mechanism, and I just tried it and it eliminated a lot of cognitive overhead about internals and hanky-panky calls to set the locale needed to get things done as expected.
Language changes in bilbliography (e.g. caused by an "et al") leak beyond the expected scope.
Minimal example
Bibliography
Document:
Obtained
The third book reference has latin text where it shoudn't.
Analysis
The bibliography package uses
fluent:get_message()
directly. Due to fluent not being stateless and having its own global local state, there's a scope leakage. (It does ring an old bell #1477...)Of course, a possible quick fix would be to systematically invoke
fluent:set_locale(SILE.settings:get("document.language"))
before any call tofluent:get_message()
in the bibliography package -- I'll leave it to the readers to judge whether it is a sane and nice solution...