Skip to content

[Translation] Push and pull translations commands say OK even no translations were transmitted #45920

Closed
@ossinkine

Description

@ossinkine

Symfony version(s) affected

=5.4

Description

I looked at the providers behavior and noticed that in some cases, if the provider API did not respond with a 200 HTTP code, an exception is thrown, and in other cases, it just add the record in the log.

This means that if the provider API responded with for example 503 code (was under maintenance) or any other 5xx code when creating translations, no translations will be pushed, but the translation:push command says [OK] New local translations has been sent.

We use Crowdin, but looks like other providers have the same behavior.

How to reproduce

You need to fake the provider API response, like if there was a 500 response here. No translations will be uploaded but command ends successfully.

Possible Solution

I suggest to throw an provider exception every time when HTTP request ends unexpected and action is not performed.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions