oficina / sheets Public

Mac menu says "Sheets": PlainAppNameCommands first, SidebarCommands, declared localizations

Human

Prompt

Add `PlainAppNameCommands()` FIRST in the Mac app's .commands (see rastrillo docs/mac-updates.md), add `"localizations"` listing Sheets' shipped languages to native/mac-updates.json, set the Settings window's navigationTitle "Sheets", and add SidebarCommands() if Sheets uses a split view.

From this commit's own message. The prompt ledger has no entries for it — which is what a squashed, rebased or amended commit looks like, and what every commit looks like in a repo without a ledger.

Summary

  SheetsApp declares PlainAppNameCommands() first, so About/Hide/Quit read "Sheets" (not "Oficina Sheets") and Check for Updates survives; then SidebarCommands(), because Home is a NavigationSplitView and the replaced Help group took SwiftUI's hidden Toggle Sidebar alias with it. mac-updates.json lists the twelve languages SheetsKit ships (en ar bn es ga hi ja pt ru vi yue zh-Hans) so the Sparkle build declares CFBundleLocalizations; the Mac App Store project.yml/Info.plist declares the same list (xcodegen regenerated; pbxproj unchanged). test-mac-bundle.py now checks SUBundleName = Sheets and, on a release build, CFBundleLocalizations against the shipped .lproj directories.

Notes:
  Sheets has no Settings scene yet (report §1.1), so there is no Settings window to title; whoever adds one gives its content .navigationTitle("Sheets").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev a741f2e1a49916393924772a3fb92964966556ef parent c4b75f0
5 files changed, +58 −6
  • native/apple/Sources/SheetsApp/SheetsApp.swift +8 −0
  • native/mac-updates.json +14 −0
  • native/macos/Info.plist +16 −1
  • native/macos/project.yml +6 −2
  • native/scripts/test-mac-bundle.py +14 −3

CI passed — run details

diff --git a/native/apple/Sources/SheetsApp/SheetsApp.swift b/native/apple/Sources/SheetsApp/SheetsApp.swift
index 0f425da..1a011f3 100644
--- a/native/apple/Sources/SheetsApp/SheetsApp.swift
+++ b/native/apple/Sources/SheetsApp/SheetsApp.swift
@@ -18,6 +18,14 @@ import SwiftUI
Window(sheetsMacString("Home"), id: "home") { SheetsAccountWindow(windows: windows) }
.defaultSize(width: 1000, height: 760)
.commands {
+ // First: it replaces the About/Hide/Quit/Help groups with items in the
+ // plain name ("Quit Sheets", not "Quit Oficina Sheets"); declared later
+ // it would drop Check for Updates (after .appInfo) with them.
+ PlainAppNameCommands()
+ // Home is a NavigationSplitView. The Help group PlainAppNameCommands
+ // replaces carried SwiftUI's hidden ⌥⌘S Toggle Sidebar; this restores
+ // View ▸ Show/Hide Sidebar (⌃⌘S).
+ SidebarCommands()
SheetsWindowCommands(windows: windows)
SheetsEditorCommands()
#if canImport(RastrilloMacUpdates)
diff --git a/native/mac-updates.json b/native/mac-updates.json
index 91b73c2..7e0d10e 100644
--- a/native/mac-updates.json
+++ b/native/mac-updates.json
@@ -5,5 +5,19 @@
"keychain_account": "oficina",
"url_schemes": [
"works.oficina.sheets"
+ ],
+ "localizations": [
+ "en",
+ "ar",
+ "bn",
+ "es",
+ "ga",
+ "hi",
+ "ja",
+ "pt",
+ "ru",
+ "vi",
+ "yue",
+ "zh-Hans"
]
}
diff --git a/native/macos/Info.plist b/native/macos/Info.plist
index b0ebdf2..16d24fc 100644
--- a/native/macos/Info.plist
+++ b/native/macos/Info.plist
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
- <string>$(DEVELOPMENT_LANGUAGE)</string>
+ <string>en</string>
<key>CFBundleDisplayName</key>
<string>Oficina Sheets</string>
<key>CFBundleExecutable</key>
@@ -14,6 +14,21 @@
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
+ <key>CFBundleLocalizations</key>
+ <array>
+ <string>en</string>
+ <string>ar</string>
+ <string>bn</string>
+ <string>es</string>
+ <string>ga</string>
+ <string>hi</string>
+ <string>ja</string>
+ <string>pt</string>
+ <string>ru</string>
+ <string>vi</string>
+ <string>yue</string>
+ <string>zh-Hans</string>
+ </array>
<key>CFBundleName</key>
<string>Sheets</string>
<key>CFBundlePackageType</key>
diff --git a/native/macos/project.yml b/native/macos/project.yml
index f20b897..0a2af50 100644
--- a/native/macos/project.yml
+++ b/native/macos/project.yml
@@ -21,8 +21,10 @@ targets:
platform: macOS
# The .app file name, which Finder, the Dock and Spotlight show (Paul,
# 2026-11-14). CFBundleName is the plain short name, as rastrillo's
- # bundler writes it; SwiftUI's About/Hide/Quit items read
- # CFBundleDisplayName, so they still say "Oficina Sheets".
+ # bundler writes it. SwiftUI's About/Hide/Quit items read
+ # CFBundleDisplayName; PlainAppNameCommands (SheetsApp.swift) replaces
+ # them with "About Sheets" etc., in the languages CFBundleLocalizations
+ # declares (the same list as mac-updates.json's "localizations").
productName: Oficina Sheets
sources:
- ../apple/Sources/SheetsApp
@@ -42,6 +44,8 @@ targets:
properties:
CFBundleDisplayName: Oficina Sheets
CFBundleName: Sheets
+ CFBundleDevelopmentRegion: en
+ CFBundleLocalizations: [en, ar, bn, es, ga, hi, ja, pt, ru, vi, yue, zh-Hans]
CFBundleShortVersionString: $(MARKETING_VERSION)
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
CFBundleIconFile: AppIcon
diff --git a/native/scripts/test-mac-bundle.py b/native/scripts/test-mac-bundle.py
index 355a10d..d09628a 100644
--- a/native/scripts/test-mac-bundle.py
+++ b/native/scripts/test-mac-bundle.py
@@ -23,12 +23,23 @@ with tempfile.TemporaryDirectory(prefix="oficina-sheets-launch-") as directory:
app = apps[0]
info = plistlib.loads((app / "Contents/Info.plist").read_bytes())
# Paul, 2026-11-14: works.oficina.* on every build, "Oficina Sheets" where
- # Finder looks, CFBundleName the plain short name "Sheets" (SwiftUI's
- # About/Hide/Quit items read the display name, not this), and the sign-in
- # scheme registered so the browser's callback reaches the app.
+ # Finder looks, CFBundleName the plain short name "Sheets" (the menu bar,
+ # the About window, PlainAppNameCommands' About/Hide/Quit and, through
+ # SUBundleName, Sparkle's windows), and the sign-in scheme registered so
+ # the browser's callback reaches the app.
assert info["CFBundleIdentifier"] == "works.oficina.sheets", info["CFBundleIdentifier"]
assert app.name == "Oficina Sheets.app" and info["CFBundleDisplayName"] == "Oficina Sheets", app.name
assert info["CFBundleName"] == "Sheets", info["CFBundleName"]
+ assert info.get("SUBundleName") == "Sheets", info.get("SUBundleName")
+ # Without CFBundleLocalizations every bundle in the app, RastrilloApple's
+ # menu titles and SheetsKit's own strings included, reads English.
+ # bundle-mac.py writes it from mac-updates.json, so only a release
+ # (--updates-config) build carries it.
+ if "SUFeedURL" in info:
+ shipped = sorted(p.stem for p in (Path(__file__).resolve().parents[1] /
+ "apple/Sources/SheetsKit/Resources").glob("*.lproj"))
+ assert sorted(info.get("CFBundleLocalizations", [])) == shipped, (info.get("CFBundleLocalizations"), shipped)
+ assert info.get("CFBundleDevelopmentRegion") == "en", info.get("CFBundleDevelopmentRegion")
assert any("works.oficina.sheets" in entry.get("CFBundleURLSchemes", [])
for entry in info.get("CFBundleURLTypes", [])), "works.oficina.sheets URL scheme not registered"
executable = app / "Contents/MacOS" / info["CFBundleExecutable"]