On Thu, Apr 5, 2012 at 1:05 AM, Daniel Friesen lists@nadir-seen-fire.comwrote:
We actually already have some plans on how to handle this case: The intent is to support the html5 <time> element.
- <time> will be allowed in WikiText.
- When a certain attribute is specified time will automatically be
localized by JS using the user's preferences, a cookie, or their browser settings.
- We will have a parser function that formats time into contentlang and
outputs a <time> with said attribute.
Relevant bugs:
- https://bugzilla.wikimedia.**org/show_bug.cgi?id=32545https://bugzilla.wikimedia.org/show_bug.cgi?id=32545- MediaWiki should support <time> in WikiText
- https://bugzilla.wikimedia.**org/show_bug.cgi?id=19992https://bugzilla.wikimedia.org/show_bug.cgi?id=19992- Support client-side date/time formatting for user's local timezone
(JavaScript)
- https://bugzilla.wikimedia.**org/show_bug.cgi?id=30857https://bugzilla.wikimedia.org/show_bug.cgi?id=30857- Requesting more user-friendly timestamps
I've introduced a changeset that adds support for <time> in WikiText:
I also wrote some code for parsing the datetime="" of a <time> element.
The next step would probably be porting our Language::sprintfDate and other date related methods to our JS mw.language system.
After that we'd incorporate it into the jQuery.fn.formatTime code I also have partially written. And start handling the preferences and cookies.
Then we'd probably add in the parser function and relative time code.
When we're done with that stuff we can probably come up with a good user interface to make out of that.
Here's my thought on that right now:
- The timezone portion of the output becomes a stylized button (probably
not directly <button> but a css style that's button-ish)
- Clicking on the button brings up a timezone map (a nice intuitive one
with a real map)
- When you change the timezone it will either use the api to change your
user preference or set either a localStorage key or cookie (cookies have the domain advantage, while localStorage has the "not sending pointless cookies" and StorageEvent advantages).
We'll also want to come up with a good switching ui for https://bugzilla.wikimedia.**org/show_bug.cgi?id=30857https://bugzilla.wikimedia.org/show_bug.cgi?id=30857
-- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
______________________________**_________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.**org MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/mediawiki-lhttps://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Nice to know there is already work going on in this, it seems to me as a very important feature.