WordPress.org

Plugin Directory

Changeset 416902


Ignore:
Timestamp:
07/29/11 13:33:42 (3 years ago)
Author:
pross
Message:

Fix i18n

Location:
theme-check/trunk
Files:
7 added
7 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • theme-check/trunk/checks/textdomain.php

    r416334 r416902  
    2525                    foreach ($matches[0] as $match ) { 
    2626                        $grep = tc_grep( ltrim( $match ), $php_key ); 
    27                         preg_match( '/Line\s[0-9]+/', $grep, $line); 
     27                        preg_match( '/[^\s]*\s[0-9]+/', $grep, $line); 
    2828                        $error .= ( !strpos( $error, $line[0] ) ) ? $grep : '';      
    2929                    } 
  • theme-check/trunk/theme-check.php

    r410852 r416902  
    1212 
    1313function tc_i18n() { 
    14  
    15 $currentLocale = get_locale(); 
    16     if(!empty($currentLocale)) { 
    17             $moFile = dirname(__FILE__) . "/lang/theme-check_" . $currentLocale . ".mo"; 
    18             if(file_exists($moFile) && is_readable($moFile)) load_textdomain('themecheck', $moFile); 
    19     } 
     14    load_plugin_textdomain( 'themecheck', false, 'theme-check/lang' ); 
    2015} 
    2116 
Note: See TracChangeset for help on using the changeset viewer.