Skip to content

Commit

Permalink
Translator comments
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Sep 3, 2023
1 parent b8b7dc0 commit d5121bf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/wp-to-twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ function wpt_post_to_twitter( $twit, $auth = false, $id = false, $media = false
);
update_option( 'wpt_app_limit', $rate_limit );
} catch ( RequestException $e ) {
// Get Guzzle exception response.
// Get Guzzle exception response.
if ( method_exists( $e, 'getResponse' ) ) {
$response = $e->getResponse();
$headers = $response->getHeaders();
Expand Down Expand Up @@ -504,25 +504,32 @@ function wpt_post_to_twitter( $twit, $auth = false, $id = false, $media = false
$error = __( '304 Not Modified: There was no new data to return', 'wp-to-twitter' );
break;
case 400:
// Translators: Error description from X.com.
$error = sprintf( __( '400: %s', 'wp-to-twitter' ), $notice );
break;
case 401:
// Translators: Error description from X.com.
$error = sprintf( __( '401: %s', 'wp-to-twitter' ), $notice );
update_option( 'wpt_authentication_missing', "$auth" );
break;
case 403:
// Translators: Error description from X.com.
$error = sprintf( __( '403: %s', 'wp-to-twitter' ), $notice );
break;
case 404:
// Translators: Error description from X.com.
$error = sprintf( __( '404: %s', 'wp-to-twitter' ), $notice );
break;
case 406:
// Translators: Error description from X.com.
$error = sprintf( __( '406: %s', 'wp-to-twitter' ), $notice );
break;
case 422:
// Translators: Error description from X.com.
$error = sprintf( __( '422: %s', 'wp-to-twitter' ), $notice );
break;
case 429:
// Translators: Error description from X.com.
$error = sprintf( __( '429: %s', 'wp-to-twitter' ), $notice );
break;
case 500:
Expand Down

0 comments on commit d5121bf

Please sign in to comment.