Making WordPress.org

Changeset 12435


Ignore:
Timestamp:
03/01/2023 12:38:02 PM (2 years ago)
Author:
spiraltee
Message:

Translate: Update gp-translation-helpers from github

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/css/discussion.css

    r12405 r12435  
    7575}
    7676.feedback-reason-list li {
    77     white-space:nowrap;
    7877    padding-right: 2px;
    7978}
     
    205204.gp-content ul.feedback-reason-list {
    206205    list-style-type: none;
    207     display: inline-block;
    208     padding-left: .5em;
     206    display: grid;
     207    grid-template-columns: repeat(2, 1fr);
     208    grid-column-gap: 4px;
     209    margin-left: 0;
    209210}
    210211.feedback-reason-list li {
    211     width: 50%;
    212212    float: left;
    213213    padding-top: 4px;
     
    216216    font-size: 1.1em;
    217217    cursor: pointer;
     218    min-width: 100%;
    218219}
    219220.feedback-reason-list li input[type="checkbox"] {
    220     margin-right: 5px;
     221    float: left;
     222}
     223.feedback-reason-list li span.gp-reason-text {
     224    display: inline-block;
     225    margin-bottom: .5em;
     226    float: left;
     227    width: 70%;
     228    margin-left: .5em;
     229    margin-top: -0.5em;
    221230}
    222231.feedback-comment label, .gp-content h3.feedback-reason-title {
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/helpers/helper-translation-discussion.php

    r12424 r12435  
    972972                $number_of_items = count( $comment_reason );
    973973                $counter         = 0;
    974                 $comment_reasons = Helper_Translation_Discussion::get_comment_reasons();
     974                $comment_reasons = Helper_Translation_Discussion::get_comment_reasons( $comment_locale );
    975975                foreach ( $comment_reason as $reason ) {
    976976                    echo wp_kses(
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/includes/class-gp-translation-helpers.php

    r12405 r12435  
    453453        $original_id_array    = ! empty( $_POST['data']['original_id'] ) ? array_map( array( $helper_discussion, 'sanitize_original_id' ), $_POST['data']['original_id'] ) : null;
    454454        $comment_reason       = ! empty( $_POST['data']['reason'] ) ? $_POST['data']['reason'] : array( 'other' );
    455         $all_comment_reasons  = array_keys( Helper_Translation_Discussion::get_comment_reasons() );
     455        $all_comment_reasons  = array_keys( Helper_Translation_Discussion::get_comment_reasons( $locale_slug ) );
    456456        $comment_reason       = array_filter(
    457457            $comment_reason,
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/js/reject-feedback.js

    r12405 r12435  
    3535                            var translationStatus = '';
    3636
    37                             if ( ! selectedRow.hasClass( 'untranslated' ) ) {
     37                            if ( ( selectedRow.length ) && ( ! selectedRow.hasClass( 'untranslated' ) ) ) {
    3838                                translationStatus = selectedRow.attr( 'class' ).split( ' ' )[ 1 ].substring( 7 );
    3939                                bulkTranslationStatus.push( translationStatus );
     
    353353        // eslint-disable-next-line vars-on-top
    354354        for ( var reason in commentReasons ) {
    355             prefix = '<div class="modal-item"><label class="tooltip" title="' + commentReasons[ reason ].explanation + '">';
    356             suffix = '</label> <span class="tooltip dashicons dashicons-info" title="' + commentReasons[ reason ].explanation + '"></span></div>';
     355            prefix = '<div class="modal-item"><label>';
     356            suffix = '<span class="tooltip dashicons dashicons-info" title="' + commentReasons[ reason ].explanation + '"></span></label></div>';
    357357            inputName = 'modal_feedback_reason';
    358             commentList += prefix + '<input type="checkbox" name="' + inputName + '" value="' + reason + '" /> ' + commentReasons[ reason ].name + suffix;
     358            commentList += prefix + '<input type="checkbox" name="' + inputName + '" value="' + reason + '" /> <span class="gp-reason-text">' + commentReasons[ reason ].name + '</span>' + suffix;
    359359        }
    360360        return commentList;
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/templates/translation-row-editor-meta-feedback.php

    r12405 r12435  
    1313                ?>
    1414                    <li>
    15                         <label class="tooltip" title="<?php echo esc_attr( $reason['explanation'] ); ?>"><input type="checkbox" name="feedback_reason" value="<?php echo esc_attr( $key ); ?>" /><?php echo esc_html( $reason['name'] ); ?></label><span class="tooltip dashicons dashicons-info" title="<?php echo esc_attr( $reason['explanation'] ); ?>"></span>
     15                        <label><input type="checkbox" name="feedback_reason" value="<?php echo esc_attr( $key ); ?>" /><span class="gp-reason-text"><?php echo esc_html( $reason['name'] ); ?></span><span class="tooltip dashicons dashicons-info" title="<?php echo esc_attr( $reason['explanation'] ); ?>"></span></label>
    1616                    </li>
    1717                <?php endforeach; ?>
Note: See TracChangeset for help on using the changeset viewer.