https://bugzilla.wikimedia.org/show_bug.cgi?id=35371

--- Comment #10 from Krinkle <krinklem...@gmail.com> 2012-03-22 09:55:21 UTC ---
(In reply to comment #9)
> (In reply to comment #8)
> > >That overview case actually shouldn't cause this. Last I checked ids are 
> > >based
> > >off of the link portion of the text not the text portion
> > 
> > That would appear to be incorrect (at least on trunk). Although logically 
> > that
> > would make more sense [I suppose the default link message names all have 
> > url in
> > them which would look weird in the id].
> 
> It's also incorrect for the MW 1.17 and MW 1.18 release versions at least.

I'm not sure wether the ID should be derived from the link or text, but it
should certainly not be based on the link text _value_, because then it would
have a different ID in different user languages, making it a complete mess to
hook into them from CSS or JavaScript.

Currently (1.19wmf1) they appear to be based on the message-key of the link
text. So that's not too bad. However in the case where no message-key is used
(and it falls back to the raw literal value), then it does end up literally in
the ID.

> development
> mw-bugzilla-url|bugtracker
> Special:Code/MediaWiki|codereview
> Special:Code/MediaWiki/comments|codecomments
> browse svn-url|browse svn
> svn statistics-url|svn statistics
> phpdoc-url|phpdoc

<!-- development -->
<div class="portal" id='p-development'>
<h5>Development</h5>
<div class="body">
<ul>
    <li id="n-bugtracker"><a href="/wiki/Bugzilla">Bug tracker</a></li>
    <li id="n-codereview"><a href="/wiki/Special:Code/MediaWiki">View code
changes</a></li>
    <li id="n-codecomments"><a
href="/wiki/Special:Code/MediaWiki/comments">Code comments</a></li>
    <li id="n-browse-svn"><a
href="https://svn.wikimedia.org/viewvc/mediawiki/trunk/";>Browse SVN</a></li>
    <li id="n-svn-statistics"><a href="/wiki/Statistics">Statistics</a></li>
    <li id="n-phpdoc"><a href="https://svn.wikimedia.org/doc/";>Code
docs</a></li>
</ul>
</div>
</div>


Using the link instead may make more sense as that should be more unique than
the link text (or its message key). I can imagine a wiki having 3 sections
named "Foo", "Bar" and "Baz" and all three having links like "Introduction",
"Download", "Install", "Get involved", but linking to different pages.

That does indeed mean "-url" or "-link" type of message keys will end up in the
ID attribute.. Or even things like "Special:Code/MediaWiki" in the case of
literal page names.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- 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
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to