mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-16 08:33:43 +03:00
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:
parent
aec40e6c7e
commit
0754ae0b28
|
@ -143,7 +143,7 @@
|
|||
provided as a comma-delimited list. -->
|
||||
<rule ref="WordPress.WP.I18n">
|
||||
<properties>
|
||||
<property name="text_domain" type="array" value="wporg-5ftf,wordpressorg,wporg" />
|
||||
<property name="text_domain" type="array" value="wporg-5ftf" />
|
||||
</properties>
|
||||
</rule>
|
||||
</ruleset>
|
||||
|
|
|
@ -25,28 +25,28 @@ add_shortcode( '5ftf_my_pledges', __NAMESPACE__ . '\render_my_pledges' );
|
|||
*/
|
||||
function register_custom_post_type() {
|
||||
$labels = array(
|
||||
'name' => _x( 'Contributors', 'Pledges General Name', 'wporg' ),
|
||||
'singular_name' => _x( 'Contributor', 'Pledge Singular Name', 'wporg' ),
|
||||
'menu_name' => __( 'Five for the Future', 'wporg' ),
|
||||
'archives' => __( 'Contributor Archives', 'wporg' ),
|
||||
'attributes' => __( 'Contributor Attributes', 'wporg' ),
|
||||
'parent_item_colon' => __( 'Parent Contributor:', 'wporg' ),
|
||||
'all_items' => __( 'Contributors', 'wporg' ),
|
||||
'add_new_item' => __( 'Add New Contributor', 'wporg' ),
|
||||
'add_new' => __( 'Add New', 'wporg' ),
|
||||
'new_item' => __( 'New Contributor', 'wporg' ),
|
||||
'edit_item' => __( 'Edit Contributor', 'wporg' ),
|
||||
'update_item' => __( 'Update Contributor', 'wporg' ),
|
||||
'view_item' => __( 'View Contributor', 'wporg' ),
|
||||
'view_items' => __( 'View Contributors', 'wporg' ),
|
||||
'search_items' => __( 'Search Contributors', 'wporg' ),
|
||||
'not_found' => __( 'Not found', 'wporg' ),
|
||||
'not_found_in_trash' => __( 'Not found in Trash', 'wporg' ),
|
||||
'insert_into_item' => __( 'Insert into contributor', 'wporg' ),
|
||||
'uploaded_to_this_item' => __( 'Uploaded to this contributor', 'wporg' ),
|
||||
'items_list' => __( 'Contributors list', 'wporg' ),
|
||||
'items_list_navigation' => __( 'Contributors list navigation', 'wporg' ),
|
||||
'filter_items_list' => __( 'Filter contributors list', 'wporg' ),
|
||||
'name' => _x( 'Contributors', 'Pledges General Name', 'wporg-5ftf' ),
|
||||
'singular_name' => _x( 'Contributor', 'Pledge Singular Name', 'wporg-5ftf' ),
|
||||
'menu_name' => __( 'Five for the Future', 'wporg-5ftf' ),
|
||||
'archives' => __( 'Contributor Archives', 'wporg-5ftf' ),
|
||||
'attributes' => __( 'Contributor Attributes', 'wporg-5ftf' ),
|
||||
'parent_item_colon' => __( 'Parent Contributor:', 'wporg-5ftf' ),
|
||||
'all_items' => __( 'Contributors', 'wporg-5ftf' ),
|
||||
'add_new_item' => __( 'Add New Contributor', 'wporg-5ftf' ),
|
||||
'add_new' => __( 'Add New', 'wporg-5ftf' ),
|
||||
'new_item' => __( 'New Contributor', 'wporg-5ftf' ),
|
||||
'edit_item' => __( 'Edit Contributor', 'wporg-5ftf' ),
|
||||
'update_item' => __( 'Update Contributor', 'wporg-5ftf' ),
|
||||
'view_item' => __( 'View Contributor', 'wporg-5ftf' ),
|
||||
'view_items' => __( 'View Contributors', 'wporg-5ftf' ),
|
||||
'search_items' => __( 'Search Contributors', 'wporg-5ftf' ),
|
||||
'not_found' => __( 'Not found', 'wporg-5ftf' ),
|
||||
'not_found_in_trash' => __( 'Not found in Trash', 'wporg-5ftf' ),
|
||||
'insert_into_item' => __( 'Insert into contributor', 'wporg-5ftf' ),
|
||||
'uploaded_to_this_item' => __( 'Uploaded to this contributor', 'wporg-5ftf' ),
|
||||
'items_list' => __( 'Contributors list', 'wporg-5ftf' ),
|
||||
'items_list_navigation' => __( 'Contributors list navigation', 'wporg-5ftf' ),
|
||||
'filter_items_list' => __( 'Filter contributors list', 'wporg-5ftf' ),
|
||||
);
|
||||
|
||||
$args = array(
|
||||
|
@ -87,7 +87,7 @@ function add_list_table_columns( $columns ) {
|
|||
$last = array_slice( $columns, 2, null, true );
|
||||
|
||||
$new_columns = array(
|
||||
'pledge' => __( 'Pledge', 'wporg' ),
|
||||
'pledge' => __( 'Pledge', 'wporg-5ftf' ),
|
||||
);
|
||||
|
||||
return array_merge( $first, $new_columns, $last );
|
||||
|
@ -108,7 +108,7 @@ function populate_list_table_columns( $column, $post_id ) {
|
|||
$pledge = get_post( $contributor->post_parent );
|
||||
|
||||
if ( ! $pledge ) {
|
||||
esc_html_e( 'Unattached', 'wordpressorg' );
|
||||
esc_html_e( 'Unattached', 'wporg-5ftf' );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -266,9 +266,9 @@ function get_pledge_contributors_data( $pledge_id ) {
|
|||
'name' => $name,
|
||||
'displayName' => $contributor->display_name,
|
||||
'publishDate' => get_the_date( '', $contributor_post ),
|
||||
'resendLabel' => __( 'Resend Confirmation', 'wporg' ),
|
||||
'resendLabel' => __( 'Resend Confirmation', 'wporg-5ftf' ),
|
||||
'removeConfirm' => sprintf( __( 'Remove %s from this pledge?', 'wporg-5ftf' ), $name ),
|
||||
'removeLabel' => sprintf( __( 'Remove %s', 'wporg' ), $name ),
|
||||
'removeLabel' => sprintf( __( 'Remove %s', 'wporg-5ftf' ), $name ),
|
||||
];
|
||||
},
|
||||
$group
|
||||
|
|
|
@ -99,7 +99,7 @@ function send_manage_email_handler() {
|
|||
if ( $message_sent ) {
|
||||
$result = [
|
||||
'success' => true,
|
||||
'message' => __( "Thanks! We've emailed you a link you can open in order to update your pledge.", 'wporg-5ftf' ),
|
||||
'message' => __( 'Thanks! We’ve emailed you a link you can open in order to update your pledge.', 'wporg-5ftf' ),
|
||||
];
|
||||
} else {
|
||||
$result = [
|
||||
|
@ -109,7 +109,7 @@ function send_manage_email_handler() {
|
|||
}
|
||||
} else {
|
||||
$error_message = sprintf(
|
||||
__( 'That\'s not the address that we have for this pledge. If you don\'t know the email associated with this pledge, <a href="%s">please contact us for help.</a>', 'wporg-5ftf' ),
|
||||
__( 'That’s not the address that we have for this pledge. If you don’t know the email associated with this pledge, <a href="%s">please contact us for help.</a>', 'wporg-5ftf' ),
|
||||
get_permalink( get_page_by_path( 'report' ) )
|
||||
);
|
||||
|
||||
|
|
|
@ -293,13 +293,13 @@ function parse_contributors( $contributors ) {
|
|||
|
||||
if ( ! empty( $invalid_contributors ) ) {
|
||||
/* translators: Used between sponsor names in a list, there is a space after the comma. */
|
||||
$item_separator = _x( ', ', 'list item separator', 'wporg' );
|
||||
$item_separator = _x( ', ', 'list item separator', 'wporg-5ftf' );
|
||||
|
||||
return new WP_Error(
|
||||
'invalid_contributor',
|
||||
sprintf(
|
||||
/* translators: %s is a list of usernames. */
|
||||
__( 'The following contributor usernames are not valid: %s', 'wporg' ),
|
||||
__( 'The following contributor usernames are not valid: %s', 'wporg-5ftf' ),
|
||||
implode( $item_separator, $invalid_contributors )
|
||||
)
|
||||
);
|
||||
|
@ -308,7 +308,7 @@ function parse_contributors( $contributors ) {
|
|||
if ( empty( $sanitized_contributors ) ) {
|
||||
return new WP_Error(
|
||||
'contributor_required',
|
||||
__( 'The pledge must have at least one contributor username.', 'wporg' )
|
||||
__( 'The pledge must have at least one contributor username.', 'wporg-5ftf' )
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -338,7 +338,7 @@ function check_invalid_submission( $submission ) {
|
|||
if ( has_existing_pledge( $email, 'email' ) ) {
|
||||
return new WP_Error(
|
||||
'existing_pledge_email',
|
||||
__( 'This email address is already connected to an existing pledge.', 'wporg' )
|
||||
__( 'This email address is already connected to an existing pledge.', 'wporg-5ftf' )
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -347,7 +347,7 @@ function check_invalid_submission( $submission ) {
|
|||
if ( has_existing_pledge( $domain, 'domain' ) ) {
|
||||
return new WP_Error(
|
||||
'existing_pledge_domain',
|
||||
__( 'A pledge already exists for this domain.', 'wporg' )
|
||||
__( 'A pledge already exists for this domain.', 'wporg-5ftf' )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ add_action( FiveForTheFuture\PREFIX . '_email_result', __NAMESPACE__ . '\capture
|
|||
function add_log_meta_box() {
|
||||
add_meta_box(
|
||||
'activity-log',
|
||||
__( 'Log', 'wordpressorg' ),
|
||||
__( 'Log', 'wporg-5ftf' ),
|
||||
__NAMESPACE__ . '\render_log_meta_box',
|
||||
Pledge\CPT_ID,
|
||||
'advanced',
|
||||
|
|
|
@ -169,7 +169,7 @@ function update_all_cached_pledge_data() {
|
|||
function add_meta_boxes() {
|
||||
add_meta_box(
|
||||
'pledge-email',
|
||||
__( 'Pledge Email', 'wordpressorg' ),
|
||||
__( 'Pledge Email', 'wporg-5ftf' ),
|
||||
__NAMESPACE__ . '\render_meta_boxes',
|
||||
Pledge\CPT_ID,
|
||||
'normal',
|
||||
|
@ -178,7 +178,7 @@ function add_meta_boxes() {
|
|||
|
||||
add_meta_box(
|
||||
'org-info',
|
||||
__( 'Organization Information', 'wordpressorg' ),
|
||||
__( 'Organization Information', 'wporg-5ftf' ),
|
||||
__NAMESPACE__ . '\render_meta_boxes',
|
||||
Pledge\CPT_ID,
|
||||
'normal',
|
||||
|
@ -187,7 +187,7 @@ function add_meta_boxes() {
|
|||
|
||||
add_meta_box(
|
||||
'pledge-contributors',
|
||||
__( 'Contributors', 'wordpressorg' ),
|
||||
__( 'Contributors', 'wporg-5ftf' ),
|
||||
__NAMESPACE__ . '\render_meta_boxes',
|
||||
Pledge\CPT_ID,
|
||||
'normal',
|
||||
|
@ -403,7 +403,7 @@ function has_required_pledge_meta( array $submission ) {
|
|||
$error->add(
|
||||
'required_field_empty',
|
||||
sprintf(
|
||||
__( 'The <code>%s</code> field does not have a value.', 'wporg' ),
|
||||
__( 'The <code>%s</code> field does not have a value.', 'wporg-5ftf' ),
|
||||
sanitize_key( $key )
|
||||
)
|
||||
);
|
||||
|
@ -411,7 +411,7 @@ function has_required_pledge_meta( array $submission ) {
|
|||
$error->add(
|
||||
'required_field_invalid',
|
||||
sprintf(
|
||||
__( 'The <code>%s</code> field has an invalid value.', 'wporg' ),
|
||||
__( 'The <code>%s</code> field has an invalid value.', 'wporg-5ftf' ),
|
||||
sanitize_key( $key )
|
||||
)
|
||||
);
|
||||
|
|
|
@ -58,28 +58,28 @@ function admin_menu() {
|
|||
*/
|
||||
function register_custom_post_type() {
|
||||
$labels = array(
|
||||
'name' => _x( 'Pledges', 'Pledges General Name', 'wporg' ),
|
||||
'singular_name' => _x( 'Pledge', 'Pledge Singular Name', 'wporg' ),
|
||||
'menu_name' => __( 'Five for the Future', 'wporg' ),
|
||||
'archives' => __( 'Pledge Archives', 'wporg' ),
|
||||
'attributes' => __( 'Pledge Attributes', 'wporg' ),
|
||||
'parent_item_colon' => __( 'Parent Pledge:', 'wporg' ),
|
||||
'all_items' => __( 'Pledges', 'wporg' ),
|
||||
'add_new_item' => __( 'Add New Pledge', 'wporg' ),
|
||||
'add_new' => __( 'Add New', 'wporg' ),
|
||||
'new_item' => __( 'New Pledge', 'wporg' ),
|
||||
'edit_item' => __( 'Edit Pledge', 'wporg' ),
|
||||
'update_item' => __( 'Update Pledge', 'wporg' ),
|
||||
'view_item' => __( 'View Pledge', 'wporg' ),
|
||||
'view_items' => __( 'View Pledges', 'wporg' ),
|
||||
'search_items' => __( 'Search Pledges', 'wporg' ),
|
||||
'not_found' => __( 'Not found', 'wporg' ),
|
||||
'not_found_in_trash' => __( 'Not found in Trash', 'wporg' ),
|
||||
'insert_into_item' => __( 'Insert into pledge', 'wporg' ),
|
||||
'uploaded_to_this_item' => __( 'Uploaded to this pledge', 'wporg' ),
|
||||
'items_list' => __( 'Pledges list', 'wporg' ),
|
||||
'items_list_navigation' => __( 'Pledges list navigation', 'wporg' ),
|
||||
'filter_items_list' => __( 'Filter pledges list', 'wporg' ),
|
||||
'name' => _x( 'Pledges', 'Pledges General Name', 'wporg-5ftf' ),
|
||||
'singular_name' => _x( 'Pledge', 'Pledge Singular Name', 'wporg-5ftf' ),
|
||||
'menu_name' => __( 'Five for the Future', 'wporg-5ftf' ),
|
||||
'archives' => __( 'Pledge Archives', 'wporg-5ftf' ),
|
||||
'attributes' => __( 'Pledge Attributes', 'wporg-5ftf' ),
|
||||
'parent_item_colon' => __( 'Parent Pledge:', 'wporg-5ftf' ),
|
||||
'all_items' => __( 'Pledges', 'wporg-5ftf' ),
|
||||
'add_new_item' => __( 'Add New Pledge', 'wporg-5ftf' ),
|
||||
'add_new' => __( 'Add New', 'wporg-5ftf' ),
|
||||
'new_item' => __( 'New Pledge', 'wporg-5ftf' ),
|
||||
'edit_item' => __( 'Edit Pledge', 'wporg-5ftf' ),
|
||||
'update_item' => __( 'Update Pledge', 'wporg-5ftf' ),
|
||||
'view_item' => __( 'View Pledge', 'wporg-5ftf' ),
|
||||
'view_items' => __( 'View Pledges', 'wporg-5ftf' ),
|
||||
'search_items' => __( 'Search Pledges', 'wporg-5ftf' ),
|
||||
'not_found' => __( 'Not found', 'wporg-5ftf' ),
|
||||
'not_found_in_trash' => __( 'Not found in Trash', 'wporg-5ftf' ),
|
||||
'insert_into_item' => __( 'Insert into pledge', 'wporg-5ftf' ),
|
||||
'uploaded_to_this_item' => __( 'Uploaded to this pledge', 'wporg-5ftf' ),
|
||||
'items_list' => __( 'Pledges list', 'wporg-5ftf' ),
|
||||
'items_list_navigation' => __( 'Pledges list navigation', 'wporg-5ftf' ),
|
||||
'filter_items_list' => __( 'Filter pledges list', 'wporg-5ftf' ),
|
||||
);
|
||||
|
||||
$args = array(
|
||||
|
@ -120,8 +120,8 @@ function register_custom_post_status() {
|
|||
register_post_status(
|
||||
FiveForTheFuture\PREFIX . '-deactivated',
|
||||
array(
|
||||
'label' => __( 'Deactivated', 'wporg' ),
|
||||
'label_count' => _n_noop( 'Deactivated <span class="count">(%s)</span>', 'Deactivated <span class="count">(%s)</span>', 'wporg' ),
|
||||
'label' => __( 'Deactivated', 'wporg-5ftf' ),
|
||||
'label_count' => _n_noop( 'Deactivated <span class="count">(%s)</span>', 'Deactivated <span class="count">(%s)</span>', 'wporg-5ftf' ),
|
||||
'public' => false,
|
||||
'internal' => false,
|
||||
'protected' => true,
|
||||
|
@ -142,8 +142,8 @@ function add_list_table_columns( $columns ) {
|
|||
$last = array_slice( $columns, 2, null, true );
|
||||
|
||||
$new_columns = array(
|
||||
'contributor_counts' => __( 'Contributors', 'wporg' ),
|
||||
'domain' => __( 'Domain', 'wporg' ),
|
||||
'contributor_counts' => __( 'Contributors', 'wporg-5ftf' ),
|
||||
'domain' => __( 'Domain', 'wporg-5ftf' ),
|
||||
);
|
||||
|
||||
return array_merge( $first, $new_columns, $last );
|
||||
|
|
|
@ -17,7 +17,7 @@ use WP_Post;
|
|||
<p>
|
||||
<?php
|
||||
printf(
|
||||
wp_kses_post( __( "Thank you for confirming your address! We've emailed confirmation links to the contributors you mentioned, and your pledge will show up in <a href=\"%s\">the directory</a> once one contributor confirms their participation.", 'wporg' ) ),
|
||||
wp_kses_post( __( 'Thank you for confirming your address! We’ve emailed confirmation links to the contributors you mentioned, and your pledge will show up in <a href=\"%s\">the directory</a> once one contributor confirms their participation.', 'wporg-5ftf' ) ),
|
||||
esc_url( $directory_url )
|
||||
);
|
||||
?>
|
||||
|
@ -26,7 +26,7 @@ use WP_Post;
|
|||
<?php if ( $pledge instanceof WP_Post ) : ?>
|
||||
<p>
|
||||
<?php echo wp_kses_post( sprintf(
|
||||
__( 'In the meantime, your pledge will be visible here: %s', 'wporg' ),
|
||||
__( 'In the meantime, your pledge will be visible here: %s', 'wporg-5ftf' ),
|
||||
sprintf(
|
||||
'<a href="%1$s">%1$s</a>',
|
||||
esc_url( get_permalink( $pledge ) )
|
||||
|
@ -36,7 +36,7 @@ use WP_Post;
|
|||
<?php endif; ?>
|
||||
|
||||
<p>
|
||||
<?php esc_html_e( "Thanks again for pledging your organization's resources to contribute to WordPress! We can do great things together!", 'wporg' ); ?>
|
||||
<?php esc_html_e( 'Thanks again for pledging your organization’s resources to contribute to WordPress! We can do great things together!', 'wporg-5ftf' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
|||
type="submit"
|
||||
id="5ftf-pledge-submit"
|
||||
name="action"
|
||||
value="<?php esc_attr_e( 'Update Pledge', 'wporg' ); ?>"
|
||||
value="<?php esc_attr_e( 'Update Pledge', 'wporg-5ftf' ); ?>"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -24,12 +24,12 @@ require __DIR__ . '/partial-result-messages.php';
|
|||
|
||||
<div id="form-messages" class="notice notice-success notice-alt">
|
||||
<p>
|
||||
<?php esc_html_e( "Thanks for pledging to Five for the Future! Your new pledge profile has been created, and we've emailed you a link to confirm your address. Once that's done, we'll also email confirmation links to the contributors you named in your pledge.", 'wporg' ); ?>
|
||||
<?php esc_html_e( "Thanks for pledging to Five for the Future! Your new pledge profile has been created, and we've emailed you a link to confirm your address. Once that's done, we'll also email confirmation links to the contributors you named in your pledge.", 'wporg-5ftf' ); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo wp_kses_post( sprintf(
|
||||
__( "After those steps are completed (and at least one contributor confirms), your pledge will appear in <a href=\"%s\">the directory</a>. Once each contributor has confirmed, they'll appear on your pledge as well.", 'wporg' ),
|
||||
__( "After those steps are completed (and at least one contributor confirms), your pledge will appear in <a href=\"%s\">the directory</a>. Once each contributor has confirmed, they'll appear on your pledge as well.", 'wporg-5ftf' ),
|
||||
esc_url( $directory_url )
|
||||
) ); ?>
|
||||
</p>
|
||||
|
@ -37,7 +37,7 @@ require __DIR__ . '/partial-result-messages.php';
|
|||
<p>
|
||||
<?php echo wp_kses_post(
|
||||
sprintf(
|
||||
__( 'Do you want to hire additional employees to contribute to WordPress? <a href="%s">Consider posting a job listing on jobs.wordpress.net</a>.', 'wporg' ),
|
||||
__( 'Do you want to hire additional employees to contribute to WordPress? <a href="%s">Consider posting a job listing on jobs.wordpress.net</a>.', 'wporg-5ftf' ),
|
||||
'https://jobs.wordpress.net'
|
||||
)
|
||||
); ?>
|
||||
|
@ -59,7 +59,7 @@ require __DIR__ . '/partial-result-messages.php';
|
|||
type="submit"
|
||||
id="5ftf-pledge-submit"
|
||||
name="action"
|
||||
value="<?php esc_attr_e( 'Submit Pledge', 'wporg' ); ?>"
|
||||
value="<?php esc_attr_e( 'Submit Pledge', 'wporg-5ftf' ); ?>"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
|
|||
|
||||
<div class="form-field">
|
||||
<label for="5ftf-pledge-contributors">
|
||||
<?php esc_html_e( 'Contributor Usernames', 'wordpressorg' ); ?>
|
||||
<?php esc_html_e( 'Contributor Usernames', 'wporg-5ftf' ); ?>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
|
@ -19,6 +19,6 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
|
|||
aria-describedby="5ftf-pledge-contributors-help"
|
||||
/>
|
||||
<p id="5ftf-pledge-contributors-help">
|
||||
<?php esc_html_e( 'Separate each WordPress.org username with a comma.', 'wordpressorg' ); ?>
|
||||
<?php esc_html_e( 'Separate each WordPress.org username with a comma.', 'wporg-5ftf' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@ use WP_Post;
|
|||
|
||||
<div class="form-field">
|
||||
<label for="5ftf-pledge-email">
|
||||
<?php esc_html_e( 'Administrator Email Address', 'wordpressorg' ); ?>
|
||||
<?php esc_html_e( 'Administrator Email Address', 'wporg-5ftf' ); ?>
|
||||
</label>
|
||||
<input
|
||||
type="email"
|
||||
|
@ -26,19 +26,19 @@ use WP_Post;
|
|||
<?php echo $readonly ? 'readonly' : ''; ?>
|
||||
/>
|
||||
<p id="5ftf-pledge-email-help">
|
||||
<?php esc_html_e( "This address will be used to confirm your organization’s contribution profile, and later manage any changes. Please make sure that it's a group address (e.g., wp-contributors@example.com) so that it persists across employee transitions.", 'wordpressorg' ); ?>
|
||||
<?php esc_html_e( 'This address will be used to confirm your organization’s contribution profile, and later manage any changes. Please make sure that it’s a group address (e.g., wp-contributors@example.com) so that it persists across employee transitions.', 'wporg-5ftf' ); ?>
|
||||
</p>
|
||||
|
||||
<?php if ( is_admin() ) : ?>
|
||||
<?php if ( $data['pledge-email-confirmed'] ) : ?>
|
||||
<p class="email-status is-confirmed">
|
||||
<span class="dashicons dashicons-yes-alt" aria-hidden="true"></span>
|
||||
<?php esc_html_e( 'Confirmed', 'wporg' ); ?>
|
||||
<?php esc_html_e( 'Confirmed', 'wporg-5ftf' ); ?>
|
||||
</p>
|
||||
<?php else : ?>
|
||||
<p class="email-status is-unconfirmed">
|
||||
<span class="dashicons dashicons-warning" aria-hidden="true"></span>
|
||||
<?php esc_html_e( 'Unconfirmed', 'wporg' ); ?>
|
||||
<?php esc_html_e( 'Unconfirmed', 'wporg-5ftf' ); ?>
|
||||
</p>
|
||||
<?php submit_button(
|
||||
'Resend Confirmation',
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
|
|||
|
||||
<div class="form-field">
|
||||
<label for="5ftf-org-name">
|
||||
<?php esc_html_e( 'Organization Name', 'wordpressorg' ); ?>
|
||||
<?php esc_html_e( 'Organization Name', 'wporg-5ftf' ); ?>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
|
@ -22,7 +22,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
|
|||
<?php if ( ! is_admin() ) : ?>
|
||||
<div class="form-field form-field__logo">
|
||||
<label for="5ftf-org-logo">
|
||||
<?php esc_html_e( 'Logo', 'wordpressorg' ); ?>
|
||||
<?php esc_html_e( 'Logo', 'wporg-5ftf' ); ?>
|
||||
</label>
|
||||
<br />
|
||||
<input
|
||||
|
@ -35,7 +35,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
|
|||
|
||||
<div class="form-field">
|
||||
<label for="5ftf-org-url">
|
||||
<?php esc_html_e( 'Website Address', 'wordpressorg' ); ?>
|
||||
<?php esc_html_e( 'Website Address', 'wporg-5ftf' ); ?>
|
||||
</label>
|
||||
<input
|
||||
type="url"
|
||||
|
@ -50,7 +50,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
|
|||
|
||||
<div class="form-field">
|
||||
<label for="5ftf-org-description">
|
||||
<?php esc_html_e( 'Organization Blurb', 'wordpressorg' ); ?>
|
||||
<?php esc_html_e( 'Organization Blurb', 'wporg-5ftf' ); ?>
|
||||
</label>
|
||||
<textarea
|
||||
id="5ftf-org-description"
|
||||
|
|
|
@ -10,7 +10,7 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
|||
|
||||
<script type="text/template" id="tmpl-5ftf-contributor-lists">
|
||||
<# if ( data.publish.length ) { #>
|
||||
<h3 class="contributor-list-heading"><?php esc_html_e( 'Confirmed', 'wporg' ); ?></h3>
|
||||
<h3 class="contributor-list-heading"><?php esc_html_e( 'Confirmed', 'wporg-5ftf' ); ?></h3>
|
||||
<table class="contributor-list publish striped widefat">
|
||||
<thead>
|
||||
<th scope="col"><?php esc_html_e( 'Contributor', 'wporg-5ftf' ); ?></th>
|
||||
|
@ -21,7 +21,7 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
|||
</table>
|
||||
<# } #>
|
||||
<# if ( data.pending.length ) { #>
|
||||
<h3 class="contributor-list-heading"><?php esc_html_e( 'Unconfirmed', 'wporg' ); ?></h3>
|
||||
<h3 class="contributor-list-heading"><?php esc_html_e( 'Unconfirmed', 'wporg-5ftf' ); ?></h3>
|
||||
<table class="contributor-list pending striped widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -84,7 +84,7 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
|||
);
|
||||
?>
|
||||
<?php else : ?>
|
||||
<p><?php esc_html_e( 'There are no contributors added to this pledge yet.', 'wporg' ); ?></p>
|
||||
<p><?php esc_html_e( 'There are no contributors added to this pledge yet.', 'wporg-5ftf' ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
|
@ -99,6 +99,6 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
|||
class="button-primary"
|
||||
data-action="add-contributor"
|
||||
>
|
||||
<?php esc_html_e( 'Add new contributors', 'wporg' ); ?>
|
||||
<?php esc_html_e( 'Add new contributors', 'wporg-5ftf' ); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -20,26 +20,26 @@ $allowed_html = array_merge(
|
|||
wp_kses_allowed_html( 'data' ),
|
||||
array(
|
||||
'span' => array(
|
||||
'class' => true
|
||||
)
|
||||
'class' => true,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$more = sprintf(
|
||||
__( '… <a href="%s">continue reading <span class="screen-reader-text">%s</span></a>', 'wporg-5ftf' ),
|
||||
$more_text = sprintf(
|
||||
__( '… <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 )
|
||||
|
|
Loading…
Reference in a new issue