Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Translation] Get domains from provider if them are not specified explicitly #45999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ossinkine
Copy link
Contributor

Q A
Branch? 5.4
Bug fix? no
New feature? no
Deprecations? no
License MIT

The command translation:pull gets domains from provider configuration if them are not specified in options but translation:push gets domans from local catalog. I find that the same behavior is more predictable in this case.

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

@ossinkine ossinkine force-pushed the translation-default-domains branch from 247d038 to abd0805 Compare April 11, 2022 15:25
@chalasr chalasr requested a review from welcoMattic April 11, 2022 16:28
@@ -133,7 +132,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$localTranslations = $this->readLocalTranslations($locales, $domains, $this->transPaths);

if (!$domains) {
$domains = $this->getDomainsFromTranslatorBag($localTranslations);
$domains = $provider->getDomains();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@welcoMattic
Copy link
Member

@ossinkine Thank you for the contribution. Can you add a test to cover this change please?

@ossinkine
Copy link
Contributor Author

Looks like it's already fixed in #45171, closing

@ossinkine ossinkine closed this May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants