WordPress.org

Plugin Directory

Changeset 503927


Ignore:
Timestamp:
02/12/12 16:34:42 (2 years ago)
Author:
pross
Message:

Applied lang patch from JOTAKI Taisuke

Location:
theme-check/trunk
Files:
2 added
32 edited

Legend:

Unmodified
Added
Removed
  • theme-check/trunk/checkbase.php

    r490619 r503927  
    238238        $tags = array(); 
    239239 
    240     $name = $theme = wp_kses( trim( $theme_name[1] ), $themes_allowed_tags ); 
    241     $theme_uri = esc_url( trim( $theme_uri[1] ) ); 
    242     $description = wp_kses( trim( $description[1] ), $themes_allowed_tags ); 
     240    $theme = ( isset( $theme_name[1] ) ) ? wp_kses( trim( $theme_name[1] ), $themes_allowed_tags ) : ''; 
     241 
     242    $theme_uri = ( isset( $theme_uri[1] ) ) ? esc_url( trim( $theme_uri[1] ) ) : ''; 
     243 
     244    $description = ( isset( $description[1] ) ) ? wp_kses( trim( $description[1] ), $themes_allowed_tags ) : ''; 
    243245 
    244246    if ( preg_match( '|Author:(.*)$|mi', $theme_data, $author_name ) ) { 
     
    252254    } 
    253255 
    254     return array( 'Name' => $name, 'Title' => $theme, 'URI' => $theme_uri, 'Description' => $description, 'Author' => $author, 'Author_URI' => $author_uri, 'Version' => $version, 'Template' => $template, 'Status' => $status, 'Tags' => $tags ); 
    255 } 
     256    return array( 'Name' => $theme, 'Title' => $theme, 'URI' => $theme_uri, 'Description' => $description, 'Author' => $author, 'Author_URI' => $author_uri, 'Version' => $version, 'Template' => $template, 'Status' => $status, 'Tags' => $tags ); 
     257} 
  • theme-check/trunk/checks/admin_menu.php

    r348763 r503927  
    2121                    $filename = tc_filename( $php_key ); 
    2222                    $grep = ( isset( $matches[2] ) ) ? tc_grep( $matches[2], $php_key ) : tc_grep( $matches[1], $php_key ); 
    23                     $this->error[] = "<span class='tc-lead tc-warning'>WARNING</span>: <strong>{$filename}</strong>. {$check}{$grep}"; 
     23                    $this->error[] = sprintf(__('<span class="tc-lead tc-warning">WARNING</span>: <strong>%1$s</strong>. %2$s%3$s', 'themecheck'), $filename, $check, $grep ); 
    2424                    $ret = false; 
    2525                } 
     
    4242                    $error = ltrim( rtrim( $matches[0], '(' ) ); 
    4343                    $grep = tc_grep( $error, $php_key ); 
    44                     $this->error[] = "<span class='tc-lead tc-required'>REQUIRED</span>: <strong>{$filename}</strong>. {$check}{$grep}"; 
     44                    $this->error[] = sprintf(__('<span class="tc-lead tc-required">REQUIRED</span>: <strong>%1$s</strong>. %2$s%3$s', 'themecheck'), $filename, $check, $grep); 
    4545                    $ret = false; 
    4646                } 
  • theme-check/trunk/checks/badthings.php

    r372196 r503927  
    2727                    $error = ltrim( trim( $matches[0], '(' ) ); 
    2828                    $grep = tc_grep( $error, $php_key ); 
    29                     $this->error[] = "<span class='tc-lead tc-warning'>WARNING</span>: Found <strong>{$error}</strong> in the file <strong>{$filename}</strong>. {$check}. {$grep}"; 
     29                    $this->error[] = sprintf(__('<span class="tc-lead tc-warning">WARNING</span>: Found <strong>%1$s</strong> in the file <strong>%2$s</strong>. %3$s. %4$s', 'themecheck'), $error, $filename, $check, $grep ); 
    3030                    $ret = false; 
    3131                } 
     
    4646                    $error = ltrim( rtrim( $matches[0],'(' ) ); 
    4747                    $grep = tc_grep( $error, $php_key ); 
    48                     $this->error[] = "<span class='tc-lead tc-warning'>WARNING</span>: Found <strong>{$error}</strong> in the file <strong>{$filename}</strong>. {$check}.{$grep}"; 
     48                    $this->error[] = sprintf(__('<span class="tc-lead tc-warning">WARNING</span>: Found <strong>%1$s</strong> in the file <strong>%2$s</strong>. %3$s.%4$s', 'themecheck'), $error, $filename, $check, $grep); 
    4949                    $ret = false; 
    5050                } 
  • theme-check/trunk/checks/basic.php

    r409425 r503927  
    2424            'comment_form\(' => __( 'See: <a href="http://codex.wordpress.org/Template_Tags/comment_form">comment_form</a><pre> &lt;?php comment_form(); ?&gt;</pre>', 'themecheck' ), 
    2525            '<body.*body_class\(' => __( 'See: <a href="http://codex.wordpress.org/Template_Tags/body_class">body_class</a><pre> &lt;?php body_class( $class ); ?&gt;</pre>', 'themecheck' ), 
    26             'wp_link_pages\(' => __( 'See: <a href=http://codex.wordpress.org/Function_Reference/wp_link_pages">wp_link_pages</a><pre> &lt;?php wp_link_pages( $args ); ?&gt;</pre>', 'themecheck' ), 
     26            'wp_link_pages\(' => __( 'See: <a href="http://codex.wordpress.org/Function_Reference/wp_link_pages">wp_link_pages</a><pre> &lt;?php wp_link_pages( $args ); ?&gt;</pre>', 'themecheck' ), 
    2727            'post_class\(' => __( 'See: <a href="http://codex.wordpress.org/Template_Tags/post_class">post_class</a><pre> &lt;div id="post-&lt;?php the_ID(); ?&gt;" &lt;?php post_class(); ?&gt;&gt;</pre>', 'themecheck' ) 
    2828            ); 
     
    3131            checkcount(); 
    3232            if ( !preg_match( '/' . $key . '/i', $php ) ) { 
    33                 if ( $key === 'add_theme_support\(\s?("|\')automatic-feed-links("|\')\s?\)' ) $key = 'add_theme_support( \'automatic-feed-links\' )'; 
    34                 if ( $key === 'wp_enqueue_script\(\s?("|\')comment-reply("|\')' ) $key = 'wp_enqueue_script( \'comment-reply\' )'; 
    35                 if ( $key === '<body.*body_class\(' ) $key = 'body_class call in body tag'; 
    36                 if ( $key === 'register_sidebar[s]?\(' ) $key = 'register_sidebar() or register_sidebars()'; 
     33                if ( $key === 'add_theme_support\(\s?("|\')automatic-feed-links("|\')\s?\)' ) $key = __( 'add_theme_support( \'automatic-feed-links\' )', 'themechek'); 
     34                if ( $key === 'wp_enqueue_script\(\s?("|\')comment-reply("|\')' ) $key = __( 'wp_enqueue_script( \'comment-reply\' )', 'themechek'); 
     35                if ( $key === '<body.*body_class\(' ) $key = __( 'body_class call in body tag', 'themechek'); 
     36                if ( $key === 'register_sidebar[s]?\(' ) $key = __( 'register_sidebar() or register_sidebars()', 'themechek'); 
    3737                $key = ltrim( trim ( trim( $key, '(' ), '\\' ) ); 
    38                 $this->error[] = "<span class='tc-lead tc-required'>REQUIRED</span>: Could not find <strong>{$key}</strong>. {$check}"; 
     38                $this->error[] = sprintf( __( '<span class="tc-lead tc-required">REQUIRED</span>: Could not find <strong>%1$s</strong>. %2$s', 'themecheck' ), $key, $check ); 
    3939                $ret = false; 
    4040            } 
  • theme-check/trunk/checks/comment_reply.php

    r409425 r503927  
    1313            if ( ! preg_match( '/comment-reply/', $php ) ) { 
    1414                $check = __( 'See: <a href="http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7/Enhanced_Comment_Display">Migrating Plugins and Themes to 2.7/Enhanced Comment Display</a><pre> &lt;?php if ( is_singular() ) wp_enqueue_script( "comment-reply" ); ?&gt;</pre>', 'themecheck' ); 
    15                 $this->error[] = "<span class='tc-lead tc-required'>REQUIRED</span>: Could not find the <strong>comment-reply</strong> script enqueued. {$check}"; 
     15                $this->error[] = sprintf(__('<span class="tc-lead tc-required">REQUIRED</span>: Could not find the <strong>comment-reply</strong> script enqueued. %1$s', 'themecheck'), $check); 
    1616                $ret = false; 
    1717            } else { 
    18                 $this->error[] = "<span class='tc-lead tc-info'>INFO</span>:". __("Could not find the <strong>comment-reply</strong> script enqueued, however a reference to 'comment-reply' was found. Make sure that the comment-reply script is being enqueued properly on singular pages.", 'themecheck'); 
     18                $this->error[] = __('<span class="tc-lead tc-info">INFO</span>: Could not find the <strong>comment-reply</strong> script enqueued, however a reference to \'comment-reply\' was found. Make sure that the comment-reply script is being enqueued properly on singular pages.', 'themecheck'); 
    1919            } 
    2020        } 
  • theme-check/trunk/checks/commpage.php

    r336084 r503927  
    1313            (strpos( $php, 'next_comments_link' ) === false && strpos( $php, 'previous_comments_link' ) === false ) ) { 
    1414 
    15             $this->error[] = __( "<span class='tc-lead tc-required'>REQUIRED</span>: The theme doesn't have comment pagination code in it. Use <strong>paginate_comments_links()</strong> or <strong>next_comments_link()</strong> and <strong>previous_comments_link()</strong> to add comment pagination.", "themecheck" ); 
     15            $this->error[] = __( '<span class="tc-lead tc-required">REQUIRED</span>: The theme doesn\'t have comment pagination code in it. Use <strong>paginate_comments_links()</strong> or <strong>next_comments_link()</strong> and <strong>previous_comments_link()</strong> to add comment pagination.', 'themecheck' ); 
    1616            $ret = false; 
    1717        } 
  • theme-check/trunk/checks/constants.php

    r434965 r503927  
    2222                    $error = ltrim( rtrim( $matches[0], '(' ) ); 
    2323                    $grep = tc_grep( $error, $php_key ); 
    24                     $this->error[] = "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: <strong>{$error}</strong> was found in the file <strong>{$filename}</strong>. Use <strong>{$check}</strong> instead.{$grep}"; 
     24                    $this->error[] = sprintf(__('<span class="tc-lead tc-recommended">RECOMMENDED</span>: <strong>%1$s</strong> was found in the file <strong>%2$s</strong>. Use <strong>%3$s</strong> instead.%4$s', 'themecheck'), $error, $filename, $check, $grep ); 
    2525                } 
    2626            } 
  • theme-check/trunk/checks/dep_recommend.php

    r386527 r503927  
    2424                    $version = $check[0]; 
    2525                    $grep = tc_grep( $error, $php_key ); 
    26                     $this->error[] = "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: <strong>{$error}</strong> found in the file <strong>{$filename}</strong>. Deprecated since version <strong>{$version}</strong>. Use <strong>{$alt}</strong> instead.{$grep}"; 
     26                    $this->error[] = sprintf(__('<span class="tc-lead tc-recommended">RECOMMENDED</span>: <strong>%1$s</strong> found in the file <strong>%2$s</strong>. Deprecated since version <strong>%3$s</strong>. Use <strong>%4$s</strong> instead.%5$s', 'themecheck'), $error, $filename, $version, $alt, $grep) ; 
    2727                } 
    2828            } 
  • theme-check/trunk/checks/deprecated.php

    r386527 r503927  
    153153                    $version = $check[0]; 
    154154                    $grep = tc_grep( $error, $php_key ); 
    155                     $this->error[] = "<span class='tc-lead tc-required'>REQUIRED</span>: <strong>{$error}</strong> found in the file <strong>{$filename}</strong>. Deprecated since version <strong>{$version}</strong>. Use <strong>{$alt}</strong> instead.{$grep}"; 
     155                    $this->error[] = sprintf(__('<span class="tc-lead tc-required">REQUIRED</span>: <strong>%1$s</strong> found in the file <strong>%2$s</strong>. Deprecated since version <strong>%3$s</strong>. Use <strong>%4$s</strong> instead.%5$s', 'themecheck'), $error, $filename, $version, $alt, $grep ); 
    156156                    $ret = false; 
    157157                } 
  • theme-check/trunk/checks/directories.php

    r410848 r503927  
    2525         
    2626        if ($found) { 
    27             $this->error[] = "<span class='tc-lead tc-required'>REQUIRED</span>: " . __( 'Please remove any extraneous directories like .git or .svn from the ZIP file before uploading it.', 'themecheck' ); 
     27            $this->error[] = sprintf(__('<span class="tc-lead tc-required">REQUIRED</span>: Please remove any extraneous directories like .git or .svn from the ZIP file before uploading it.', 'themecheck') ); 
    2828            $ret = false; 
    2929        } 
  • theme-check/trunk/checks/filenames.php

    r441657 r503927  
    4040            if ( $filename = preg_grep( '/' . $file . '/', $filenames ) ) { 
    4141                $error = implode( array_unique( $filename ), ' ' ); 
    42                 $this->error[] = "<span class='tc-lead tc-warning'>WARNING</span>: <strong>{$error}</strong> {$reason} found."; 
     42                $this->error[] = sprintf(__('<span class="tc-lead tc-warning">WARNING</span>: <strong>%1$s</strong> %2$s found.', 'themecheck'), $error, $reason) ; 
    4343                $ret = false; 
    4444            } 
     
    4747        foreach( $musthave as $file ) { 
    4848            if ( !in_array( $file, $filenames ) ) { 
    49                 $this->error[] = __( "<span class='tc-lead tc-warning'>WARNING</span>: could not find the file <strong>{$file}</strong> in the theme.", "themecheck" ); 
     49                $this->error[] = sprintf(__('<span class="tc-lead tc-warning">WARNING</span>: could not find the file <strong>%1$s</strong> in the theme.', 'themecheck'), $file); 
    5050                $ret = false; 
    5151            } 
     
    5454        foreach( $rechave as $file => $reason ) { 
    5555            if ( !in_array( $file, $filenames ) ) { 
    56                 $this->error[] = __( "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: could not find the file <strong>{$file}</strong> in the theme. {$reason}", "themecheck" ); 
     56                $this->error[] = sprintf(__('<span class="tc-lead tc-recommended">RECOMMENDED</span>: could not find the file <strong>%1$s</strong> in the theme. %2$s', 'themecheck'), $file, $reason ); 
    5757            } 
    5858        } 
  • theme-check/trunk/checks/iframes.php

    r364729 r503927  
    1818                    $error = rtrim( $error, '(' ); 
    1919                    $grep = tc_grep( $error, $php_key ); 
    20                     $this->error[] = "<span class='tc-lead tc-info'>INFO</span>: <strong>{$error}</strong> was found in the file <strong>{$filename}</strong> {$check}.{$grep}"; 
     20                    $this->error[] = sprintf(__('<span class="tc-lead tc-info">INFO</span>: <strong>%1$s</strong> was found in the file <strong>%2$s</strong> %3$s.%4$s', 'themecheck'), $error, $filename, $check, $grep ) ; 
    2121                } 
    2222            } 
  • theme-check/trunk/checks/include.php

    r346568 r503927  
    1717                    $error = '/(?<![a-z0-9_])(?:requir|includ)e(?:_once)?\s?\(/'; 
    1818                    $grep = tc_preg( $error, $php_key ); 
    19                     if ( basename($filename) !== 'functions.php' ) $this->error[] = "<span class='tc-lead tc-info'>INFO</span>: <strong>{$filename}</strong> {$check} {$grep}"; 
     19                    if ( basename($filename) !== 'functions.php' ) $this->error[] = sprintf ( __( '<span class="tc-lead tc-info">INFO</span>: <strong>%1$s</strong> %2$s %3$s', 'themecheck' ), $filename, $check, $grep ); 
    2020                } 
    2121            } 
  • theme-check/trunk/checks/lineendings.php

    r392929 r503927  
    99                if (preg_match("/[^\r]\n/",$phpfile)) { 
    1010                    $filename = tc_filename( $php_key ); 
    11                     $this->error[] = "<span class='tc-lead tc-warning'>WARNING</span>: Both DOS and UNIX style line endings were found in the file <strong>{$filename}</strong>. This causes a problem with SVN repositories and must be corrected before the theme can be accepted. Please change the file to use only one style of line endings."; 
     11                    $this->error[] = sprintf(__('<span class="tc-lead tc-warning">WARNING</span>: Both DOS and UNIX style line endings were found in the file <strong>%1$s</strong>. This causes a problem with SVN repositories and must be corrected before the theme can be accepted. Please change the file to use only one style of line endings.', 'themecheck'), $filename); 
    1212                    $ret = false; 
    1313                } 
     
    1818                if (preg_match("/[^\r]\n/",$cssfile)) { 
    1919                    $filename = tc_filename( $css_key ); 
    20                     $this->error[] = "<span class='tc-lead tc-warning'>WARNING</span>: Both DOS and UNIX style line endings were found in the file <strong>{$filename}</strong>. This causes a problem with SVN repositories and must be corrected before the theme can be accepted. Please change the file to use only one style of line endings."; 
     20                    $this->error[] = sprintf(__('<span class="tc-lead tc-warning">WARNING</span>: Both DOS and UNIX style line endings were found in the file <strong>%1$s</strong>. This causes a problem with SVN repositories and must be corrected before the theme can be accepted. Please change the file to use only one style of line endings.', 'themecheck'), $filename); 
    2121                    $ret = false; 
    2222                } 
     
    2929                    if (preg_match("/[^\r]\n/",$othfile)) { 
    3030                        $filename = tc_filename( $oth_key ); 
    31                         $this->error[] = "<span class='tc-lead tc-warning'>WARNING</span>: Both DOS and UNIX style line endings were found in the file <strong>{$filename}</strong>. This causes a problem with SVN repositories and must be corrected before the theme can be accepted. Please change the file to use only one style of line endings."; 
     31                    $this->error[] = sprintf(__('<span class="tc-lead tc-warning">WARNING</span>: Both DOS and UNIX style line endings were found in the file <strong>%1$s</strong>. This causes a problem with SVN repositories and must be corrected before the theme can be accepted. Please change the file to use only one style of line endings.', 'themecheck'), $filename); 
    3232                        $ret = false; 
    3333                    } 
  • theme-check/trunk/checks/links.php

    r363053 r503927  
    2424                    } 
    2525                    if ( $grep ) { 
    26                         $this->error[] = "<span class='tc-lead tc-info'>INFO</span>: Possible hard-coded links were found in the file <strong>{$filename}</strong>.{$grep}"; 
     26                        $this->error[] = sprintf(__('<span class="tc-lead tc-info">INFO</span>: Possible hard-coded links were found in the file <strong>%1$s</strong>.%2$s', 'themecheck'), $filename, $grep); 
    2727                    } 
    2828                } 
  • theme-check/trunk/checks/malware.php

    r410848 r503927  
    2121                            $error = rtrim( $error, '(' ); 
    2222                            $grep = tc_grep( $error, $php_key ); 
    23                             $this->error[] = "<span class='tc-lead tc-warning'>WARNING</span>: <strong>{$error}</strong> was found in the file <strong>{$filename}</strong> {$check}.{$grep}"; 
     23                            $this->error[] = sprintf(__('<span class="tc-lead tc-warning">WARNING</span>: <strong>%1$s</strong> was found in the file <strong>%2$s</strong> %3$s.%4$s', 'themecheck'), $error, $filename, $check, $grep ); 
    2424                            $ret = false; 
    2525                        } 
  • theme-check/trunk/checks/more_deprecated.php

    r386527 r503927  
    2020                    $error = ltrim( rtrim( $matches[0], '(' ) ); 
    2121                    $grep = tc_grep( $error, $php_key ); 
    22                     $this->error[] = "<span class='tc-lead tc-required'>REQUIRED</span>: <strong>{$error}</strong> was found in the file <strong>{$filename}</strong>. Use <strong>{$check}</strong> instead.{$grep}"; 
     22                    $this->error[] = sprintf(__('<span class="tc-lead tc-required">REQUIRED</span>: <strong>%1$s</strong> was found in the file <strong>%2$s</strong>. Use <strong>%3$s</strong> instead.%4$s', 'themecheck'), $error, $filename, $check, $grep); 
    2323                    $ret = false; 
    2424                } 
  • theme-check/trunk/checks/nonprintable.php

    r335927 r503927  
    1414                $filename = tc_filename( $name ); 
    1515                $non_print = tc_preg( '/[\x00-\x08\x0B-\x0C\x0E-\x1F\x80-\xFF]/', $name ); 
    16                 $this->error[] = "<span class='tc-lead tc-info'>INFO</span>: Non-printable characters were found in the <strong>{$filename}</strong> file. You may want to check this file for errors.{$non_print}"; 
     16                $this->error[] = sprintf(__('<span class="tc-lead tc-info">INFO</span>: Non-printable characters were found in the <strong>%1$s</strong> file. You may want to check this file for errors.%2$s', 'themecheck'), $filename, $non_print); 
    1717            } 
    1818        } 
  • theme-check/trunk/checks/phpshort.php

    r357342 r503927  
    1212                $filename = tc_filename( $php_key ); 
    1313                $grep = tc_preg( '/<\?(\=?)(?!php|xml)/', $php_key ); 
    14                 $this->error[] = "<span class='tc-lead tc-warning'>WARNING</span>: Found PHP short tags in file <strong>{$filename}</strong>.{$grep}"; 
     14                $this->error[] = sprintf(__('<span class="tc-lead tc-warning">WARNING</span>: Found PHP short tags in file <strong>%1$s</strong>.%2$s', 'themecheck'), $filename, $grep); 
    1515                $ret = false; 
    1616            } 
  • theme-check/trunk/checks/post-formats.php

    r365117 r503927  
    2525                        $error = esc_html( rtrim($matches[0], '(' ) ); 
    2626                        $grep = tc_grep( rtrim($matches[0], '(' ), $php_key); 
    27                         $this->error[] = "<span class='tc-lead tc-required'>REQUIRED</span>: <strong>{$error}</strong> was found in the file <strong>{$filename}</strong>. However get_post_format and/or has_post_format were not found, and no use of formats in the CSS was detected."; 
     27                        $this->error[] = sprintf(__('<span class="tc-lead tc-required">REQUIRED</span>: <strong>%1$s</strong> was found in the file <strong>%2$s</strong>. However get_post_format and/or has_post_format were not found, and no use of formats in the CSS was detected.', 'themecheck'), $error, $filename); 
    2828                        $ret = false; 
    2929                    } 
  • theme-check/trunk/checks/required.php

    r365117 r503927  
    2020                    $error = esc_html( rtrim($matches[0], '(' ) ); 
    2121                    $grep = tc_grep( rtrim($matches[0], '(' ), $php_key ); 
    22                     $this->error[] = "<span class='tc-lead tc-required'>REQUIRED</span>: <strong>{$error}</strong> was found in the file <strong>{$filename}</strong>. Use <strong>{$check}</strong> instead.{$grep}"; 
     22                    $this->error[] = sprintf(__('<span class="tc-lead tc-required">REQUIRED</span>: <strong>%1$s</strong> was found in the file <strong>%2$s</strong>. Use <strong>%3$s</strong> instead.%4$s', 'themecheck'), $error, $filename, $check, $grep); 
    2323                    $ret = false; 
    2424                } 
  • theme-check/trunk/checks/screenshot.php

    r364729 r503927  
    1919                    $image = getimagesize( $other_key ); 
    2020                    if ( $image[0] > 320 || $image[1] > 240 ) { 
    21                         $this->error[] = __( "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: Screenshot is wrong size! Detected: <strong>{$image[0]}x{$image[1]}px</strong>. Maximum allowed size is 320x240px.", "themecheck" ); 
     21                        $this->error[] = sprintf(__('<span class="tc-lead tc-recommended">RECOMMENDED</span>: Screenshot is wrong size! Detected: <strong>%1$sx%2$spx</strong>. Maximum allowed size is 320x240px.', 'themecheck'), $image[0], $image[1]); 
    2222                    } 
    2323                } 
  • theme-check/trunk/checks/searchform.php

    r357342 r503927  
    1414                    $grep = tc_preg( $key, $php_key ); 
    1515                    $filename = tc_filename( $php_key ); 
    16                     $this->error[] = "<span class='tc-lead tc-required'>REQUIRED</span>: <strong>{$filename}</strong> {$check}{$grep}"; 
     16                    $this->error[] = sprintf(__('<span class="tc-lead tc-required">REQUIRED</span>: <strong>%1$s</strong> %2$s%3$s', 'themecheck'), $filename, $check, $grep); 
    1717                    $ret = false; 
    1818                } 
  • theme-check/trunk/checks/style_needed.php

    r364729 r503927  
    2828            checkcount(); 
    2929            if ( !preg_match( '/' . $key . '/i', $css, $matches ) ) { 
    30                 $this->error[] = "<span class='tc-lead tc-required'>REQUIRED</span>: {$check}"; 
     30                $this->error[] = __("<span class='tc-lead tc-required'>REQUIRED</span>:") . $check; 
    3131                $ret = false; 
    3232            } 
  • theme-check/trunk/checks/style_suggested.php

    r340724 r503927  
    1818        foreach ($checks as $key => $check) { 
    1919            if ( !preg_match( '/' . $key . '/i', $css, $matches ) ) { 
    20                 $this->error[] = "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: <strong>{$check}</strong> is missing from your style.css header."; 
     20                $this->error[] = sprintf(__('<span class="tc-lead tc-recommended">RECOMMENDED</span>: <strong>%1$s</strong> is missing from your style.css header.', 'themecheck'), $check); 
    2121            } 
    2222        } 
  • theme-check/trunk/checks/style_tags.php

    r382969 r503927  
    2626        foreach( $data[ 'Tags' ] as $tag ) { 
    2727            if ( !in_array( strtolower( $tag ), $allowed_tags ) ) { 
    28                 $this->error[] = "<span class='tc-lead tc-warning'>WARNING</span>: Found wrong tag, remove <strong>{$tag}</strong> from your style.css header."; 
     28                $this->error[] = sprintf(__('<span class="tc-lead tc-warning">WARNING</span>: Found wrong tag, remove <strong>%1$s</strong> from your style.css header.', 'themecheck'), $tag); 
    2929                $ret = false; 
    3030            } 
  • theme-check/trunk/checks/suggested.php

    r365117 r503927  
    3232                    $error = trim( esc_html( rtrim($matches[0], '(' ) ) ); 
    3333                    $grep = tc_grep( rtrim( $matches[0], '(' ), $php_key ); 
    34                     $this->error[] = "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: <strong>{$error}</strong> was found in the file <strong>{$filename}</strong>. Use <strong>{$check}</strong> instead.{$grep}"; 
     34                    $this->error[] = sprintf(__('<span class="tc-lead tc-recommended">RECOMMENDED</span>: <strong>%1$s</strong> was found in the file <strong>%2$s</strong>. Use <strong>%3$s</strong> instead.%4$s', 'themecheck'), $error, $filename, $check, $grep); 
    3535                } 
    3636            } 
  • theme-check/trunk/checks/textdomain.php

    r434695 r503927  
    2828                        $error .= ( !strpos( $error, $line[0] ) ) ? $grep : '';      
    2929                    } 
    30                 $this->error[] = __( "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: Text domain problems in <strong>{$filename}</strong>. {$check}{$error}", "themecheck" ); 
     30                $this->error[] = sprintf( __( '<span class=\'tc-lead tc-recommended\'>RECOMMENDED</span>: Text domain problems in <strong>%1$s</strong>. %2$s %3$s ', 'themecheck' ), $filename, $check, $error ); 
    3131                } 
    3232            } 
     
    3434 
    3535        $checks = array( 
    36         '/[\s|\(]_[e|_]\s?\([^,|;]*\s?,\s?[\'|"]([^\'|"]*)[\'|"]\s?\)/' => __( 'Text domain should match theme slug: <strong>' . $themename . '</strong>', 'themecheck' ), 
    37         '/[\s|\(]_x\s?\([^,]*\s?,\s[^\'|"]*[\'|"][^\'|"]*[\'|"],\s?[\'|"]([^\'|"]*)[\'|"]\s?\)/' => __( 'Text domain should match theme slug: <strong>' . $themename . '</strong>', 'themecheck' ) 
     36        '/[\s|\(]_[e|_]\s?\([^,|;]*\s?,\s?[\'|"]([^\'|"]*)[\'|"]\s?\)/' => sprintf(__('Text domain should match theme slug: <strong>%1$s</strong>', 'themecheck'), $themename ), 
     37        '/[\s|\(]_x\s?\([^,]*\s?,\s[^\'|"]*[\'|"][^\'|"]*[\'|"],\s?[\'|"]([^\'|"]*)[\'|"]\s?\)/' => sprintf(__('Text domain should match theme slug: <strong>%1$s</strong>', 'themecheck'), $themename ) 
    3838         ); 
    3939        foreach ( $php_files as $php_key => $phpfile ) { 
     
    5151                            $error = tc_grep( $matches[0][$count], $php_key ); 
    5252                            if ( $matches[1][$count] === 'twentyten' || $matches[1][$count] === 'twentyeleven' ): 
    53                                 $this->error[] = __( "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: Text domain problems in <strong>{$filename}</strong>. The twentyten text domain is being used!{$error}", "themecheck" ); 
     53                                $this->error[] = sprintf(__( '<span class=\'tc-lead tc-recommended\'>RECOMMENDED</span>: Text domain problems in <strong>%1$s</strong>. The twentyten text domain is being used!%2$s', 'themecheck' ), $filename, $error ); 
    5454                            else: 
    5555                            if ( defined( 'TC_TEST' ) && strpos( strtolower( $themename ), $matches[1][$count] ) === false ) { 
    5656                                $error = tc_grep( $matches[0][$count], $php_key ); 
    57                                 $this->error[] = __( "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: Text domain problems in <strong>{$filename}</strong>. {$check} You are using: <strong>{$matches[1][$count]}</strong>{$error}", "themecheck" ); 
     57                                $this->error[] = sprintf( __( '<span class=\'tc-lead tc-recommended\'>RECOMMENDED</span>: Text domain problems in <strong>%1$s</strong>. %2$s You are using: <strong>%3s</strong>%4$s', 'themecheck' ), $filename, $check, $matches[1][$count], $error ); 
    5858                            } 
    5959                            endif; 
  • theme-check/trunk/checks/theme_support.php

    r365117 r503927  
    2020                    $error = esc_html( rtrim( $matches[0], '(' ) ); 
    2121                    $grep = tc_grep( rtrim( $matches[0], '(' ), $php_key ); 
    22                     $this->error[] = "<span class='tc-lead tc-required'>REQUIRED</span>: <strong>{$error}</strong> was found in the file <strong>{$filename}</strong>. Use <strong>{$check}</strong> instead.{$grep}"; 
     22                    $this->error[] = sprintf(__('<span class="tc-lead tc-required">REQUIRED</span>: <strong>%1$s</strong> was found in the file <strong>%2$s</strong>. Use <strong>%3$s</strong> instead.%4$s', 'themecheck'), $error, $filename, $check, $grep ); 
    2323                    $ret = false; 
    2424                } 
  • theme-check/trunk/checks/time_date.php

    r365117 r503927  
    2020                    $matches[0] = str_replace(array('"',"'"),'', $matches[0]); 
    2121                    $error = trim( esc_html( rtrim( $matches[0], '(' ) ) ); 
    22                     $this->error[] = '<span class="tc-lead tc-info">INFO</span>: ' . sprintf( __( 'At least one hard coded date was found in the file <strong>%s</strong>. Consider get_option( \'date_format\' )', 'themecheck' ), $filename ); 
     22                    $this->error[] = sprintf( __( '<span class="tc-lead tc-info">INFO</span>: At least one hard coded date was found in the file <strong>%s</strong>. Consider get_option( \'date_format\' )', 'themecheck' ), $filename ); 
    2323                } 
    2424            } 
  • theme-check/trunk/checks/worms.php

    r371810 r503927  
    2727                    $error = $matches[0]; 
    2828                    $grep = tc_grep( $error, $php_key ); 
    29                     $this->error[] = "<span class='tc-lead tc-warning'>WARNING</span>: <strong>{$filename}</strong> {$check}{$grep}"; 
     29                    $this->error[] = sprintf(__('<span class="tc-lead tc-warning">WARNING</span>: <strong>%1$s</strong> %2$s%3$s', 'themecheck'), $filename, $check, $grep ); 
    3030                    $ret = false; 
    3131                } 
  • theme-check/trunk/main.php

    r450773 r503927  
    1010        $parent = get_theme_root( $data[ 'Template' ] ) . '/' . $data['Template']; 
    1111        if ( !get_theme_data( $parent . '/style.css' ) ) { // This should never happen but we will check while were here! 
    12             echo '<h2>Parent theme <strong>' . $data[ 'Template' ] . ' not found! You have to have parent AND child-theme installed!'; 
     12            echo '<h2>' . sprintf(__('Parent theme <strong>%1$s</strong> not found! You have to have parent AND child-theme installed!', 'themecheck'), $data[ 'Template' ] ) . '</h2>'; 
    1313            return; 
    1414        } 
     
    6060        if ( $data[ 'Template' ] ) { 
    6161        if ( $data['Template Version'] > $parent_data['Version'] ) { 
    62             echo "<p>This child theme requires at least version <strong>{$data['Template Version']}</strong> of theme <strong>{$parent_data['Title']}</strong> to be installed. You only have <strong>{$parent_data['Version']}</strong> please update the parent theme.</p>"; 
     62            echo '<p>' . sprintf(__('This child theme requires at least version <strong>%1$s</strong> of theme <strong>%2$s</strong> to be installed. You only have <strong>%3$s</strong> please update the parent theme.', 'themecheck'), $data['Template Version'], $parent_data['Title'], $parent_data['Version'] ) . '</p>'; 
    6363        } 
    64             echo '<p>' . __( 'This is a child theme. The parent theme is', 'themecheck' ) . ': <strong>' . $data[ 'Template' ] . '</strong>. These files have been included automatically!</p>'; 
     64            echo '<p>' . sprintf(__( 'This is a child theme. The parent theme is: <strong>%1$s</strong>. These files have been included automatically!', 'themecheck'), $data[ 'Template' ] ) . '</p>'; 
    6565            if ( empty( $data['Template Version'] ) ) { 
    66                 echo '<p>Child theme does not have the <strong>Template Version</strong> tag in style.css.</p>'; 
     66                echo '<p>' . __('Child theme does not have the <strong>Template Version</strong> tag in style.css.', 'themecheck') . '</p>'; 
    6767            } else { 
    68                 echo ( $data['Template Version'] < $parent_data['Version'] ) ? "<p>Child theme is only tested up to version {$data['Template Version']} of {$parent_data['Title']} breakage may occur! {$parent_data['Title']} installed version is {$parent_data['Version']}</p>" : ''; 
     68                echo ( $data['Template Version'] < $parent_data['Version'] ) ? '<p>' . sprintf(__('Child theme is only tested up to version %1$s of %2$s breakage may occur! %3$s installed version is %4$s', 'themecheck'), $data['Template Version'], $parent_data['Title'], $parent_data['Title'], $parent_data['Version'] ) . '</p>' : ''; 
    6969            } 
    7070         } 
     
    7373        $plugins = get_plugins( '/theme-check' ); 
    7474        $version = explode( '.', $plugins['theme-check.php']['Version'] ); 
    75         echo '<p>Running <strong>' . $checkcount . '</strong> tests against <strong>' . $data[ 'Title' ] . '</strong> using Guidelines Version: <strong>'. $version[0] . '</strong> Plugin revision: <strong>'. $version[1] .'</strong></p>'; 
     75        echo '<p>' . sprintf(__(' Running <strong>%1$s</strong> tests against <strong>%2$s</strong> using Guidelines Version: <strong>%3$s</strong> Plugin revision: <strong>%4$s</strong>', 'themecheck'), $checkcount, $data[ 'Title' ], $version[0], $version[1] ) . '</p>'; 
    7676        $results = display_themechecks(); 
    7777        $success = true; 
     
    7979        if (strpos( $results, 'REQUIRED') !== false) $success = false; 
    8080        if ( $success === false ) { 
    81             echo '<h2>' . __( 'One or more errors were found for ', 'themecheck' ) . $data[ 'Title' ] . '.</h2>'; 
     81            echo '<h2>' . sprintf(__('One or more errors were found for %1$s.', 'themecheck'), $data[ 'Title' ] ) . '</h2>'; 
    8282        } else { 
    83             echo '<h2>' . $data[ 'Title' ] . __( ' passed the tests', 'themecheck' ) . '</h2>'; 
     83            echo '<h2>' . sprintf(__('%1$s passed the tests', 'themecheck'), $data[ 'Title' ] ) . '</h2>'; 
    8484            tc_success(); 
    8585        } 
Note: See TracChangeset for help on using the changeset viewer.