Skip to content

tag: add parameters to {{R from sort name}}#2290

Open
User-IAmChaos wants to merge 3 commits intowikimedia-gadgets:masterfrom
User-IAmChaos:master
Open

tag: add parameters to {{R from sort name}}#2290
User-IAmChaos wants to merge 3 commits intowikimedia-gadgets:masterfrom
User-IAmChaos:master

Conversation

@User-IAmChaos
Copy link
Copy Markdown

I still don't know how to use github and I definitely messed up at least something. I think I ended up copying the entire Twinkle code to my own account? I definitely didnt mean to and I hope I didnt break copyright law or anything. Please check my work. I think this addresses Issue 2281, per my comments on that issue.

@NovemLinguae
Copy link
Copy Markdown
Member

Looks like you got the GitHub side of things correct. "Forking" a repo to make your changes is the way you're supposed to do it and that's what you did. The idea is that you don't have edit access to this repo, but can edit your fork, so the fork is where you store your git branch. Copyright isn't a problem since all the code is open source.

You can edit your original post to end in "fixes #2281" to automatically link this PR to that issue. Would recommend you do that.

Did you get a chance to load up your patch in localhost, do npm start, then test it on test.wikipedia.org? That step is helpful to make sure your patch is bug free and works: https://github.com/wikimedia-gadgets/twinkle/blob/master/CONTRIBUTING.md#testing-your-code

Comment thread src/modules/twinkletag.js
{ tag: 'R from non-neutral name', description: 'redirect from a title that contains a non-neutral, pejorative, controversial, or offensive word, phrase, or name' },
{ tag: 'R from short name', description: 'redirect from a title that is a shortened form of a person\'s full name, a book title, or other more complete title' },
{ tag: 'R from sort name', description: 'redirect from the target\'s sort name, such as beginning with their surname rather than given name', restriction: 'insideMainspaceOnly' },
{ tag: 'R from sort name', description: 'redirect from the target\'s sort name, such as beginning with their surname rather than given name', restriction: 'insideMainspaceOnly' ,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have an extra space at the end of this line (the one before the comma) that is causing the "linter" test to fail.

@NovemLinguae NovemLinguae linked an issue Apr 18, 2026 that may be closed by this pull request
@NovemLinguae
Copy link
Copy Markdown
Member

Manual testing of this patch doesn't work. I don't see the 3 elements you added.

image

Comment thread src/modules/twinkletag.js
{ tag: 'R from short name', description: 'redirect from a title that is a shortened form of a person\'s full name, a book title, or other more complete title' },
{ tag: 'R from sort name', description: 'redirect from the target\'s sort name, such as beginning with their surname rather than given name', restriction: 'insideMainspaceOnly' },
{ tag: 'R from sort name', description: 'redirect from the target\'s sort name, such as beginning with their surname rather than given name', restriction: 'insideMainspaceOnly' ,
subgroup: [
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get tag, description, and restriction on their own lines, since subgroup is on its own line.

Comment thread src/modules/twinkletag.js
label: $.parseHTML('<p>Please provide the required parameters for sort name redirects. See <a href="/wiki/Template:R_from_sort_name#Parameters">the template page for more info</a></p>')
}
]
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any code that will change the wikitext once the form information is collected. You'll probably need to pair these form changes with some more code changes farther down, and the farther down code changes will change the output of this tag's wikitext.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tag: add parameters to {{R from sort name}}

2 participants