Skip to content

Commit 54319b2

Browse files
committed
Tweak to improve translation strings
1 parent de3983e commit 54319b2

1 file changed

Lines changed: 27 additions & 18 deletions

File tree

views/tasks/set-date-format-form-contents.php

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,17 @@
2323
<fieldset>
2424
<?php foreach ( $prpl_date_formats as $prpl_format ) : ?>
2525
<div class="prpl-radio-wrapper">
26-
<label class="prpl-custom-radio"><input type="radio" name="date_format" value="<?php echo \esc_attr( $prpl_format ); ?>"
27-
<?php
28-
if ( \get_option( 'date_format' ) === $prpl_format ) { // checked() uses "==" rather than "===".
29-
echo " checked='checked'";
30-
$prpl_custom = false;
31-
}
32-
?>
26+
<label class="prpl-custom-radio">
27+
<input
28+
type="radio"
29+
name="date_format"
30+
value="<?php echo \esc_attr( $prpl_format ); ?>"
31+
<?php
32+
if ( \get_option( 'date_format' ) === $prpl_format ) { // checked() uses "==" rather than "===".
33+
echo " checked='checked'";
34+
$prpl_custom = false;
35+
}
36+
?>
3337
/>
3438
<span class="prpl-custom-control"></span>
3539
<span class="date-time-text format-i18n"><?php echo \esc_html( \date_i18n( $prpl_format ) ); ?></span>
@@ -43,29 +47,34 @@
4347
<label class="prpl-custom-radio">
4448
<input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m" <?php checked( $prpl_custom ); ?>/>
4549
<span class="prpl-custom-control"></span> <span class="date-time-text date-time-custom-text">
46-
<?php \esc_html_e( 'Custom:', 'progress-planner' ); ?>
47-
<span class="screen-reader-text">
4850
<?php
51+
printf(
52+
/* translators: %s: Screen reader text "enter a custom date format in the following field". */
53+
\esc_html__( 'Custom: %s', 'progress-planner' ),
4954
/* translators: Hidden accessibility text. */
50-
\esc_html_e( 'enter a custom date format in the following field', 'progress-planner' );
55+
'<span class="screen-reader-text">' . \esc_html__( 'enter a custom date format in the following field', 'progress-planner' ) . '</span>'
56+
);
5157
?>
52-
</span>
5358
</span>
5459
</label>
5560
<label for="date_format_custom" class="screen-reader-text">
56-
<?php
57-
/* translators: Hidden accessibility text. */
58-
\esc_html_e( 'Custom date format:', 'progress-planner' );
59-
?>
61+
<?php
62+
/* translators: Hidden accessibility text. */
63+
\esc_html_e( 'Custom date format:', 'progress-planner' );
64+
?>
6065
</label>
6166
<input type="text" name="date_format_custom" id="date_format_custom" value="<?php echo \esc_attr( \get_option( 'date_format' ) ); ?>" class="small-text" />
6267
</div>
6368

6469
<?php /* Preview. */ ?>
6570
<p>
66-
<strong><?php \esc_html_e( 'Preview:', 'progress-planner' ); ?></strong>
67-
<span class="example"><?php echo \esc_html( \date_i18n( \get_option( 'date_format' ) ) ); ?></span>
68-
<span class="spinner"></span>
71+
<?php
72+
printf(
73+
/* translators: %s: Preview text. */
74+
\wp_kses_post( \__( '<strong>Preview:</strong> %s', 'progress-planner' ) ),
75+
'<span class="example">' . \esc_html( \date_i18n( \get_option( 'date_format' ) ) ) . '</span><span class="spinner"></span>'
76+
);
77+
?>
6978
</p>
7079
</fieldset>
7180
</div>

0 commit comments

Comments
 (0)