$formData =
new FormDataPart($fields);
$response =
$this->httpClient->
request('POST', 'uploads',
[ 'body' =>
$formData->
bodyToIterable(),
'headers' =>
$formData->
getPreparedHeaders()->
toArray(),
]);
if (201 !==
$statusCode =
$response->
getStatusCode()) { $this->logger->
error(sprintf('Unable to upload translations for domain "%s" to phrase: "%s".',
$domain,
$response->
getContent(false
)));
$this->
throwProviderException($statusCode,
$response, 'Unable to upload translations to phrase.'
);
} } } } public function read(array
$domains, array
$locales): TranslatorBag
{ $translatorBag =
new TranslatorBag();
foreach ($locales as $locale) { $phraseLocale =
$this->
getLocale($locale);