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
Contributor

abhijitrakas commented Jun 5, 2019

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

@abhijitrakas abhijitrakas requested a review from chandrapatel Jun 5, 2019
@abhijitrakas

This comment has been minimized.

Copy link
Contributor Author

abhijitrakas commented Jun 10, 2019

@chandrapatel Please review this PR once you are free.

@abhijitrakas abhijitrakas requested a review from thrijith Jun 10, 2019
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-general-options.php Outdated Show resolved Hide resolved
admin/partials/nginx-helper-sidebar-display.php Outdated Show resolved Hide resolved
@abhijitrakas

This comment has been minimized.

Copy link
Contributor Author

abhijitrakas commented Jun 12, 2019

@thrijith Updated code as per suggested please check.

thrijith added 2 commits Dec 20, 2019
Exclude vendor directory from PHPCS checks
@thrijith

This comment has been minimized.

Copy link
Member

thrijith commented Dec 20, 2019

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' )

This comment has been minimized.

Copy link
@chandrapatel

chandrapatel Dec 23, 2019

Collaborator

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' )

This comment has been minimized.

Copy link
@chandrapatel

chandrapatel Dec 23, 2019

Collaborator

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' )

This comment has been minimized.

Copy link
@chandrapatel

chandrapatel Dec 23, 2019

Collaborator

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' )

This comment has been minimized.

Copy link
@chandrapatel

chandrapatel Dec 23, 2019

Collaborator

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' )

This comment has been minimized.

Copy link
@chandrapatel

chandrapatel Dec 23, 2019

Collaborator

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' )

This comment has been minimized.

Copy link
@chandrapatel

chandrapatel Dec 23, 2019

Collaborator

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' )

This comment has been minimized.

Copy link
@chandrapatel

chandrapatel Dec 23, 2019

Collaborator

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' )

This comment has been minimized.

Copy link
@chandrapatel

chandrapatel Dec 23, 2019

Collaborator

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' )

This comment has been minimized.

Copy link
@chandrapatel

chandrapatel Dec 23, 2019

Collaborator

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' )

This comment has been minimized.

Copy link
@chandrapatel

chandrapatel Dec 23, 2019

Collaborator

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' )

This comment has been minimized.

Copy link
@chandrapatel

chandrapatel Dec 23, 2019

Collaborator

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' )

This comment has been minimized.

Copy link
@chandrapatel

chandrapatel Dec 23, 2019

Collaborator

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' )

This comment has been minimized.

Copy link
@chandrapatel

chandrapatel Dec 23, 2019

Collaborator

This is not correct way to make small string translatable. We need to allow entire string translatable.

@chandrapatel

This comment has been minimized.

Copy link
Collaborator

chandrapatel commented Dec 23, 2019

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 dismissed thrijith’s stale review Dec 23, 2019

Feedback Addressed

@chandrapatel chandrapatel merged commit f60700a into rtCamp:master Dec 23, 2019
1 check passed
1 check passed
WIP Ready for review
Details
@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
Projects
None yet
3 participants
You can’t perform that action at this time.