Skip to content

Commit

Permalink
Merge pull request #472 from mehrazmorshed/mehraz
Browse files Browse the repository at this point in the history
added comments for translators
  • Loading branch information
matiasbenedetto authored Oct 24, 2024
2 parents 621b8aa + de85a9c commit b2b4cec
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions checks/class-comments-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function check( $php_files, $css_files, $other_files ) {
'<span class="tc-lead tc-recommended">%s</span>: %s',
__( 'RECOMMENDED', 'theme-check' ),
sprintf(
/* translators: %1$s is the missing key, and %2$s is the additional check or message related to the missing key. */
__( 'Could not find %1$s. %2$s', 'theme-check' ),
'<strong>' . $key . '</strong>',
$check
Expand Down
3 changes: 2 additions & 1 deletion checks/class-constants-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ public function check( $php_files, $css_files, $other_files ) {
'<span class="tc-lead tc-required">%s</span>: %s %s',
__( 'REQUIRED', 'theme-check' ),
sprintf(
/* translators: %1$s is the error message, %2$s is the filename, %3$s is the suggested check */
__( '%1$s was found in the file %2$s. Use %3$s instead.', 'theme-check' ),
'<strong>' . $error . '</strong>',
'<strong>' . $filename . '</strong>',
'<strong>' . $check . '</strong>'
),
$grep
);
$ret = false;
$ret = false;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions checks/class-deprecated-param-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public function check( $php_files, $css_files, $other_files ) {
'<span class="tc-lead tc-warning">%s</span>: %s %s',
__( 'WARNING', 'theme-check' ),
sprintf(
/* translators: %1$s is the error found, %2$s is the file name where the error was found, and %3$s is the suggested replacement. */
__( '%1$s was found in the file %2$s. Use %3$s instead.', 'theme-check' ),
'<strong>' . $error . '</strong>',
'<strong>' . $filename . '</strong>',
Expand Down
1 change: 1 addition & 0 deletions checks/class-deregister-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function check( $php_files, $css_files, $other_files ) {
'<span class="tc-lead tc-warning">%s</span>: %s %s',
__( 'WARNING', 'theme-check' ),
sprintf(
/* translators: %1$s is the file path where wp_deregister_script is found */
__( 'Found wp_deregister_script in %1$s. Themes must not deregister scripts that are included in WordPress. Deregistering third party scripts that are registered by parent themes is allowed.', 'theme-check' ),
'<strong>' . tc_filename( $file_path ) . '</strong>'
),
Expand Down
1 change: 1 addition & 0 deletions checks/class-non-gpl-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function check( $php_files, $css_files, $other_files ) {
'<span class="tc-lead tc-required">%s</span>: %s %s',
__( 'REQUIRED', 'theme-check' ),
sprintf(
/* translators: %s is the link slug that references the asset */
__( 'Found a reference to %s. Assets from this website does not use a license that is compatible with GPL.', 'theme-check' ),
'<code>' . esc_html( $link_slug ) . '</code>'
),
Expand Down

0 comments on commit b2b4cec

Please sign in to comment.