Require GFM adjacency for translate table detection#1088
Conversation
|
Warning Review limit reached
Next review available in: 19 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Greptile SummaryThis PR tightens markdown table detection for translated content. The main changes are:
Confidence Score: 4/5This is close, but the table heuristic can still skip translatable prose.
apps/web/src/api/translation.ts Important Files Changed
Reviews (2): Last reviewed commit: "fix(publish): match table cell counts in..." | Re-trigger Greptile |
| line.includes("|") && | ||
| line.includes("-") && | ||
| TABLE_SEPARATOR_LINE.test(line) && | ||
| lines[i - 1].includes("|") && |
There was a problem hiding this comment.
When adjacent prose has the same pipe-delimited count as a separator-looking line, this still treats the whole block as a table. For example, Valores: min | max | defecto\n-- | -- | -- gives both lines a count of 3, so translateMarkdown skips the block instead of translating the prose. The count check fixes mismatched examples, but matching-count prose still produces the silent untranslated output this change is meant to prevent.
Context Used: CLAUDE.md (source)
Parity port of the tightening that shipped in the mobile compose-translation review (ecency/ecency-mobile#3325):
translateMarkdownclassified a block as a table when any line had a pipe and any other line looked like a|---|separator, so prose containing pipe characters near a separator-like line was silently skipped by translation. The separator row must now sit directly below a pipe-containing row (the GFM shape).Two regression tests added (real table still skipped; pipes-in-prose now translates); suite 30/30.
Replaces #1087 (branch renamed so the build workflow triggers).