Skip to content

[T3339] FIX: gate B2S letter translation on detected content language - #2120

Merged
Danielgergely merged 1 commit into
14.0from
T3339-b2s-translation-language-gate
Jul 28, 2026
Merged

[T3339] FIX: gate B2S letter translation on detected content language#2120
Danielgergely merged 1 commit into
14.0from
T3339-b2s-translation-language-gate

Conversation

@Danielgergely

Copy link
Copy Markdown
Member
  • FIX: Trust the letter's detected language over the field-office stamp; fail safe to translation when it can't be determined

- FIX: Trust the letter's detected language over the field-office stamp; fail safe to translation when it can't be determined
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge, with undetectable content consistently falling back to translation or manual handling.

The new helper uses the most processed available letter text, while both callers explicitly reject an empty detection result.

Files Needing Attention: Module dependencies guarantee the helper is available, and no incompatible consumers or overrides were identified.

T-Rex T-Rex Logs

What T-Rex did

  • Before capture, stamp-based decisions incorrectly queued readable English and allowed French, blank, and undetectable content.
  • After capture, language detection correctly identified English and French and produced publish/queue plus auto-send decisions that match all acceptance expectations (acceptance_failures=0).
  • The blocker capture recorded the exact failed Odoo and PostgreSQL availability commands.
  • Reviewed the related artifacts to verify pre- and post-capture behavior and the blocker command evidence.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
partner_communication_compassion/models/correspondence.py Replaces metadata-based auto-send eligibility with a fail-safe detected-content-language check.
sbc_compassion/models/correspondence.py Adds the shared content normalization and language-detection helper used by both gates.
sbc_translation/models/correspondence.py Uses detected content language to decide whether a letter can bypass translation.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Select translated, English, or original text] --> B[Normalize text and detect language]
    B --> C{Language detected and supported?}
    C -->|Yes| D[Continue publication or auto-send]
    C -->|No| E[Route to translation or manual delivery]
Loading

Reviews (1): Last reviewed commit: "[T3339] FIX: gate B2S letter translation..." | Re-trigger Greptile

@Danielgergely
Danielgergely merged commit 4745a93 into 14.0 Jul 28, 2026
2 checks passed
@Danielgergely
Danielgergely deleted the T3339-b2s-translation-language-gate branch July 28, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant