Page MenuHomePhabricator

GrowthExperiments QuestionPoster should use Parser::stripSectionName to strip links from section name
Closed, ResolvedPublic

Description

Instead of growthexperiments-homepage-mentorship-question-subject-no-link and similar, use Parser::stripSectionName to prepare the parameter for newsectionsummary.

Old description

For some reason they are in English. This breaks recent changes links, since the section title *is* in the content language.

Example: https://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91vita:Tgr&dir=prev&offset=20200211193314&limit=2&action=history

Event Timeline

Tgr renamed this task from GrowthExperiments QuestionPoster edit summaries should be in content language, not interface language to GrowthExperiments QuestionPoster edit summaries should be in content language,.Feb 19 2020, 6:27 AM
Tgr updated the task description. (Show Details)
Urbanecm closed this task as Invalid.EditedFeb 19 2020, 8:19 AM
Urbanecm added a project: Growth-Team.
Urbanecm added a subscriber: Urbanecm.

That's because growthexperiments-homepage-mentorship-question-subject-no-link isn't translated to Hungarian, see https://translatewiki.net/wiki/MediaWiki:Growthexperiments-homepage-mentorship-question-subject-no-link/hu. Also, some other messages aren't fully translated, so it's possible this problem happens elsewhere too. This particular message was added in ab0e84d to add the new section link.

Closing as Invalid given no developer intervention is required.

So the section title and the link to the section title are created from different messages? That wouldn't really make sense to me.

So the section title and the link to the section title are created from different messages? That wouldn't really make sense to me.

Yes. I've talked about this with @kostajh and we did this, because neither me nor Kosta could figure out how to remove wikitext from a message. The issue is that you must pass the section title to newsectionsummary in plaintext, even if some link is there. He recommended creating an additional message having no link. If you have better solution, I'm open to suggestions.

Use Parser::stripSectionName, like EditPage does.

Urbanecm renamed this task from GrowthExperiments QuestionPoster edit summaries should be in content language, to GrowthExperiments QuestionPoster should use Parser::stripSectionName to strip links from section name.Feb 22 2020, 2:12 PM
Urbanecm reopened this task as Open.
Urbanecm claimed this task.
Urbanecm triaged this task as Low priority.
Urbanecm edited projects, added Growth-Team (Current Sprint); removed Growth-Team.
Urbanecm updated the task description. (Show Details)

Use Parser::stripSectionName, like EditPage does.

Good point. Let's do it.

Change 574171 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/extensions/GrowthExperiments@master] QuestionPoster: Use Parser::stripSectionName instead of plaintext messages

https://gerrit.wikimedia.org/r/574171

Change 574171 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] QuestionPoster: Use Parser::stripSectionName instead of plaintext messages

https://gerrit.wikimedia.org/r/574171