diff --git a/extension.json b/extension.json index cfcb1b227..5acf5be70 100644 --- a/extension.json +++ b/extension.json @@ -196,6 +196,7 @@ "discussiontools-replywidget-placeholder-reply", "discussiontools-replywidget-preferences", "discussiontools-replywidget-preview", + "discussiontools-replywidget-publish-accesskey", "discussiontools-replywidget-reply", "discussiontools-replywidget-return-to-newtopic", "discussiontools-replywidget-return-to-reply", diff --git a/i18n/en.json b/i18n/en.json index c4639a871..86576dbf3 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -118,6 +118,7 @@ "discussiontools-replywidget-placeholder-reply": "Reply to {{BIDI:$1}}", "discussiontools-replywidget-preferences": "Preferences", "discussiontools-replywidget-preview": "Preview", + "discussiontools-replywidget-publish-accesskey": "s", "discussiontools-replywidget-reply": "Reply", "discussiontools-replywidget-reply-link": "https://www.mediawiki.org/wiki/Special:MyLanguage/Talk_pages_project/Replying", "discussiontools-replywidget-return-to-newtopic": "Return to new topic", diff --git a/i18n/qqq.json b/i18n/qqq.json index 86dedf2eb..33d005110 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -131,6 +131,7 @@ "discussiontools-replywidget-placeholder-reply": "Placeholder describing who is being replied to.\n\nParameters:\n* $1 – username of the person who wrote the previous comment", "discussiontools-replywidget-preferences": "Label for link to the relevant preferences in the reply widget (the link points to [[Special:Preferences#mw-prefsection-editing-discussion]]).\n{{Identical|Preferences}}", "discussiontools-replywidget-preview": "Label for the preview area of the reply widget", + "discussiontools-replywidget-publish-accesskey": "{{doc-accesskey}}", "discussiontools-replywidget-reply": "Label for the button to submit a reply in the reply widget", "discussiontools-replywidget-reply-link": "{{notranslate}}\nUsed by {{msg-mw|Tag-discussiontools-reply}} as a link to a page where users learn about the feature. Defaults to a page on MediaWiki.org.", "discussiontools-replywidget-return-to-newtopic": "Label for the button to scroll the new topic widget back into view.", diff --git a/modules/dt.ui.ReplyWidget.js b/modules/dt.ui.ReplyWidget.js index 4353f0f36..389c7c59d 100644 --- a/modules/dt.ui.ReplyWidget.js +++ b/modules/dt.ui.ReplyWidget.js @@ -77,23 +77,24 @@ function ReplyWidget( commentController, commentDetails, config ) { this.replyButton = new OO.ui.ButtonWidget( { flags: [ 'primary', 'progressive' ], label: this.replyButtonLabel, - title: this.replyButtonLabel + ' ' + + title: this.replyButtonLabel + ' [' + // TODO: Use VE keyboard shortcut generating code ( $.client.profile().platform === 'mac' ? '⌘⏎' : mw.msg( 'visualeditor-key-ctrl' ) + '+' + mw.msg( 'visualeditor-key-enter' ) - ) + ) + ']', + accessKey: mw.msg( 'discussiontools-replywidget-publish-accesskey' ) } ); this.cancelButton = new OO.ui.ButtonWidget( { flags: [ 'destructive' ], label: mw.msg( 'discussiontools-replywidget-cancel' ), framed: false, - title: mw.msg( 'discussiontools-replywidget-cancel' ) + ' ' + + title: mw.msg( 'discussiontools-replywidget-cancel' ) + ' [' + // TODO: Use VE keyboard shortcut generating code ( $.client.profile().platform === 'mac' ? '⎋' : mw.msg( 'visualeditor-key-escape' ) - ) + ) + ']' } ); this.$headerWrapper = $( '