On 28 March 2010 23:57, Conrad Irwin conrad.irwin@googlemail.com wrote:
With any code like this I worry that someone might try:
$msg = Message::key( 'example' ); $nicemsg = $msg->params( 'nice' ); $nastymsg = $msg->params( 'nasty' ); echo $nicemsg->text(); echo $nastymsg->text();
Which will break unexpectedly, but perhaps that is livable with.
That's true, but on the other hand there documentation about the indented usage. I don't think that there is often need to call the same message with different parameters and reuse the object.
(3) Anything else with regards to the documentation, the code or other issues.
The names of the methods are somewhat confusing and it'd be nice if they were consistent. (language/inContentLanguage), (parse/text/plain/escaped/parseAsBlock)
perhaps (inLanguage/inContentLanguage) and (html/text/wikitext/htmlentities/htmlblock)
Perhaps language could be inLanguage. I don't really like (html/text/wikitext/htmlentities/htmlblock) because it emphasizes the output format, not what has been done to the string. I reiterate the meanings here so that is easier to give suggestions.
* parse: parsed wikitext * text: plain text with for working plural and grammar * escaped: same as previous but already escaped for html output * plain: the raw message text for special uses, like Special:Allmessages * parseAsBlock: normal parsing, not going to be used a lot since there is OutputPage::addWikiMsg
- As a side effect interface message status is unconditionally
- turned off.
What does that mean?
Currently the only thing that depends on ParserOptions' "InterfaceMessage" property is the gender magic word, which only works (without user parameter) in interface messages.