Skip to content

fix(fomats): better handle edge cases in csv format#6261

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

fix(fomats): better handle edge cases in csv format#6261
nijel merged 1 commit intotranslate:masterfrom
nijel:csv

Conversation

@nijel
Copy link
Copy Markdown
Member

@nijel nijel commented Apr 23, 2026

Gracefully handle non-numeric values and support string escaping in round trip.

@nijel nijel self-assigned this Apr 23, 2026
@nijel nijel enabled auto-merge (rebase) April 23, 2026 06:34
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: 89f9b7880a

ℹ️ 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".

Comment thread translate/convert/csv2po.py Outdated
Gracefully handle non-numeric values and support string escaping in round trip.
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: 9c133ce52f

ℹ️ 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".

Comment on lines +113 to +114
and value[0] in {"'", "\\"}
and value[1] in csvl10n.csvunit.spreadsheetescapes
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 Restrict spreadsheet de-escape to apostrophe-prefixed values

In csv2po.remove_spreadsheet_escape, this change now strips both leading ' and \ before template matching, but CSV export only adds spreadsheet protection with a leading apostrophe (csvunit.add_spreadsheet_escape). As a result, literal values like \=A1 (in source or location) are treated as escaped formulas and normalized to =A1, which can incorrectly match and update a different PO unit instead of remaining unmatched.

Useful? React with 👍 / 👎.

@nijel nijel merged commit 6510373 into translate:master Apr 23, 2026
25 of 26 checks passed
@nijel nijel deleted the csv branch April 23, 2026 06:57
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