Community Wishlist Survey 2022/Multimedia and Commons/Make the language list accessable

Make the language list accessable

  • Problem: At display of a multilingal SVG a drop-down-list ist displayed; this list should be acessible by template or module
  • Proposed solution:
  • Who would benefit: automatic actualized galleries; no own-written second access to read the source code
  • More comments:
  • Phabricator tickets:
  • Proposer: -- sarang사랑 13:43, 15 January 2022 (UTC)[reply]

Discussion

  • A general addition to the desription page of a multilingual file, to give the user a comfortable overview, is a gallery how the image displays in all the different languages.
This gallery is generated by templates which need a parameter list of the contained languages. Currently this list is independent of the languages that are served in fact - when somebody adds languages but does not maintain the parameter list it will differ. Much better would be when the templates get that list automatically & up-to-time, instead of user-designed; an empty list indicates that no language switch exists.
I am hesitating to write a feature which accesses & analizes the SVG source code: when the tool (unknown to me) which generates the drop-down list of the languages can pass its result somehow to the template, no expensive second access to the source code will be necessary ?
May be that the list can be provided as an expensive LUA title object (a table element) ? But I am open to any other solution. -- sarang사랑 15:58, 17 January 2022 (UTC)[reply]
I think exposing this to Lua is a very good implementation idea. Specifically, it should probably be available in the File metadata object. —TheDJ (talkcontribs) 10:48, 19 January 2022 (UTC)[reply]
@SWilson (WMF): An example gallery at: c:File:Community Wishlist Survey banner - translatable.svg with 12 languages. -- sarang사랑 16:35, 17 January 2022 (UTC)[reply]
We have to upload a translation from an external tools, which is not ok. I want to translate it using a MediaWiki tool. Thingofme (talk) 15:55, 18 January 2022 (UTC)[reply]
@Thingofme: Are you referring to the SVG Translate tool? It's external to the wikis, certainly, but it's definitely a Wikimedia tool (developed by the CommTech team even!). SWilson (WMF) (talk) 03:58, 19 January 2022 (UTC)[reply]
@Sarang: That makes sense, thanks. You're right, there should be an easier way to get at this data rather than re-parsing the SVG source. SWilson (WMF) (talk) 03:59, 19 January 2022 (UTC)[reply]
  • If I understand correctly it would be nice to have a single structured place to save all the available language editions of a multimedia file and be able to query it from wikitext. So, an user can query this list to show a dropdown of this images in the wikitext, as well as a gallery of these images in the wikitext, as well as other things. More generally, it should be possible to answer the question: what other languages does this file support? and get them from wikitext. --Valerio Bozzolan (talk) 16:33, 11 February 2022 (UTC)[reply]

Voting