Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/09/2020 02:47:32 AM (13 months ago)
Author:
johnjamesjacoby
Message:

Group/Member Types: More string changes.

This commit includes the following code changes:

  • Change case of strings to match how WordPress core labels are cased
  • Reorder schema so singular is before plural (see: order of adjectives)
  • Adds missing taxonomy labels for core functionalities that could be activated or used later (hierarchy, popularity, etc...)
  • Simplifies all verbiage, to be more concise without sacrificing accuracy or descriptiveness (removes example URLs, encoded quotes, etc...)
  • Remove "member" references from default strings, and re-add them back in using member-specific variants to match how groups works
  • Related inline documentation

Together, these changes bring both Group and Member types closer in readability and usability to other taxonomies, making them feel a little bit more familiar, while also keeping strings within 2 lines tall on most viewport sizes, and hopefully making them easier to understand for users who are new to these features.

See #7179, #7181.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-functions.php

    r12764 r12776  
    25102510        'bp_get_group_type_tax_labels',
    25112511        array(
    2512             'name'                          => _x( 'Group types', 'Group type taxonomy name', 'buddypress' ),
    2513             'singular_name'                 => _x( 'Group type', 'Group type taxonomy singular name', 'buddypress' ),
    2514             'search_items'                  => _x( 'Search Group types', 'Group type taxonomy search items label', 'buddypress' ),
    2515             'popular_items'                 => _x( 'Most used Group types', 'Group type taxonomy popular items label', 'buddypress' ),
    2516             'all_items'                     => _x( 'All Group types', 'Group type taxonomy all items label', 'buddypress' ),
    2517             'edit_item'                     => _x( 'Edit Group type', 'Group type taxonomy edit item label', 'buddypress' ),
    2518             'view_item'                     => _x( 'View Group type', 'Group type taxonomy view item label', 'buddypress' ),
    2519             'update_item'                   => _x( 'Update Group type', 'Group type taxonomy update item label', 'buddypress' ),
    2520             'add_new_item'                  => _x( 'Add new Group type', 'Group type taxonomy add new item label', 'buddypress' ),
    2521             'new_item_name'                 => _x( 'New Group type name', 'Group type taxonomy new item name label', 'buddypress' ),
    2522             'separate_items_with_commas'    => _x( 'Separate Group types with commas', 'Group type taxonomy separate items with commas label', 'buddypress' ),
    2523             'add_or_remove_items'           => _x( 'Add or remove Group types', 'Group type taxonomy add or remove items label', 'buddypress' ),
    2524             'choose_from_most_used'         => _x( 'Choose from the most used Group types', 'Group type taxonomy choose from most used label', 'buddypress' ),
    2525             'not_found'                     => _x( 'No Group types found', 'Group type taxonomy not found label', 'buddypress' ),
    2526             'no_terms'                      => _x( 'No Group types', 'Group type taxonomy no terms label', 'buddypress' ),
    2527             'items_list_navigation'         => _x( 'Group types list navigation', 'Group type taxonomy items list navigation label', 'buddypress' ),
    2528             'items_list'                    => _x( 'Group types list', 'Group type taxonomy items list label', 'buddypress' ),
    2529             'back_to_items'                 => _x( 'Back to all Group types', 'Group type taxonomy back to items label', 'buddypress' ),
     2512
     2513            // General labels
     2514            'name'                          => _x( 'Group Types', 'Group type taxonomy name', 'buddypress' ),
     2515            'singular_name'                 => _x( 'Group Type', 'Group type taxonomy singular name', 'buddypress' ),
     2516            'search_items'                  => _x( 'Search Group Types', 'Group type taxonomy search items label', 'buddypress' ),
     2517            'popular_items'                 => _x( 'Popular Group Types', 'Group type taxonomy popular items label', 'buddypress' ),
     2518            'all_items'                     => _x( 'All Group Types', 'Group type taxonomy all items label', 'buddypress' ),
     2519            'parent_item'                   => _x( 'Parent Group Type', 'Group type taxonomy parent item label', 'buddypress' ),
     2520            'parent_item_colon'             => _x( 'Parent Group Type:', 'Group type taxonomy parent item label', 'buddypress' ),
     2521            'edit_item'                     => _x( 'Edit Group Type', 'Group type taxonomy edit item label', 'buddypress' ),
     2522            'view_item'                     => _x( 'View Group Type', 'Group type taxonomy view item label', 'buddypress' ),
     2523            'update_item'                   => _x( 'Update Group Type', 'Group type taxonomy update item label', 'buddypress' ),
     2524            'add_new_item'                  => _x( 'Add New Group Type', 'Group type taxonomy add new item label', 'buddypress' ),
     2525            'new_item_name'                 => _x( 'New Group Type Name', 'Group type taxonomy new item name label', 'buddypress' ),
     2526            'separate_items_with_commas'    => _x( 'Separate group types with commas', 'Group type taxonomy separate items with commas label', 'buddypress' ),
     2527            'add_or_remove_items'           => _x( 'Add or remove group types', 'Group type taxonomy add or remove items label', 'buddypress' ),
     2528            'choose_from_most_used'         => _x( 'Choose from the most used group types', 'Group type taxonomy choose from most used label', 'buddypress' ),
     2529            'not_found'                     => _x( 'No group types found.', 'Group type taxonomy not found label', 'buddypress' ),
     2530            'no_terms'                      => _x( 'No group types', 'Group type taxonomy no terms label', 'buddypress' ),
     2531            'items_list_navigation'         => _x( 'Group Types list navigation', 'Group type taxonomy items list navigation label', 'buddypress' ),
     2532            'items_list'                    => _x( 'Group Types list', 'Group type taxonomy items list label', 'buddypress' ),
     2533
     2534            /* translators: Tab heading when selecting from the most used terms. */
     2535            'most_used'                     => _x( 'Most Used', 'Group type taxonomy most used items label', 'buddypress' ),
     2536            'back_to_items'                 => _x( '← Back to Group Types', 'Group type taxonomy back to items label', 'buddypress' ),
     2537
    25302538            // Specific to BuddyPress.
    25312539            'bp_type_id_label'              => _x( 'Group Type ID', 'BP Member type ID label', 'buddypress' ),
    2532             'bp_type_id_description'        => _x( 'Enter a lower-case string without spaces or special characters (used internally to identify the group type).', 'BP Group type ID description', 'buddypress' ),
    2533             'bp_type_show_in_create_screen' => _x( 'Add to Available Types on Create Screen', 'BP Group type show in create screen', 'buddypress' ),
    2534             'bp_type_show_in_list'          => _x( 'Include when Group Types are Listed for a Group', 'BP Group type show in list', 'buddypress' ),
     2540            'bp_type_id_description'        => _x( 'Lower-case string, no spaces or special characters. Used to identify the group type.', 'BP Group type ID description', 'buddypress' ),
     2541            'bp_type_show_in_create_screen' => _x( 'Show on Group Creation', 'BP Group type show in create screen', 'buddypress' ),
     2542            'bp_type_show_in_list'          => _x( 'Show on Group', 'BP Group type show in list', 'buddypress' ),
    25352543        )
    25362544    );
     
    25572565        array_merge(
    25582566            array(
    2559                 'description' => _x( 'BuddyPress Group types', 'Group type taxonomy description', 'buddypress' ),
     2567                'description' => _x( 'BuddyPress Group Types', 'Group type taxonomy description', 'buddypress' ),
    25602568                'labels'      => array_merge( bp_get_group_type_tax_labels(), bp_get_taxonomy_common_labels() ),
    25612569            ),
     
    26142622function bp_get_group_type_metadata_schema( $schema = array(), $taxonomy = '' ) {
    26152623    if ( bp_get_group_type_tax_name() === $taxonomy ) {
     2624
     2625        // Directory
    26162626        if ( isset( $schema['bp_type_has_directory']['description'] ) ) {
    2617             $schema['bp_type_has_directory']['description'] = __( 'Add a list of groups matching the group type available on the Groups Directory page (e.g. site.url/groups/type/ninja/).', 'buddypress' );
     2627            $schema['bp_type_has_directory']['description'] = __( 'Make a list of groups matching this type available on the groups directory.', 'buddypress' );
    26182628        }
    26192629
     2630        // Slug
    26202631        if ( isset( $schema['bp_type_directory_slug']['description'] ) ) {
    2621             $schema['bp_type_directory_slug']['description'] = __( 'If you want to use a slug that is different from the Group Type ID above, enter it here.', 'buddypress' );
     2632            $schema['bp_type_directory_slug']['description'] = __( 'Enter if you want the type slug to be different from its ID.', 'buddypress' );
    26222633        }
    26232634
    2624         $schema = array_merge(
    2625             $schema,
    2626             array(
    2627                 'bp_type_show_in_create_screen' => array(
    2628                     'description'       => __( 'Include this group type during group creation and when a group administrator is on the group’s “Manage > Settings” page.', 'buddypress' ),
    2629                     'type'              => 'boolean',
    2630                     'single'            => true,
    2631                     'sanitize_callback' => 'absint',
    2632                 ),
    2633                 'bp_type_show_in_list'          => array(
    2634                     'description'       => __( 'Include this group type when group types are listed, like in the group header.', 'buddypress' ),
    2635                     'type'              => 'boolean',
    2636                     'single'            => true,
    2637                     'sanitize_callback' => 'absint',
    2638                 ),
    2639             )
     2635        // Create
     2636        $schema['bp_type_show_in_create_screen'] = array(
     2637            'description'       => __( 'Show during group creation, and when a group admin is on the group’s settings page.', 'buddypress' ),
     2638            'type'              => 'boolean',
     2639            'single'            => true,
     2640            'sanitize_callback' => 'absint',
     2641        );
     2642
     2643        // List
     2644        $schema['bp_type_show_in_list'] = array(
     2645            'description'       => __( 'Show where group types may be listed, like in the group header.', 'buddypress' ),
     2646            'type'              => 'boolean',
     2647            'single'            => true,
     2648            'sanitize_callback' => 'absint',
    26402649        );
    26412650    }
Note: See TracChangeset for help on using the changeset viewer.