chore(ci): check translation keys on pull requests - #4622
Draft
thetaPC wants to merge 1 commit into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Issue URL: N/A
What is the current behavior?
No PR check builds a non-default locale.
build:previewisdocusaurus build --locale enand onlybuild:productionbuilds all locales, so anything that fails specifically injagets through review and breaks the main deploy instead.That just happened: the Docusaurus 3.10 upgrade added a validation that rejects duplicate sidebar translation keys, our three "Build Your First App" categories collide on one key, and every check on that PR was green because none of them touched
ja.What is the new behavior?
A
Check Translation Keysstep runs on pull requests, beforeCheck Diff:write-translationsextracts translatable strings through the same code path the localized build uses, so it hits the same validation, but it never compiles anything. It caught the real failure in 2 seconds, versus minutes fordocusaurus build --locale ja.The workflow is also renamed from
Install Dependencies, LinttoValidate Docs. The old name was already stale, since it didn't mention Spell Check, and naming it after the steps is what let it drift.Does this introduce a breaking change?
Other information
How to test:
The check should fail where the duplicate keys still exist, and pass where they are fixed. Run it on both branches to see each side.
1. This branch, without the fix. The check should fail.
Expected: exits 1 with
2. The branch with the sidebar fix. The check should pass.
Expected: exits 0 and reports the files it wrote, for example
3. Clean up.