https://bugzilla.wikimedia.org/show_bug.cgi?id=56216
Web browser: ---
Bug ID: 56216
Summary: Scribunto: mw.site.namespaces should accept namespace
name keys with any capitalisation
Product: MediaWiki extensions
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Unprioritized
Component: Scribunto
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
At the moment mw.site.namespaces accepts namespace names as keys if they are
correctly capitalised. The following both work:
mw.site.namespaces['Education Program']
mw.site.namespaces['Education_Program']
However, using keys with different capitalisation doesn't work:
mw.site.namespaces['education program'] --> error
mw.site.namespaces['education_program'] --> error
mw.site.namespaces['Education program'] --> error
mw.site.namespaces['Education_program'] --> error
mw.site.namespaces['EdUcAtiOn pRoGrAm'] --> error
mw.site.namespaces['EdUcAtiOn_pRoGrAm'] --> error
However, all of these work when making wikilinks on normal wiki pages. The
following will all get you to the same page:
[[Education Program:Example University/Example Course (2013 Q1)]]
[[education program:Example University/Example Course (2013 Q1)]]
[[Education_program:Example University/Example Course (2013 Q1)]]
[[EdUcAtIoN_pRoGrAm:Example University/Example Course (2013 Q1)]]
It would be useful if all of these variants were accepted as keys to
mw.site.namespaces. For example, at [[Module:Namespace detect]] I have
discovered a bug in the "education program" parameter. The parameter name
("education program") has to match the lower-case value of title.nsText
("education_program"), but they don't match because of the underscore. Allowing
both of these as keys would be a neat way to work around the problem.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l