Skip to content

i18n: everything in English, UI in English or Polish following the system - #9

Merged
mbeczynski merged 18 commits into
mainfrom
i18n/english
Oct 6, 2026
Merged

mbeczynski merged 18 commits into
mainfrom
i18n/english

Conversation

@mbeczynski

Copy link
Copy Markdown
Contributor

What

The whole repository is now in English: code comments, logs, docs, launchd templates, workflows, config example, README.

Text shown to people (menu-bar app, CLI output and --help, notifications) goes through L10n.tr("English text"):

  • Language: follows the system. Polish when it is the first preferred language, otherwise English. CM_LANGUAGE=en|pl overrides it.
  • Logs: always English.
  • Translations: 364 Polish entries, now with correct diacritics (the old strings had none).

Example, drive-status on a live Mac:

Upload:           Uploading to Google Drive — 112 queued      (en)
Wysyłka:          Wysyłanie na Google Drive — 112 w kolejce   (CM_LANGUAGE=pl)

Guard rails (L10nTests)

  • Every key is an inline literal with a Polish entry, and the placeholder counts match.
  • No unused entries. The tables never disagree; this caught one real conflict while merging.
  • No Polish left anywhere in Sources/Tests outside the Polish tables. Exceptions carry an l10n-polish-ok marker. The detector was checked against injected samples: a word in a sentence, diacritics, and a word at a pattern boundary.
  • Tests always run in English, whatever the Mac's language.

Behaviour changes worth knowing

  • Alert deduplication no longer compares translated text. BackupHealth.Problem has a stable code (no-recent-backup, …). An existing health-alert.json holds a fingerprint of the old Polish summary, so one active problem may be notified once more after the update. After that, deduplication works as before, now independent of the language.
  • AppVersion.unknownCommit is now "unknown", not "nieznany"; it is written and read through the same constant.
  • The example config no longer uses the owner's name; the test that pins those keys is updated.
  • Temporary file names inside the POC harness are English (load.bin, …); nothing outside the harness uses them.

Not changed

  • Strings matched against tmutil, hdiutil, rclone, launchctl and security output.
  • Subcommand and flag names, launchd labels, persisted file formats.
  • "Show help information." stays English: it comes from ArgumentParser.

Checks

  • swift test: 306 tests, 0 failures.
  • swift format lint --strict passes.
  • drive-status and --help were checked in both languages.

🤖 Generated with Claude Code

mbeczynski and others added 18 commits October 6, 2026 08:32
…system

Replaces the unused Loc.swift. `L10n.tr("English text")` returns Polish
when the first preferred system language is Polish, English otherwise;
CM_LANGUAGE overrides it and tests always run in English. Logs stay
English-only.

L10nTests enforce the rules: inline literal keys, %@ placeholders only,
a Polish entry with matching placeholders for every key, no unused entries,
and no Polish left in Sources/Tests outside the Polish tables (currently
3311 lines - the translation follows in the next commits).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comments, CI error messages, the gdrive/ measurement notes, launchd and
Info.plist comments, the cask template comments and the example config
comments. No functional changes: keys, placeholders, shell logic and cask
stanzas are untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Translate all comments in Sources/CloudMachineApp to English and route
every visible GUI string (menu bar, dashboard, AppStatus headlines,
controller messages, busy labels) through L10n.tr with Polish entries in
L10nPolish+App.swift. Action logs keep a separate English name, so the
log does not switch language with the system.

AppStatusHealthTests now expect English; headlines owned by
CloudMachineCore (UploadState, BackupHealth.formatAge) are compared with
the core's own text instead of a copied literal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cloudmachine-agent: abstracts, option help and printed output go through
L10n.tr with Polish entries in L10nPolish.agent (104 keys); logs are plain
English. cloudmachine-poc is a developer tool and is English only. All
comments translated; PullPlugHarnessTests expect the English summary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Translates comments, logs and user-facing text in the image, buffer,
watchdog and upload-state code (BackupImageService, BufferGuardService,
DriveBufferService, UploadDrain, UploadState, BufferReadiness,
EdgeTriggeredLog) and their tests. Logs are plain English; text shown to
people goes through L10n.tr with Polish translations (with diacritics) in
L10nPolish.storage.

The upload-jam notification is now localized separately from its log
line. BufferGuardDecisionTests no longer asserts BackupHealth's exact
wording, which belongs to another file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Attaching the image" had two Polish translations: the GUI action label
("Podpinam obraz") and the busy-lock message prefix ("Podpinanie obrazu").
One English key can only have one translation, so the lock messages now use
their own names (Image creation/attach/detach/verification). Caught by
L10nTests.testTablesDoNotDisagree after merging the app and storage tables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sh table

Comments and logs are now English; text shown to people goes through
L10n.tr with Polish translations in L10nPolish+System.swift (104 keys).

HealthAlert no longer deduplicates by the translated summary:
BackupHealth.Problem carries a stable `code`, and the persisted
deliveryError is a fixed English value translated only for display, so
alert state written by a Polish-language run matches an English one.
AppVersion.unknownCommit is now "unknown" (written and read only via the
constant).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test names, comments and expected strings follow the English messages.
New tests: HealthAlert identity and persisted delivery reason do not
depend on the UI language; every BackupHealth problem has its own code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ealth text again

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ated texts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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