diff --git a/src/Drivers/Translation.php b/src/Drivers/Translation.php index d52e751..245c78a 100644 --- a/src/Drivers/Translation.php +++ b/src/Drivers/Translation.php @@ -120,7 +120,9 @@ public function getGoogleTranslate($language, $token) if (count($translatedMatches[0]) !== count($placeholders)) { // Print a warning to stderr fwrite(STDERR, sprintf( - "Warning: Placeholder count mismatch in translated text.\nOriginal text: %s\nTranslated text: %s\nExpected placeholders: %s\nActual placeholders: %s\n", + "Warning: Placeholder count mismatch in translated text when translating %s to %s.\nOriginal text: %s\nTranslated text: %s\nExpected placeholders: %s\nActual placeholders: %s\n", + $this->sourceLanguage, + $language, $token, $translatedText, json_encode($placeholders),