iPad-on-macOS (Catalyst) and menu bar localization

Hi,


I have a confounding localization problem for the menu bar and preferences in an iPad-on-macOS (Catalyst) app.


Here is all I did to find the problem. I checked the Mac checkbox for an existing, shipping app that contains 10 localizations, and I added the default menu bar to its Main.storyboard file. The Main.storyboard file is not localized, as I replace all app-specific strings at runtime by calling NSLocalizedString directly. I also have a Settings bundle localized to the same 10 languages.


The first problem I observed was, the menu bar items that refer to the app name (such as About, Quit, etc.), appear in ALL-CAPS (e.g., NSMENUITEMTITLEABOUT, etc.):


The menu bar menu title for the app is correct, but it appears to not substitute the app name in any menu items that require it. The rest of the application (main window contents) localizes as expected.


If I select a different region and language to run, all of the CamelCase menu items (Preferences, Services, etc.) appear localized, but the all-caps items are still not localized.


I tried changing the storyboard file to have localization (Base, and all of the app's supported locales), but it had no effect. I also observed that if I add my own menu items using the same string keys found in my Localization.strings files, and ensure that the storyboard is using those localization files, my app-specific menu items are also not being localized. Only the system menu items without the app name are being localized.


Lastly, I observed that the Preferences window's strings are also entirely in ALL-CAPS. If I copy each of the localizable strings from the Settings' Root.strings files into the respective Localizable.strings files, the Preferences window strings still don't get localized.


If anyone familiar with the subtleties of localization and Catalyst can offer suggestions for me to diagnose or fix these problems, let me know what to try next.


Regards, Brian

I have progress to report, and partial answers.


The root cause of the problem with Settings / Preferences localization had to do with my Settings.bundle Root.plist specifying "Root.strings" as the Strings Filename, instead of simply "Root". I figured this out by looking at a new project with a Settings bundle, and diffing. I think my Settings.bundle was initially created in 2008. So, wow. OK.


Regarding the other problem, with the ALL-CAPS menu items, I noticed the following runtime logging output repeated a dozen or so times at startup, varying the "<numbers-and-letters>.title" part:


[-snipped-] [strings] ERROR: 0fi-6W-Mns.title not found in table MainMenu of bundle CFBundle 0x1024136d0 </System/Library/PrivateFrameworks/UIKitMacHelper.framework> (not loaded)


I have no idea what this means, or how to resolve it.

I realize I'm a bit late, but if it can help. Resource files such as xib and storyboard get their own strings file. You need a MainMenu.strings file in each of your lproj folders.
iPad-on-macOS (Catalyst) and menu bar localization
 
 
Q