Apps pane of Language & Region preferences not showing all languages

My AppleScript applet is localized for French, German, Italian and Spanish. The applet displays text in the correct language if the preferred language is changed in the "General" pane of the Language & Region preferences. That is, the applet correctly works in all four languages.

However, the "Apps" pane shows Spanish, German and Italian but, does not show French. For example:

Why would the "Apps" pane not show all languages for which the applet is localized ?

Thanks

late 2015 iMac 27", macOS 12.2.1

Accepted Reply

Having lots of copies of the same app around can cause macOS grief. This problem is common on development machines, where you rebuild the same app over and over again. I generally test this stuff in on ‘clean’ machine, so I can get reproducible results. I typically use a VM for this, restoring the VM to a snapshot, one that’s never seen my app before, between each run. If that behaves correctly then I know that my app is OK in general and that the problem I’m seeing on my main machine is an edge case that I don’t have to worry too much about.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Replies

I tried this here in my office and wasn’t able to reproduce the problem. Specifically, I used Script Editor to create an applet and then added .lproj for the languages you mentioned (plus English). Here’s the final on-disk layout:

% find Test700983.app 
Test700983.app
Test700983.app/Contents
Test700983.app/Contents/_CodeSignature
Test700983.app/Contents/_CodeSignature/CodeResources
Test700983.app/Contents/MacOS
Test700983.app/Contents/MacOS/applet
Test700983.app/Contents/Resources
Test700983.app/Contents/Resources/de.lproj
Test700983.app/Contents/Resources/de.lproj/test.txt
Test700983.app/Contents/Resources/en.lproj
Test700983.app/Contents/Resources/en.lproj/test.txt
Test700983.app/Contents/Resources/es.lproj
Test700983.app/Contents/Resources/es.lproj/test.txt
Test700983.app/Contents/Resources/applet.rsrc
Test700983.app/Contents/Resources/it.lproj
Test700983.app/Contents/Resources/it.lproj/test.txt
Test700983.app/Contents/Resources/description.rtfd
Test700983.app/Contents/Resources/description.rtfd/TXT.rtf
Test700983.app/Contents/Resources/Scripts
Test700983.app/Contents/Resources/Scripts/main.scpt
Test700983.app/Contents/Resources/fr.lproj
Test700983.app/Contents/Resources/fr.lproj/test.txt
Test700983.app/Contents/Resources/applet.icns
Test700983.app/Contents/Info.plist
Test700983.app/Contents/PkgInfo

When I select this in System Preferences > Language & Region > Apps, the popup shows an extra value, Français — French, at the top of the non-default languages list.

macOS 12.2.1

Ditto.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Many thanks for looking at this. I suspect the problem is with my "strings" files. A while back I had a problem in Script Debugger which, on compiling my applet, removed my custom icns file (Script Editor does that too) and removed the entire "en.lproj" folder.

I was advised to rename the custom icns file and to rename all the localisable strings files. I did that. SD now compiles my app normally. More recently, I added French localisation. I think that's why French does not appear in the "Apps" pane – macOS is only looking for strings files which have the default name "localizable.strings". My guess is that macOS has already registered the other three languages and leaves them in place even though I've renamed the strings files.

I have tried testing that hypothesis by renaming all the strings files back to "Localizable.strings" and compiling in SD. So far, French still does not appear in the "Apps" pane, although, I don't know how long to wait for the new localisation to be registered (perhaps I have to reboot). The "Apps" pane is weird. I have deleted my applet from the "Apps" pane then added it back. Before adding it back, I can see French is registered:

But, after clicking on "Add", the applet is added but French is not shown.

  • I've done another test: created a new applet with one dialog using the same localization files as in my original applet. French and all other languages work in that test applet. So, something is amiss in my production applet. Now for a lot of head scratching.

  • I've done some testing by adding another language to a copy of my applet. That new language is not visible in the "Apps" pane at all. I can't get that language to appear. But, French now does show correctly for my original applet as well as the duplicate.

    I've also ended up with 7 copies of my applet in the Apps pane Application Chooser. That and the fact that French is now working even though I've not changed anything in my applet suggests the app-specific localisation in macOS is a bit wonky.

Add a Comment

Having lots of copies of the same app around can cause macOS grief. This problem is common on development machines, where you rebuild the same app over and over again. I generally test this stuff in on ‘clean’ machine, so I can get reproducible results. I typically use a VM for this, restoring the VM to a snapshot, one that’s never seen my app before, between each run. If that behaves correctly then I know that my app is OK in general and that the problem I’m seeing on my main machine is an edge case that I don’t have to worry too much about.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Good advice, many thanks. I'll do up a VM or two to help test my applet in various versions of macOS. Currently, I can test cleanly only in 10.13 and 10.14.

I had thought adding an app to the "Apps" pane would add the specific copy chosen – I used the "Other" menu item to locate the copy I wanted to add. But, I think you are right about the risks of having multiple copies floating around.

Cheers.