Problem/Motivation
When working locally, I don't want po files to be updated every time I run `drush deploy`, because it's quite time-consuming.
ddev drush deploy
[notice] Database updates start.
> [success] No pending updates.
Do you wish to update translations from local po files? (yes/no) [yes]:
> > [notice] Running post updatedb locale deploy to ensure translations are up-to-date with po files.
Proposed resolution
Thinking out loud: maybe a possible way forward is to have a config override in `settings.local.php`
$config['locale.settings']['update_translations'] = FALSE;
... such that the config settings is respected here:
`docroot/modules/contrib/locale_deploy/src/Commands/LocaleDeployCommands.php`
public function postUpdateDbHook(int $result): void {
if ($result === 0) {
if (!$this->io()->confirm(dt('Do you wish to update translations from local po files?'))) {
return;
}
$this->logger()?->notice('Running post updatedb locale deploy to ensure translations are up-to-date with po files.');
... so that the translations are not downloaded every time I run `drush deploy` on local.
Issue fork locale_deploy-3484661
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
michaellenahan commentedComment #5
miha.wagner commentedAdded a config setting 'locale_deploy.skip_update' that can be set to TRUE to skip the locale deploy. Additionally moved the updating to a separate command where there is no check for this option, so the developer can still do it manually if he wants to.