On 30/01/2008, Roan Kattouw <roan.kattouw(a)home.nl> wrote:
Jan Hecking schreef:
Can someone on this list confirm whether the
action=raw method of the
index.php API is supposed to support the variant parameter or not?
If not then we have to either do the transcoding client-side or use the
rendered HTML instead of the raw wiki markup. Both of these options
don't sound very good.
I don't really have the final answer to this, but I do know what
action=raw does internally: read an article's wikitext from the database
and output it without any processing. In that sense, one could say
action=raw isn't supposed to support variants, as it dumps the *raw*
wikitext content of an article. On the other hand, the alternatives kind
of suck, so I guess action=raw should support variants anyway. Has this
bug been filed at Bugzilla yet? If not, please do so.
It kind of makes sense both ways. Technically there is only one raw
wikitext but pragmatically you should be able to get unrendered versions
of either language variant.
The solutions I can think of are:
* something such as "action=rawvariant"
* "action=raw&variant=xxx" which would pragmatically generate a raw
equivalent of the variant which would not technically be the raw one
* implement "raw" or "wikitext" in api.php which would be a pragmatic
interface that either gives you the technically raw original wikitext or
generates a variant wikitext based on the raw wikitext processed by
the language variant code.
Stubbornly stating "language variants are not raw wikitext" instead
of providing a solutions would be a bad thing (-:
As an alternative, think about what you need the raw wikitext for.
Can you not parse or process either the action=render HTML
or the same converted to plain text?
Andrew Dunbar (hippietrail)
Roan Kattouw (Catrope)
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
--
http://wiktionarydev.leuksman.com http://linguaphile.sf.net