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