Setup UI - Fix translation of post-install messages
authorTim Otten <totten@civicrm.org>
Tue, 7 Jul 2020 23:07:49 +0000 (16:07 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 7 Jul 2020 23:12:09 +0000 (16:12 -0700)
commite7646a961f7313a13e7e56cc1ea6cb61fefe74b2
treed572589c7c9507b76328aff8604333f0ca1a0d00
parentaed5db5d86071243709b47bbca052cb1369c6e08
Setup UI - Fix translation of post-install messages

Here's what happens:

- The "Setup" subsystem does its internal/partial bootstrap; it sets `$tsLocale` and uses `CRM_Core_I18n`. Hooray.
- The "Setup" initializes the database/settings and then does a full bootstrap. The full bootstrap step calls `applyLocale()`, which replaces the active `$tsLocale`... with the *unconfigured default*. Ooops.
- This step runs next - and it updates the DB setting. But we've already trampled `$tsLocale`. Calling `applyLocale()` a second time means we use the preferred `$tsLocale` again. Hooray.
setup/plugins/installDatabase/SetLanguage.civi-setup.php