A skin has (or imho should have) (only) two "name" like properties:
1) Internal identifier ("id"):
- Used for processing at the application level and as public API (configuration
variables, url parameters, API properties, database values, dynamically constructed page
names such as for site and user scripts, preference keys)
- Lowercase
- No non-ASCII characters
- No spaces
- Not localised
- Change this would be a breaking change
2) Display title ("skin name"):
- Typically starts with an uppercase letter, may contain spaces (e.g. "Cologne
Blue")
- Used for graphical user interface (e.g. anywhere HTML is displayed, whenever it is used
inside an message)
- Defined by msg key skinnname-{skin}
— Krinkle
On 25 May 2014, at 18:02, Bartosz Dziewoński <matma.rex(a)gmail.com> wrote:
On Sun, 25 May 2014 00:11:28 +0200, Daniel Friesen
<daniel(a)nadir-seen-fire.com> wrote:
However $wgValidSkins isn't
something should become case insensitive, attempting that for array keys
is asking for bugs. Same for putting non lowercase keys in the database
and trying to make them case insensitive.
The easiest way to make &useskin=, $wgDefaultSkin, and $wgSkipSkins case
insensitive is to normalize all skin keys from them to lowercase (which
is actually only a few lines in Skin.php) and then as a "breaking
change" say we're forbidding non-lowercase keys to $wgValidSkins (which
should be rather simple since I haven't seen a single skin yet doing
that which would actually be broken by such a change).
Hmm. Yeah, this actually sounds very sensible. Let's make it so.
To summarize:
* 'skin file name' (='skin directory name' and 'skin repository
name'):
* "pretty" (that is, usually CamelCased, unless the skin name would
for some reason be lowercase)
* may not contain non-ASCII characters
* 'skin name':
* a lowercase version of 'skin file name', which would also provide
any future skin loading/installation/management mechanism with a
simple way to map the file/directory/repository name to the 'skin
name'
* user inputs (useskin, $wgDefaultSkin) are accepted with any
capitalization and normalized to lowercase
The requirements above are technically breaking changes, but are very
unlikely to actually break anything.
Right?
--
Matma Rex
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l