add fancy tech to allow calamares to reuse most of the ubiquity slideshow
ClosedPublic

Authored by sitter on May 17 2019, 3:09 PM.

Details

Summary
  • new qml module which injects i18n into the engine so we may resolve translations from the existing gettext files. it also sets the correct domain and ensures the runtime language selection of calamares is forwarded into ki18n
  • since the qtquick tech in cala feels like it's from 5 years ago we also force a proper background on the presentation now. meaning it no longer has this obnoxious white background associated with a qqmlview.
  • new qml files loosely based on the existing one we have in calamares-settings
    • index.qml is similar to index.html in that it defines the general order of the show etc.
    • new UbiquitySlide.qml which extends cala's Slide with a generic as possible translation of the existing ubiquity htmls. to that end the Slide loads the related html file as xml and pops out the header string and the img uri. the string is then run through i18n to translate it accordingly
    • the header is now also using a Kirigami.Heading which is an easy way to get a header but also is vastly more useful than the originally suggested Text as it obeys colors and what not

all of this also requires changes to the packaging and calamares-settings
to actually get used

Test Plan

in a testing VM it works as expected, since this is a
functionally large change affecting 3 repos this does also need testing
in the unstable edition tho

Diff Detail

Repository
R574 Ubiquity Slideshow for Neon
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter requested review of this revision.May 17 2019, 3:09 PM
sitter created this revision.
sitter edited the test plan for this revision. (Show Details)May 17 2019, 3:11 PM
sitter updated this revision to Diff 58339.May 20 2019, 9:33 AM

throw out unrelated change

sitter updated this revision to Diff 58340.May 20 2019, 9:39 AM

throw out empty lines

Some minor comments, otherwise looks good to me.

CMakeLists.txt
10

You might want to specify version here, as you use specific version in QML files.

calamares-qml-plugin/plugin.cpp
47

Are you sure? This seems to be cala?

sitter updated this revision to Diff 58346.May 20 2019, 11:35 AM
sitter marked an inline comment as done.

refine cmake code a bit

  • look for versions I know work
  • print a feature summary
  • also import kde compiler settings
sitter marked an inline comment as done.May 20 2019, 11:35 AM
sitter added inline comments.
calamares-qml-plugin/plugin.cpp
47

Yes. The domain is preexisting and is called ubiquity because that is what the repo was targetting. This module specifically glues that preexisting translation domain into the qml scope of the cala slideshow.

bshah accepted this revision.May 20 2019, 11:36 AM
bshah added inline comments.
calamares-qml-plugin/plugin.cpp
47

Please add a comment for future code-readers then ;)

This revision is now accepted and ready to land.May 20 2019, 11:36 AM
This revision was automatically updated to reflect the committed changes.