@@ 89-98 (lines=10) @@ | ||
86 | 'key_id' => $keyId |
|
87 | ]); |
|
88 | ||
89 | if (empty($response)) { |
|
90 | $this->client->request('translation.create', [ |
|
91 | 'project_id' => $this->projectId, |
|
92 | 'locale_id' => $this->getLocaleId($message->getLocale()), |
|
93 | 'key_id' => $keyId, |
|
94 | 'content' => $message->getDomain() . '::' . $message->getTranslation(), |
|
95 | ]); |
|
96 | ||
97 | return; |
|
98 | } |
|
99 | } catch (\Throwable $e) { |
|
100 | throw new StorageException($e->getMessage()); |
|
101 | } |
|
@@ 139-148 (lines=10) @@ | ||
136 | 'key_id' => $keyId |
|
137 | ]); |
|
138 | ||
139 | if (empty($response)) { |
|
140 | $this->client->request('translation.create', [ |
|
141 | 'project_id' => $this->projectId, |
|
142 | 'locale_id' => $this->getLocaleId($message->getLocale()), |
|
143 | 'key_id' => $keyId, |
|
144 | 'content' => $message->getDomain() . '::' . $message->getTranslation(), |
|
145 | ]); |
|
146 | ||
147 | return; |
|
148 | } |
|
149 | ||
150 | foreach ($response as $translation) { |
|
151 | if ($translation['locale']['name'] === $message->getLocale()) { |