@@ 249-260 (lines=12) @@ | ||
246 | $error = ''; |
|
247 | ||
248 | $activated_count = count( $activated ); |
|
249 | if ( $activated_count > 0 ) { |
|
250 | $activated_last = array_pop( $activated ); |
|
251 | $activated_text = $activated_count > 1 ? sprintf( |
|
252 | /* Translators: first variable is a list followed by the last item, which is the second variable. Example: dog, cat and bird. */ |
|
253 | __( '%1$s and %2$s', 'jetpack' ), |
|
254 | join( ', ', $activated ), $activated_last ) : $activated_last; |
|
255 | ||
256 | $error = sprintf( |
|
257 | /* Translators: the variable is a module name. */ |
|
258 | _n( 'The module %s was activated.', 'The modules %s were activated.', $activated_count, 'jetpack' ), |
|
259 | $activated_text ) . ' '; |
|
260 | } |
|
261 | ||
262 | $failed_count = count( $failed ); |
|
263 | if ( count( $failed ) > 0 ) { |
|
@@ 263-274 (lines=12) @@ | ||
260 | } |
|
261 | ||
262 | $failed_count = count( $failed ); |
|
263 | if ( count( $failed ) > 0 ) { |
|
264 | $failed_last = array_pop( $failed ); |
|
265 | $failed_text = $failed_count > 1 ? sprintf( |
|
266 | /* Translators: first variable is a list followed by the last item, which is the second variable. Example: dog, cat and bird. */ |
|
267 | __( '%1$s and %2$s', 'jetpack' ), |
|
268 | join( ', ', $failed ), $failed_last ) : $failed_last; |
|
269 | ||
270 | $error = sprintf( |
|
271 | /* Translators: the variable is a module name. */ |
|
272 | _n( 'The module %s failed to be activated.', 'The modules %s failed to be activated.', $failed_count, 'jetpack' ), |
|
273 | $failed_text ) . ' '; |
|
274 | } |
|
275 | ||
276 | return new WP_Error( |
|
277 | 'activation_failed', |