diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-20 23:43:35 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-22 12:50:31 -0400 |
| commit | cd93d2d8b5062493650673ecdd13139d6f0e5171 (patch) | |
| tree | 23ab13665da3bc5aca4913ca8f8dc33eb5219bff /src/sisudoc/outputs/io_out/epub3.d | |
| parent | pod digests: multilingual document digests sorted (diff) | |
xml: markup language attributes take a bcp 47 tag
Spine names a language as the directory under media/text/ is
named, which for a region is the posix form with an underscore,
pt_BR. A lang, xml:lang or dc:language value is a BCP 47 (RFC
3066) tag and wants a hyphen, pt-BR. Spine put its own code
there unchanged, so a document in a region language produced an
invalid attribute in every one of its xhtml files: 138 epubcheck
errors for a document of ten segments and a navigation file.
src.language_tag is the same language as a tag. The attributes
and the dc metadata now read it. Output paths keep src.language,
since a path is named after the directory, not after the tag.
(assisted by Claude-Code)
Diffstat (limited to 'src/sisudoc/outputs/io_out/epub3.d')
| -rw-r--r-- | src/sisudoc/outputs/io_out/epub3.d | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sisudoc/outputs/io_out/epub3.d b/src/sisudoc/outputs/io_out/epub3.d index 8a3baaf..c785895 100644 --- a/src/sisudoc/outputs/io_out/epub3.d +++ b/src/sisudoc/outputs/io_out/epub3.d @@ -298,7 +298,7 @@ template outputEPub3() { <item id="css" href="%s" media-type="text/css"/> <item id="nav" href="toc_nav.xhtml" media-type="application/xhtml+xml" properties="nav" /> ┃", - doc.matters.src.language, + doc.matters.src.language_tag, _uuid, xhtml_format.special_characters_plain(doc.matters.conf_make_meta.meta.title_main), (doc.matters.conf_make_meta.meta.title_sub.empty) ? "" : format( @@ -309,7 +309,7 @@ template outputEPub3() { ? "" : xhtml_format.special_characters_plain(doc.matters.conf_make_meta.meta.creator_author), (doc.matters.conf_make_meta.meta.creator_author_surname_fn.empty) ? "" : xhtml_format.special_characters_plain(doc.matters.conf_make_meta.meta.creator_author_surname_fn), - doc.matters.src.language, // language, fix (needed in dochead metadata) + doc.matters.src.language_tag, // language, fix (needed in dochead metadata) (doc.matters.conf_make_meta.meta.date_published.empty) ? "" : xhtml_format.special_characters_plain_date(doc.matters.conf_make_meta.meta.date_published), (doc.matters.conf_make_meta.meta.rights_copyright.empty) |
