Skip to content

Commit

Permalink
[Translation] Refresh local translations if the provider has domains
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian-B committed May 6, 2022
1 parent f5c0f6d commit 1639abc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Command/TranslationPushCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,16 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$force = $input->getOption('force');
$deleteMissing = $input->getOption('delete-missing');

if (!$domains && $provider instanceof FilteringProvider) {
$domains = $provider->getDomains();
}

// Reading local translations must be done after retrieving the domains from the provider
// in order to manage only translations from configured domains
$localTranslations = $this->readLocalTranslations($locales, $domains, $this->transPaths);

if (!$domains) {
if ($provider instanceof FilteringProvider) {
$domains = $provider->getDomains();
}

if (!$domains) {
$domains = $this->getDomainsFromTranslatorBag($localTranslations);
}
$domains = $this->getDomainsFromTranslatorBag($localTranslations);
}

if (!$deleteMissing && $force) {
Expand Down

0 comments on commit 1639abc

Please sign in to comment.