- To support translation testing, without needing to recompile
Calamares, load files from the local directory when debugging,
or from /usr/share/calamares/lang/ in general.
- This allows updating translations and testing them with just
lrelease (a translation build tool) installed, without rebuilding
Calamares.
- This allows distro's to ship updated or modified translations without
rebuilding Calamares.
- Most of the code was error-checking, just replace the open-read
with a call to the service instead.
- It's not an error if /dev/urandom doesn't exist in the source system
(there may be other good random sources, and otherwise we have the
low-quality random fallback).
- the list is already filtered for UTF-8, so this is redundant
- this *incidentally* fixes the problem with Assamese and Asturian,
since Assamese (as_IN) was having its only entry removed,
after which it would match Asturian (ast_ES)
- these were empty, so the widgets were hidden in the details
dialog of the requirements check; which looks really strange
if the reason the check fails is because root is required,
and you can't see that in the details.
This commit is on a branch because it changes strings, and I want
to do a release Real Soon and not annoy the translators.
- instead of counting and needing to keep track of the predicate
applied while creating the widgets, push nullptrs to the widget
list instead reflecting "this entry did not satisfy the predicate
for widget creation".
- for the list, the code can be the same as for the dialog,
only the predicate is different.
- while here, implement retranslate() since there's no text on
the list widgets otherwise.
- Create the label once, and it's ok for it to respond to links
even if there's none in the code.
- Turn into a member variable in preparation for retranslation-refactor.
- lift it out of the loop that creates the widgets
- some lambda-wankery, but the compiler hammers this down to
simple loops and you can read the resulting code as
none_of [the list] isUnSatisfied
none_of [the list] isMandatoryAndUnSatisfied
- no point in having init() called immediately after the constructor,
if it only makes sense to have one call to init() ever to create
the widget.
- while here, give it the same kind of structure as the dialog,
holding on to a reference to the list.
- Add Assamese (as) in the *ok* group.
- Although languages move around a bit in the groupings,
that doesn't change their availability; just says something
about the current translation status.