Ticket #124: warnings-fix.patch

File warnings-fix.patch, 1.1 KB (added by Nightgunner5, 22 months ago)
  • gp-includes/warnings.php

     
    7171                $len_trans = gp_strlen( $translation ); 
    7272                if ( !( $this->length_lower_bound*$len_src < $len_trans && $len_trans < $this->length_upper_bound*$len_src ) && 
    7373                                ( !gp_in( '_abbreviation', $original ) && !gp_in( '_initial', $original ) ) ) { 
    74                         return __('Lenghts of source and translation differ too much.'); 
     74                        return __('Lengths of source and translation differ too much.'); 
    7575                } 
    7676                return true; 
    7777        } 
     
    108108        } 
    109109         
    110110        function warning_placeholders( $original, $translation, $locale ) { 
    111                 $placeholders_re = apply_filters( 'warning_placeholders_re', '%[a-z]*|%[A-Z]+|%\d+\$(?:s|d)' ); 
     111                $placeholders_re = apply_filters( 'warning_placeholders_re', '%[a-z]+|%[A-Z]+|%\d+\$(?:s|d)' ); 
    112112 
    113113                $original_counts = $this->_placeholders_counts( $original, $placeholders_re ); 
    114114                $translation_counts = $this->_placeholders_counts( $translation, $placeholders_re );