two questions regarding QML

Dirk Hohndel dirk at hohndel.org
Sun Mar 13 11:30:15 PDT 2016


Marco, Sebastian,

I guess you are the most likely people who have a good answer here...

a) is there a simple, concise, useful introduction to localization of QML code? The way we do localization in Subsurface is a bit odd because of the large amount of C code that we have, but it fundamentally uses the tr() facility and then Transifex as a back-end for the translators to work with. How do we do this for QML code? I guess there's some magic macro or something? And does the lupdate / lrelease tooling correctly deal with those strings or do I need more magic to make this all work?

b) Thomas suggested that we should use the swipe right as our "back" function everywhere. Is there an easy way in QML / Kirigami to be told if there was a swipe right on the current page? I browsed the Kirigami sources and find a lot of painful, manual QML that seems to deal with the swipes for the overlay drawers, but I hope I don't have to reproduce something like that in my code... on most pages we actually happen to do the right thing already, the only one where this doesn't quite work is the StartPage (so when we re-enter cloud credentials). I could work around this by making the Dive List option in the menu do the right thing here and then I guess I could avoid handling all this, but I figured I'd at least ask in case this is easy...

Thanks

/D  


More information about the subsurface mailing list