This fixes the following drush error:
The pm-info command was deprecated. Please see `drush pm:list` and `composer show`
While at it also use an exact pattern for the module name, this avoids
matching against other modules which may contain the word 'locale' in
their names.
--account-mail="$ACCOUNT_MAIL" \
"$INSTALLATION_PROFILE"
-if $DRUSH pm-info --fields=status locale | grep -q enabled;
+if $DRUSH pm-list --type=module --field=name --status=enabled --pipe | grep -q "^locale$";
then
# This is necessary for multi-language sites, it fixes some issues like:
# "The Translation source field needs to be installed."