View Single Post
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: 885
Karma: 3501166
Join Date: Jan 2017
Location: Poland
Device: Various
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 online now   Reply With Quote