Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Translation] [Bridge][Lokalise] Fix empty keys array in PUT, DELETE requests causing Lokalise API error#58983
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedNov 25, 2024
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice thanks
src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProvider.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProvider.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
@nicolas-grekas Thanks for your review! Thefailing tests seem unrelated. :) |
…requests causing Lokalise API error
0c17119
to2e51808
CompareThank you@DominicLuidold. |
294a39f
intosymfony:5.4Uh oh!
There was an error while loading.Please reload this page.
This PR fixes two cases where an empty
keys
array is passed to aPUT
/DELETE
request, resulting in a Lokalise API error.The empty arrays are the result of a
Symfony\Component\Translation\TranslatorBag
containing one or moreSymfony\Component\Translation\MessageCatalogue
without any messages getting passed into theSymfony\Component\Translation\Bridge\Lokalise\LokaliseProvider
(which is expected behaviour, seehere and below).This is the case if either
bin/console translation:push lokalise
bin/console translation:push lokalise --delete-missing
is called when both the local translations as well as the translations on Lokalise match 1:1 for a given translation domain.
This will fix the following erros that might be observed while running the mentioned commands:
Before/after for
translation:push lokalise
Before:
After:
Before/after for
translation:push lokalise --delete-missing
Before:
After: