mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 09:43:30 +00:00
Merge "Allow the mention prefix to be configured via a message"
This commit is contained in:
commit
b31c9ae7fb
|
@ -35,6 +35,7 @@
|
|||
"callbackParam": [
|
||||
"discussiontools-defaultsummary-reply",
|
||||
"discussiontools-replywidget-feedback-link",
|
||||
"discussiontools-replywidget-mention-prefix",
|
||||
"discussiontools-signature-prefix"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"discussiontools-replywidget-feedback": "Share feedback about this feature",
|
||||
"discussiontools-replywidget-feedback-link": "https:\/\/www.mediawiki.org\/wiki\/Talk:Talk_pages_project\/replying",
|
||||
"discussiontools-replywidget-loading": "Loading…",
|
||||
"discussiontools-replywidget-mention-prefix": "@",
|
||||
"discussiontools-replywidget-mention-tool-header": "Find user: $1",
|
||||
"discussiontools-replywidget-mention-tool-title": "Mention a user",
|
||||
"discussiontools-replywidget-mode-source": "Source",
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
"discussiontools-replywidget-feedback": "Label for link to share feedback about the reply widget",
|
||||
"discussiontools-replywidget-feedback-link": "{{optional|Link to a page where users can share feedback about the reply widget. Defaults to a page on MediaWiki.org.}}",
|
||||
"discussiontools-replywidget-loading": "Message shown while the reply widget is loading",
|
||||
"discussiontools-replywidget-mention-prefix": "{{optional|Character to prefix mentions. This does not have to be the same as the trigger character, which is always '@'.}}",
|
||||
"discussiontools-replywidget-mention-tool-header": "Header of search results when searching for a user to mention.\n\nParameters:\n* $1 – search query for the username. Note that this is not a full username, and '''can't''' be used with <code><nowiki>{{GENDER:}}</nowiki></code>.",
|
||||
"discussiontools-replywidget-mention-tool-title": "Title text for the user mention tool.",
|
||||
"discussiontools-replywidget-mode-source": "Label for source mode (wikitext) editor",
|
||||
|
|
|
@ -117,8 +117,7 @@ MWUsernameCompletionAction.prototype.getHeaderLabel = function ( input, suggesti
|
|||
|
||||
MWUsernameCompletionAction.prototype.insertCompletion = function ( word, range ) {
|
||||
var fragment,
|
||||
// TODO: Allow output customisation (T250332)
|
||||
prefix = '@',
|
||||
prefix = mw.msg( 'discussiontools-replywidget-mention-prefix' ),
|
||||
title = mw.Title.newFromText( word, mw.config.get( 'wgNamespaceIds' ).user );
|
||||
|
||||
if ( this.surface.getMode() === 'source' ) {
|
||||
|
@ -133,7 +132,7 @@ MWUsernameCompletionAction.prototype.insertCompletion = function ( word, range )
|
|||
{ type: '/mwPing' }
|
||||
] );
|
||||
|
||||
fragment.collapseToStart().insertContent( '@' );
|
||||
fragment.collapseToStart().insertContent( prefix );
|
||||
|
||||
return fragment;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue