You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(helper): localise TCC prompts via lproj/InfoPlist.strings (#43)
User report: the two macOS TCC permission popups looked
inconsistent on a zh-locale machine — the Location prompt showed
"谛听 · 天耳" (Chinese) while the Bluetooth prompt showed
"diting-tianer.app" (English-looking bundle filename), and both
prompt bodies were always English even for zh users.
Root cause: the bundle had `CFBundleDisplayName = "谛听 · 天耳"`
set at the top level of Info.plist but no localised
InfoPlist.strings overrides. macOS picks the TCC prompt's
header from different fields per category (Location reads
CFBundleDisplayName, Bluetooth falls back to the bundle's URL
filename), and both prompt bodies come straight from the
NSLocationUsageDescription / NSBluetoothAlwaysUsageDescription
plist keys — which were English-only.
Fix: proper locale-aware InfoPlist.strings.
- New helper/Resources/en.lproj/InfoPlist.strings with English
overrides for CFBundleDisplayName / CFBundleName /
NSLocation* / NSBluetoothAlwaysUsageDescription
- New helper/Resources/zh-Hans.lproj/InfoPlist.strings with the
Chinese equivalents (display name "谛听 · 天耳", prompt bodies
translated)
- Info.plist top-level CFBundleName / CFBundleDisplayName unified
to "diting · tianer" (English fallback for non-lproj-aware
locales); the previous split between CFBundleName=diting-tianer
and CFBundleDisplayName=谛听 was what created the prompt
inconsistency in the first place
- Info.plist declares CFBundleLocalizations [en, zh-Hans] for
older macOS releases that don't auto-discover lproj dirs
- helper/build.sh copies the Resources/*.lproj tree into the
assembled bundle
Both .strings files pass `plutil -lint`; the bundle rebuilds
cleanly with no errors. zh-locale TCC prompts on v1.0.4 should
now show consistent Chinese display name + Chinese body in both
the Location and Bluetooth dialogs.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
/* English (default) localisation for the helper bundle's Info.plist.
2
+
*
3
+
* macOS's TCC prompts and the Finder display name read both
4
+
* CFBundleDisplayName and the usage descriptions through the
5
+
* active locale's lproj. Without this file, English users would
6
+
* see the global CFBundleDisplayName ("谛听 · 天耳") even though
7
+
* their locale is English — and the prompt bodies are English
8
+
* literals living in Info.plist directly.
9
+
*
10
+
* Keys must match exactly; macOS does NOT fall back to Info.plist
11
+
* if a key is missing here.
12
+
*/
13
+
14
+
"CFBundleDisplayName" = "diting · tianer";
15
+
"CFBundleName" = "diting · tianer";
16
+
17
+
"NSLocationUsageDescription" = "diting reads nearby Wi-Fi network names and BSSIDs to label access points and detect roaming. Location data never leaves your machine.";
18
+
"NSLocationWhenInUseUsageDescription" = "diting reads nearby Wi-Fi network names and BSSIDs to label access points and detect roaming. Location data never leaves your machine.";
19
+
"NSBluetoothAlwaysUsageDescription" = "diting scans nearby BLE advertisements so the TUI can show you what devices are around.";
0 commit comments