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

Skip to content

[Translator] Provider domains configuration option not used in pull/push command #46177

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
Florian-B opened this issue Apr 26, 2022 · 2 comments

Comments

@Florian-B
Copy link
Contributor

Symfony version(s) affected

5.4.7

Description

When using Translator component with "Loco" Provider (it could be the case for every providers) the domains configuration it not used by TranslationPushCommand or TranslationPullCommand commands.

How to reproduce

With the following configuration

# config/packages/translation.yaml
framework:
    translator:
        default_path: '%kernel.project_dir%/translations'
        providers:
            loco:
                dsn: '%env(LOCO_DSN)%'
                domains: ['messages', 'emails']
                locales: ['en', 'fr', 'es']

The --help option on both commands show configured locales as default, but not domains is not used.

php bin/console translation:push --help
Description:
  Push translations to a given provider.

Usage:
  translation:push [options] [--] [<provider>]

Arguments:
  provider                 The provider to push translations to. [default: "loco"]

Options:
      --force              Override existing translations with local ones (it will delete not synchronized messages).
      --delete-missing     Delete translations available on provider but not locally.
      --domains[=DOMAINS]  Specify the domains to push. (multiple values allowed)
      --locales[=LOCALES]  Specify the locales to push. [default: ["en","fr","es"]] (multiple values allowed)
...

The following command will push all domains to the provider instead of ['messages', 'emails'] : php bin/console translation:push

Possible Solution

No response

Additional Context

No response

@plfort
Copy link
Contributor

plfort commented May 1, 2022

I think this issue is solved in 5.4.8 #45171

@Florian-B
Copy link
Contributor Author

I think this issue is solved in 5.4.8 #45171

Indeed, thank you! I close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants