Skip to content

localize-changes: read multi-line defaultValue literals - #15275

Closed
teamleaderleo wants to merge 1 commit into
mainfrom
fix/localize-changes-multiline
Closed

teamleaderleo wants to merge 1 commit into
mainfrom
fix/localize-changes-multiline

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

scripts/localize-changes matched only single-line defaultValue strings, so a """ help text (the style CLI/CMUXCLI+Current.swift uses) parsed as an empty string. The helper then wrote en = "" into the catalog, and the merge rejected every packet row for that key with "completed packet row requires catalog, key, source, and locale strings". Each rerun reset en to empty again.

  • The defaultValue pattern now also matches """ literals. A new multiline_swift_body strips the closing delimiter's indentation the way Swift does, and still reports line-continuation escapes as needing manual review.
  • swift_call_suffix skips over """ blocks when it looks for the closing paren.

Found while localizing #15273.

Testing

  • python3 tests/test_localize_changes.py: 25 tests pass. The new test_multiline_default_is_read_whole_and_deindented fails without the fix.
  • The fixed parser decodes the existing cli.current.help to exactly its catalog en value.

🤖 Generated with Claude Code


Summary by cubic

Fixes scripts/localize-changes.py to read Swift multi-line defaultValue literals. Previously """ help text parsed as an empty string, so the catalog wrote en = "" and the merge rejected every packet row for that key; now the parser strips the closing delimiter's indentation as Swift does and flags \ line continuations for manual review. Also makes the closing-paren scan skip over multi-line blocks so the call boundary is found correctly.

Written for commit 4b6f071. Summary will update on new commits.

Review in cubic

The defaultValue pattern only matched single-line strings, so a `"""`
help text parsed as an empty string: the helper wrote an empty English
value into the catalog and the merge then rejected the packet rows. Match
multi-line literals, strip the closing delimiter's indentation the way
Swift does, and skip them when scanning for the call's closing paren.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Sep 28, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 32 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 665760ea-4cc1-4783-a254-55d49435b04a

📥 Commits

Reviewing files that changed from the base of the PR and between ba94a13 and 4b6f071.

📒 Files selected for processing (2)
  • scripts/localize_changes.py
  • tests/test_localize_changes.py

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@github-actions

Copy link
Copy Markdown
Contributor

Dogfood build of 4b6f071ac25074d7c88e0f702f2a4e0cc48f8f48

cmux DEV pr-15275-4b6f071a.app

The link opens this exact commit in the cmux dev menu bar app. The build starts on each push and the page waits until it is ready; a newer push replaces it. It signs in against production, so Cloud or backend changes still need a tagged build with a development backend.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Superseded by #15265, which landed the same multi-line defaultValue fix first.

@teamleaderleo
teamleaderleo deleted the fix/localize-changes-multiline branch September 28, 2026 10:11
@github-actions

Copy link
Copy Markdown
Contributor

Automatic catch-up couldn't merge main (2e0750be50a4): scripts/localize_changes.py (both sides changed it). Nothing was pushed; merge it by hand. A new push or /catch-up tries again.

Label no-auto-catch-up to opt out · Catch-up run

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