You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(i18n): check display-only error messages in one source scan - #9667
The translation audit read every source file twice, once for direct uses and once for aliases. Run both checks on the same contents. This preserves the file filters, patterns and line diagnostics while avoiding the second traversal that contributed to a macOS timeout.
How I tested it
On this branch, macOS arm64 with Bun 1.4.3 and TERM=dumb: from packages/i18n, bun test test/display-only.test.ts — 10 pass, 0 fail.
Lint and typecheck passed on the combined verification checkout
Allow maintainer edits
Signed CLA
Summary by cubic
Combines the direct-use and alias checks in the i18n display-only test into a single file scan, removing the second traversal that contributed to a macOS timeout while preserving file filters and line diagnostics.
Written for commit d84fd9b. Summary will update on new commits.
Summary by CodeRabbit
Tests
Simplified an existing check for matching strings assigned from error messages.
No actionable comments were generated in the recent review.
Walkthrough
The display-only test now checks aliases for values assigned from errorMessage() during the existing source-file scan. It removes the separate glob scan and its repeated file and source checks.
Changes: i18n display-only test scan
Layer / File(s)
Summary
Alias check in existing scan packages/i18n/test/display-only.test.ts
The alias check reuses source text from the existing scan. A comment documents the check, and the separate scan and repeated checks are removed.
This is a test-only change that makes the i18n display-only audit scan source files once instead of twice. It does not affect production behavior, and no merge-blocking risk is evident.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title describes the main change: the translation audit's display-only error message check now runs within one source-file scan instead of a separate second glob scan. It uses conventional commit f…
Description check
The description covers the What & why section, explaining that the audit previously read each source file twice and now runs both checks on the same contents to avoid a second traversal linked to a ma…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title describes the main change: the translation audit's display-only error message check now runs within one source-file scan instead of a separate second glob scan. It uses conventional commit format (type(scope): subject) and matches the raw summary and objectives. Length is 64 characters, which is acceptable.
Full details: Description check
Explanation
The description covers the What & why section, explaining that the audit previously read each source file twice and now runs both checks on the same contents to avoid a second traversal linked to a macOS timeout. The How I tested it section gives concrete commands, platform, and results. The checklist is filled in. The template asks for an issue link, which is not given, but the PR is linked to #9625 for verification. Screenshots are not needed since the change is not user-visible. The description is mostly complete.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 0bcdbe05-d74b-4f0d-8d5f-3e92c32eaa67
Commits
Reviewing files that changed from the base of the PR and between e9dc091 and d84fd9b.
Files selected for processing: 1
packages/i18n/test/display-only.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
This branch has not been deployed
No deployments
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
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 & why
The translation audit read every source file twice, once for direct uses and once for aliases. Run both checks on the same contents. This preserves the file filters, patterns and line diagnostics while avoiding the second traversal that contributed to a macOS timeout.
How I tested it
bun test test/display-only.test.ts— 10 pass, 0 fail.Checklist
Summary by cubic
Combines the direct-use and alias checks in the i18n display-only test into a single file scan, removing the second traversal that contributed to a macOS timeout while preserving file filters and line diagnostics.
Written for commit d84fd9b. Summary will update on new commits.
Summary by CodeRabbit