Pledge details: Prevent count & label from wrapping for contributor data string.

Fixes #316
This commit is contained in:
Kelly Dwan 2024-09-30 17:07:32 -04:00
parent fbe64d8153
commit 32b4cdbcd8
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D

View file

@ -51,10 +51,10 @@ function get_meta_binding_value( $args, $block ) {
case 'org-contribution-details':
$contribution_data = XProfile\get_aggregate_contributor_data_for_pledge( $block->context['postId'] );
return sprintf(
__( '%1$s sponsors %2$s for a total of <strong>%3$s hours</strong> per week across <strong>%4$d teams</strong>.', 'wporg-5ftf' ),
__( '%1$s sponsors %2$s for a total of <strong>%3$s&nbsp;hours</strong> per week across <strong>%4$d&nbsp;teams</strong>.', 'wporg-5ftf' ),
get_the_title( $block->context['postId'] ),
sprintf(
_n( '<strong>%d contributor</strong>', '<strong>%d contributors</strong>', $contribution_data['contributors'], 'wporg-5ftf' ),
_n( '<strong>%d&nbsp;contributor</strong>', '<strong>%d&nbsp;contributors</strong>', $contribution_data['contributors'], 'wporg-5ftf' ),
number_format_i18n( absint( $contribution_data['contributors'] ) )
),
number_format_i18n( absint( $contribution_data['hours'] ) ),