مدیاویکی:Gadget-friendlytag.js: تفاوت میان نسخهها
پرش به ناوبری
پرش به جستجو
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
خط ۱۲: | خط ۱۲: | ||
* Active on: Existing articles; file pages with a corresponding file | * Active on: Existing articles; file pages with a corresponding file | ||
* which is local (not on Commons); existing subpages of | * which is local (not on Commons); existing subpages of | ||
* { | * {Iranpedia|Iranpedia talk}:Articles for creation; | ||
* all redirects | * all redirects | ||
* Config directives in: FriendlyConfig | * Config directives in: FriendlyConfig | ||
خط ۲۹: | خط ۲۹: | ||
} | } | ||
// article/draft article tagging | // article/draft article tagging | ||
else if( ( mw.config.get('wgNamespaceNumber') === 0 || mw.config.get('wgNamespaceNumber') === 118 || /^ | else if( ( mw.config.get('wgNamespaceNumber') === 0 || mw.config.get('wgNamespaceNumber') === 118 || /^Iranpedia( talk)?\:Articles for creation\//.exec(Morebits.pageNameNorm) ) && mw.config.get('wgCurRevisionId') ) { | ||
Twinkle.tag.mode = 'article'; | Twinkle.tag.mode = 'article'; | ||
Twinkle.addPortletLink( Twinkle.tag.callback, "برچسب", "friendly-tag", "افزودن برچسبهای نگهداری به مقاله" ); | Twinkle.addPortletLink( Twinkle.tag.callback, "برچسب", "friendly-tag", "افزودن برچسبهای نگهداری به مقاله" ); | ||
خط ۳۹: | خط ۳۹: | ||
Window.setScriptName( "توینکل" ); | Window.setScriptName( "توینکل" ); | ||
// anyone got a good policy/guideline/info page/instructional page link?? | // anyone got a good policy/guideline/info page/instructional page link?? | ||
Window.addFooterLink( "راهنمای توینکل", " | Window.addFooterLink( "راهنمای توینکل", "ip:TW/DOC#tag" ); | ||
var form = new Morebits.quickForm( Twinkle.tag.callback.evaluate ); | var form = new Morebits.quickForm( Twinkle.tag.callback.evaluate ); | ||
خط ۶۶: | خط ۶۶: | ||
name: 'sortorder', | name: 'sortorder', | ||
label: 'مشاهده فهرست:', | label: 'مشاهده فهرست:', | ||
tooltip: 'میتوانید ترتیب نمایش پیشفرض را در ترجیحات توینکل تغییر دهید ( | tooltip: 'میتوانید ترتیب نمایش پیشفرض را در ترجیحات توینکل تغییر دهید (ip:TWPREFS).', | ||
event: Twinkle.tag.updateSortOrder, | event: Twinkle.tag.updateSortOrder, | ||
list: [ | list: [ | ||
خط ۲۸۷: | خط ۲۸۷: | ||
type: 'input', | type: 'input', | ||
label: 'زبان مقاله (اگر معلوم باشد): ', | label: 'زبان مقاله (اگر معلوم باشد): ', | ||
tooltip: 'Consider looking at [[ | tooltip: 'Consider looking at [[ip:LRC]] for help. If listing the article at PNT, please try to avoid leaving this box blank, unless you are completely unsure.' | ||
} | } | ||
]; | ]; | ||
خط ۳۰۸: | خط ۳۰۸: | ||
list: [ | list: [ | ||
{ | { | ||
label: 'List this article at | label: 'List this article at Iranpedia:Pages needing translation into English (PNT)', | ||
checked: true | checked: true | ||
} | } | ||
خط ۷۹۱: | خط ۷۹۱: | ||
{ label: '{{Opaque}}: opaque background should be transparent', value: 'Opaque' }, | { label: '{{Opaque}}: opaque background should be transparent', value: 'Opaque' }, | ||
{ label: '{{Remove border}}: unneeded border, white space, etc.', value: 'Remove border' }, | { label: '{{Remove border}}: unneeded border, white space, etc.', value: 'Remove border' }, | ||
{ label: '{{Rename media}}: file should be renamed according to the criteria at [[ | { label: '{{Rename media}}: file should be renamed according to the criteria at [[ip:FMV]]', value: 'Rename media' }, | ||
{ label: '{{Should be PNG}}: GIF or JPEG should be lossless', value: 'Should be PNG' }, | { label: '{{Should be PNG}}: GIF or JPEG should be lossless', value: 'Should be PNG' }, | ||
{ | { | ||
خط ۱٬۱۲۲: | خط ۱٬۱۲۲: | ||
} | } | ||
// post at | // post at ip:PNT for {{not English}} and {{rough translation}} tag | ||
if (params.translationPostAtPNT) { | if (params.translationPostAtPNT) { | ||
var pntPage = new Morebits.wiki.page(' | var pntPage = new Morebits.wiki.page('Iranpedia:Pages needing translation into English', | ||
"Listing article at | "Listing article at Iranpedia:Pages needing translation into English"); | ||
pntPage.setFollowRedirect(true); | pntPage.setFollowRedirect(true); | ||
pntPage.setCallbackParameters({ | pntPage.setCallbackParameters({ | ||
خط ۱٬۴۰۶: | خط ۱٬۴۰۶: | ||
} | } | ||
var | var iranpedia_page = new Morebits.wiki.page(Morebits.pageNameNorm, "در حال برچسب زدن به " + Twinkle.tag.mode); | ||
iranpedia_page.setCallbackParameters(params); | |||
switch (Twinkle.tag.mode) { | switch (Twinkle.tag.mode) { | ||
case 'article': | case 'article': | ||
/* falls through */ | /* falls through */ | ||
case 'redirect': | case 'redirect': | ||
iranpedia_page.load(Twinkle.tag.callbacks.main); | |||
return; | return; | ||
case 'file': | case 'file': | ||
iranpedia_page.load(Twinkle.tag.callbacks.file); | |||
return; | return; | ||
default: | default: |