Don't double-localize menu shortcuts (#20623)

Release Notes:

- Don't have macOS localize our menu shortcuts that we already
localized.
This commit is contained in:
Conrad Irwin 2024-11-13 13:56:56 -07:00 committed by GitHub
parent 3c2dcf50fa
commit 6e477bbf56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,7 @@ use cocoa::{
NSPasteboardTypePNG, NSPasteboardTypeRTF, NSPasteboardTypeRTFD, NSPasteboardTypeString,
NSPasteboardTypeTIFF, NSSavePanel, NSWindow,
},
base::{id, nil, selector, BOOL, YES},
base::{id, nil, selector, BOOL, NO, YES},
foundation::{
NSArray, NSAutoreleasePool, NSBundle, NSData, NSInteger, NSProcessInfo, NSRange, NSString,
NSUInteger, NSURL,
@ -343,6 +343,8 @@ impl MacPlatform {
ns_string(key_to_native(&keystroke.key).as_ref()),
)
.autorelease();
let _: () =
msg_send![item, setAllowsAutomaticKeyEquivalentLocalization: NO];
item.setKeyEquivalentModifierMask_(mask);
}
// For multi-keystroke bindings, render the keystroke as part of the title.