- Make the BCP47 value explicitly lower-case.
- Add some constness and encapsulation.
- Fix up documentation in the packages module explaining the
format of the ${LOCALE} replacement (now forced to lower-case,
but it is also only the language part, not e.g. en-UK).
FIXES#922
Add description of language and number formats to pretty status.
This is shown in the summary page. Refactor a little to produce
the strings only in one place. Constify methods.
FIXES: #564
If the user selects a language from the dialog (by clicking 'change'),
then preserve that explicit choice even when clicking on another
location which would reset the language based on the installer-
language.
This allows for installing locale packages. This can be achieved
by adding a entry of the format packagename-${LOCALE} in the
packages configuration module.
locale -a returns the locales using ".utf8" names rather than ".UTF-8".
The case-insensitive match does not help because it is "utf8" rather
than "UTF-8". So we need to match both with and without the dash.
In order to avoid deep copies, Qt containers over which we iterate must be const
The remaining unported cases require qAsConst (Qt 5.7) or std::as_const (C++17)