13,400
edits
m (1 revision imported) |
No edit summary |
||
Line 528: | Line 528: | ||
'Enter the content and\\/or code of the template here.', | 'Enter the content and\\/or code of the template here.', | ||
'EDIT BELOW THIS LINE', | 'EDIT BELOW THIS LINE', | ||
'Metadata: see \\[\\[ | 'Metadata: see \\[\\[Bharatpedia:Persondata\\]\\].', | ||
'See http://en. | 'See http://en.bharatpedia.org.in/wiki/Bharatpedia:Footnotes on how to create references using\\<ref\\>\\<\\/ref\\> tags, these references will then appear here automatically', | ||
'(After listing your sources please cite them using inline citations and place them after the information they cite.|Inline citations added to your article will automatically display here.) ' + | '(After listing your sources please cite them using inline citations and place them after the information they cite.|Inline citations added to your article will automatically display here.) ' + | ||
'(Please see|See) ((https?://)?en. | '(Please see|See) ((https?://)?en.bharatpedia.org.in/wiki/(Bharatpedia|WP):REFB|\\[\\[Bharatpedia:REFB\\]\\]) for instructions on how to add citations.' | ||
] ); | ] ); | ||
} else { | } else { | ||
Line 543: | Line 543: | ||
// Remove initial request artifact | // Remove initial request artifact | ||
text = text.replace( /== Request review at \[\[ | text = text.replace( /== Request review at \[\[BP:AFC\]\] ==/gi, '' ); | ||
// Remove sandbox templates | // Remove sandbox templates | ||
Line 566: | Line 566: | ||
// FIXME: Break this out into its own core function? Will it be used elsewhere? | // FIXME: Break this out into its own core function? Will it be used elsewhere? | ||
function convertExternalLinksToWikilinks( text ) { | function convertExternalLinksToWikilinks( text ) { | ||
var linkRegex = /\[{1,2}(?:https?:)?\/\/(?:en. | var linkRegex = /\[{1,2}(?:https?:)?\/\/(?:en.bharatpedia.org.in\/wiki|enwp.org)\/([^\s\|\]\[]+)(?:\s|\|)?((?:\[\[[^\[\]]*\]\]|[^\]\[])*)\]{1,2}/ig, | ||
linkMatch = linkRegex.exec( text ), | linkMatch = linkRegex.exec( text ), | ||
title, displayTitle, newLink; | title, displayTitle, newLink; | ||
Line 1,112: | Line 1,112: | ||
*/ | */ | ||
function setMessages() { | function setMessages() { | ||
var headerBegin = '== Your submission at [[ | var headerBegin = '== Your submission at [[Bharatpedia:Articles for creation|Articles for creation]]: '; | ||
AFCH.msg.set( { | AFCH.msg.set( { | ||
// $1 = article name | // $1 = article name | ||
Line 1,146: | Line 1,146: | ||
'g13-submission': '{{subst:Db-afc-notice|$1}} ~~' + '~~', | 'g13-submission': '{{subst:Db-afc-notice|$1}} ~~' + '~~', | ||
'teahouse-invite': '{{subst: | 'teahouse-invite': '{{subst:Bharatpedia:Teahouse/AFC invitation|sign=~~' + '~~}}' | ||
} ); | } ); | ||
} | } | ||
Line 2,031: | Line 2,031: | ||
AFCH.actions.movePage( afchPage.rawTitle, data.newTitle, | AFCH.actions.movePage( afchPage.rawTitle, data.newTitle, | ||
'Publishing accepted [[ | 'Publishing accepted [[Bharatpedia:Articles for creation|Articles for creation]] submission', | ||
{ movetalk: true } ) // Also move associated talk page if exists (e.g. `Draft_talk:`) | { movetalk: true } ) // Also move associated talk page if exists (e.g. `Draft_talk:`) | ||
.done( function ( moveData ) { | .done( function ( moveData ) { | ||
Line 2,037: | Line 2,037: | ||
newPage = new AFCH.Page( moveData.to ), | newPage = new AFCH.Page( moveData.to ), | ||
talkPage = newPage.getTalkPage(), | talkPage = newPage.getTalkPage(), | ||
recentPage = new AFCH.Page( ' | recentPage = new AFCH.Page( 'Bharatpedia:Articles for creation/recent' ); | ||
// ARTICLE | // ARTICLE | ||
Line 2,064: | Line 2,064: | ||
newPage.edit( { | newPage.edit( { | ||
contents: newText.get(), | contents: newText.get(), | ||
summary: 'Cleaning up accepted [[ | summary: 'Cleaning up accepted [[Bharatpedia:Articles for creation|Articles for creation]] submission' | ||
} ); | } ); | ||
Line 2,133: | Line 2,133: | ||
talkText = talkTextPrefix + '\n\n' + talkText; | talkText = talkTextPrefix + '\n\n' + talkText; | ||
var summary = 'Placing [[ | var summary = 'Placing [[Bharatpedia:Articles for creation|Articles for creation]] banner'; | ||
if ( wikiProjectsToAdd.length > 0 ) { | if ( wikiProjectsToAdd.length > 0 ) { | ||
summary += ', adding ' + wikiProjectsToAdd.length + | summary += ', adding ' + wikiProjectsToAdd.length + | ||
Line 2,157: | Line 2,157: | ||
message: AFCH.msg.get( 'accepted-submission', | message: AFCH.msg.get( 'accepted-submission', | ||
{ $1: newPage, $2: data.newAssessment } ), | { $1: newPage, $2: data.newAssessment } ), | ||
summary: 'Notification: Your [[ | summary: 'Notification: Your [[Bharatpedia:Articles for creation|Articles for creation]] submission has been accepted' | ||
} ); | } ); | ||
} ); | } ); | ||
Line 2,326: | Line 2,326: | ||
var hasTeahouseCat = false, | var hasTeahouseCat = false, | ||
teahouseCategories = [ | teahouseCategories = [ | ||
'Category: | 'Category:Bharatpedians who have received a Teahouse invitation', | ||
'Category: | 'Category:Bharatpedians who have received a Teahouse invitation through AfC' | ||
]; | ]; | ||
Line 2,386: | Line 2,386: | ||
AFCH.actions.logCSD( { | AFCH.actions.logCSD( { | ||
title: afchPage.rawTitle, | title: afchPage.rawTitle, | ||
reason: declineReason === 'cv' ? '[[ | reason: declineReason === 'cv' ? '[[BP:G12]] ({{tl|db-copyvio}})' : | ||
'{{tl|db-reason}} ([[ | '{{tl|db-reason}} ([[BP:AFC|Articles for creation]])', | ||
usersNotified: data.notifyUser ? [ submitter ] : [] | usersNotified: data.notifyUser ? [ submitter ] : [] | ||
} ); | } ); | ||
Line 2,518: | Line 2,518: | ||
afchPage.edit( { | afchPage.edit( { | ||
contents: text.get(), | contents: text.get(), | ||
summary: 'Tagging abandoned [[ | summary: 'Tagging abandoned [[Bharatpedia:Articles for creation|Articles for creation]] draft ' + | ||
'for speedy deletion under [[ | 'for speedy deletion under [[BP:G13|G13]]' | ||
} ); | } ); | ||
Line 2,537: | Line 2,537: | ||
message: AFCH.msg.get( 'g13-submission', | message: AFCH.msg.get( 'g13-submission', | ||
{ $1: AFCH.consts.pagename } ), | { $1: AFCH.consts.pagename } ), | ||
summary: 'Notification: [[ | summary: 'Notification: [[BP:G13|G13]] speedy deletion nomination of [[' + AFCH.consts.pagename + ']]' | ||
} ); | } ); | ||
} ); | } ); | ||
Line 2,544: | Line 2,544: | ||
AFCH.actions.logCSD( { | AFCH.actions.logCSD( { | ||
title: afchPage.rawTitle, | title: afchPage.rawTitle, | ||
reason: '[[ | reason: '[[BP:G13]] ({{tl|db-afc}})', | ||
usersNotified: usersToNotify | usersNotified: usersToNotify | ||
} ); | } ); | ||
Line 2,582: | Line 2,582: | ||
afchPage.edit( { | afchPage.edit( { | ||
contents: text.get(), | contents: text.get(), | ||
summary: 'Postponing [[ | summary: 'Postponing [[BP:G13|G13]] speedy deletion' | ||
} ); | } ); | ||
} | } |
edits