@@ -71,10 +71,10 @@ public function __invoke( $args, $assoc_args ) {
71
71
if ( isset ( $ assoc_args ['url-only ' ] ) ) {
72
72
\WP_CLI ::log ( $ link );
73
73
} else {
74
- $ this ->success ( 'Single-use login link valid for ' . $ this ->expiry_min . ' minutes ' );
74
+ /* Translators: %d number */
75
+ $ this ->success ( sprintf ( __ ( 'Single-use login link valid for %d minutes ' , 'wp-module-sso ' ), $ this ->expiry_min ) );
75
76
$ this ->colorize_log ( $ link , 'underline ' );
76
77
}
77
-
78
78
}
79
79
80
80
/**
@@ -142,7 +142,7 @@ protected function create_salt_nonce_and_hash() {
142
142
}
143
143
144
144
145
- /**
145
+ /**
146
146
* Helper to format data into tables.
147
147
*
148
148
* By default, the method creates simple $key => $value tables.
@@ -193,7 +193,7 @@ protected function bold_heading( $message, $emoji = '' ) {
193
193
* @param string $message
194
194
*/
195
195
protected function success ( $ message , $ silent = false ) {
196
- $ pre_ = $ silent ? '' : 'Success: ' ;
196
+ $ pre_ = $ silent ? '' : __ ( 'Success: ' , ' wp-module-sso ' ) ;
197
197
$ this ->colorize_log ( $ pre_ . $ message , '2 ' , 'k ' , '✅ ' );
198
198
}
199
199
@@ -226,7 +226,7 @@ protected function warning( $message ) {
226
226
* @throws \WP_CLI\ExitException
227
227
*/
228
228
protected function error ( $ message , $ silent = false , $ halt = true , $ code = 400 ) {
229
- $ pre_ = $ silent ? '' : 'Error: ' ;
229
+ $ pre_ = $ silent ? '' : __ ( 'Error: ' , ' wp-module-sso ' ) ;
230
230
$ this ->colorize_log ( $ pre_ . $ message , '1 ' , 'W ' , '🛑️ ' );
231
231
if ( $ halt ) {
232
232
WP_CLI ::halt ( $ code );
@@ -275,7 +275,7 @@ protected function log_to_json( $data ) {
275
275
} elseif ( is_array ( json_decode ( $ data , true ) ) ) {
276
276
\WP_CLI ::log ( $ data );
277
277
} else {
278
- $ this ->error ( 'Provided $data wasn \'t valid array or JSON string. ' );
278
+ $ this ->error ( __ ( 'Provided $data wasn \'t valid array or JSON string. ' , ' wp-module-sso ' ) );
279
279
}
280
280
}
281
281
0 commit comments