Closed
Description
Symfony version(s) affected
At least ^5.3
Description
I have a large file with translations (about 130 messages) and when I trying to push or pull translations I fail with error:
13:21:09 ERROR [app] Unable to get keys ids from Lokalise: "<html>
<head><title>414 Request-URI Too Large</title></head>
<body>
<center><h1>414 Request-URI Too Large</h1></center>
<hr><center>nginx</center>
</body>
</html>
".
Due to request is too long as said lokalise server:
13:21:08 INFO [http_client] Request: "GET https://api.lokalise.com/api2/projects/{project_id}/keys?filter_keys=This%20value%20should%20be%20false.%2CThis%20value%20should%20be%20true.%2CThis%20value%20should%20be%20of%20type%20%7B%7B%20type%20%7D%7D.%2CThis%20value%20should%20be%20blank.%2CThe%20value%20you%20selected%20is%20not%20a%20valid%20choice.%2CYou%20must%20select%20at%20least%20%7B%7B {truncated}
Because of the adapter is trying to send all keys to lokalise in https://github.com/symfony/symfony/blob/5.3/src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProvider.php#L273
How to reproduce
- Register lokalise app
- Register a lot of translations
- Register translation domain in lokalise config
- Do
./bin/console t:pull lokalise --force -vvv
- Fail
Possible Solution
Remove lokalise filtering step and filter keys locally.
Additional Context
No response