Skip to content

fix(csv): better detect need for stripping csv escaping#6262

Merged
nijel merged 1 commit intotranslate:masterfrom
nijel:csv
Apr 23, 2026
Merged

fix(csv): better detect need for stripping csv escaping#6262
nijel merged 1 commit intotranslate:masterfrom
nijel:csv

Conversation

@nijel
Copy link
Copy Markdown
Member

@nijel nijel commented Apr 23, 2026

No description provided.

@nijel nijel self-assigned this Apr 23, 2026
@nijel nijel enabled auto-merge (rebase) April 23, 2026 08:10
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f14b6ae30

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

break

if pounit is None:
if pounit is None and not self.has_spreadsheet_escape_prefix(csvunit.source):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve simplify fallback for apostrophe-escaped sources

This new guard skips the simplify() matching path for any source that starts with an apostrophe escape (for example '=A1), not just backslash-prefixed literals. That regresses prior merge behavior when exact source/location matching fails but simplified matching would still recover the intended unit (e.g., formula-like msgids that differ only by punctuation/spacing), causing those translations to be logged as "entry not found" and dropped. Limiting this skip to backslash-prefixed values avoids the false-positive case you fixed without removing existing fallback behavior for normal spreadsheet-escaped CSV produced by po2csv.

Useful? React with 👍 / 👎.

@nijel nijel merged commit a5de752 into translate:master Apr 23, 2026
26 checks passed
@nijel nijel deleted the csv branch April 23, 2026 08:21
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