مدیاویکی: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
  *                        {Wikipedia|Wikipedia talk}:Articles for creation;
  *                        {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 || /^Wikipedia( talk)?\:Articles for creation\//.exec(Morebits.pageNameNorm) ) && mw.config.get('wgCurRevisionId') ) {
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( "راهنمای توینکل", "WP:TW/DOC#tag" );
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: 'می‌توانید ترتیب نمایش پیش‌فرض را در ترجیحات توینکل تغییر دهید (WP:TWPREFS).',
tooltip: 'می‌توانید ترتیب نمایش پیش‌فرض را در ترجیحات توینکل تغییر دهید (ip:TWPREFS).',
event: Twinkle.tag.updateSortOrder,
event: Twinkle.tag.updateSortOrder,
list: [
list: [
خط ۲۸۷: خط ۲۸۷:
type: 'input',
type: 'input',
label: 'زبان مقاله (اگر معلوم باشد): ',
label: 'زبان مقاله (اگر معلوم باشد): ',
tooltip: 'Consider looking at [[WP:LRC]] for help. If listing the article at PNT, please try to avoid leaving this box blank, unless you are completely unsure.'
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 Wikipedia:Pages needing translation into English (PNT)',
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 [[WP:FMV]]', value: 'Rename media' },
{ 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 WP:PNT for {{not English}} and {{rough translation}} tag
// post at ip:PNT for {{not English}} and {{rough translation}} tag
if (params.translationPostAtPNT) {
if (params.translationPostAtPNT) {
var pntPage = new Morebits.wiki.page('Wikipedia:Pages needing translation into English',
var pntPage = new Morebits.wiki.page('Iranpedia:Pages needing translation into English',
"Listing article at Wikipedia:Pages needing translation into English");
"Listing article at Iranpedia:Pages needing translation into English");
pntPage.setFollowRedirect(true);
pntPage.setFollowRedirect(true);
pntPage.setCallbackParameters({
pntPage.setCallbackParameters({
خط ۱٬۴۰۶: خط ۱٬۴۰۶:
}
}


var wikipedia_page = new Morebits.wiki.page(Morebits.pageNameNorm, "در حال برچسب زدن به " + Twinkle.tag.mode);
var iranpedia_page = new Morebits.wiki.page(Morebits.pageNameNorm, "در حال برچسب زدن به " + Twinkle.tag.mode);
wikipedia_page.setCallbackParameters(params);
iranpedia_page.setCallbackParameters(params);
switch (Twinkle.tag.mode) {
switch (Twinkle.tag.mode) {
case 'article':
case 'article':
/* falls through */
/* falls through */
case 'redirect':
case 'redirect':
wikipedia_page.load(Twinkle.tag.callbacks.main);
iranpedia_page.load(Twinkle.tag.callbacks.main);
return;
return;
case 'file':
case 'file':
wikipedia_page.load(Twinkle.tag.callbacks.file);
iranpedia_page.load(Twinkle.tag.callbacks.file);
return;
return;
default:
default: