^demon, Happy-melon, ialex, ashley and I have been preparing a new
class. It is intended to be replacement for the old wfMsg* functions
that many seem to dislike.
The most important reasons why we want to replace them are below.
There is some more at [1].
* There is too many functions with too many parameters
* It is easy to do the wrong thing
* It is difficult to do the right thing
The new class is in my opinion now ready enough for comments and
criticism. The full source code is at [2] and formatted documentation
at [3].
It should be possible form the documentation to see how it is meant to be used.
Few examples are below. More examples and how they compare to old
wfMsg* functions can be found at [2].
# $button = Xml::submitButton( Message::key( 'submit' )->text() );
# Message::key( 'welcome-to' )->params( $wgSitename )->parse();
# Message::key( 'bad-message' )->rawParams( '<script>...</script>' )->escaped();
# Message::key( 'file-log' )->params( $user, $filename
)->inContentLanguage()->text();
It should be noted that it is not our intention to replace
OutputPage::addWikiMsg() and ::wrapWikiMsg().
Things I'd like to have comments for:
(1) Is it easy to use this class? Have we solved the three main issues
given above?
(2) The primary entry point is Message::key(). The syntax is little
more verbose than wfMsg*'s, but much more readable imho. Do we want to
use even short wrapper for the entry point? If yes, how should it be
called? For example _() (often used in Gettext projects) and
Msg::key() have been suggested.
(3) Anything else with regards to the documentation, the code or other issues.
In the current state the class should be able to cover almost all use
cases wfMsg-functions had, with some exceptions. I'd like to have some
tests for this class, can somebody help with that? Obviously this
quite a small change itself, but it will have a big impact when we
start converting code to use these new methods. For that reason I want
to get it right. I think we should proceed slowly during 1.17 cycle,
for example using these only in new code and iron out all problems.
Like ^demon pointed out at bug 16026 [4], we should perhaps review
HTML-safety of any message we convert to use these new methods.
[1] http://www.mediawiki.org/wiki/New_messages_api
[2] http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/Message.php
[3] http://svn.wikimedia.org/doc/classMessage.html
[4] https://bugzilla.wikimedia.org/show_bug.cgi?id=16026#c8
--
Niklas Laxström
Hello all,
together with Frank Schulenburg and Naoko Komura, I just participated
in a video-conference with the winners of the Google Kiswahili
Wikipedia challenge ( http://www.google.com/events/kiswahili-wiki/ ),
and we talked about some of the challenges they encountered when
contributing to the Swahili Wikipedia.
One of the issues was that it was very hard for them to upload files.
Specifically, when you're a new user on a small wiki like sw.wp, you
_cannot upload_ locally due to a restriction of uploads to
autoconfirmed users. The upload link isn't even visible in the sidebar
until you're autoconfirmed, and you get a confusing error message if
you happen to call up Special:Upload.
>From a user experience standpoint, this is horrible.
For the immediate future, I suggest lifting this restriction for wikis
between 1,000 and 50,000 articles in size (large enough to have a few
active users, small enough to not yet have lots of policy around these
issues). Ultimately we'll want to integrate Commons better into the
user experience, but until then, IMO we should eliminate artificial
impediments like this which prevent people from growing their
communities and frustrate them -- unless there's a proven issue of
large scale abuse. Does that make sense?
Thanks,
Erik
--
Erik Möller
Deputy Director, Wikimedia Foundation
Support Free Knowledge: http://wikimediafoundation.org/wiki/Donate
Hi
I've tried installing a number of extensions on a Windows 2003 server but
they dont seem to work. Although i've successfully installed it onto Linux.
I think this has to do with the Read-only attribute thats inbuilt into the
Windows 2003 server.
Anyone out there ever come across this problem? If yes how did you work your
way around it? Looking forward to any responses.
Thanks.