Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Translations] Lokalise adapter is working incorrect #44444

Copy link
Copy link
Closed
@xepozz

Description

@xepozz
Issue body actions

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

  1. Register lokalise app
  2. Register a lot of translations
  3. Register translation domain in lokalise config
  4. Do ./bin/console t:pull lokalise --force -vvv
  5. Fail

Possible Solution

Remove lokalise filtering step and filter keys locally.

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.