Repository navigation
docs: correct the stale UTF-16LE claim about localization files - #948
Conversation
CLAUDE.md said `*.lproj/Localizable.strings` files are UTF-16LE and told readers to keep them that way. That is inverted for the main app: all 43 locales of `DashWallet/*.lproj/Localizable.strings` and `Localizable.stringsdict` are UTF-8 with no BOM, and plain `grep` works on them. The files that actually are UTF-16LE are `WatchApp/*.lproj/Interface.strings` (40 of 43; en, zh-Hans and zh-Hant-TW are UTF-8). The old wording was actively harmful — acting on it means running iconv over UTF-8 files or "restoring" them to UTF-16, which breaks bartycrouch, plutil and reviewable diffs. It came up in review on #945, where a reviewer cited the guideline to request exactly that conversion. Also notes that `file` reports pure-ASCII UTF-8 as `us-ascii`, and every example command is runnable as written. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 41 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: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughLocalization encoding guidance now distinguishes main-app and WatchApp files, adds search and verification commands, warns against unsafe conversions, and retains Transifex synchronization instructions. ChangesLocalization encoding guidance
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CLAUDE.md`:
- Line 164: Update the conversion workflow to process only
DashWallet/**/Localizable.strings files, excluding WatchApp Interface.strings
files from recursive conversion; adjust scripts/convert_strings_to_utf8.sh
accordingly and keep the documented Transifex pull workflow consistent with this
target-aware behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
…talogs scripts/convert_strings_to_utf8.sh ran `find $(pwd) -name '*.strings'` and rewrote every match as UTF-8 without a BOM. That swept in the 40 UTF-16LE WatchApp/*.lproj/Interface.strings files — which are UTF-16LE by design — and anything under Pods/. Following the documented post-pull workflow therefore silently changed encodings it should not touch. Now scoped to DashWallet/*.lproj/Localizable.strings and .stringsdict, and it detects the BOM instead of unconditionally rewriting, so it is idempotent: on a clean tree it reports 'checked 86, normalised 0' and leaves every file byte-identical. Also drops the vim dependency. Verified both directions: no-op on the current tree, and a file forced to UTF-16LE converts back byte-identical to the original. Reported by CodeRabbit on #948. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
What
Corrects the "Localization files are UTF-16LE" gotcha in
CLAUDE.md, which is inverted for the main app and was actively causing bad advice.Why
The note said
*.lproj/Localizable.stringsfiles are UTF-16LE and instructed readers to "keep them UTF-16LE". Measured ondevelop:DashWallet/*.lproj/Localizable.stringsDashWallet/*.lproj/Localizable.stringsdictWatchApp/*.lproj/Interface.stringsWatchApp/{en,zh-Hans,zh-Hant-TW}.lproj/Interface.stringsSo the guidance named the wrong files. Acting on it means running
iconvover UTF-8 files, or "restoring" them to UTF-16 — which breaks bartycrouch,plutil, and reviewable diffs.This isn't hypothetical: in review on #945 a reviewer cited this guideline to request that
hr.lproj/Localizable.stringsbe converted to UTF-16LE with a BOM. Declining that required re-deriving the facts from scratch.What changed
Interface.stringsis UTF-16LE — and lists the three WatchApp exceptions.iconvor re-encode the main-app catalogs, and why.head -c 4 … | xxdcheck so the next reader verifies rather than trusts the doc.filereports pure-ASCII UTF-8 asus-ascii, which trips people up.Every command in the new note was run verbatim and produces the output shown.
Docs-only — no code or resources touched.
🤖 Generated with Claude Code
Summary by CodeRabbit