Use a unique text-domain, wporg-5ftf (#110)

* Use a unique text-domain, wporg-5ftf

* Fix plugin i18n strings

* Remove unwanted text-domains from WPCS checks and fix missed old text-domains

* Remove type=array from phpcs

* Re-add type=array

* Small WPCS fix

* WPCS: replace  var with
This commit is contained in:
Jb Audras 2019-11-23 19:24:37 +01:00 committed by Kelly Dwan
parent aec40e6c7e
commit 0754ae0b28
17 changed files with 108 additions and 108 deletions

View file

@ -20,25 +20,25 @@ get_header(); ?>
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title"><?php esc_html_e( 'Pledges', 'wordpressorg' ); ?></h1>
<h1 class="page-title"><?php esc_html_e( 'Pledges', 'wporg-5ftf' ); ?></h1>
<div class="page-header-callout">
<a class="button" href="<?php echo esc_url( $new_pledge_link ); ?>" >
<?php esc_html_e( 'Pledge your company', 'wordpressorg' ); ?>
<?php esc_html_e( 'Pledge your company', 'wporg-5ftf' ); ?>
</a>
</div>
<div class="page-header-controls">
<form method="get" action="<?php echo esc_url( get_post_type_archive_link( CPT_ID ) ); ?>">
<label for="pledge-sort"><?php esc_html_e( 'Sort pledges by', 'wordpressorg' ); ?></label>
<label for="pledge-sort"><?php esc_html_e( 'Sort pledges by', 'wporg-5ftf' ); ?></label>
<select class="custom-select" id="pledge-sort" name="order">
<option value="" <?php selected( $pledge_order, '' ); ?>>
<?php esc_html_e( 'Random', 'wordpressorg' ); ?>
<?php esc_html_e( 'Random', 'wporg-5ftf' ); ?>
</option>
<option value="alphabetical" <?php selected( $pledge_order, 'alphabetical' ); ?>>
<?php esc_html_e( 'Alphabetical', 'wordpressorg' ); ?>
<?php esc_html_e( 'Alphabetical', 'wporg-5ftf' ); ?>
</option>
<option value="hours" <?php selected( $pledge_order, 'hours' ); ?>>
<?php esc_html_e( 'Total Hours', 'wordpressorg' ); ?>
<?php esc_html_e( 'Total Hours', 'wporg-5ftf' ); ?>
</option>
</select>
<span class="screen-reader-text">

View file

@ -52,7 +52,7 @@ get_header();
</header>
<div class="entry-content">
<h2><?php esc_html_e( 'About', 'wporg' ); ?></h2>
<h2><?php esc_html_e( 'About', 'wporg-5ftf' ); ?></h2>
<div class="pledge-company-description">
<?php
@ -62,15 +62,15 @@ get_header();
</div>
<?php if ( ! empty( $contributors ) ) : ?>
<h2><?php esc_html_e( 'Contributions', 'wporg' ); ?></h2>
<h2><?php esc_html_e( 'Contributions', 'wporg-5ftf' ); ?></h2>
<p>
<?php
echo wp_kses_post( sprintf(
__( '%1$s sponsors %2$s for a total of <strong>%3$s</strong> hours per week.', 'wporg' ),
__( '%1$s sponsors %2$s for a total of <strong>%3$s</strong> hours per week.', 'wporg-5ftf' ),
get_the_title(),
sprintf(
_n( '<strong>%d</strong> contributor', '<strong>%d</strong> contributors', $contribution_data['contributors'], 'wporg' ),
_n( '<strong>%d</strong> contributor', '<strong>%d</strong> contributors', $contribution_data['contributors'], 'wporg-5ftf' ),
number_format_i18n( absint( $contribution_data['contributors'] ) )
),
number_format_i18n( absint( $contribution_data['hours'] ) )
@ -80,7 +80,7 @@ get_header();
<p>
<?php
echo wp_kses_post( sprintf(
__( 'Contributors from %s work on the following teams:', 'wporg' ),
__( 'Contributors from %s work on the following teams:', 'wporg-5ftf' ),
get_the_title()
) );
?>
@ -97,7 +97,7 @@ get_header();
</ul>
<?php endif; ?>
<h2><?php esc_html_e( 'Contributors', 'wporg' ); ?></h2>
<h2><?php esc_html_e( 'Contributors', 'wporg-5ftf' ); ?></h2>
<?php if ( ! empty( $contributors ) ) : ?>
<ul class="pledge-contributors has-contrib-names">
@ -122,14 +122,14 @@ get_header();
<?php endforeach; ?>
</ul>
<?php else : ?>
<p><?php esc_html_e( 'No confirmed contributors yet.', 'wporg' ); ?></p>
<p><?php esc_html_e( 'No confirmed contributors yet.', 'wporg-5ftf' ); ?></p>
<?php endif; ?>
</div>
<footer class="entry-footer">
<div class="report-wrapper">
<a href="<?php the_permalink( $report_page ); ?>">
<?php esc_html_e( 'Report a problem', 'wporg' ); ?>
<?php esc_html_e( 'Report a problem', 'wporg-5ftf' ); ?>
</a>
</div>

View file

@ -20,26 +20,26 @@ $allowed_html = array_merge(
wp_kses_allowed_html( 'data' ),
array(
'span' => array(
'class' => true
)
'class' => true,
),
)
);
$more = sprintf(
__( '&hellip; <a href="%s">continue reading <span class="screen-reader-text">%s</span></a>', 'wporg-5ftf' ),
$more_text = sprintf(
__( '&hellip; <a href="%1$s">continue reading <span class="screen-reader-text">%2$s</span></a>', 'wporg-5ftf' ),
esc_url( get_permalink() ),
esc_html( get_the_title() )
);
$content = apply_filters( 'the_content', $data['org-description'] );
$content = strip_tags( $content );
$content = wp_trim_words( $content, 55, $more );
$content = wp_trim_words( $content, 55, $more_text );
$total_hours = $pledge->{ PledgeMeta\META_PREFIX . 'pledge-total-hours' };
$contributor_title = sprintf(
esc_html(
_n( '%1$s has pledged %2$d hour a week', '%1$s has pledged %2$d hours a week', $total_hours, 'wordpressorg' )
_n( '%1$s has pledged %2$d hour a week', '%1$s has pledged %2$d hours a week', $total_hours, 'wporg-5ftf' )
),
wp_kses_post( get_the_title() ),
intval( $total_hours )