Skip to content

macOS: declare the UI languages so the open and save panels are translated - #2627

Merged
h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
Atalantis:macos-dialog-localizations
Oct 30, 2026
Merged

h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
Atalantis:macos-dialog-localizations

Conversation

@Atalantis

@Atalantis Atalantis commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What and why

The open and save panels, the overwrite confirmation and other AppKit dialogs stay in English whatever language GridCraft is shown in. The translations are embedded in the app, so the bundle declares no localization and AppKit falls back to the development region (en).

This adds CFBundleLocalizations to packaging/macos/Info.plist.in with the 19 interface languages GridCraft ships (its catalogs on main; Apple's spelling for zh-Hans, zh-Hant, pt-BR). CFBundleDevelopmentRegion stays en. PhotoCraft made the same change in storytold/photocraft#4261, and PdfCraft in storytold/pdfcraft#4785.

How it was tested

  • The same key was tested on PdfCraft 0.13.0 with French as the system language, on two copies of the bundle that differ only by this key (File > Open): Cancel, Open, Search, Recents, Downloads without it; Annuler, Ouvrir, Rechercher, Récents, Téléchargements with it.
  • Here: the template, with its placeholders filled, passes plutil -lint. Not run: cargo xtask ci, packaging/macos/package.sh, and the GridCraft app itself with this change.
  • If GridCraft gains or drops a language, this list needs the same change.

Summary by CodeRabbit

  • New Features
    • The app now declares support for English, Czech, German, Greek, Spanish, French, Italian, Japanese, Korean, Dutch, Polish, Brazilian Portuguese, Romanian, Russian, Serbian, Turkish, Ukrainian, Vietnamese, and Simplified Chinese.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between f6b0cec and 8cfe970.

Files selected for processing: 1
  • packaging/macos/Info.plist.in

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

Walkthrough

The macOS app property list now declares 20 supported localizations. A comment relates the list to embedded Rust UI translations and AppKit dialogs.

Changes: macOS localizations

Layer / File(s) Summary
Declare supported localizations
packaging/macos/Info.plist.in
Adds 20 language codes to CFBundleLocalizations and comments on alignment with embedded Rust UI translations and AppKit dialogs.

Priority: Normal

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: echelon

Merge Risk: Minimal · up to 8cfe9

The macOS localization metadata is aligned with the app’s translations and packaging flow.

Architecture risk: Low · up to 8cfe9

The change affects 1 system.

Changed systems: packaging

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — packaging (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in packaging/macos/Info.plist.in: Added CFBundleLocalizations with the listed 20 language codes, along with a comment describing their relationship to embedded Rust UI translations and AppKit dialogs.
Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: declaring macOS UI languages so system open and save panels can use the app's translations.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@Harrison-Booth

Copy link
Copy Markdown
Contributor

Review notes (not a formal review) on head 8cfe970.

Checked

  • Read the diff. The 19 entries in CFBundleLocalizations (en, cs, de, el, es, fr, it, ja, ko, nl, pl, pt-BR, ro, ru, sr, tr, uk, vi, zh-Hans) match the 19 variants of Language::ALL on main, and CFBundleDevelopmentRegion stays en.
  • No assets or third-party code.

Two notes

  • The description says Apple's spelling is used for zh-Hans, zh-Hant and pt-BR, but there is no zh-Hant entry. That is correct, since GridCraft has one Chinese catalog (Simplified), so only the wording of the text is off.
  • GridCraft's Serbian catalog is Latin script (i18n/sr.rs says "Latin script, ekavian"), while, as far as I know, the bare sr tag is Serbian in Cyrillic on Apple platforms. If macOS ships Serbian dialogs under sr only in Cyrillic, a user on Serbian (Latin) would get Cyrillic open and save panels next to a Latin interface. I cannot test this here, so it is a question and not a finding. sr-Latn may be the entry to use if AppKit has it.

Not checked

  • I have no macOS here, so I did not look at a panel or run plutil -lint or the packaging script. The French result in the description was on a different app's bundle, as the PR says. On this PR upstream shows only CodeRabbit as a check.

@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit b2f984a into storytold:main Oct 30, 2026
1 check passed
@echelon

echelon commented Oct 30, 2026

Copy link
Copy Markdown
Member

Landed in main (75f7056). Thank you for the contribution, @Atalantis! If you haven't already, come join us on Discord: https://discord.gg/artcraft

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.

4 participants