Merge "Use VE shortcut-generation code for replywidget button labels"

This commit is contained in:
jenkins-bot 2023-10-26 16:47:18 +00:00 committed by Gerrit Code Review
commit ee8a898f69

View file

@ -74,11 +74,8 @@ function ReplyWidget( commentController, commentDetails, config ) {
flags: [ 'primary', 'progressive' ], flags: [ 'primary', 'progressive' ],
label: this.replyButtonLabel, label: this.replyButtonLabel,
title: this.replyButtonLabel + ' [' + title: this.replyButtonLabel + ' [' +
// TODO: Use VE keyboard shortcut generating code new ve.ui.Trigger( ve.ui.commandHelpRegistry.lookup( 'dialogConfirm' ).shortcuts[ 0 ] ).getMessage() +
( $.client.profile().platform === 'mac' ? ']',
'⌘⏎' :
mw.msg( 'visualeditor-key-ctrl' ) + '+' + mw.msg( 'visualeditor-key-enter' )
) + ']',
accessKey: mw.msg( 'discussiontools-replywidget-publish-accesskey' ) accessKey: mw.msg( 'discussiontools-replywidget-publish-accesskey' )
} ); } );
this.cancelButton = new OO.ui.ButtonWidget( { this.cancelButton = new OO.ui.ButtonWidget( {
@ -86,11 +83,8 @@ function ReplyWidget( commentController, commentDetails, config ) {
label: mw.msg( 'discussiontools-replywidget-cancel' ), label: mw.msg( 'discussiontools-replywidget-cancel' ),
framed: false, framed: false,
title: mw.msg( 'discussiontools-replywidget-cancel' ) + ' [' + title: mw.msg( 'discussiontools-replywidget-cancel' ) + ' [' +
// TODO: Use VE keyboard shortcut generating code new ve.ui.Trigger( ve.ui.commandHelpRegistry.lookup( 'dialogCancel' ).shortcuts[ 0 ] ).getMessage() +
( $.client.profile().platform === 'mac' ? ']'
'⎋' :
mw.msg( 'visualeditor-key-escape' )
) + ']'
} ); } );
this.$headerWrapper = $( '<div>' ).addClass( 'ext-discussiontools-ui-replyWidget-headerWrapper' ); this.$headerWrapper = $( '<div>' ).addClass( 'ext-discussiontools-ui-replyWidget-headerWrapper' );