Closed gautierchomel closed 2 years ago
This will be solved in two stages:
See how the RWPM title
incorrectly assume en
instead of xml:lang
on the OPF package or local to dc:title
:
Update: the streamer deployment is now updated with the fixed r2-shared-js code, consequently the title and author JSON properties now carry the language info (from which we derive rtl direction): https://streamer.edrlab.org/pub/aHR0cHM6Ly9naXRodWIuY29tL3czYy9lcHViLXRlc3RzL3Jhdy9tYWluL3Rlc3RzL3BrZy1kaXJfcnRsLXJvb3QtbHRyLmVwdWI%3D/manifest.json/show/all (PS: I must investigate why the publisher property remains language-free)
(PS: I must investigate why the publisher property remains language-free)
Fixed.
Tested with pkg-dir_rtl-root-ltr.epub
from https://github.com/w3c/epub-tests/blob/main/tests/pkg-dir_rtl-root-ltr.epub
Here is a more interesting test case:
https://github.com/IDPF/epub3-samples/tree/main/30/regime-anticancer-arabic/EPUB
=>
"metadata": {
"title": {
"ar": "السرطان من للوقاية الصحيح الغذائي النظام",
"fr": "Le Vrai Régime anti-cancer"
},
"author": [
{
"name": {
"ar": "دافيد خيّاط لبروفيسورا",
"fr": "Pr David Khayat"
}
},
{
"name": {
"ar": "اردو هاتر ناتالي",
"fr": "Nathalie Hutter-Lardeau"
}
}
],
"translator": {
"name": {
"ar": "فيّاض خليل مارينا",
"fr": "Marina Khalil Fayad"
}
},
"contributor": {
"name": "Vincent Gros",
"sortAs": "Gros, Vincent",
"role": "mrk"
},
"language": "ar",
"readingProgression": "rtl",
},
Here we can see that when the Thorium UI is set to fr
(French) the available title
metadata is selected for display, whereas the default en
(English) UI locale selects the first available title
language which is ar
(Arabic)
Note that publication "authors" are not subject to the same title
logic ... yet. We will need to fix this, and several other instances too (e.g. dc:description
, a11y:summary
)
The pkg-dir_rtl-root-ltr test fails at
It renders correctly in the window heading but not on catalog interface
OPF meta Title
<dc:title dir="rtl" xml:lang="he">CSS: הרפתקה חדשה!</dc:title>