Add context to "n Words" translations

This commit is contained in:
Tetrakern 2024-02-02 19:13:07 +01:00
parent 1559dfe765
commit 22e04cfce5
4 changed files with 5 additions and 5 deletions

View File

@ -143,7 +143,7 @@ $tabs[ $current_tab ]['classes'][] = '_current';
<span><?php echo number_format_i18n( $author_statistics['chapter_count'] ); ?></span>
</div>
<div class="statistics__inline-stat">
<strong><?php _e( 'Words', 'fictioneer' ); ?></strong>
<strong><?php _ex( 'Words', 'Word count caption in statistics.', 'fictioneer' ); ?></strong>
<span><?php echo fictioneer_shorten_number( $author_statistics['word_count'] ); ?></span>
</div>
<div class="statistics__inline-stat">

View File

@ -1752,13 +1752,13 @@ if ( ! function_exists( 'fictioneer_get_list_chapter_meta_row' ) ) {
// Start HTML ---> ?>
<span class="chapter-group__list-item-words" data-number-switch="<?php echo esc_attr( $short_words ); ?>"><?php
printf( _x( '%s Words', 'Words in chapter list', 'fictioneer' ), number_format_i18n( $data['words'] ) );
printf( _x( '%s Words', 'Word count in chapter list.', 'fictioneer' ), number_format_i18n( $data['words'] ) );
?></span>
<?php // <--- End HTML
} else {
// Start HTML ---> ?>
<span class="chapter-group__list-item-words"><?php
printf( _x( '%s Words', 'Words in chapter list', 'fictioneer' ), number_format_i18n( $data['words'] ) );
printf( _x( '%s Words', 'Word count in chapter list.', 'fictioneer' ), number_format_i18n( $data['words'] ) );
?></span>
<?php // <--- End HTML
}

View File

@ -34,7 +34,7 @@ function fictioneer_stories_statistics( $args ) {
'content' => number_format_i18n( wp_count_posts( 'fcn_story' )->publish )
),
'words' => array(
'label' => __( 'Words', 'fictioneer' ),
'label' => _x( 'Words', 'Word count caption in statistics.', 'fictioneer' ),
'content' => fictioneer_shorten_number( $words )
),
'comments' => array(

View File

@ -42,7 +42,7 @@ $statistics = fictioneer_get_collection_statistics( $args['collection_id'] );
<span><?php echo number_format_i18n( $statistics['chapter_count']); ?></span>
</div>
<div class="statistics__inline-stat">
<strong><?php _e( 'Words', 'fictioneer' ); ?></strong>
<strong><?php _ex( 'Words', 'Word count caption in statistics.', 'fictioneer' ); ?></strong>
<span><?php echo fictioneer_shorten_number( $statistics['word_count'] ); ?></span>
</div>
<div class="statistics__inline-stat">