Translation Events: Retire the standalone GitHub repository#731
Open
obenland wants to merge 7 commits into
Open
Translation Events: Retire the standalone GitHub repository#731obenland wants to merge 7 commits into
obenland wants to merge 7 commits into
Conversation
Syncs the plugin to the current trunk of https://github.com/WordPress/wporg-gp-translation-events and brings over its PHPUnit suite, so the standalone repository can be retired and no longer needs to be kept in sync. The suite runs on PHPUnit 11 in a new environments/translate test environment, following the same conventions as the Plugin Directory and Theme Directory suites, and the plugin is now part of the translate dev stack. Multi-class files were split up so the plugin lints clean against the root PHPCS ruleset without any ruleset changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The effective one is directly above the __() call, where gettext tooling picks it up. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fixes indentation depths that did not match their openers, strips trailing whitespace, collapses multiple blank lines, and applies the auto-fixable WordPress-standard alignment fixes. Whitespace-only: git diff -w is empty. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
All files added in this PR now pass phpcs --standard=WordPress with no exclusions; the only remaining output is the Capabilities.Unknown warnings for the plugin's own registered capabilities, whose designed remedy is the ruleset property the root ruleset already applies. - Documents every new file: file, class, property, and function doc comments across the plugin includes, the test suite, and the theme. - Renames single-class files to the class- prefix convention and the four camelCase exception classes to WordPress-style names (Invalid_Start etc.). - Replaces the short ternaries in the event form block with explicit ternaries. The old expressions echoed "1" into the markup when a field was editable; now nothing is echoed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Converts space indentation to tabs and strips trailing whitespace, so the stylesheet passes the WordPress standard. Whitespace-only change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The example block in src/ was never wired up: the only reference to its build/ output is in src/blocks/example/index.php, which nothing loads. With it gone, package.json (whose only purpose was building it) and the .gitignore for build/ have no reason to exist either. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
phpcs-branch.php runs phpcs on a temp copy named <basename>.test.php in the repo root, so path-sensitive sniffs act on the temp path: the FileName sniff reports "index.php.test.php" as an invalid file name (surfacing as a false positive whenever line 1 of a file changes), and ruleset exclude-patterns never match modified files. Feed the temp copy to phpcs on stdin with --stdin-path so sniffs see the real path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
obenland
marked this pull request as ready for review
July 23, 2026 01:21
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes this repository the canonical home of the Translation Events plugin, so that https://github.com/WordPress/wporg-gp-translation-events can be retired and we no longer have to sync changes between the two repositories.
Plugin sync
trunkof the standalone repository. This includes refactors that had not yet been synced over (removal ofEvent_Repository_Cached/Event_Repository_Interface, newEvents_Query_Result,check_is_new_contributor()visibility change). All meta-side commits were verified to already be present in the standalone repository, so nothing is lost in either direction.Eventexception classes,Event_Start_Date/Event_End_Date,Stats_Row/Event_Stats), plus a handful of style fixes (blank line after file comments, reversedimplode()arguments, deprecatedimagedestroy()call,use (spacing).WPORG_TRANSLATION_EVENTS_TESTSenv var. It only skipped the one-timev3_set_is_new_contributor()backfill during tests, which is a no-op on a fresh test database anyway.Tests
The PHPUnit suite comes along and now runs on PHPUnit 11 under wp-env, following the same conventions as the Plugin Directory and Theme Directory suites:
Class_Name.php(PHPUnit ≥ 10 discovers tests by class-name-matching file names) and de-namespaced, with the shared base class imported asuse Wporg\Tests\Base_Test as TestCase— the pattern WPCS'sFileNamesniff recognizes for test classes.Base_Testgained agetAnnotations()shim: WordPress Core's test framework predates PHPUnit 10 and otherwise falls back toPHPUnit\Util\Test::parseTestMethodAnnotations(), which no longer exists. That is the framework's only PHPUnit 9 API touchpoint at runtime; none of these tests use annotation-based expectations.environments/translate/.wp-env.test.jsontest environment (GlotPress from source, since the suite needsGP_UnitTestCase) with anafter-start-test.shthat installs PHPUnit 11 the same way the Theme Directory one does, plustranslate:test/translate:test:envnpm scripts matchingplugins:test/themes:test.Translation Eventsentry in the Unit Tests workflow, identical in shape to the existing entries.Development environment
environments/translatedev stack, including creating its database tables inafter-start.sh(the plugin only creates them whenis_admin()is true).Not carried over
.github/workflows/,composer.json/composer.lock,bin/install-wp-tests.sh,phpcs.xml,package-lock.json— all replaced by this repository's existing tooling.Verification
checkRequirements()docblock annotation, same as the Theme Directory suite.phpcsover the whole plugin directory is clean against the unmodified root ruleset.Note
While validating the CI approach I noticed the existing
WP: Handbook Pluginjob currently reportsNo tests executed!and still passes — wp-env's bundled PHPUnit 10 doesn't pick up its kebab-case test files. Pre-existing and out of scope here, but worth a follow-up.Once this lands, the standalone repository can be archived.
🤖 Generated with Claude Code