8000 [Translation] Refresh local translations if the provider has domains · symfony/symfony@8b0f7eb · GitHub
[go: up one dir, main page]

Skip to content

Commit 8b0f7eb

Browse files
committed
[Translation] Refresh local translations if the provider has domains
1 parent c25a7f5 commit 8b0f7eb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Symfony/Component/Translation/Command/TranslationPushCommand.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,16 @@ protected function execute(InputInterface $input, OutputInterface $output): int
131131
$force = $input->getOption('force');
132132
$deleteMissing = $input->getOption('delete-missing');
133133

134+
if (!$domains && $provider instanceof FilteringProvider) {
135+
$domains = $provider->getDomains();
136+
}
137+
138+
// Reading local translations must be done after retrieving the domains from the provider
139+
// in order to manage only translations from configured domains
134140
$localTranslations = $this->readLocalTranslations($locales, $domains, $this->transPaths);
135141

136142
if (!$domains) {
137-
if ($provider instanceof FilteringProvider) {
138-
$domains = $provider->getDomains();
139-
}
140-
141-
if (!$domains) {
142-
$domains = $this->getDomainsFromTranslatorBag($localTranslations);
143-
}
143+
$domains = $this->getDomainsFromTranslatorBag($localTranslations);
144144
}
145145

146146
if (!$deleteMissing && $force) {

0 commit comments

Comments
 (0)
0