Skip to content

Commit 6029559

Browse files
committed
fix: i18n for keyboard help header
1 parent 77147cf commit 6029559

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/shortcut_dialog.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,6 @@ export class ShortcutDialog {
5252
}
5353
}
5454

55-
/**
56-
* Update the modifier key to the user's specific platform.
57-
*/
58-
updatePlatformName() {
59-
const platform = this.getPlatform();
60-
const platformEl = this.outputDiv
61-
? this.outputDiv.querySelector('.platform')
62-
: null;
63-
if (platformEl) {
64-
platformEl.textContent = platform;
65-
}
66-
}
67-
6855
toggle(workspace: Blockly.WorkspaceSvg) {
6956
clearHelpHint(workspace);
7057
this.toggleInternal();
@@ -126,7 +113,7 @@ export class ShortcutDialog {
126113
<button class="close-modal">
127114
<span class="material-symbols-outlined">close</span>
128115
</button>
129-
<h1>Keyboard shortcuts – <span class="platform">Windows</span></h1>
116+
<h1>${Msg['SHORTCUTS_HELP_HEADER'] || 'Keyboard shortcuts'} – <span class="platform">${this.getPlatform()}</span></h1>
130117
</div>
131118
<div class="shortcut-tables">
132119
${shortcutTables}
@@ -138,8 +125,6 @@ export class ShortcutDialog {
138125
this.modalContainer = this.outputDiv.querySelector('.modal-container');
139126
this.shortcutDialog = this.outputDiv.querySelector('.shortcut-modal');
140127
this.closeButton = this.outputDiv.querySelector('.close-modal');
141-
this.updatePlatformName();
142-
// Can we also intercept the Esc key to dismiss.
143128
if (this.closeButton) {
144129
this.closeButton.addEventListener('click', (e) => {
145130
this.toggleInternal();

0 commit comments

Comments
 (0)