Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8b0f7eb

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

File tree

1 file changed

+7
-7
lines changed
Filter options

1 file changed

+7
-7
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Command/TranslationPushCommand.php
+7-7Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.