Last modified: 2014-02-12 23:38:01 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 T43692, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41692 - TimedText namespace is using CamelCase for no good reason
TimedText namespace is using CamelCase for no good reason
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
TimedMediaHandler (Other open bugs)
master
All All
: Low normal with 1 vote (vote)
: ---
Assigned To: Michael Dale
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-02 14:12 UTC by Derk-Jan Hartman
Modified: 2014-02-12 23:38 UTC (History)
4 users (show)

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


Attachments

Description Derk-Jan Hartman 2012-11-02 14:12:24 UTC
As Rich Farmbrough stated 'Welcome back CamelCase'. Let's just call it 'Timed text' or 'Timed Text' (that's what the spec calls it).
Comment 1 Michael Dale 2012-11-02 16:34:38 UTC
You can have spaces in namespaces? I don't think this will be something that is easy to change.

Is it easy to add canonical mapping for namespaces ?
Comment 2 Andre Klapper 2012-11-02 16:37:30 UTC
I see. Feel free to remove the easy keyword in such cases, you definitely know better than I do. :)
Comment 3 Aaron Schulz 2012-11-02 17:20:21 UTC
(In reply to comment #1)
> You can have spaces in namespaces?

You mean like "Article talk"?
Comment 4 Chad H. 2012-11-03 23:17:18 UTC
Re-adding +easy since this is (literally) a 2 line-change.
Comment 5 Michael Dale 2012-11-03 23:55:55 UTC
The reason I think it would not be so easy, is that we already have the TimedText namespace on commons with associated links, pages etc. I have not looked at this closely but I don't think it would be trivial.

There are places in the code where we have to discover the timed text namespace on the remote host and have to look it up by name i.e: handlers/TextHandler/TextHander.php line 98:

foreach( $data['query']['namespaces'] as $ns ){
	if( $ns['*'] == 'TimedText' ){
		$this->remoteNs = $ns['id'];
	}
}

That being said it should be possible to update ( with some work ) if the caps on Text is a bad eye sore.
Comment 6 Chad H. 2012-11-04 00:23:11 UTC
(In reply to comment #5)
> The reason I think it would not be so easy, is that we already have the
> TimedText namespace on commons with associated links, pages etc. I have not
> looked at this closely but I don't think it would be trivial.
> 

This is not hard. It's why we have the namespaceDupes.php maintenance script.

> There are places in the code where we have to discover the timed text namespace
> on the remote host and have to look it up by name i.e:
> handlers/TextHandler/TextHander.php line 98:
> 
> foreach( $data['query']['namespaces'] as $ns ){
>     if( $ns['*'] == 'TimedText' ){
>         $this->remoteNs = $ns['id'];
>     }
> }
> 

Any code that looks like that should be updated immediately. To compare namespaces you should *always* do it based on the ID, *never* the name.
Comment 7 Michael Dale 2012-11-04 01:09:34 UTC
How do you know that timed text is timed text on a foreign wiki if not by name ?

The issue is it has to query the remote wiki api by namespace number, and there was no global extension namespace manifest early on resulting in commons using 102 for timed text, where as timed media handler got 710:
http://www.mediawiki.org/wiki/Extension_default_namespaces#TimedMediaHandler

To solve the problem I imagine we should move all the commons timed text over to the manifest id of "710" .. or just hard code per-wiki namespace id overrides in the foreign repo settings ?

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


Navigation
Links