dev/translation#39 - Fix `core:install --lang`. Realign boot code.
Overview
--------
Suppose you run a command like:
```
cv core:install --lang=fr_FR --cms-base-url=http://example.com/
```
This fixes that use-case by realigning some of the bootstrap steps under `setup/plugins/installDatabase/*`.
Before
------
* The above `core:install` command crashes because the `paths` service is unavailable.
* The `civi.setup.installDatabase` begins with these two steps:
1. `InstallSchema.civi-setup.php` manipulates some global options (to make certain services work),
and it also installs the schema, and it also reboots the `Container`.
2. `BootstrapCivi.civi-setup.php` tries to boot again - e.g. it loads `civicrm.settings.php` and
calls `CRM_Core_Config::singleton($loadFromDB=TRUE)`. But this is suspect because it
neglects to set `$force=TRUE`.
After
-----
* The above `core:install` command runs.
* The `civi.setup.installDatabase` begins with these *three* steps:
1. `Preboot.civi-setup.php` starts the system in a *partially booted* mode (ie with `$loadFromDB==FALSE`).
2. `InstallSchema.civi-setup.php` just installs the schema.
3. `BootstrapCivi.civi-setup.php` switches the system to a fully booted mode (ie with `$loadFromDB==TRUE`).
Technical details
-----------------
I tested this on a D7 build. My dev/test loop was basically these steps:
```
cv core:uninstall -f
cv core:install --lang fr_FR --cms-base-url='http://dmaster.bknix:8001' -vvv
echo 'select name, label, value from civicrm_option_value where name like "Meet%"' | cv sql
```
If the install succeeded, then the SQL command would display localized
labels for "Meeting" ("Reunion").