Skip to content

Commit

Permalink
Merge branch '3.4' into 4.4
Browse files Browse the repository at this point in the history
* 3.4:
  Various cleanups
  • Loading branch information
nicolas-grekas committed May 30, 2020
2 parents a538e0a + b0cd62e commit 79d3ef9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Formatter/IntlFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function formatIntl(string $message, string $locale, array $parameters =
try {
$this->cache[$locale][$message] = $formatter = new \MessageFormatter($locale, $message);
} catch (\IntlException $e) {
throw new InvalidArgumentException(sprintf('Invalid message format (error #%d): '.intl_get_error_message(), intl_get_error_code()), 0, $e);
throw new InvalidArgumentException(sprintf('Invalid message format (error #%d): ', intl_get_error_code()).intl_get_error_message(), 0, $e);
}
}

Expand All @@ -52,7 +52,7 @@ public function formatIntl(string $message, string $locale, array $parameters =
}

if (false === $message = $formatter->format($parameters)) {
throw new InvalidArgumentException(sprintf('Unable to format message (error #%s): '.$formatter->getErrorMessage(), $formatter->getErrorCode()));
throw new InvalidArgumentException(sprintf('Unable to format message (error #%s): ', $formatter->getErrorCode()).$formatter->getErrorMessage());
}

return $message;
Expand Down
2 changes: 1 addition & 1 deletion Loader/XliffFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private function extract($resource, MessageCatalogue $catalogue, string $domain)

$xliffVersion = XliffUtils::getVersionNumber($dom);
if ($errors = XliffUtils::validateSchema($dom)) {
throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: '.XliffUtils::getErrorsAsString($errors), $resource));
throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: ', $resource).XliffUtils::getErrorsAsString($errors));
}

if ('1.2' === $xliffVersion) {
Expand Down

0 comments on commit 79d3ef9

Please sign in to comment.