Localized information templates are not recognized

Issue #2 new
Guillaume Paumier created an issue

Hi,

The script to identify files without an information template works great for Commons, however it seems it only works for other wikis when they use "information" as the template name.

Some wikis have localized versions of the template name, like https://it.wikipedia.org/wiki/Template:Informazioni_file and https://fa.wikipedia.org/wiki/%D8%A7%D9%84%DA%AF%D9%88:%D8%AF%D9%84%DB%8C%D9%84_%D8%A7%D8%B3%D8%AA%D9%81%D8%A7%D8%AF%D9%87_%D8%A7%D8%AB%D8%B1_%D8%BA%DB%8C%D8%B1_%D8%A2%D8%B2%D8%A7%D8%AF

Files with such templates end up being listed by the no_information tool, and the add_information tool can also mess things up, and try to replace the existing template: https://it.wikipedia.org/w/index.php?title=File:%22Il_Giardino_de%27_Prencipi%22,_Scipione_Tolomei.jpg&diff=prev&oldid=69258761

For no_information, would it be possible to use https://www.wikidata.org/wiki/Q6466010 to check the template's local name when getting the list of files?

For add_information, I'm not sure what to do, since we don't necessarily know the local names of the parameters. One solution could be not to show the add_information link in those cases.

Comments (1)

  1. Guillaume Paumier reporter

    For add_information, I imagine local wikis could create a local {{information}} template with the English parameter names, and match them like this:

    on [[it:Template:Information]]:

    {{Informazioni file
    | Descrizione = {{{Description}}}
    | Fonte = {{{Source}}}
    | Data = {{{Date}}}
    | Autore = {{{Author}}}
    | Licenza = {{{Permission}}}
    }}
    

    Then, with a few regular expressions, the add_information script would know how to match the parameters to their local name. I'm not sure how much work this would represent, though.

  2. Log in to comment