https://bugzilla.wikimedia.org/show_bug.cgi?id=41498

--- Comment #8 from Bawolff (Brian Wolff) <[email protected]> ---
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > Wouldn't it make more sense to do this with a Lua module instead of adding
> > > more
> > > parser functions ?
> > 
> > Perhaps. OTOH lua is not garunteed to be installed on all third party wikis.
> 
> Actually, personally I would like to have both, with more advanced
> functionality available to lua (Such as getting a table of all the metadata)

Ok, I tried my hand at adding this to lua as well -
https://gerrit.wikimedia.org/r/67588

For the lua part, I just added a method to the title class that can retrieve a
table of all the (standard) file metadata. This is the raw unformated data.

I imagine that people using lua for this are more interested in the raw data,
and will probably want to format it themselves. If they don't, there's still
the parser function (lua after all outputs wikitext).

One of the use cases I imagine for the parser function version, is someone
might want to put on the image description page of their image the description
from the metadata. This is a simple non-complex use case, and I think is well
suited to a parser function.

One point that I'm worried might be sticky in review of this, is the parser
function, when in formatted output mode, formats according to user language.
There's a number of reasons for this:
*Output then looks exactly like the formatted output in the metadata box on the
image page, which varies by user language.
*Commons people (who realistically are probably going to be the main people
using this) tend to like everything changing with user language
*Image description pages on commons effectively already always vary by user
language. (Almost every template on commons has an {{int:...}} in it), so its
not like we're splitting the parser cache, its already split.
*And the bad reason, the formatMetadata class already assumes using user
language via a bunch of global state (This is really a non-reason. It can be
changed if people don't like the user language thing. The main reason is the
first 3)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to