2,693
次編輯
小 (已匯入 1 筆修訂:Twinkle) |
小 (繁簡轉換) |
||
if( Morebits.wiki.isPageRedirect() ) {
Twinkle.tag.mode = '重定向';
Twinkle.addPortletLink( Twinkle.tag.callback, "
}
// article/draft tagging
else if( ( ( mw.config.get('wgNamespaceNumber') === 0 || mw.config.get('wgNamespaceNumber') === 118 ) && mw.config.get('wgCurRevisionId') ) || ( Morebits.pageNameNorm === 'Wikipedia:沙盒' ) ) {
Twinkle.tag.mode = '
Twinkle.addPortletLink( Twinkle.tag.callback, "
}
};
Twinkle.tag.callback = function friendlytagCallback( uid ) {
var Window = new Morebits.simpleWindow( 630, (Twinkle.tag.mode === "
Window.setScriptName( "Twinkle" );
// anyone got a good policy/guideline/info page/instructional page link??
Window.addFooterLink( "Twinkle
var form = new Morebits.quickForm( Twinkle.tag.callback.evaluate );
list: [
{
label: '
value: 'patrolPage',
name: 'patrolPage',
switch( Twinkle.tag.mode ) {
case '
Window.setTitle( "
form.append({
name: 'sortorder',
label: '察看列表:',
tooltip: '您可以在Twinkle
event: Twinkle.tag.updateSortOrder,
list: [
{ type: 'option', value: 'cat', label: '按
{ type: 'option', value: 'alpha', label: '按字母', selected: Twinkle.getFriendlyPref('tagArticleSortOrder') === 'alpha' }
]
list: [
{
label: '如可能,合
value: 'group',
name: 'group',
tooltip: '如果添加{{multiple issues}}支持的三
checked: Twinkle.getFriendlyPref('groupByDefault')
}
case '重定向':
Window.setTitle( "重定向
form.append({ type: 'header', label:'常用模板' });
form.append({ type: 'checkbox', name: 'redirectTags', list: Twinkle.tag.lessFrequentList });
form.append({ type: 'header', label:'
form.append({ type: 'checkbox', name: 'redirectTags', list: Twinkle.tag.rareList });
break;
Window.display();
if (Twinkle.tag.mode === "
// fake a change event on the sort dropdown, to initialize the tag list
var evt = document.createEvent("Event");
name: 'mergeTarget',
type: 'input',
label: '其他
tooltip: '如指定多
},
{
list: [
{
label: '用{{' + otherTagName + '}}
checked: true,
tooltip: '
}
]
name: 'mergeReason',
type: 'textarea',
label: '合
(tag === "merge to" ? '其他' : '
tooltip: '可
});
}
type: 'select',
list: [
{ label: "{{notability}}:通用的
{ label: "{{notability|Biographies}}:人物
{ label: "{{notability|Book}}:
{ label: "{{notability|Number}}:
{ label: "{{notability|Fiction}}:
{ label: "{{notability|Neologisms}}:
{ label: "{{notability|Web}}:
]
};
// append any custom tags
if (Twinkle.getFriendlyPref('customTagList').length) {
container.append({ type: 'header', label: '自定
container.append({ type: 'checkbox', name: 'articleTags', list: Twinkle.getFriendlyPref('customTagList') });
}
Twinkle.tag.article.tags = {
"advert": "
"autobiography": "
"blpdispute": "可能
"blpsources": "生者
"blpunsourced": "生者
"catimprove": "需要更多
"citation style": "引用需要
"citecheck": "可能包含不
"cleanup": "可能需要
"cleanup-jargon": "包含
"coi": "主要
"copypaste": "
"contradict": "
"copyedit": "需要
"dead end": "需要更多
"disputed": "
"expand": "需要
"expert": "需要精通或熟悉本主
"external links": "使用外部
"fansite": "
"globalize": "
"hoax": "真
"howto": "包含指南或教
"in-universe": "使用小
"inappropriate person": "使用不
"inappropriate tone": "
"lead section": "
"lead section too long": "
"merge": "建
"merge from": "建
"merge to": "建
"newsrelease": "
"no footnotes": "因
"non-free": "可能
"notability": "可能不符合通用
"notmandarin": "包含
"onesource": "
"original research": "可能包含原
"orphan": "
"overlinked": "含有
"overly detailed": "包含太多
"plot": "可能包含
"pov": "中立性有
"primarysources": "依
"prose": "使用了日期或
"refimprove": "需要
"review": "
"rewrite": "不符合
"roughtranslation": "翻
"substub": "
"trivia": "
"uncategorized": "缺少
"unencyclopedic": "可能不
"unreferenced": "
"update": "
"verylong": "可能
"weasel": "
};
Twinkle.tag.article.tagCategories = {
"清理和
"常
"cleanup",
"cleanup-jargon",
"copyedit"
],
"可能多余的
"copypaste",
"external links",
"non-free"
],
"
"lead section",
"lead section too long",
"verylong"
],
"
"in-universe",
"plot"
]
},
"常
"重要性和知名度": [
"notability" // has subcategories and special-cased code
],
"
"advert",
"fansite",
"review"
],
"
"expand",
"substub",
"unencyclopedic"
],
"信息和
"expert",
"overly detailed",
"trivia"
],
"
"update"
],
"中立、偏
"autobiography",
"coi",
"weasel"
],
"可供查
"blpdispute",
"blpsources",
]
},
"具
"
"notmandarin",
"roughtranslation"
],
"
"dead end",
"orphan",
"overlinked"
],
"
"citation style"
],
"分
"catimprove",
"uncategorized"
]
},
"合
"merge",
"merge from",
Twinkle.tag.frequentList = [
{
label: '{{合
value: '合
},
{
label: '{{
value: '
},
{
label: '{{模板重定向}}:指向模板的重定向
value: '模板重定向'
},
{
label: '{{
value: '
},
{
label: '{{
value: '
},
{
label: '{{
value: '
},
{
label: '{{拼
value: '拼
},
{
label: '{{
value: '
},
{
label: '{{
value: '
},
{
label: '{{
value: '
},
{
label: '{{全名重定向}}:
value: '全名重定向'
},
{
label: '{{短名重定向}}:完整
value: '短名重定向'
},
},
{
label: '{{非中文重定向}}:非中文
value: '非中文重定向'
},
{
label: '{{日文重定向}}:日
value: '日文重定向'
}
Twinkle.tag.lessFrequentList = [
{
label: '{{角色重定向}}:
value: '角色重定向'
},
{
label: '{{章
value: '章
},
{
label: '{{列表重定向}}:
value: '列表重定向'
},
{
label: '{{可能性重定向}}:
value: '可能性重定向'
},
{
label: '{{
value: '
},
{
label: '{{
value: '
},
{
label: '{{快捷方式重定向}}:
value: '快捷方式重定向'
}
Twinkle.tag.rareList = [
{
label: '{{
value: '
},
{
label: '{{消歧
value: '消歧
},
{
label: '{{域名重定向}}:
value: '域名重定向'
},
{
label: '{{年代重定向}}:
value: '年代重定向'
},
{
label: '{{用
value: '用
},
{
label: '{{重定向模板用重定向}}:
value: '重定向模板用重定向'
},
{
label: '{{EXIF重定向}}:JPEG
value: 'EXIF重定向'
}
// nonDiscussArticle is the article which won't have the discussion
params.nonDiscussArticle = (tagName === "merge to" ? mw.config.get('wgTitle') : params.mergeTarget);
params.talkDiscussionTitle = '
}
currentTag += '|discuss=Talk:' + params.discussArticle + '#' + params.talkDiscussionTitle;
if( !tagRe.exec( pageText ) ) {
if( params.tags[i] == 'notability' ) {
wikipedia_page = new Morebits.wiki.page("Wikipedia:
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
}
} else {
Morebits.status.warn( '信息', '在
'}}…跳
// don't do anything else with merge tags
if (params.tags[i] === "merge" || params.tags[i] === "merge from" ||
if( ( miTest || miOldStyleTest ) && groupableTags.length > 0 ) {
Morebits.status.info( '信息', '添加支持的
groupableTags.sort();
$.each(groupableTags, addTag);
summaryText += '
if( tags.length > 0 ) {
summaryText += '和';
tagText = "";
} else if( params.group && groupableTags.length >= 3 ) {
Morebits.status.info( '信息', '合
groupableTags.sort();
$.each(groupableTags, addTag);
summaryText += '等
if( tags.length > 0 ) {
summaryText += '及';
} else {
Morebits.status.warn( '信息', '在重定向上找到{{' + params.tags[i] +
'}}…跳
}
}
"$1" + tagText);
}
summaryText += ( tags.length > 0 ? '
'到' + Twinkle.tag.mode;
if (params.mergeReason) {
// post the rationale on the talk page (only operates in main namespace)
var talkpageText = "\n\n==
talkpageText += params.mergeReason.trim() + "--~~~~";
var talkpage = new Morebits.wiki.page("Talk:" + params.discussArticle, "
talkpage.setAppendText(talkpageText);
talkpage.setEditSummary('
'
Twinkle.getPref('summaryAd'));
talkpage.setWatchlist(Twinkle.getFriendlyPref('watchMergeDiscussions'));
talkDiscussionTitle: params.talkDiscussionTitle
};
var otherpage = new Morebits.wiki.page(params.mergeTarget, "
params.mergeTarget + ")");
otherpage.setCallbackParameters(newParams);
var params = pageobj.getCallbackParameters();
pageobj.setAppendText("\n{{subst:Wikipedia:
pageobj.setEditSummary("添加[[" + Morebits.pageNameNorm + "]]" + Twinkle.getPref('summaryAd'));
pageobj.setCreateOption('recreate');
switch (Twinkle.tag.mode) {
case '
params.tags = form.getChecked( 'articleTags' );
params.group = form.group.checked;
// form validation
if( !params.tags.length ) {
alert( '必
return;
}
if( ((params.tags.indexOf("merge") !== -1) + (params.tags.indexOf("merge from") !== -1) +
(params.tags.indexOf("merge to") !== -1)) > 1 ) {
alert( '
return;
}
if( (params.mergeTagOther || params.mergeReason) && params.mergeTarget.indexOf('|') !== -1 ) {
alert( '目前
return;
}
Morebits.wiki.actionCompleted.redirect = Morebits.pageNameNorm;
Morebits.wiki.actionCompleted.notice = "
if (Twinkle.tag.mode === '重定向') {
Morebits.wiki.actionCompleted.followRedirect = false;
}
var wikipedia_page = new Morebits.wiki.page(Morebits.pageNameNorm, "正在
wikipedia_page.setCallbackParameters(params);
switch (Twinkle.tag.mode) {
case '
/* falls through */
case '重定向':
|