Set locales for all domains when enabling multilingual
authoreileen <emcnaughton@wikimedia.org>
Thu, 2 Jul 2020 00:36:13 +0000 (12:36 +1200)
committereileen <emcnaughton@wikimedia.org>
Thu, 2 Jul 2020 01:55:48 +0000 (13:55 +1200)
commit6d78a98a04487683dc28f1649076ebeaea21b8d6
tree6db0d6b8d57a4ee327ccfedf3ba44ece7bc63bf7
parentaef4c7b3f337105999421301c2f7297fc0a47176
Set locales for all domains when enabling multilingual

In the process of trying to test a possible wordpress regression I found that enabling
mutlilingual on a domain other than domain 1 breaks the site. The reason is that without
only domain 1 is being updated with the new language and locales. Since I'm on domain
2 when I do this I can no longer load any page as the locales value has not been set
and the queries look for option_value.label not option_value.label_us.

Since 'no locale' is no longer valid the locale needs to be set on all sites. Note the
code change is primarily an extraction inn order to only run the table update part once
CRM/Core/I18n/Schema.php
tests/phpunit/CRM/Core/I18n/SchemaTest.php