Skip to content
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

Merged
merged 4 commits into from
Dec 23, 2019
Merged

Fix PHPCS #209

merged 4 commits into from
Dec 23, 2019

Conversation

abhijitrakas
Copy link
Member

Fix PHPCS errors. Some errors are still there which needs more attention and testing so not fixing now.

@abhijitrakas
Copy link
Member Author

@chandrapatel Please review this PR once you are free.

admin/class-fastcgi-purger.php Outdated Show resolved Hide resolved
admin/class-nginx-helper-admin.php Show resolved Hide resolved
admin/js/nginx-helper-admin.js Outdated Show resolved Hide resolved
admin/js/nginx-helper-admin.js Outdated Show resolved Hide resolved
admin/js/nginx-helper-admin.js Outdated Show resolved Hide resolved
admin/partials/nginx-helper-admin-display.php Show resolved Hide resolved
admin/partials/nginx-helper-general-options.php Outdated Show resolved Hide resolved
admin/partials/nginx-helper-sidebar-display.php Outdated Show resolved Hide resolved
@abhijitrakas
Copy link
Member Author

@thrijith Updated code as per suggested please check.

@thrijith
Copy link
Contributor

Conflicts have been resolved and remaining CS issue has been fixed. @chandrapatel please review and merge, if the changes look ok to you.
Thanks

esc_html__( ' (or page/custom post) is ', 'nginx-helper' ),
esc_html__( 'modified', 'nginx-helper' ),
esc_html__( ' or ', 'nginx-helper' ),
esc_html__( 'added', 'nginx-helper' )
Copy link
Contributor

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' )
Copy link
Contributor

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' )
Copy link
Contributor

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' )
Copy link
Contributor

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' )
Copy link
Contributor

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' )
Copy link
Contributor

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' )
Copy link
Contributor

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' )
Copy link
Contributor

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' )
Copy link
Contributor

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' )
Copy link
Contributor

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' )
Copy link
Contributor

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' )
Copy link
Contributor

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' )
Copy link
Contributor

@chandrapatel chandrapatel Dec 23, 2019

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.

@chandrapatel
Copy link
Contributor

Conflicts have been resolved and remaining CS issue has been fixed. @chandrapatel please review and merge, if the changes look ok to you.
Thanks

@thrijith I have left feedback for translatable strings but we will fix it new PR and I'm merging this PR.

@chandrapatel chandrapatel merged commit f60700a into rtCamp:master Dec 23, 2019
@thrijith thrijith mentioned this pull request Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants