-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix PHPCS #209
Fix PHPCS #209
Conversation
@chandrapatel Please review this PR once you are free. |
@thrijith Updated code as per suggested please check. |
Exclude vendor directory from PHPCS checks
Conflicts have been resolved and remaining CS issue has been fixed. @chandrapatel please review and merge, if the changes look ok to you. |
esc_html__( ' (or page/custom post) is ', 'nginx-helper' ), | ||
esc_html__( 'modified', 'nginx-helper' ), | ||
esc_html__( ' or ', 'nginx-helper' ), | ||
esc_html__( 'added', 'nginx-helper' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct way to make small string translatable. We need to allow entire string translatable.
esc_html__( 'when a ', 'nginx-helper' ), | ||
esc_html__( 'published post', 'nginx-helper' ), | ||
esc_html__( ' (or page/custom post) is ', 'nginx-helper' ), | ||
esc_html__( 'trashed', 'nginx-helper' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct way to make small string translatable. We need to allow entire string translatable.
esc_html__( 'when a ', 'nginx-helper' ), | ||
esc_html__( 'post', 'nginx-helper' ), | ||
esc_html__( ' is ', 'nginx-helper' ), | ||
esc_html__( 'published', 'nginx-helper' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct way to make small string translatable. We need to allow entire string translatable.
esc_html__( 'when a ', 'nginx-helper' ), | ||
esc_html__( 'comment', 'nginx-helper' ), | ||
esc_html__( ' is ', 'nginx-helper' ), | ||
esc_html__( 'approved/published', 'nginx-helper' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct way to make small string translatable. We need to allow entire string translatable.
esc_html__( 'when a ', 'nginx-helper' ), | ||
esc_html__( 'comment', 'nginx-helper' ), | ||
esc_html__( ' is ', 'nginx-helper' ), | ||
esc_html__( 'unapproved/deleted', 'nginx-helper' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct way to make small string translatable. We need to allow entire string translatable.
esc_html__( ' (or page/custom post) is ', 'nginx-helper' ), | ||
esc_html__( 'modified', 'nginx-helper' ), | ||
esc_html__( ' or ', 'nginx-helper' ), | ||
esc_html__( 'added', 'nginx-helper' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct way to make small string translatable. We need to allow entire string translatable.
esc_html__( 'when a ', 'nginx-helper' ), | ||
esc_html__( 'published post', 'nginx-helper' ), | ||
esc_html__( ' (or page/custom post) is ', 'nginx-helper' ), | ||
esc_html__( 'trashed', 'nginx-helper' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct way to make small string translatable. We need to allow entire string translatable.
esc_html__( 'when a ', 'nginx-helper' ), | ||
esc_html__( 'comment', 'nginx-helper' ), | ||
esc_html__( ' is ', 'nginx-helper' ), | ||
esc_html__( 'approved/published', 'nginx-helper' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct way to make small string translatable. We need to allow entire string translatable.
esc_html__( 'when a ', 'nginx-helper' ), | ||
esc_html__( 'comment', 'nginx-helper' ), | ||
esc_html__( ' is ', 'nginx-helper' ), | ||
esc_html__( 'unapproved/deleted', 'nginx-helper' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct way to make small string translatable. We need to allow entire string translatable.
@@ -604,9 +646,13 @@ | |||
echo wp_kses( | |||
sprintf( | |||
'%1$s<br /><small>%2$s</small>', | |||
esc_html__( 'Nginx Map path to include in nginx settings', 'nginx-helper' ), esc_html__( '(recommended)', 'nginx-helper' ) | |||
esc_html__( 'Nginx Map path to include in nginx settings', 'nginx-helper' ), | |||
esc_html__( '(recommended)', 'nginx-helper' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct way to make small string translatable. We need to allow entire string translatable.
esc_html__( 'Or,', 'nginx-helper' ), esc_html__( 'Text to manually copy and paste in nginx settings', 'nginx-helper' ), esc_html__( '(if your network is small and new sites are not added frequently)', 'nginx-helper' ) | ||
esc_html__( 'Or,', 'nginx-helper' ), | ||
esc_html__( 'Text to manually copy and paste in nginx settings', 'nginx-helper' ), | ||
esc_html__( '(if your network is small and new sites are not added frequently)', 'nginx-helper' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct way to make small string translatable. We need to allow entire string translatable.
esc_html__( 'Can\'t write on log file.', 'nginx-helper' ), esc_html__( 'Check you have write permission on ', 'nginx-helper' ), esc_url( $log_path . 'nginx.log' ) | ||
esc_html__( 'Can\'t write on log file.', 'nginx-helper' ), | ||
esc_html__( 'Check you have write permission on ', 'nginx-helper' ), | ||
esc_url( $log_path . 'nginx.log' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct way to make small string translatable. We need to allow entire string translatable.
'%s <a href=\'%s\'>%s</a>.', | ||
esc_html__( 'Please use our', 'nginx-helper' ), | ||
esc_url( 'http://rtcamp.com/support/forum/wordpress-nginx/' ), | ||
esc_html__( 'free support forum', 'nginx-helper' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct way to make small string translatable. We need to allow entire string translatable.
@thrijith I have left feedback for translatable strings but we will fix it new PR and I'm merging this PR. |
Fix PHPCS errors. Some errors are still there which needs more attention and testing so not fixing now.