mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-17 21:53:54 +09:00
Added some missing 'Translators:' comments
Added class documentation Changed phpcs ignores to new style
This commit is contained in:
@@ -24,7 +24,10 @@ class WPStrava_LatestMapWidget extends WP_Widget {
|
||||
|
||||
?>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'wp-strava' ); ?></label>
|
||||
<label for="<?php echo $this->get_field_id( 'title' ); ?>">
|
||||
<?php // Translator: Widget Title. ?>
|
||||
<?php esc_html_e( 'Title:', 'wp-strava' ); ?>
|
||||
</label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" />
|
||||
</p>
|
||||
<p>
|
||||
@@ -36,7 +39,10 @@ class WPStrava_LatestMapWidget extends WP_Widget {
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id( 'distance_min' ); ?>"><?php echo sprintf( __( 'Min. Distance (%s):', 'wp-strava' ), $this->som->get_distance_label() ); ?></label>
|
||||
<label for="<?php echo $this->get_field_id( 'distance_min' ); ?>">
|
||||
<?php // Translators: Label for minimum distance input. ?>
|
||||
<?php echo sprintf( __( 'Min. Distance (%s):', 'wp-strava' ), $this->som->get_distance_label() ); ?>
|
||||
</label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id( 'distance_min' ); ?>" name="<?php echo $this->get_field_name( 'distance_min' ); ?>" type="text" value="<?php echo $distance_min; ?>" />
|
||||
</p>
|
||||
<p>
|
||||
@@ -128,6 +134,7 @@ class WPStrava_LatestMapWidget extends WP_Widget {
|
||||
}
|
||||
|
||||
echo empty( $activity->map ) ?
|
||||
// Translators: Text with activity name shown in place of image if not available.
|
||||
sprintf( __( 'Map not available for activity "%s"', 'wp-strava' ), $activity->name ) :
|
||||
"<a title='{$activity->name}' href='" . WPStrava_Activity::ACTIVITIES_URL . "{$activity->id}'>" .
|
||||
$this->get_static_image( $id, $activity, $build_new ) .
|
||||
|
||||
Reference in New Issue
Block a user