diff --git a/admin/hooks/admin-post-thumbnail-html.php b/admin/hooks/admin-post-thumbnail-html.php index 78848273..6f3d6939 100644 --- a/admin/hooks/admin-post-thumbnail-html.php +++ b/admin/hooks/admin-post-thumbnail-html.php @@ -2,16 +2,16 @@ function sportspress_admin_post_thumbnail_html( $translated_text, $post_id ) { $texts = array( 'sp_team' => array( - 'Set featured image' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Logo', 'sportspress' ) ), - 'Remove featured image' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Logo', 'sportspress' ) ), + 'Set featured image' => __( 'Select Logo', 'sportspress' ), + 'Remove featured image' => __( 'Remove Logo', 'sportspress' ), ), 'sp_player' => array( - 'Set featured image' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ), - 'Remove featured image' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ), + 'Set featured image' => __( 'Select Photo', 'sportspress' ), + 'Remove featured image' => __( 'Remove Photo', 'sportspress' ), ), 'sp_staff' => array( - 'Set featured image' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ), - 'Remove featured image' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ), + 'Set featured image' => __( 'Select Photo', 'sportspress' ), + 'Remove featured image' => __( 'Remove Photo', 'sportspress' ), ), ); diff --git a/admin/hooks/gettext.php b/admin/hooks/gettext.php index fc1b54c3..99a77de3 100644 --- a/admin/hooks/gettext.php +++ b/admin/hooks/gettext.php @@ -9,13 +9,13 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain ) { $translated_text = __( 'Team', 'sportspress' ); break; case 'Set featured image': - $translated_text = sprintf( __( 'Select %s', 'sportspress' ), __( 'Logo', 'sportspress' ) ); + $translated_text = __( 'Select Logo', 'sportspress' ); break; case 'Set Featured Image': - $translated_text = sprintf( __( 'Select %s', 'sportspress' ), __( 'Logo', 'sportspress' ) ); + $translated_text = __( 'Select Logo', 'sportspress' ); break; case 'Remove featured image': - $translated_text = sprintf( __( 'Remove %s', 'sportspress' ), __( 'Logo', 'sportspress' ) ); + $translated_text = __( 'Remove Logo', 'sportspress' ); break; endswitch; elseif ( in_array( $typenow, array( 'sp_event', 'sp_player', 'sp_staff' ) ) ): @@ -24,13 +24,13 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain ) { $translated_text = __( '(Auto)', 'sportspress' ); break; case 'Set featured image': - $translated_text = sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ); + $translated_text = __( 'Select Photo', 'sportspress' ); break; case 'Set Featured Image': - $translated_text = sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ); + $translated_text = __( 'Select Photo', 'sportspress' ); break; case 'Remove featured image': - $translated_text = sprintf( __( 'Remove %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ); + $translated_text = __( 'Remove Photo', 'sportspress' ); break; case 'Scheduled for: %1$s': $translated_text = __( 'Date/Time: %1$s', 'sportspress' ); diff --git a/admin/hooks/media-buttons.php b/admin/hooks/media-buttons.php index e4a34198..f8c0060f 100644 --- a/admin/hooks/media-buttons.php +++ b/admin/hooks/media-buttons.php @@ -4,8 +4,8 @@ function sportspress_media_buttons() { //if ( ! in_array( array('post.php', 'page.php', 'page-new.php', 'post-new.php') ?> - - + + labels->singular_name ) . - ' ' . - sprintf( __( 'Edit %s', 'sportspress' ), $obj->labels->name ) . ''; + for ( $i = 0; $i <= 10; $i++ ): + $messages['post'][ $i ] = __( 'Settings saved.', 'sportspress' ) . + ' ' . + __( 'View all', 'sportspress' ) . ''; + endfor; elseif ( in_array( $typenow, array( 'sp_event', 'sp_team', 'sp_table', 'sp_player', 'sp_list', 'sp_staff' ) ) ): $obj = get_post_type_object( $typenow ); - $messages['post'][1] = sprintf( __( '%s updated.', 'sportspress' ), $obj->labels->singular_name ) . + $messages['post'][1] = __( 'Changes saved.', 'sportspress' ) . ' ' . $obj->labels->view_item . ''; - $messages['post'][4] = sprintf( __( '%s updated.', 'sportspress' ), $obj->labels->singular_name ); + $messages['post'][4] = __( 'Changes saved.', 'sportspress' ); - $messages['post'][6] = sprintf( __( '%s published.', 'sportspress' ), $obj->labels->singular_name ) . + $messages['post'][6] = __( 'Success!', 'sportspress' ) . ' ' . $obj->labels->view_item . ''; - $messages['post'][7] = sprintf( __( '%s saved.', 'sportspress' ), $obj->labels->singular_name ); + $messages['post'][7] = __( 'Changes saved.', 'sportspress' ); - $messages['post'][8] = sprintf( __( '%s submitted.', 'sportspress' ), $obj->labels->singular_name ) . + $messages['post'][8] = __( 'Success!', 'sportspress' ) . ' ' . sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; $messages['post'][9] = sprintf( - __( '%s scheduled for: %s.', 'sportspress' ), + __( 'Scheduled for: %1$s.', 'sportspress' ), date_i18n( __( 'M j, Y @ G:i', 'sportspress' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post->ID) ) ) . ' ' . sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; - $messages['post'][8] = sprintf( __( '%s draft updated.', 'sportspress' ), $obj->labels->singular_name ) . + $messages['post'][10] = __( 'Success!', 'sportspress' ) . ' ' . sprintf( __( 'Preview %s', 'sportspress' ), $obj->labels->singular_name ) . ''; diff --git a/admin/hooks/restrict-manage-posts.php b/admin/hooks/restrict-manage-posts.php index c08d8159..270108c2 100644 --- a/admin/hooks/restrict-manage-posts.php +++ b/admin/hooks/restrict-manage-posts.php @@ -5,7 +5,7 @@ function sportspress_restrict_manage_posts() { if ( in_array( $typenow, array( 'sp_event', 'sp_player', 'sp_staff', 'sp_table', 'sp_list' ) ) ): $selected = isset( $_REQUEST['sp_team'] ) ? $_REQUEST['sp_team'] : null; $args = array( - 'show_option_none' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ), + 'show_option_none' => __( 'All Teams', 'sportspress' ), 'post_type' => 'sp_team', 'name' => 'sp_team', 'selected' => $selected @@ -15,7 +15,7 @@ function sportspress_restrict_manage_posts() { if ( in_array( $typenow, array( 'sp_player' ) ) ): $selected = isset( $_REQUEST['sp_position'] ) ? $_REQUEST['sp_position'] : null; $args = array( - 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Positions', 'sportspress' ) ), + 'show_option_all' => __( 'All Positions', 'sportspress' ), 'taxonomy' => 'sp_position', 'name' => 'sp_position', 'selected' => $selected @@ -25,7 +25,7 @@ function sportspress_restrict_manage_posts() { if ( in_array( $typenow, array( 'sp_team', 'sp_event', 'sp_player', 'sp_staff', 'sp_table', 'sp_list' ) ) ): $selected = isset( $_REQUEST['sp_season'] ) ? $_REQUEST['sp_season'] : null; $args = array( - 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ), + 'show_option_all' => __( 'All Seasons', 'sportspress' ), 'taxonomy' => 'sp_season', 'name' => 'sp_season', 'selected' => $selected @@ -37,7 +37,7 @@ function sportspress_restrict_manage_posts() { $args = array( 'post_type' => 'sp_team', 'name' => 'team', - 'show_option_none' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ), + 'show_option_none' => __( 'All Teams', 'sportspress' ), 'selected' => $selected, 'values' => 'ID', ); diff --git a/admin/post-types/column.php b/admin/post-types/column.php index 58ff84c2..9e26a410 100644 --- a/admin/post-types/column.php +++ b/admin/post-types/column.php @@ -1,11 +1,18 @@ __( 'Columns', 'sportspress' ), + 'singular_name' => __( 'Column', 'sportspress' ), + 'add_new_item' => __( 'Add New Column', 'sportspress' ), + 'edit_item' => __( 'Edit Column', 'sportspress' ), + 'new_item' => __( 'New Column', 'sportspress' ), + 'view_item' => __( 'View Column', 'sportspress' ), + 'search_items' => __( 'Search Columns', 'sportspress' ), + 'not_found' => __( 'No columns found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No columns found in trash.', 'sportspress' ), + ); $args = array( - 'label' => $name, + 'label' => __( 'Columns', 'sportspress' ), 'labels' => $labels, 'public' => false, 'show_ui' => true, diff --git a/admin/post-types/event.php b/admin/post-types/event.php index 52b7e7bc..d93b7a5e 100644 --- a/admin/post-types/event.php +++ b/admin/post-types/event.php @@ -3,17 +3,14 @@ function sportspress_event_post_init() { $labels = array( 'name' => __( 'Schedule', 'sportspress' ), 'singular_name' => __( 'Event', 'sportspress' ), - 'menu_name' => __( 'Schedule', 'sportspress' ), 'all_items' => __( 'Events', 'sportspress' ), - 'add_new' => sprintf( __( 'Add Event', 'sportspress' ), __( 'Event', 'sportspress' ) ), - 'add_new_item' => sprintf( __( 'Add New %s', 'sportspress' ), __( 'Event', 'sportspress' ) ), - 'edit_item' => sprintf( __( 'Edit %s', 'sportspress' ), __( 'Event', 'sportspress' ) ), - 'new_item' => sprintf( __( 'New %s', 'sportspress' ), __( 'Event', 'sportspress' ) ), - 'view_item' => sprintf( __( 'View %s', 'sportspress' ), __( 'Event', 'sportspress' ) ), - 'search_items' => sprintf( __( 'Search %s', 'sportspress' ), __( 'Events', 'sportspress' ) ), - 'not_found' => sprintf( __( 'No %s found.', 'sportspress' ), __( 'events', 'sportspress' ) ), - 'not_found_in_trash' => sprintf( __( 'No %s found in trash.', 'sportspress' ), __( 'events', 'sportspress' ) ), - 'parent_item_colon' => sprintf( __( 'Parent %s', 'sportspress' ), __( 'Event', 'sportspress' ) ) . ':' + 'add_new_item' => __( 'Add New Event', 'sportspress' ), + 'edit_item' => __( 'Edit Event', 'sportspress' ), + 'new_item' => __( 'New Event', 'sportspress' ), + 'view_item' => __( 'View Event', 'sportspress' ), + 'search_items' => __( 'Search Events', 'sportspress' ), + 'not_found' => __( 'No events found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No events found in trash.', 'sportspress' ), ); $args = array( 'label' => __( 'Events', 'sportspress' ), @@ -79,7 +76,7 @@ function sportspress_event_details_meta( $post ) { 'show_option_none' => __( '-- Not set --', 'sportspress' ), ); if ( ! sportspress_dropdown_taxonomies( $args ) ): - sportspress_taxonomy_adder( 'sp_league', 'sp_team' ); + sportspress_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New League', 'sportspress' ) ); endif; ?>
@@ -94,7 +91,7 @@ function sportspress_event_details_meta( $post ) { 'show_option_none' => __( '-- Not set --', 'sportspress' ), ); if ( ! sportspress_dropdown_taxonomies( $args ) ): - sportspress_taxonomy_adder( 'sp_season', 'sp_team' ); + sportspress_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New Season', 'sportspress' ) ); endif; ?> @@ -109,7 +106,7 @@ function sportspress_event_details_meta( $post ) { 'show_option_none' => __( '-- Not set --', 'sportspress' ), ); if ( ! sportspress_dropdown_taxonomies( $args ) ): - sportspress_taxonomy_adder( 'sp_venue', 'sp_event' ); + sportspress_taxonomy_adder( 'sp_venue', 'sp_event', __( 'Add New Venue', 'sportspress' ) ); endif; ?> diff --git a/admin/post-types/list.php b/admin/post-types/list.php index 436f7822..8d94d684 100644 --- a/admin/post-types/list.php +++ b/admin/post-types/list.php @@ -1,11 +1,18 @@ __( 'Player Lists', 'sportspress' ), + 'singular_name' => __( 'Player List', 'sportspress' ), + 'add_new_item' => __( 'Add New Player List', 'sportspress' ), + 'edit_item' => __( 'Edit Player List', 'sportspress' ), + 'new_item' => __( 'New Player List', 'sportspress' ), + 'view_item' => __( 'View Player List', 'sportspress' ), + 'search_items' => __( 'Search Player Lists', 'sportspress' ), + 'not_found' => __( 'No player lists found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No player lists found in trash.', 'sportspress' ), + ); $args = array( - 'label' => $name, + 'label' => __( 'Player Lists', 'sportspress' ), 'labels' => $labels, 'public' => true, 'has_archive' => false, @@ -67,7 +74,7 @@ function sportspress_list_player_meta( $post ) { 'values' => 'term_id', ); if ( ! sportspress_dropdown_taxonomies( $args ) ): - sportspress_taxonomy_adder( 'sp_league', 'sp_team' ); + sportspress_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New League', 'sportspress' ) ); endif; ?> @@ -81,7 +88,7 @@ function sportspress_list_player_meta( $post ) { 'values' => 'term_id', ); if ( ! sportspress_dropdown_taxonomies( $args ) ): - sportspress_taxonomy_adder( 'sp_season', 'sp_team' ); + sportspress_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New Season', 'sportspress' ) ); endif; ?> @@ -91,12 +98,12 @@ function sportspress_list_player_meta( $post ) { $args = array( 'post_type' => 'sp_team', 'name' => 'sp_team', - 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ), + 'show_option_all' => __( 'All Teams', 'sportspress' ), 'selected' => $team_id, 'values' => 'ID', ); if ( ! sportspress_dropdown_pages( $args ) ): - sportspress_post_adder( 'sp_team' ); + sportspress_post_adder( 'sp_team', __( 'Add New Team', 'sportspress' ) ); endif; ?> @@ -115,7 +122,7 @@ function sportspress_list_player_meta( $post ) { 'values' => 'slug', ); if ( ! sportspress_dropdown_pages( $args ) ): - sportspress_post_adder( 'sp_list' ); + sportspress_post_adder( 'sp_list', __( 'Add New Player List', 'sportspress' ) ); endif; ?> @@ -129,7 +136,7 @@ function sportspress_list_player_meta( $post ) {ID, 'sp_player', 'block', 'sp_team' ); - sportspress_post_adder( 'sp_player' ); + sportspress_post_adder( 'sp_player', __( 'Add New Player', 'sportspress' ) ); ?> __( 'Metrics', 'sportspress' ), + 'singular_name' => __( 'Metric', 'sportspress' ), + 'add_new_item' => __( 'Add New Metric', 'sportspress' ), + 'edit_item' => __( 'Edit Metric', 'sportspress' ), + 'new_item' => __( 'New Metric', 'sportspress' ), + 'view_item' => __( 'View Metric', 'sportspress' ), + 'search_items' => __( 'Search Metrics', 'sportspress' ), + 'not_found' => __( 'No metrics found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No metrics found in trash.', 'sportspress' ), + ); $args = array( - 'label' => $name, + 'label' => __( 'Metrics', 'sportspress' ), 'labels' => $labels, 'public' => false, 'show_ui' => true, diff --git a/admin/post-types/outcome.php b/admin/post-types/outcome.php index d43f581e..acd99040 100644 --- a/admin/post-types/outcome.php +++ b/admin/post-types/outcome.php @@ -1,11 +1,18 @@ __( 'Outcomes', 'sportspress' ), + 'singular_name' => __( 'Outcome', 'sportspress' ), + 'add_new_item' => __( 'Add New Outcome', 'sportspress' ), + 'edit_item' => __( 'Edit Outcome', 'sportspress' ), + 'new_item' => __( 'New Outcome', 'sportspress' ), + 'view_item' => __( 'View Outcome', 'sportspress' ), + 'search_items' => __( 'Search Outcomes', 'sportspress' ), + 'not_found' => __( 'No outcomes found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No outcomes found in trash.', 'sportspress' ), + ); $args = array( - 'label' => $name, + 'label' => __( 'Outcomes', 'sportspress' ), 'labels' => $labels, 'public' => false, 'show_ui' => true, diff --git a/admin/post-types/player.php b/admin/post-types/player.php index 110d151e..3d42d77e 100644 --- a/admin/post-types/player.php +++ b/admin/post-types/player.php @@ -1,11 +1,18 @@ __( 'Players', 'sportspress' ), + 'singular_name' => __( 'Player', 'sportspress' ), + 'add_new_item' => __( 'Add New Player', 'sportspress' ), + 'edit_item' => __( 'Edit Player', 'sportspress' ), + 'new_item' => __( 'New Player', 'sportspress' ), + 'view_item' => __( 'View Player', 'sportspress' ), + 'search_items' => __( 'Search Players', 'sportspress' ), + 'not_found' => __( 'No players found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No players found in trash.', 'sportspress' ), + ); $args = array( - 'label' => $name, + 'label' => __( 'Players', 'sportspress' ), 'labels' => $labels, 'public' => true, 'has_archive' => false, @@ -227,7 +234,7 @@ function sportspress_player_metrics_meta( $post ) { __( 'Results', 'sportspress' ), + 'singular_name' => __( 'Result', 'sportspress' ), + 'add_new_item' => __( 'Add New Result', 'sportspress' ), + 'edit_item' => __( 'Edit Result', 'sportspress' ), + 'new_item' => __( 'New Result', 'sportspress' ), + 'view_item' => __( 'View Result', 'sportspress' ), + 'search_items' => __( 'Search Results', 'sportspress' ), + 'not_found' => __( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No results found in trash.', 'sportspress' ), + ); $args = array( - 'label' => $name, + 'label' => __( 'Results', 'sportspress' ), 'labels' => $labels, 'public' => false, 'show_ui' => true, diff --git a/admin/post-types/staff.php b/admin/post-types/staff.php index aca7752d..7f8cedd5 100644 --- a/admin/post-types/staff.php +++ b/admin/post-types/staff.php @@ -1,11 +1,18 @@ __( 'Staff', 'sportspress' ), + 'singular_name' => __( 'Staff', 'sportspress' ), + 'add_new_item' => __( 'Add New Staff', 'sportspress' ), + 'edit_item' => __( 'Edit Staff', 'sportspress' ), + 'new_item' => __( 'New Staff', 'sportspress' ), + 'view_item' => __( 'View Staff', 'sportspress' ), + 'search_items' => __( 'Search Staff', 'sportspress' ), + 'not_found' => __( 'No staff found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No staff found in trash.', 'sportspress' ), + ); $args = array( - 'label' => $name, + 'label' => __( 'Staff', 'sportspress' ), 'labels' => $labels, 'public' => true, 'has_archive' => false, @@ -30,7 +37,7 @@ function sportspress_staff_meta_init() { } function sportspress_staff_team_meta( $post ) { sportspress_post_checklist( $post->ID, 'sp_team' ); - sportspress_post_adder( 'sp_team' ); + sportspress_post_adder( 'sp_team', __( 'Add New Team', 'sportspress' ) ); sportspress_nonce(); } diff --git a/admin/post-types/statistic.php b/admin/post-types/statistic.php index a45f951a..37caff21 100644 --- a/admin/post-types/statistic.php +++ b/admin/post-types/statistic.php @@ -1,11 +1,18 @@ __( 'Statistics', 'sportspress' ), + 'singular_name' => __( 'Statistic', 'sportspress' ), + 'add_new_item' => __( 'Add New Statistic', 'sportspress' ), + 'edit_item' => __( 'Edit Statistic', 'sportspress' ), + 'new_item' => __( 'New Statistic', 'sportspress' ), + 'view_item' => __( 'View Statistic', 'sportspress' ), + 'search_items' => __( 'Search Statistics', 'sportspress' ), + 'not_found' => __( 'No statistics found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No statistics found in trash.', 'sportspress' ), + ); $args = array( - 'label' => $name, + 'label' => __( 'Statistics', 'sportspress' ), 'labels' => $labels, 'public' => false, 'show_ui' => true, diff --git a/admin/post-types/table.php b/admin/post-types/table.php index 0a211822..c80a47ad 100644 --- a/admin/post-types/table.php +++ b/admin/post-types/table.php @@ -1,11 +1,18 @@ __( 'League Tables', 'sportspress' ), + 'singular_name' => __( 'League Table', 'sportspress' ), + 'add_new_item' => __( 'Add New League Table', 'sportspress' ), + 'edit_item' => __( 'Edit League Table', 'sportspress' ), + 'new_item' => __( 'New League Table', 'sportspress' ), + 'view_item' => __( 'View League Table', 'sportspress' ), + 'search_items' => __( 'Search League Tables', 'sportspress' ), + 'not_found' => __( 'No league tables found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No league tables found in trash.', 'sportspress' ), + ); $args = array( - 'label' => $name, + 'label' => __( 'League Tables', 'sportspress' ), 'labels' => $labels, 'public' => true, 'has_archive' => false, @@ -63,7 +70,7 @@ function sportspress_table_team_meta( $post, $test ) { 'values' => 'term_id' ); if ( ! sportspress_dropdown_taxonomies( $args ) ): - sportspress_taxonomy_adder( 'sp_league', 'sp_team' ); + sportspress_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New League', 'sportspress' ) ); endif; ?> @@ -77,14 +84,14 @@ function sportspress_table_team_meta( $post, $test ) { 'values' => 'term_id' ); if ( ! sportspress_dropdown_taxonomies( $args ) ): - sportspress_taxonomy_adder( 'sp_season', 'sp_team' ); + sportspress_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New Season', 'sportspress' ) ); endif; ?>
ID, 'sp_team', 'block', 'sp_season' ); - sportspress_post_adder( 'sp_team' ); + sportspress_post_adder( 'sp_team', __( 'Add New Team', 'sportspress' ) ); ?> __( 'Teams', 'sportspress' ), + 'singular_name' => __( 'Team', 'sportspress' ), + 'add_new_item' => __( 'Add New Team', 'sportspress' ), + 'edit_item' => __( 'Edit Team', 'sportspress' ), + 'new_item' => __( 'New Team', 'sportspress' ), + 'view_item' => __( 'View Team', 'sportspress' ), + 'search_items' => __( 'Search Teams', 'sportspress' ), + 'not_found' => __( 'No teams found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No teams found in trash.', 'sportspress' ), + 'parent_item_colon' => __( 'Parent Team:', 'sportspress' ), + ); $args = array( - 'label' => $name, + 'label' => __( 'Teams', 'sportspress' ), 'labels' => $labels, 'public' => true, 'has_archive' => false, diff --git a/admin/settings/events.php b/admin/settings/events.php index 7f956c80..cd9dbcad 100644 --- a/admin/settings/events.php +++ b/admin/settings/events.php @@ -29,7 +29,7 @@ $data = get_posts( $args );
' . __( 'All done!', 'sportspress' ) . ' ' . sprintf( __( 'View %s', 'sportspress' ), __( 'Players', 'sportspress' ) ) . '' . '
'; + echo '' . __( 'All done!', 'sportspress' ) . ' ' . __( 'View Players', 'sportspress' ) . '' . '
'; do_action( 'import_end' ); } @@ -261,7 +261,7 @@ if ( class_exists( 'WP_Importer' ) ) { * @return void */ function header() { - echo '' . __( 'All done!', 'sportspress' ) . ' ' . sprintf( __( 'View %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ) . '' . '
'; + echo '' . __( 'All done!', 'sportspress' ) . ' ' . __( 'View Teams', 'sportspress' ) . '' . '
'; do_action( 'import_end' ); } @@ -220,7 +220,7 @@ if ( class_exists( 'WP_Importer' ) ) { * @return void */ function header() { - echo '-
+
'sp_event', @@ -48,13 +48,13 @@ class SP_Widget_Countdown extends WP_Widget { 'post_status' => 'future', ); if ( ! sportspress_dropdown_pages( $args ) ): - sportspress_post_adder( 'sp_event' ); + sportspress_post_adder( 'sp_event', __( 'Add New Event', 'sportspress' ) ); endif; ?>
> -
+ $this->get_field_name('league'), 'id' => $this->get_field_id('league'), 'selected' => $league, - 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ), + 'show_option_all' => __( 'All Leagues', 'sportspress' ), 'hide_empty' => 0, 'values' => 'term_id', 'class' => 'widefat', @@ -78,7 +78,7 @@ class SportsPress_Widget_Future_Events extends WP_Widget { 'name' => $this->get_field_name('season'), 'id' => $this->get_field_id('season'), 'selected' => $season, - 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ), + 'show_option_all' => __( 'All Seasons', 'sportspress' ), 'hide_empty' => 0, 'values' => 'term_id', 'class' => 'widefat', @@ -94,7 +94,7 @@ class SportsPress_Widget_Future_Events extends WP_Widget { 'name' => $this->get_field_name('venue'), 'id' => $this->get_field_id('venue'), 'selected' => $venue, - 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Venues', 'sportspress' ) ), + 'show_option_all' => __( 'All Venues', 'sportspress' ), 'hide_empty' => 0, 'values' => 'term_id', 'class' => 'widefat', @@ -110,17 +110,17 @@ class SportsPress_Widget_Future_Events extends WP_Widget { 'name' => $this->get_field_name('team'), 'id' => $this->get_field_id('team'), 'selected' => $team, - 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ), + 'show_option_all' => __( 'All Teams', 'sportspress' ), 'values' => 'ID', 'class' => 'widefat', ); if ( ! sportspress_dropdown_pages( $args ) ): - sportspress_post_adder( 'sp_table' ); + sportspress_post_adder( 'sp_table', __( 'Add New League Table', 'sportspress' ) ); endif; ?> -+
-
+
'sp_table', @@ -49,7 +49,7 @@ class SportsPress_Widget_League_Table extends WP_Widget { 'class' => 'widefat', ); if ( ! sportspress_dropdown_pages( $args ) ): - sportspress_post_adder( 'sp_table' ); + sportspress_post_adder( 'sp_table', __( 'Add New League Table', 'sportspress' ) ); endif; ?>
diff --git a/admin/widgets/player-list.php b/admin/widgets/player-list.php index c5fbf850..cc5ae278 100644 --- a/admin/widgets/player-list.php +++ b/admin/widgets/player-list.php @@ -44,7 +44,7 @@ class SportsPress_Widget_Player_list extends WP_Widget {-
+
'sp_list', @@ -55,7 +55,7 @@ class SportsPress_Widget_Player_list extends WP_Widget { 'class' => 'widefat', ); if ( ! sportspress_dropdown_pages( $args ) ): - sportspress_post_adder( 'sp_list' ); + sportspress_post_adder( 'sp_list', __( 'Add New Player List', 'sportspress' ) ); endif; ?>
@@ -98,7 +98,7 @@ class SportsPress_Widget_Player_list extends WP_Widget { 'class' => 'sp-select-orderby widefat', ); if ( ! sportspress_dropdown_pages( $args ) ): - sportspress_post_adder( 'sp_list' ); + sportspress_post_adder( 'sp_list', __( 'Add New Player List', 'sportspress' ) ); endif; ?> diff --git a/admin/widgets/recent-events.php b/admin/widgets/recent-events.php index 832a86ba..5c8f5451 100644 --- a/admin/widgets/recent-events.php +++ b/admin/widgets/recent-events.php @@ -62,7 +62,7 @@ class SportsPress_Widget_Recent_Events extends WP_Widget { 'name' => $this->get_field_name('league'), 'id' => $this->get_field_id('league'), 'selected' => $league, - 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ), + 'show_option_all' => __( 'All Leagues', 'sportspress' ), 'hide_empty' => 0, 'values' => 'term_id', 'class' => 'widefat', @@ -78,7 +78,7 @@ class SportsPress_Widget_Recent_Events extends WP_Widget { 'name' => $this->get_field_name('season'), 'id' => $this->get_field_id('season'), 'selected' => $season, - 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ), + 'show_option_all' => __( 'All Seasons', 'sportspress' ), 'hide_empty' => 0, 'values' => 'term_id', 'class' => 'widefat', @@ -94,7 +94,7 @@ class SportsPress_Widget_Recent_Events extends WP_Widget { 'name' => $this->get_field_name('venue'), 'id' => $this->get_field_id('venue'), 'selected' => $venue, - 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Venues', 'sportspress' ) ), + 'show_option_all' => __( 'All Venues', 'sportspress' ), 'hide_empty' => 0, 'values' => 'term_id', 'class' => 'widefat', @@ -110,17 +110,17 @@ class SportsPress_Widget_Recent_Events extends WP_Widget { 'name' => $this->get_field_name('team'), 'id' => $this->get_field_id('team'), 'selected' => $team, - 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ), + 'show_option_all' => __( 'All Teams', 'sportspress' ), 'values' => 'ID', 'class' => 'widefat', ); if ( ! sportspress_dropdown_pages( $args ) ): - sportspress_post_adder( 'sp_table' ); + sportspress_post_adder( 'sp_table', __( 'Add New League Table', 'sportspress' ) ); endif; ?> -+
$name, - 'singular_name' => $singular_name, - 'all_items' => $name, - 'add_new' => sprintf( __( 'Add New', 'sportspress' ), $singular_name ), - 'add_new_item' => sprintf( __( 'Add New %s', 'sportspress' ), $singular_name ), - 'edit_item' => sprintf( __( 'Edit %s', 'sportspress' ), $singular_name ), - 'new_item' => sprintf( __( 'New %s', 'sportspress' ), $singular_name ), - 'view_item' => sprintf( __( 'View %s', 'sportspress' ), $singular_name ), - 'search_items' => sprintf( __( 'Search %s', 'sportspress' ), $name ), - 'not_found' => sprintf( __( 'No %s found.', 'sportspress' ), $lowercase_name ), - 'not_found_in_trash' => sprintf( __( 'No %s found in trash.', 'sportspress' ), $lowercase_name ), - 'parent_item_colon' => sprintf( __( 'Parent %s', 'sportspress' ), $singular_name ) . ':' - ); - return $labels; - } -} - -if ( !function_exists( 'sportspress_get_term_labels' ) ) { - function sportspress_get_term_labels( $name, $singular_name, $lowercase_name = null ) { - if ( !$lowercase_name ) $lowercase_name = $name; - $labels = array( - 'name' => $name, - 'singular_name' => $singular_name, - 'all_items' => sprintf( __( 'All %s', 'sportspress' ), $name ), - 'edit_item' => sprintf( __( 'Edit %s', 'sportspress' ), $singular_name ), - 'view_item' => sprintf( __( 'View %s', 'sportspress' ), $singular_name ), - 'update_item' => sprintf( __( 'Update %s', 'sportspress' ), $singular_name ), - 'add_new_item' => sprintf( __( 'Add New %s', 'sportspress' ), $singular_name ), - 'new_item_name' => sprintf( __( 'New %s Name', 'sportspress' ), $singular_name ), - 'parent_item' => sprintf( __( 'Parent %s', 'sportspress' ), $singular_name ), - 'parent_item_colon' => sprintf( __( 'Parent %s', 'sportspress' ), $singular_name ) . ':', - 'search_items' => sprintf( __( 'Search %s', 'sportspress' ), $name ), - 'not_found' => sprintf( __( 'No %s found.', 'sportspress' ), $lowercase_name ) - ); - return $labels; - } -} - if ( !function_exists( 'sportspress_get_the_term_id' ) ) { function sportspress_get_the_term_id( $post_id, $taxonomy, $index ) { $terms = get_the_terms( $post_id, $taxonomy ); @@ -716,7 +674,7 @@ if ( !function_exists( 'sportspress_get_var_calculates' ) ) { if ( !function_exists( 'sportspress_edit_calendar_table' ) ) { function sportspress_edit_calendar_table( $data = array() ) { if ( empty( $data ) ): - printf( __( 'No %s found.', 'sportspress' ), __( 'events', 'sportspress' ) ); + _e( 'No Events found.', 'sportspress' ); return false; endif; ?> @@ -1171,13 +1129,15 @@ if ( !function_exists( 'sportspress_player_nationality_selector' ) ) { } if ( !function_exists( 'sportspress_post_adder' ) ) { - function sportspress_post_adder( $post_type = 'post' ) { + function sportspress_post_adder( $post_type = 'post', $label = null ) { $obj = get_post_type_object( $post_type ); + if ( $label == null ) + $label = __( 'Add New', 'sportspress' ); ?> @@ -1186,13 +1146,15 @@ if ( !function_exists( 'sportspress_post_adder' ) ) { } if ( !function_exists( 'sportspress_taxonomy_adder' ) ) { - function sportspress_taxonomy_adder( $taxonomy = 'category', $post_type = 'post' ) { + function sportspress_taxonomy_adder( $taxonomy = 'category', $post_type = 'post', $label = null ) { $obj = get_taxonomy( $taxonomy ); + if ( $label == null ) + $label = __( 'Add New', 'sportspress' ); ?>