-
Notifications
You must be signed in to change notification settings - Fork 83
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
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. |
tests/phpunit/tests/Checker/Checks/Plugin_Readme_Check_Tests.php
Outdated
Show resolved
Hide resolved
|
Suggestions:
|
tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-language/readme.txt
Outdated
Show resolved
Hide resolved
tests/phpunit/tests/Checker/Checks/Plugin_Readme_Check_Tests.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Nilambar Sharma <[email protected]>
Co-authored-by: Nilambar Sharma <[email protected]>
Implements language detection for
readme.txtfiles to ensure compliance with WordPress.org requirement that readmes be written in standard English.Implementation
Uses
patrickschur/language-detectionlibrary to detect language with enhanced preprocessing:Enhanced Detection Features
Check Locations & Severity
Testing
Added comprehensive test coverage:
Language_Utilstrait tests with 14 test casesAll tests pass linting and PHPStan checks.
Example Output
For non-English content:
Edge Cases Handled
✅ Code snippets and technical documentation
✅ URLs and email addresses
✅ Short descriptions (< 30 chars get benefit of doubt)
✅ HTML formatting
✅ Mixed technical/natural language content
✅ Common WordPress/plugin terminology
Fixes #1009