crowdin-api-client-php
crowdin-api-client-php copied to clipboard
SourceString fails on pluralized string
TypeError
Return value of CrowdinApiClient\Model\SourceString::getText() must be of the type string, array returned
at vendor/crowdin/crowdin-api-client/src/CrowdinApiClient/Model/SourceString.php:175
171▕ * @return string
172▕ */
173▕ public function getText(): string
174▕ {
➜ 175▕ return $this->text;
176▕ }
177▕
178▕ /**
179▕ * @param string $text
Could you please supply some steps on how to recreate this error so that I can have a look
@phillipsb22 probably, you need to upload to your Crowdin project some file with plural strings (for example, android XML)
Then, call the List Strings or Get String API method
Hi guys. You can reproduce this by adding pluralized string and then downloading it by SourceStringApi::list.
Here is api documentation:

https://developer.crowdin.com/api/v2/#operation/api.projects.strings.post