Skip to content

Navigation Menu

Sign in
Appearance settings

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

[Translation] Don’t check the error message to know if Lokalise keys are missing#64289

Merged
nicolas-grekas merged 1 commit into
symfony:6.4symfony/symfony:6.4from
MatTheCat:lokalise_export_filesMatTheCat/symfony:lokalise_export_filesCopy head branch name to clipboard
May 20, 2026
Merged

[Translation] Don’t check the error message to know if Lokalise keys are missing#64289
nicolas-grekas merged 1 commit into
symfony:6.4symfony/symfony:6.4from
MatTheCat:lokalise_export_filesMatTheCat/symfony:lokalise_export_filesCopy head branch name to clipboard

Conversation

@MatTheCat
Copy link
Copy Markdown
Contributor

@MatTheCat MatTheCat commented May 19, 2026

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues N/A
License MIT

Pushing translations to an empty Lokalise project failed with

Unable to export translations from Lokalise: "{"error":{"message":"No keys for export with current export settings","code":406}}".

because the provider checks for the following message:

No keys found with specified filenames.

Since error responses aren’t documented anywhere and the message can change it probably is better not to take it into account.

}

if (200 !== $response->getStatusCode()) {
if (self::PROJECT_TOO_BIG_STATUS_CODE !== ($responseContent['error']['code'] ?? null)) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is the same as the response’s so we don’t need to wait for the content.

Comment on lines -147 to -149
/**
* @see https://app.lokalise.com/api2docs/curl/#transition-download-files-post
*/
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn’t find a single reference to this endpoint even using Wayback Machine 🤔

@MatTheCat MatTheCat changed the title [Translation] Don’t check the error message to know if Lokalise keys … [Translation] Don’t check the error message to know if Lokalise keys are missing May 19, 2026
@MatTheCat MatTheCat force-pushed the lokalise_export_files branch from 3aa9f51 to e4d2918 Compare May 20, 2026 12:14
@MatTheCat MatTheCat force-pushed the lokalise_export_files branch from e4d2918 to c43252b Compare May 20, 2026 13:50
@MatTheCat
Copy link
Copy Markdown
Contributor Author

Sorry for the noise; rebased on the wrong branch.

@nicolas-grekas nicolas-grekas force-pushed the lokalise_export_files branch from c43252b to b6fe6a0 Compare May 20, 2026 17:42
@nicolas-grekas
Copy link
Copy Markdown
Member

Thank you @MatTheCat.

@nicolas-grekas nicolas-grekas merged commit c252904 into symfony:6.4 May 20, 2026
11 of 13 checks passed
@MatTheCat MatTheCat deleted the lokalise_export_files branch May 20, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

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