Skip to content

fix: keep zh_CN.lproj in macOS builds - #61

Merged
boomzero merged 1 commit into
mainfrom
fix/mac-zh-locale
Oct 3, 2026
Merged

boomzero merged 1 commit into
mainfrom
fix/mac-zh-locale

Conversation

@boomzero

@boomzero boomzero commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • The Mac App Store page lists twig as English only, even though the app ships a Chinese UI and has a Chinese (Simplified) store listing.
  • Cause: electronLanguages: [en-US, zh-CN]. electron-builder matches locale file names literally (exact, or <name>- / <name>_ prefix). Windows/Linux use zh-CN.pak, which matches; macOS uses zh_CN.lproj, which does not, so it was stripped from the bundle. The App Store derives supported languages from the .lproj folders.
  • Evidence: the shipped 1.2.0 dist/mas-arm64/twig.app/Contents/Resources contains only en.lproj, while CFBundleLocalizations already declares en and zh-CN.
  • Fix: list both zh-CN (pak) and zh_CN (lproj).

Validation

  • Simulated electron-builder's matching rule against the installed Electron's locale folders:
    • macOS keeps en.lproj, zh_CN.lproj
    • Windows/Linux keep en-US.pak, zh-CN.pak (unchanged)
  • Not yet verified with a full MAS build. After the next build, confirm twig.app/Contents/Resources/zh_CN.lproj exists.

🤖 Generated with Claude Code

electronLanguages matched locale names literally, so zh-CN kept
zh-CN.pak on Windows/Linux but stripped zh_CN.lproj from the macOS
bundle. The Mac App Store derives supported languages from .lproj
folders and listed twig as English-only. List both spellings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@boomzero
boomzero merged commit e83f663 into main Oct 3, 2026
6 checks passed
@boomzero
boomzero deleted the fix/mac-zh-locale branch October 3, 2026 00:24
@boomzero
boomzero restored the fix/mac-zh-locale branch October 11, 2026 13:37
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