Skip to content

Translate GPT validation reasons in partition notes - #31

Merged
sudo-py-dev merged 1 commit into
mainfrom
fix/translate-gpt-errors
Nov 25, 2026
Merged

sudo-py-dev merged 1 commit into
mainfrom
fix/translate-gpt-errors

Conversation

@sudo-py-dev

@sudo-py-dev sudo-py-dev commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

The Quick Drive Check note for a damaged GPT copy translated the copy name but left the failure reason in English (e.g. GPT de secours · missing signature). None of the gpt() / inspect() error messages were in the locale catalogs, and the combined note can't match a catalog key.

  • src/partition.rs: translate the reason separately from the copy name.
  • locales/*.json: add the 12 partition inspection messages (missing signature, partition array checksum mismatch, unknown logical sector size, …) to all 10 locales. Key parity is kept (325 keys each).

OS-supplied I/O errors (e.g. a short read) still pass through untranslated, since they aren't app strings.

Testing

  • cargo fmt --check clean
  • cargo test --no-fail-fast passes locally. The audit test passes on a clean tree; it only fails locally when untracked review output (.codehawk/) sits in the working tree, which CI never has.
  • The Arabic and Hebrew translations would benefit from a native speaker's review.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added localized messages for disk partition and GPT validation errors, including invalid headers, checksums, partition entries, disk identifiers, and unknown sector sizes.
  • Bug Fixes
    • GPT copy error details now display in the selected language.

The note for a damaged GPT copy translated the copy name but left the
reason (e.g. "missing signature") in English, since none of the gpt()
error messages were in the locale catalogs. Translate the reason on its
own and add the 12 partition inspection messages to every locale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
reclaim Ready Ready Preview Nov 25, 2026 6:25am UTC

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Locale files add translations for GPT and partition validation diagnostics. GPT copy failure notes now translate the error text before formatting it with the translated copy name.

Changes: GPT diagnostic localization

Layer / File(s) Summary
Add and use translated GPT diagnostics
locales/*.json, src/partition.rs
Ten locale files add translations for GPT and partition validation errors. GPT copy failure notes now translate the error text before formatting it with the translated copy name.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Possibly related PRs

  • sudo-py-dev/reclaim#30: Adds the Quick Drive Check feature that produces the GPT validation reasons and partition notes translated in this change.
Merge Risk: Minimal · up to f44a8

This change translates GPT validation reasons in Quick Drive Check partition notes and adds the matching catalog entries to all locales. No concrete defect was found, so the merge risk is low. Native-speaker review of the Arabic and Hebrew strings is still advisable.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Translate GPT validation reasons in partition notes" matches the main change. The raw summary and PR objectives both say the change translates GPT validation reasons (such as "missing signa…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "Translate GPT validation reasons in partition notes" matches the main change. The raw summary and PR objectives both say the change translates GPT validation reasons (such as "missing signature") in partition notes, which were previously left in English. The change also adds 12 partition inspection messages to all 10 locale catalogs and wraps the error text with crate::i18n::t in src/partition.rs. The title does not cover the locale catalog additions in detail, which is acceptable.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 833cf55a-18e0-4086-a434-5fbc6d1a0092
Commits

Reviewing files that changed from the base of the PR and between d3b4a7e and f44a880.

Files selected for processing: 11

  • locales/ar.json
  • locales/de.json
  • locales/en.json
  • locales/es.json
  • locales/fr.json
  • locales/he.json
  • locales/it.json
  • locales/nl.json
  • locales/pt.json
  • locales/ru.json
  • src/partition.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@sudo-py-dev
sudo-py-dev merged commit 5eb7c7a into main Nov 25, 2026
8 checks passed
@sudo-py-dev
sudo-py-dev deleted the fix/translate-gpt-errors branch November 25, 2026 06:32
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