Skip to content

feat: add Translation Import API endpoints and deprecate uploadTranslations#256

Merged
andrii-bodnar merged 2 commits intomasterfrom
copilot/add-translation-import-api
Mar 4, 2026
Merged

feat: add Translation Import API endpoints and deprecate uploadTranslations#256
andrii-bodnar merged 2 commits intomasterfrom
copilot/add-translation-import-api

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Crowdin API v2 introduced dedicated Translation Import endpoints as a more efficient replacement for the legacy uploadTranslations method, which is now deprecated.

New Models

  • TranslationImport — represents an async import operation (identifier, status, progress, attributes, createdAt, updatedAt, startedAt, finishedAt)
  • TranslationImportReport — wraps a languages array (reuses PreTranslationReportLanguage)

New API Methods (TranslationApi)

  • importTranslations(int $projectId, array $params): ?TranslationImportPOST /projects/{projectId}/translations/imports
  • getTranslationImportStatus(int $projectId, string $importTranslationId): ?TranslationImportGET /projects/{projectId}/translations/imports/{importTranslationId}
  • downloadTranslationImportReport(int $projectId, string $importTranslationId): ?TranslationImportReportGET /projects/{projectId}/translations/imports/{importTranslationId}/report

Deprecation

uploadTranslations() is marked @deprecated — use importTranslations() instead.

Usage

// Start an import
$import = $crowdin->translation->importTranslations($projectId, [
    'storageId' => 13,
    'fileId'    => 2,       // required for file-based (non-XLIFF)
    'branchId'  => 34,      // required for string-based
    'languageIds' => ['uk'],
]);

// Poll status
$status = $crowdin->translation->getTranslationImportStatus($projectId, $import->getIdentifier());

// Fetch report once finished
$report = $crowdin->translation->downloadTranslationImportReport($projectId, $import->getIdentifier());

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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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

This section details on the original issue you should resolve

<issue_title>Add support for new Translation Import API endpoints</issue_title>
<issue_description>The Crowdin API has been extended with new Translation Import endpoints that provide a more efficient way to import translations. Additionally, the legacy translation upload method has been deprecated.

The Crowdin API client libraries need to be updated to include these new endpoints and mark the deprecated method accordingly.

New Endpoints:

Deprecated:

References:

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

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
@andrii-bodnar andrii-bodnar marked this pull request as ready for review March 4, 2026 13:31
@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.37%. Comparing base (62ddd0c) to head (78e1dee).
⚠️ Report is 5 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andrii-bodnar andrii-bodnar merged commit d02d8fc into master Mar 4, 2026
10 checks passed
@andrii-bodnar andrii-bodnar deleted the copilot/add-translation-import-api branch March 4, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for new Translation Import API endpoints

2 participants