Skip to content

Commit

Permalink
translator formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfoell committed Dec 26, 2017
1 parent bd40fe4 commit 07949e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/API.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function post( $uri, $data = null ) {

return new WP_Error(
'wp-strava_post',
// translators: message shown when there's a problem with ab HTTP POST to the Strava API.
// Translators: message shown when there's a problem with ab HTTP POST to the Strava API.
sprintf( __( 'ERROR %1$s %2$s - See full error by adding <code>define( \'WP_STRAVA_DEBUG\', true );</code> to wp-config.php', 'wp-strava' ), $response['response']['code'], $response['response']['message'] ),
$error
);
Expand Down Expand Up @@ -89,7 +89,7 @@ public function get( $uri, $args = null ) {

return new WP_Error(
'wp-strava_get',
// translators: message shown when there's a problem with an HTTP GET to the Strava API.
// Translators: message shown when there's a problem with an HTTP GET to the Strava API.
sprintf( __( 'ERROR %1$s %2$s - See full error by adding <code>define( \'WP_STRAVA_DEBUG\', true );</code> to wp-config.php', 'wp-strava' ), $response['response']['code'], $response['response']['message'] ),
$error
);
Expand Down
8 changes: 4 additions & 4 deletions lib/LatestRidesWidget.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,18 @@ private function strava_request_handler( $athlete_token, $strava_club_id, $quant
$response .= "<a href='" . WPStrava_Rides::ACTIVITIES_URL . $ride->id . "' target='_blank'>" . $ride->name . '</a>';
$response .= "<div class='ride-item'>";
$unixtime = strtotime( $ride->start_date_local );
// translators: Shows something like "On <date> <name [went 10 miles] [during 1 hour] [climbing 100 feet]>."
// Translators: Shows something like "On <date> <[went 10 miles] [during 2 hours] [climbing 100 feet]>."
$response .= sprintf( __( 'On %1$s %2$s', 'wp-strava' ), date_i18n( get_option( 'date_format' ), $unixtime ), date_i18n( get_option( 'time_format' ), $unixtime ) );

if ( is_numeric( $strava_club_id ) ) {
$response .= " <a href='" . WPStrava_Rides::ATHLETES_URL . $ride->athlete_id . "'>" . $ride->athlete_name . '</a>';
}

// translators: "went 10 miles"
// Translators: "went 10 miles"
$response .= sprintf( __( ' went %1$s %2$s', 'wp-strava' ), $som->distance( $ride->distance ), $som->get_distance_label() );
// translators: "during 1 hour"
// Translators: "during 2 hours"
$response .= sprintf( __( ' during %1$s %2$s', 'wp-strava' ), $som->time( $ride->elapsed_time ), $som->get_time_label() );
// translators: "climbing 100 feet"
// Translators: "climbing 100 ft."
$response .= sprintf( __( ' climbing %1$s %2$s', 'wp-strava' ), $som->elevation( $ride->total_elevation_gain ), $som->get_elevation_label() );
$response .= '</div></li>';
}
Expand Down

0 comments on commit 07949e0

Please sign in to comment.