Added some missing 'Translators:' comments

Added class documentation
Changed phpcs ignores to new style
This commit is contained in:
Justin Foell
2018-03-23 16:52:06 -05:00
parent c1fc8fc2d9
commit 702febcc8c
6 changed files with 84 additions and 11 deletions
+9 -2
View File
@@ -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 ) .