WordPress.org

Making WordPress.org

Changeset 3739


Ignore:
Timestamp:
07/29/2016 10:44:47 AM (3 years ago)
Author:
ocean90
Message:

Support: Use wporg-forums as the text domain for bbPress plugins.

We already use it for the theme.

See #1544.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-term-subscription/inc/class-plugin.php

    r3719 r3739  
    7979
    8080        // Get required data.
    81         $user_id = get_current_user_id(); 
     81        $user_id = get_current_user_id();
    8282        $term_id = intval( $_GET['term_id'] );
    8383        $term = get_term( $term_id );
     
    8585        // Check for empty term id.
    8686        if ( ! $term ) {
    87             bbp_add_error( 'wporg_bbp_subscribe_term_id', __( '<strong>ERROR</strong>: No term was found! Which term are you subscribing/unsubscribing to?', 'wporg' ) );
     87            bbp_add_error( 'wporg_bbp_subscribe_term_id', __( '<strong>ERROR</strong>: No term was found! Which term are you subscribing/unsubscribing to?', 'wporg-forums' ) );
    8888
    8989        // Check for current user.
    9090        } elseif ( empty( $user_id ) ) {
    91             bbp_add_error( 'wporg_bbp_subscribe_logged_id', __( '<strong>ERROR</strong>: You must be logged in to do this!', 'wporg' ) );
     91            bbp_add_error( 'wporg_bbp_subscribe_logged_id', __( '<strong>ERROR</strong>: You must be logged in to do this!', 'wporg-forums' ) );
    9292
    9393        // Check nonce.
    9494        } elseif ( ! bbp_verify_nonce_request( 'toggle-term-subscription_' . $user_id . '_' . $term_id ) ) {
    95             bbp_add_error( 'wporg_bbp_subscribe_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'wporg' ) );
     95            bbp_add_error( 'wporg_bbp_subscribe_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'wporg-forums' ) );
    9696
    9797        // Check current user's ability to spectate.
    9898        } elseif ( ! current_user_can( 'spectate' ) ) {
    99             bbp_add_error( 'wporg_bbp_subscribe_permissions', __( '<strong>ERROR</strong>: You don\'t have permission to do this!', 'wporg' ) );
     99            bbp_add_error( 'wporg_bbp_subscribe_permissions', __( '<strong>ERROR</strong>: You don\'t have permission to do this!', 'wporg-forums' ) );
    100100        }
    101101
     
    118118            bbp_redirect( $redirect );
    119119        } elseif ( true === $is_subscribed && 'wporg_bbp_subscribe_term' === $action ) {
    120             bbp_add_error( 'wporg_bbp_subscribe_user', __( '<strong>ERROR</strong>: There was a problem subscribing to that term!', 'wporg' ) );
     120            bbp_add_error( 'wporg_bbp_subscribe_user', __( '<strong>ERROR</strong>: There was a problem subscribing to that term!', 'wporg-forums' ) );
    121121        } elseif ( false === $is_subscribed && 'wporg_bbp_unsubscribe_term' === $action ) {
    122             bbp_add_error( 'wporg_bbp_unsubscribe_user', __( '<strong>ERROR</strong>: There was a problem unsubscribing from that term!', 'wporg' ) );
     122            bbp_add_error( 'wporg_bbp_unsubscribe_user', __( '<strong>ERROR</strong>: There was a problem unsubscribing from that term!', 'wporg-forums' ) );
    123123        }
    124124    }
     
    206206You are receiving this email because you subscribed to a topic tag.
    207207
    208 Login and visit the topic to unsubscribe from these emails.', 'wporg' ),
     208Login and visit the topic to unsubscribe from these emails.', 'wporg-forums' ),
    209209            $topic_author_name,
    210210            $topic_content,
     
    297297You are receiving this email because you subscribed to a topic tag.
    298298
    299 Login and visit the topic to unsubscribe from these emails.', 'wporg' ),
     299Login and visit the topic to unsubscribe from these emails.', 'wporg-forums' ),
    300300            $reply_author_name,
    301301            $reply_content,
     
    376376     * @param $user_id int The user id
    377377     * @param $term_id int The term id
    378      * @return bool False if invalid, otherwise true 
     378     * @return bool False if invalid, otherwise true
    379379     */
    380380    public static function add_user_subscription( $user_id = 0, $term_id = 0 ) {
     
    384384
    385385        if ( ! self::is_user_subscribed_to_term( $user_id, $term_id ) ) {
    386             add_term_meta( $term_id, self::META_KEY, $user_id ); 
     386            add_term_meta( $term_id, self::META_KEY, $user_id );
    387387            wp_cache_delete( 'wporg_bbp_get_term_subscribers_' . $term_id, 'bbpress_users' );
    388388        }
     
    429429            'user_id'     => get_current_user_id(),
    430430            'term_id'     => 0,
    431             'subscribe'   => esc_html__( 'Subscribe to this topic tag', 'wporg' ),
    432             'unsubscribe' => esc_html__( 'Unsubscribe from this topic tag', 'wporg' ),
     431            'subscribe'   => esc_html__( 'Subscribe to this topic tag', 'wporg-forums' ),
     432            'unsubscribe' => esc_html__( 'Unsubscribe from this topic tag', 'wporg-forums' ),
    433433        ), 'get_term_subscription_link' );
    434434        if ( empty( $r['user_id'] ) || empty( $r['term_id'] ) ) {
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-topic-resolution/inc/class-plugin.php

    r3738 r3739  
    6565     */
    6666    public function get_topic_title( $title, $topic_id ) {
    67         $resolved = __( 'Resolved', 'wporg' );
     67        $resolved = __( 'Resolved', 'wporg-forums' );
    6868        if ( 'yes' == $this->get_topic_resolution( array( 'id' => $topic_id ) ) ) {
    6969           return sprintf( esc_html( '[%s]: %s' ), $resolved, $title );
     
    101101        }
    102102        ?>
    103         <p><label for="topic-resolved"><?php esc_html_e( 'This topic is', 'wporg' ); ?></label><br />
     103        <p><label for="topic-resolved"><?php esc_html_e( 'This topic is', 'wporg-forums' ); ?></label><br />
    104104
    105105        <select name="<?php echo esc_attr( self::META_KEY ); ?>" id="topic-resolved">
     
    129129        }
    130130        ?>
    131         <p><label for="topic-resolved"><input type="checkbox" name="<?php echo esc_attr( self::META_KEY ); ?>" id="topic-resolved" value="mu"> <?php esc_html_e( 'This topic is not a support question', 'wporg' ); ?></label></p>
     131        <p><label for="topic-resolved"><input type="checkbox" name="<?php echo esc_attr( self::META_KEY ); ?>" id="topic-resolved" value="mu"> <?php esc_html_e( 'This topic is not a support question', 'wporg-forums' ); ?></label></p>
    132132        <?php
    133133    }
     
    155155    public function add_forum_topic_resolution_column( $columns ) {
    156156        return array_merge( $columns, array(
    157             'bbp_topic_resolution' => __( 'Support', 'wporg' ),
     157            'bbp_topic_resolution' => __( 'Support', 'wporg-forums' ),
    158158        ) );
    159159    }
     
    260260    public function get_topic_resolutions() {
    261261        return apply_filters( 'wporg_bbp_get_topic_resolutions', array(
    262                 'no'  => __( 'not resolved', 'wporg' ),
    263                 'yes' => __( 'resolved', 'wporg' ),
    264                 'mu'  => __( 'not a support question', 'wporg' ),
     262                'no'  => __( 'not resolved', 'wporg-forums' ),
     263                'yes' => __( 'resolved', 'wporg-forums' ),
     264                'mu'  => __( 'not a support question', 'wporg-forums' ),
    265265        ) );
    266266    }
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-user-moderation/inc/class-plugin.php

    r3702 r3739  
    170170        $post = get_post( $post_id );
    171171        if ( ! $post ) {
    172             bbp_add_error( 'wporg_bbp_flag_post_id', __( '<strong>ERROR</strong>: No post was found! Which topic or reply are you marking for moderation?', 'wporg' ) );
     172            bbp_add_error( 'wporg_bbp_flag_post_id', __( '<strong>ERROR</strong>: No post was found! Which topic or reply are you marking for moderation?', 'wporg-forums' ) );
    173173
    174174        // Check that user id matches post author
    175175        } elseif ( $post->post_author != intval( $_GET['user_id'] ) ) {
    176             bbp_add_error( 'wporg_bbp_flag_post_user', __( '<strong>ERROR</strong>: That author does not match the flagged post.', 'wporg' ) );
     176            bbp_add_error( 'wporg_bbp_flag_post_user', __( '<strong>ERROR</strong>: That author does not match the flagged post.', 'wporg-forums' ) );
    177177
    178178        // Check nonce
    179179        } elseif ( ! bbp_verify_nonce_request( 'toggle-flag_' . $post->post_author . '_' . $post->ID ) ) {
    180             bbp_add_error( 'wporg_bbp_flag_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'wporg' ) );
     180            bbp_add_error( 'wporg_bbp_flag_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'wporg-forums' ) );
    181181
    182182        // Check current user's ability to moderate
    183183        } elseif ( ! current_user_can( 'moderate' ) ) {
    184             bbp_add_error( 'wporg_bbp_flag_permissions', __( '<strong>ERROR</strong>: You don\'t have permission to moderate that user!', 'wporg' ) );
     184            bbp_add_error( 'wporg_bbp_flag_permissions', __( '<strong>ERROR</strong>: You don\'t have permission to moderate that user!', 'wporg-forums' ) );
    185185        }
    186186
     
    205205            bbp_redirect( $redirect );
    206206        } elseif ( true === $is_flagged && 'bbp_flag_user' === $action ) {
    207             bbp_add_error( 'wporg_bbp_flag_user', __( '<strong>ERROR</strong>: There was a problem flagging that user!', 'wporg' ) );
     207            bbp_add_error( 'wporg_bbp_flag_user', __( '<strong>ERROR</strong>: There was a problem flagging that user!', 'wporg-forums' ) );
    208208        } elseif ( false === $is_flagged && 'bbp_unflag_user' == $action ) {
    209             bbp_add_error( 'wporg_bbp_flag_unuser', __( '<strong>ERROR</strong>: There was a problem unflagging that user!', 'wporg' ) );
     209            bbp_add_error( 'wporg_bbp_flag_unuser', __( '<strong>ERROR</strong>: There was a problem unflagging that user!', 'wporg-forums' ) );
    210210        }
    211211    }
     
    256256            'user_id' => bbp_get_displayed_user_id(),
    257257            'post_id' => 0,
    258             'flag'    => esc_html__( 'Flag Author', 'wporg' ),
    259             'unflag'  => esc_html__( 'Unflag Author', 'wporg' ),
     258            'flag'    => esc_html__( 'Flag Author', 'wporg-forums' ),
     259            'unflag'  => esc_html__( 'Unflag Author', 'wporg-forums' ),
    260260        ), 'get_user_flag_link' );
    261261
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-version-dropdown/inc/class-plugin.php

    r3737 r3739  
    7777        ?>
    7878        <p>
    79             <label for="wp-version"><?php esc_html_e( 'Version:', 'wporg' ); ?></label><br />
    80             <em><?php esc_html_e( 'Select the version of WordPress you are using.', 'wporg' ); ?></em><br />
     79            <label for="wp-version"><?php esc_html_e( 'Version:', 'wporg-forums' ); ?></label><br />
     80            <em><?php esc_html_e( 'Select the version of WordPress you are using.', 'wporg-forums' ); ?></em><br />
    8181
    8282            <select name="<?php echo esc_attr( self::META_KEY ); ?>" id="wp-version">
     
    8686            </select>
    8787
    88             <label for="wp-other-version"><?php esc_html_e( 'Enter a different WordPress version here:', 'wporg' ); ?></label>
     88            <label for="wp-other-version"><?php esc_html_e( 'Enter a different WordPress version here:', 'wporg-forums' ); ?></label>
    8989            <input type="text" name="wp_other_version" id="wp-other-version" value="<?php echo esc_attr( $other_version ); ?>">
    9090        </p>
     
    111111    public function enqueue_scripts() {
    112112        if ( bbp_is_single_forum() || bbp_is_single_topic() || bbp_is_topic_edit() ) {
    113             wp_enqueue_script( 'wporg-bbp-version-dropdown', plugins_url( 'wporg-bbp-version-dropdown.js', dirname( __FILE__ ) ), array( 'jquery' ) );
     113            wp_enqueue_script( 'wporg-bbp-version-dropdown', plugins_url( 'wporg-bbp-version-dropdown.js', __DIR__ ), array( 'jquery' ), '20160729', true );
    114114        }
    115115    }
     
    157157            array( '0' => '' ),
    158158            apply_filters( 'wporg_bbp_get_wp_versions', array() ),
    159             array( 'other' => __( 'Other:', 'wporg' ) )
     159            array( 'other' => __( 'Other:', 'wporg-forums' ) )
    160160        );
    161161        return $versions;
Note: See TracChangeset for help on using the changeset viewer.