code-server/packages/vscode/src/fill/labels.ts
Asher 14da71499f
Set platform based on server (#32)
* 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
2019-02-26 12:01:14 -06:00

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; };