Last modified: 2013-10-31 20:08:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T58217, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56217 - Scribunto: Title object namespace text should use spaces rather than underscores
Scribunto: Title object namespace text should use spaces rather than underscores
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Scribunto (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Brad Jorsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-27 15:14 UTC by Mr. Stradivarius
Modified: 2013-10-31 20:08 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Mr. Stradivarius 2013-10-27 15:14:37 UTC
The Lua code:

mw.title.new('Wikipedia talk:Articles for deletion').prefixedText

Gives the result:

"Wikipedia_talk:Articles for deletion"

Most users will be expecting spaces rather than underscores, as that is what is normally used in wikilinks on Wikipedia. Using underscores also causes problems if you try to test for equality between title.nsText and mw.site.namespaces[namespace].name:

mw.title.new('Wikipedia talk:Articles for deletion').nsText --> "Wikipedia_talk"
mw.site.namespaces['Wikipedia_talk'].name --> "Wikipedia talk"

Having these two commands produce different text seems counterintuitive to me.

I've posted a related issue at Bug 56216.
Comment 1 Brad Jorsch 2013-10-31 15:53:53 UTC
The behavior of .nsText is as intended, as it matches Title::getNsText() in PHP. You shouldn't test for equality between .nsText and .name, test .namespace and .id instead.
Comment 2 Gerrit Notification Bot 2013-10-31 15:55:23 UTC
Change 92887 had a related patch set uploaded by Anomie:
Regularize whitespace handling in mw.title

https://gerrit.wikimedia.org/r/92887
Comment 3 Gerrit Notification Bot 2013-10-31 19:23:34 UTC
Change 92887 merged by jenkins-bot:
Regularize whitespace handling in mw.title

https://gerrit.wikimedia.org/r/92887
Comment 4 Brad Jorsch 2013-10-31 20:08:40 UTC
Fix is merged. It should be deployed to WMF wikis with 1.23wmf3, see https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the schedule.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links