Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 04:33 AM   #1
Einstein
Junior Member
Einstein began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2026
Device: kindle
EPUB3 dc:date corrupted to <meta refines property="Veröffentlichungsdatum"> in German

Sigil version: 2.8.0 (also affects earlier versions using the same sigil_de.ts)
OS: Windows 11
UI language: German

Problem:
When adding a publication date via Meta Editor → Add Basic Metadata → "Veröffentlichungsdatum" (German for "Date Published") in an EPUB3 book, the date is not saved as a proper <dc:date> element. Instead it's written as:

<meta refines="#des" property="Veröffentlichungsdatum">2022-09-26</meta>

This is invalid — property should be dcterms:date/dc:date, not the literal translated UI label, and it should never refine the description (#des). On reopening, the date field shows at the top of the metadata tree, appears indented, and is lost/not saved correctly on subsequent edits.

Suspected root cause:
src/Resource_Files/ts/sigil_de.ts has a leading space typo in the translation:

<source>Date Published</source>
<translation> Veröffentlichungsdatum</translation>

MetaEditor::EName()/ECode() (src/Dialogs/MetaEditor.cpp) do a raw string match between the tree's stored display text and the m_ElementCode lookup table with no .trimmed(). If the leading space gets stripped anywhere in the Qt tree-view cell round-trip (e.g. on cell edit/commit), the reverse lookup silently fails and falls back to using the raw (translated) name as the internal code:

const QString MetaEditor::ECode(const QString& name)
{
if (m_ElementCode.contains(name)) return m_ElementCode[name];
return name; // silent fallback — writes translated text as code
}

This only affects EPUB3, since EPUB2 dates go through the separate opf:event/dc:date-publication code path, not the generic meta refines/property system.

Reproduction: Confirmed reproducible on a fresh EPUB3 file using only "Add Basic Metadata" → "Veröffentlichungsdatum", nothing else touched. Does not occur with English UI ("Date Published").

Suggested fix: Remove the leading space in sigil_de.ts line ~16573, and/or make ECode()/PCode() trim input before lookup as defensive fix.

Workaround: Switch Sigil UI language to English (Preferences → Language) before setting the publication date field, then switch back.
Einstein is offline   Reply With Quote
Old Yesterday, 09:34 AM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,897
Karma: 7500000
Join Date: Nov 2009
Device: many
Unfortunately, we do not control the volunteer generated translation files. They are hosted on Transifex. So unless you post a translation bug report in the Sigil Project on Transifex, I doubt it will be fixed unless that volunteer translator just happens to also be a member of MobileRead and sees your post.

But we can harden the Sigil code to left and right trim the translated string for comparison purposes.

I will look into doing that.

Thank you for your bug report.

Last edited by KevinH; Yesterday at 10:09 AM.
KevinH is offline   Reply With Quote
Advert
Old Yesterday, 01:21 PM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,897
Karma: 7500000
Join Date: Nov 2009
Device: many
Okay, I added .trimmed() to the translated name tables built in MetaEditor.cpp. And the mapping from name to code uses those table values so this problem should now be fixed.

I tried switching to a German ui to test this but my highschool German from 50 years ago was not enough to run the test.

I have pushed this fix to master. It should appear in the next release of Sigil.

Once we have a Windows 11 test build with this fix, I will post a link here for you to test with to confirm this bug has been squashed.

Thank you!
KevinH is offline   Reply With Quote
Old Yesterday, 08:49 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 53,612
Karma: 181843001
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Here's a build with that fix: Sigil-2.8.1-Windows-x64-Setup.exe
DNSB is offline   Reply With Quote
Reply

Tags
dc:date, epub3, metadata, sigil bug, translation


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change "Date Added" metadata on Kobo to match the "Date" column in Calibre? slantybard Kobo Reader 2 05-01-2024 09:39 PM
Bugs "Sanity Check epub" and "Failed Release date" on V 0.91 qkiazd Sigil 5 12-03-2015 04:01 AM
"C'mon, I Want Lolcats" or "how to abuse JS in EPUB3" AlPe ePub 18 06-29-2013 06:31 PM
Editing "date" on a "News" tagged ebook makes it vanish... jangliss Calibre 4 12-04-2011 10:12 PM
Custom column: "Updated date", when adding new "versions" of the same file? enriquep Library Management 16 11-03-2011 10:46 AM


All times are GMT -4. The time now is 11:56 AM.


MobileRead.com is a privately owned, operated and funded community.