-
Notifications
You must be signed in to change notification settings - Fork 80
Require users to write readme in English #1025
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
base: trunk
Are you sure you want to change the base?
Require users to write readme in English #1025
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
if ( ! $check_language ) { | ||
$this->add_result_error_for_file( | ||
$result, | ||
__( 'The README description contains unofficial language. It must be written in standard English.', 'plugin-check' ), |
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.
"README" should be simply "readme" I believe.
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.
ok
@@ -370,8 +370,8 @@ public function test_run_with_errors_multiple_parser_warnings() { | |||
$this->assertNotEmpty( $warnings ); | |||
$this->assertArrayHasKey( 'readme.txt', $warnings ); | |||
$this->assertSame( 7, $check_result->get_warning_count() ); | |||
$this->assertEmpty( $errors ); | |||
$this->assertSame( 0, $check_result->get_error_count() ); | |||
$this->assertNotEmpty( $errors ); |
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.
We should improve our test and make sure any addition of new check does not break the existing checks.
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.
ok
Suggestions:
|
Fixes #1009
My approach is to use the Language Detector library. It returns a list of languages that best match the content. I use the highest-scoring language; if it's not English, it gives an error.
Maybe we can set a lower severity level until we've tested it for a while.