feat: add Translation Import API endpoints and deprecate uploadTranslations#256
Merged
andrii-bodnar merged 2 commits intomasterfrom Mar 4, 2026
Merged
Conversation
Co-authored-by: andrii-bodnar <29282228+andrii-bodnar@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for new translation import API endpoints
feat: add Translation Import API endpoints and deprecate uploadTranslations
Mar 4, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #256 +/- ##
============================================
+ Coverage 92.29% 92.37% +0.08%
- Complexity 1617 1631 +14
============================================
Files 153 155 +2
Lines 4330 4372 +42
============================================
+ Hits 3996 4038 +42
Misses 334 334 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Crowdin API v2 introduced dedicated Translation Import endpoints as a more efficient replacement for the legacy
uploadTranslationsmethod, which is now deprecated.New Models
TranslationImport— represents an async import operation (identifier,status,progress,attributes,createdAt,updatedAt,startedAt,finishedAt)TranslationImportReport— wraps alanguagesarray (reusesPreTranslationReportLanguage)New API Methods (
TranslationApi)importTranslations(int $projectId, array $params): ?TranslationImport—POST /projects/{projectId}/translations/importsgetTranslationImportStatus(int $projectId, string $importTranslationId): ?TranslationImport—GET /projects/{projectId}/translations/imports/{importTranslationId}downloadTranslationImportReport(int $projectId, string $importTranslationId): ?TranslationImportReport—GET /projects/{projectId}/translations/imports/{importTranslationId}/reportDeprecation
uploadTranslations()is marked@deprecated— useimportTranslations()instead.Usage
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/c0daa33cb2533cd73f48dde1c70c2afa3e7953b5/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/phpunit/zipball/05017b80304e0eb3f31d90194a563fd53a6021f1/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/console/zipball/4b4d8cd118484aa604ec519062113dd87abde18c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/event-dispatcher/zipball/e3bca343efeb613f843c254e7718ef17c9bdf7a3/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/options-resolver/zipball/4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/process/zipball/01906871cb9b5e3cf872863b91aba4ec9767daf4/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/stopwatch/zipball/f83692cd869a6f2391691d40a01e8acb89e76fee/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/string/zipball/e3f98bfc7885c957488f443df82d97814a3ce061/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/cxssbU /usr/bin/composer install --no-interaction --prefer-dist(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.