mirror of
https://github.com/cdr/code-server.git
synced 2026-03-20 20:25:47 +01:00
* Set platform based on server Had to refactor a bit to ensure our values get set before VS Code tries to use them. * Pave the way for mnemonics on all platforms * Fix context menus on Mac * Fix a bunch of things on Mac including menu bar * Set keybindings based on client's OS
10 lines
542 B
TypeScript
10 lines
542 B
TypeScript
import * as labels from "vs/base/common/labels";
|
|
|
|
// Here we simply disable translation of mnemonics and leave everything as &&.
|
|
// Since we're in the browser, we can handle all platforms in the same way.
|
|
const target = labels as typeof labels;
|
|
target.mnemonicMenuLabel = (label: string, forceDisable?: boolean): string => {
|
|
return forceDisable ? label.replace(/\(&&\w\)|&&/g, "") : label;
|
|
};
|
|
target.mnemonicButtonLabel = (label: string): string => { return label; };
|
|
target.unmnemonicLabel = (label: string): string => { return label; };
|