Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating welcome anon templates' names. #1941

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions modules/friendlywelcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Twinkle.welcome.callback = function friendlywelcomeCallback(uid) {
event: Twinkle.welcome.populateWelcomeList,
list: [
{ type: 'option', value: 'standard', label: 'Standard welcomes', selected: !mw.util.isIPAddress(mw.config.get('wgRelevantUserName')) },
{ type: 'option', value: 'anonymous', label: 'IP user welcomes', selected: mw.util.isIPAddress(mw.config.get('wgRelevantUserName')) },
{ type: 'option', value: 'unregistered', label: 'IP user welcomes', selected: mw.util.isIPAddress(mw.config.get('wgRelevantUserName')) },
{ type: 'option', value: 'wikiProject', label: 'WikiProject welcomes' },
{ type: 'option', value: 'nonEnglish', label: 'Non-English welcomes' }
]
Expand Down Expand Up @@ -183,7 +183,7 @@ Twinkle.welcome.populateWelcomeList = function(e) {

var container = new Morebits.quickForm.element({ type: 'fragment' });

if ((type === 'standard' || type === 'anonymous') && Twinkle.getPref('customWelcomeList').length) {
if ((type === 'standard' || type === 'unregistered') && Twinkle.getPref('customWelcomeList').length) {
container.append({ type: 'header', label: 'Custom welcome templates' });
container.append({
type: 'radio',
Expand Down Expand Up @@ -341,37 +341,37 @@ Twinkle.welcome.templates = {
}
},

anonymous: {
'Anonymous user welcome templates': {
'welcome-anon': {
description: 'for anonymous users; encourages creating an account',
unregistered: {
'Unregistered user welcome templates': {
'welcome-unregistered': {
description: 'for unregistered users; encourages creating an account',
linkedArticle: true,
syntax: '{{subst:welcome-anon|art=$ARTICLE$}} ~~~~'
syntax: '{{subst:welcome-unregistered|art=$ARTICLE$}} ~~~~'
},
'thanks': {
description: 'for anonymous users; short; encourages creating an account',
description: 'for unregistered users; short; encourages creating an account',
linkedArticle: true,
syntax: '== Welcome! ==\n{{subst:thanks|page=$ARTICLE$}} ~~~~'
},
'welcome-anon-test': {
description: 'for anonymous users who have performed test edits',
'welcome-unregistered-test': {
description: 'for unregistered users who have performed test edits',
linkedArticle: true,
syntax: '{{subst:welcome-anon-test|$ARTICLE$|$USERNAME$}} ~~~~'
syntax: '{{subst:welcome-unregistered-test|$ARTICLE$|$USERNAME$}} ~~~~'
},
'welcome-anon-unconstructive': {
description: 'for anonymous users who have vandalized or made unhelpful edits',
'welcome-unregistered-unconstructive': {
description: 'for unregistered users who have vandalized or made unhelpful edits',
linkedArticle: true,
syntax: '{{subst:welcome-anon-unconstructive|$ARTICLE$|$USERNAME$}}'
syntax: '{{subst:welcome-unregistered-unconstructive|$ARTICLE$|$USERNAME$}}'
},
'welcome-anon-constructive': {
description: 'for anonymous users who fight vandalism or edit constructively',
'welcome-unregistered-constructive': {
description: 'for unregistered users who fight vandalism or edit constructively',
linkedArticle: true,
syntax: '{{subst:welcome-anon-constructive|art=$ARTICLE$}}'
syntax: '{{subst:welcome-unregistered-constructive|art=$ARTICLE$}}'
},
'welcome-anon-delete': {
description: 'for anonymous users who have removed content from pages',
'welcome-unregistered-delete': {
description: 'for unregistered users who have removed content from pages',
linkedArticle: true,
syntax: '{{subst:welcome-anon-delete|$ARTICLE$|$USERNAME$}} ~~~~'
syntax: '{{subst:welcome-unregistered-delete|$ARTICLE$|$USERNAME$}} ~~~~'
}
}
},
Expand Down
34 changes: 17 additions & 17 deletions modules/twinkleblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -815,13 +815,13 @@ Twinkle.block.callback.change_action = function twinkleblockCallbackChangeAction
* autoblock: <autoblock any IP addresses used (for registered users only)>
* disabletalk: <disable user from editing their own talk page while blocked>
* expiry: <string - expiry timestamp, can include relative times like "5 months", "2 weeks" etc>
* forAnonOnly: <show block option in the interface only if the relevant user is an IP>
* forUnregisteredOnly: <show block option in the interface only if the relevant user is an IP>
* forRegisteredOnly: <show block option in the interface only if the relevant user is registered>
* label: <string - label for the option of the dropdown in the interface (keep brief)>
* noemail: prevent the user from sending email through Special:Emailuser
* pageParam: <set if the associated block template accepts a page parameter>
* prependReason: <string - prepends the value of 'reason' to the end of the existing reason, namely for when revoking talk page access>
* nocreate: <block account creation from the user's IP (for anonymous users only)>
* nocreate: <block account creation from the user's IP (for unregistered users only)>
* nonstandard: <template does not conform to stewardship of WikiProject User Warnings and may not accept standard parameters>
* reason: <string - block rationale, as would appear in the block log,
* and the edit summary for when adding block template, unless 'summary' is set>
Expand All @@ -839,15 +839,15 @@ Twinkle.block.callback.change_action = function twinkleblockCallbackChangeAction
Twinkle.block.blockPresetsInfo = {
'anonblock': {
expiry: '31 hours',
forAnonOnly: true,
forUnregisteredOnly: true,
nocreate: true,
nonstandard: true,
reason: '{{anonblock}}',
sig: '~~~~'
},
'anonblock - school': {
expiry: '36 hours',
forAnonOnly: true,
forUnregisteredOnly: true,
nocreate: true,
nonstandard: true,
reason: '{{anonblock}} <!-- Likely a school based on behavioral evidence -->',
Expand All @@ -856,7 +856,7 @@ Twinkle.block.blockPresetsInfo = {
},
'blocked proxy': {
expiry: '1 year',
forAnonOnly: true,
forUnregisteredOnly: true,
nocreate: true,
nonstandard: true,
hardblock: true,
Expand All @@ -865,7 +865,7 @@ Twinkle.block.blockPresetsInfo = {
},
'CheckUser block': {
expiry: '1 week',
forAnonOnly: true,
forUnregisteredOnly: true,
nocreate: true,
nonstandard: true,
reason: '{{CheckUser block}}',
Expand All @@ -881,15 +881,15 @@ Twinkle.block.blockPresetsInfo = {
sig: '~~~~'
},
'checkuserblock-wide': {
forAnonOnly: true,
forUnregisteredOnly: true,
nocreate: true,
nonstandard: true,
reason: '{{checkuserblock-wide}}',
sig: '~~~~'
},
'colocationwebhost': {
expiry: '1 year',
forAnonOnly: true,
forUnregisteredOnly: true,
nonstandard: true,
reason: '{{colocationwebhost}}',
sig: null
Expand All @@ -903,14 +903,14 @@ Twinkle.block.blockPresetsInfo = {
sig: '~~~~'
},
'school block': {
forAnonOnly: true,
forUnregisteredOnly: true,
nocreate: true,
nonstandard: true,
reason: '{{school block}}',
sig: '~~~~'
},
'spamblacklistblock': {
forAnonOnly: true,
forUnregisteredOnly: true,
expiry: '1 month',
disabletalk: true,
nocreate: true,
Expand All @@ -920,19 +920,19 @@ Twinkle.block.blockPresetsInfo = {
reason: '{{rangeblock}}',
nocreate: true,
nonstandard: true,
forAnonOnly: true,
forUnregisteredOnly: true,
sig: '~~~~'
},
'tor': {
expiry: '1 year',
forAnonOnly: true,
forUnregisteredOnly: true,
nonstandard: true,
reason: '{{Tor}}',
sig: null
},
'webhostblock': {
expiry: '1 year',
forAnonOnly: true,
forUnregisteredOnly: true,
nonstandard: true,
reason: '{{webhostblock}}',
sig: null
Expand All @@ -949,7 +949,7 @@ Twinkle.block.blockPresetsInfo = {
'uw-ablock': {
autoblock: true,
expiry: '31 hours',
forAnonOnly: true,
forUnregisteredOnly: true,
nocreate: true,
pageParam: true,
reasonParam: true,
Expand Down Expand Up @@ -1082,7 +1082,7 @@ Twinkle.block.blockPresetsInfo = {
summary: 'You have been blocked from editing for attempting to [[WP:HARASS|harass]] other users'
},
'uw-ipevadeblock': {
forAnonOnly: true,
forUnregisteredOnly: true,
nocreate: true,
reason: '[[WP:Blocking policy#Evasion of blocks|Block evasion]]',
summary: 'Your IP address has been blocked from editing because it has been used to [[WP:EVADE|evade a previous block]]'
Expand Down Expand Up @@ -1255,7 +1255,7 @@ Twinkle.block.blockPresetsInfo = {
},
'zombie proxy': {
expiry: '1 month',
forAnonOnly: true,
forUnregisteredOnly: true,
nocreate: true,
nonstandard: true,
reason: '{{zombie proxy}}',
Expand Down Expand Up @@ -1485,7 +1485,7 @@ Twinkle.block.callback.filtered_block_groups = function twinkleblockCallbackFilt
var registrationRestrict;
if (blockSettings.forRegisteredOnly) {
registrationRestrict = Twinkle.block.isRegistered;
} else if (blockSettings.forAnonOnly) {
} else if (blockSettings.forUnregisteredOnly) {
registrationRestrict = !Twinkle.block.isRegistered;
} else {
registrationRestrict = true;
Expand Down
Loading