Skip to content

Commit 36bdae9

Browse files
committed
Update warning message in language command
1 parent 4d0a2e5 commit 36bdae9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/WP_CLI/CommandWithTranslation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ protected function download_language_pack( $download, $slug = null ) {
216216
}
217217

218218
if ( ! $translation_to_load ) {
219-
return new \WP_Error( 'not_found', "Language '{$download}' not available." );
219+
return new \WP_Error( 'not_found', $slug ? "Language '{$download}' for '{$slug}' not available." : "Language '{$download}' not available." );
220220
}
221221
$translation = (object) $translation;
222222

@@ -235,7 +235,7 @@ protected function download_language_pack( $download, $slug = null ) {
235235
}
236236

237237
if ( ! $result ) {
238-
return new \WP_Error( 'not_installed', "Could not install language '{$download}'." );
238+
return new \WP_Error( 'not_installed', $slug ? "Could not install language '{$download}' for '{$slug}'." : "Could not install language '{$download}'." );
239239
}
240240

241241
return $translation->language;

0 commit comments

Comments
 (0)