Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-21-2023, 01:11 PM   #31
Kelsier
Junior Member
Kelsier began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2023
Location: Scadrial, Cosmere
Device: Lithium, Thorium Reader
Hello, sorry if my English is not understandable, because I am a Spanish speaker.

I have gotten a "small" error regarding the language tags, the language in metadata, the Sigil language and the generation of the Landmarks (in the nav.xthml) and Guide (in the content.opf) in EPUB3:

Basically I have Sigil configured in Spanish and when editing a book in English (whose metadata language is simply English and the tag in the HTML header are lang="en" and xml:lang="en") there is no problem. When using Add Semantics, the text in Landmarks appears in English (e.g. <li><a href="titlepage.xhtml" epub:type="titlepage">Title Page</a></li>). Then when generating the NCX/Guide, the title="anything" in it are also generated in the language declared in the metadata and HTML header of the book, all this in EPUB3 of course.

The problem comes from putting the language in metadata and tags by region, in this case English - United States which is "en-US". When using Add Semantics, the text is placed in the language in which Sigil is configured, which in my case is Spanish, instead of being placed in English, which is the language declared in the metadata and the HTML header. With this, the concept that I gave as an example before no longer appears in English but in Spanish, like this: <li><a href="titlepage.xhtml" epub:type="titlepage">Página de título</a></ li>.

Is there a way to fix this? The ideal is that with the language by region, the Landmarks and Guide are placed with the corresponding language. This problem also occurs exactly the other way around if I set Sigil to English and try to edit an EPUB in Spanish - Mexico ("es-MX"), Spanish - Spain ("es-ES") or any existing variation on Sigil. It is the first time that I edit with an ISO Country Code instead of a Language Code, so I had not noticed this error.

Thank you very much to all of you for all the work with this program and sorry for the inconvenience.
Kelsier is offline   Reply With Quote
Old 12-23-2023, 07:07 PM   #32
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
You are right.
A simple workaround would be an additional condition in two files:
Misc/GuideItems.cpp [inside GuideItems::GetTitle]
Misc/Landmarks.cpp [inside Landmarks::GetTitle]

Spoiler:

Code:
    // if no translator matched for xx-YY
    // try again with just part of language code that exists before the "-"
    if (!translation_loaded) {
        const QString langcut = lang.split("-").at(0);
        const QString qm_name = QString("sigil_%1").arg(langcut);
        // Run though all locations and stop once we find and are able to load
        // an appropriate translation.
        foreach(QString path, UILanguage::GetPossibleTranslationPaths()) {
            if (QDir(path).exists()) {
                if (bookTranslator.load(qm_name, path)) {
                    translation_loaded = true;
                    break;
               }
            }
        }
    }



Probably KevinH or DiapDealer will take a look and decide whether such a code is suitable.
BeckyEbook is offline   Reply With Quote
Advert
Old 12-23-2023, 08:21 PM   #33
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Yes BeckyEbook that looks correct and useful. I will add that to Sigil master for the next release.

Thank you!
KevinH is offline   Reply With Quote
Old 12-24-2023, 12:02 PM   #34
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Okay, I have this in my tree (slightly modified to check if "-" in lang before trying again with the region removed).

My home internet is out. Only iphone access. So I will push that change to master when my home internet returns.

Thank you for your bug report and thank you BeckyEbook for the fixes!

Update: This has now been pushed to master

Last edited by KevinH; 12-26-2023 at 11:13 AM. Reason: update
KevinH is offline   Reply With Quote
Old 02-11-2024, 04:04 AM   #35
Astroman
Junior Member
Astroman began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2024
Device: none
Hi everyone. After publishing various printed astronomy books for almost 20 years, I'm now transitioning to e-books. I'm using Sigil, and I'm very thankful to the developers and contributors who maintain this software!

I was wondering if anyone knows when the next update will be? My EPUB is affected by the above-mentioned language/region bug, for which a fix was "pushed to master" in December last year.

PS: This is not meant as a complaint, as I'm fully aware that this is a free program maintained by volunteers. BTW, in the introduction of my e-book(s), I will mention Sigil and thank the developers.

Quote:
Originally Posted by KevinH View Post
Okay, I have this in my tree (slightly modified to check if "-" in lang before trying again with the region removed).

My home internet is out. Only iphone access. So I will push that change to master when my home internet returns.

Thank you for your bug report and thank you BeckyEbook for the fixes!

Update: This has now been pushed to master
Astroman is offline   Reply With Quote
Advert
Old 02-11-2024, 08:56 AM   #36
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Sigil averages releases 3 to 4 times a year, typically once enough bug fixes or new features are amassed to make a new release worthwhile. Our last release was made October 26 of 2023.

In this case, we are waiting for an update to the Qt software package to version 6.6.2 which has a lot of bug fixes for users with Accessibility needs (especially on macOS platforms). Once that is released, hopefully any day now, we will test it and if no serious issues, integrate it into our Sigil builds. A full Sigil release should follow that soon after.

If you need a fixed build before that and you are using macOS or Windows, we can make a pre-release CI build available for you to use with that bug fixed but with the older Qt version we are currently using. Just let me know your platform if manually working around the bug is an issue.

Users on Linux are encouraged to build their own from source anytime as we try to keep master buildable at all times. Building from source on Windows and macOS is done by some epub devs here as well. If you want help in building from source we can try to help there as well.

Last edited by KevinH; 02-11-2024 at 12:29 PM.
KevinH is offline   Reply With Quote
Old 02-12-2024, 02:17 AM   #37
Astroman
Junior Member
Astroman began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2024
Device: none
Thank you for your quick reply and your very kind offer.

I'm not in a big rush, so I can wait. I'll be looking forward to the next official release. (BTW, I'm on Mac, running macOS 12 Monterey.)
Astroman is offline   Reply With Quote
Old 02-12-2024, 02:13 PM   #38
philja
Zealot
philja began at the beginning.
 
Posts: 121
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: none
Installing on MacBook M2

Thanks, Diapdealer for including this small note inside the first post :
Quote:
The MacOS builds are signed but they are NOT notarized. See this PageEdit/Sigil issue for more information.
I am now the 'proud' owner of a MacBook Air M2 as a result of family 'pressures'. I'm not very happy to be in Apple's walled garden and I'm finding that getting used to the Apple interface is tiresome so I spend little time on the portable compared with my linux desktop. Fortunately, much of the command line stuff is familiar from linux.

I just installed Sigil 2.0.2 and when I clicked the icon to open, I was immediately hit with Apple's warning that the app was unsigned. They only gave 2 options: bin or cancel. So I was mightily relieved to see your note and follow the link and then find that the answer was to start from a 'right-click'.
philja is offline   Reply With Quote
Old 02-12-2024, 02:35 PM   #39
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by philja View Post
...
I just installed Sigil 2.0.2 and when I clicked the icon to open, I was immediately hit with Apple's warning that the app was unsigned. ...
Technically it is signed (by my Apple Dev account id). It just is not "notarized" which is a process where you send your compiled executable to Apple along with a list of rights it needs and Apple verifies it is "okay" which really is just them acting to take control over all of the software used on desktop macos platform.

Notarization is an extremely silly process in my opinion given Apple, just like everyone else, can see and search each and every line of our source code to verify that it is more than "okay" - ie,. that it collects no data on you, and therefore sells no data, that it has no ads, has no backdoors, etc etc. That is much better than notarization.
KevinH is offline   Reply With Quote
Old 02-13-2024, 04:36 PM   #40
philja
Zealot
philja began at the beginning.
 
Posts: 121
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: none
Quote:
Originally Posted by KevinH View Post
Technically it is signed (by my Apple Dev account id). It just is not "notarized" which is a process where you send your compiled executable to Apple along with a list of rights it needs and Apple verifies it is "okay" which really is just them acting to take control over all of the software used on desktop macos platform.

Notarization is an extremely silly process in my opinion given Apple, just like everyone else, can see and search each and every line of our source code to verify that it is more than "okay" - ie,. that it collects no data on you, and therefore sells no data, that it has no ads, has no backdoors, etc etc. That is much better than notarization.
Yes, I agree with you, Kevin. I did the "codesign -dvvv Sigil.app" thing and saw your dev ID. But the big guys can pretty well do as they like, charging a fortune for the badge and taking the maximum of control over products that essentially are no better than many others.
philja is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil-1.5.1 Released DiapDealer Sigil 27 04-15-2021 10:27 AM
Sigil-1.3.0 Released DiapDealer Sigil 8 09-15-2020 08:03 AM
Sigil-0.9.17 Released DiapDealer Sigil 50 08-14-2019 11:12 PM
Sigil-0.9.13 Released DiapDealer Sigil 201 05-13-2019 06:13 PM
Sigil-0.8.900 released for testing - Wait for Sigil-0.8.901 KevinH Sigil 106 10-04-2015 10:41 AM


All times are GMT -4. The time now is 05:16 PM.


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