Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

On message output format types

 

 

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


brion at wikimedia

Jun 10, 2008, 7:23 PM

Post #1 of 4 (212 views)
Permalink
On message output format types

As is well known, we're still a bit inconsistent and confusing about
what format various localized messages come in.

Some are to be formatted as plain text; some as wiki text; some as raw
HTML. Some are plain text, but get wiki constructs tossed in as a
preprocess step to support the plural-alternate function.

But what we do know is that things get ugly when messages *change*
format -- customized messages in use on live sites break.


One that's been changed back and forth several times lately has been
'linkstoimage', used in the file links section on Image: description pages.

English Wikipedia uses a customized <div> wrapper with an id in there:
http://en.wikipedia.org/wiki/MediaWiki:Linkstoimage

but it's been broken several times on the assumption that the message
should be output as plaintext because the default text has no markup in it.

The most recent breakage was in r36139, changing it from wikitext to
plaintext with wikitext preprocessing, apparently in order to support
{{PLURAL}}.... which shouldn't even be necessary at all; it should work
fine with $wgOut->addWikiMsg as is! :)

The change caused the "<div>" tag to be literally displayed in page
output as plain text.

I've reverted the change temporarily so things will work as before until
a proper update to the message and the message calls can be done.


At a minimum, one should check what format is really being used by the
current code. When considering changing it, doing a quick survey of
existing usage is strongly recommended. Wikipedians are notorious for
using software facilities in ways we didn't expect! ;)

If it's *really* necessary to change formats in a way that could likely
break (for instance, from HTML to wikitext or plaintext, or wikitext to
plaintext, etc), the message key name should be changed. This prevents
incompatible customizations from being incorrectly displayed.

The same goes when changing parameters or the places a message gets
used; if the old version or a reasonably customized version of it
doesn't make sense in the new system, it has to be changed.


In this case, the message doesn't need to change format in order to gain
the extra capability (this is already built in to the wikitext display)
and the extra parameters used for the {{PLURAL:}} won't have any
negative effect on an old customized version in wikitext, so it doesn't
need to be renamed as long as the code retains the format.

-- brion

_______________________________________________
Wikitech-l mailing list
Wikitech-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


raimond.spekking at gmail

Jun 11, 2008, 5:14 AM

Post #2 of 4 (191 views)
Permalink
Re: On message output format types [In reply to]

Brion Vibber schrieb:
> The most recent breakage was in r36139, changing it from wikitext to
> plaintext with wikitext preprocessing, apparently in order to support
> {{PLURAL}}.... which shouldn't even be necessary at all; it should work
> fine with $wgOut->addWikiMsg as is! :)

The request to support {{PLURAL}} comes from Betawiki for the
possibility of proper localizations.
$wgOut->addWikiText does the job now w/o breaking customizations.

> At a minimum, one should check what format is really being used by the
> current code. When considering changing it, doing a quick survey of
> existing usage is strongly recommended. Wikipedians are notorious for
> using software facilities in ways we didn't expect! ;)

I missed to check existing usage, my apologies.

> In this case, the message doesn't need to change format in order to gain
> the extra capability (this is already built in to the wikitext display)
> and the extra parameters used for the {{PLURAL:}} won't have any
> negative effect on an old customized version in wikitext, so it doesn't
> need to be renamed as long as the code retains the format.

The message names are unchanged, the new parameter with PLURAL doesn't
hurt the existing customizations.

Raymond.
Attachments: signature.asc (0.24 KB)


raimond.spekking at gmail

Jun 11, 2008, 6:01 AM

Post #3 of 4 (194 views)
Permalink
Re: On message output format types [In reply to]

Raimond Spekking schrieb:
> $wgOut->addWikiText does the job now w/o breaking customizations.

Switched back to $wgOut->addWikiMsg, Nikerabbit pointed me to the
correct usage.

Raymond.
Attachments: signature.asc (0.24 KB)


brion at wikimedia

Jun 11, 2008, 7:09 AM

Post #4 of 4 (190 views)
Permalink
Re: On message output format types [In reply to]

Raimond Spekking wrote:
> Raimond Spekking schrieb:
>> $wgOut->addWikiText does the job now w/o breaking customizations.
>
> Switched back to $wgOut->addWikiMsg, Nikerabbit pointed me to the
> correct usage.

Thanks!

-- brion

_______________________________________________
Wikitech-l mailing list
Wikitech-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.