This user has autopatrolled rights on Wikimedia Commons

User talk:JJMC89/Archives/2017/08

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Transwikiing

Do you think the BSicon replacer could be ported to Commons (and other wikis)? All the templates (on Commons, anyway) should be the same as on the English Wikipedia. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
05:18, 10 April 2017 (UTC)

@Jc86035: It can be. Looking at the source, there are some things that are hard coded:
  1. The beginning of the edit summary (Replace BSicon)[1]
    • This is trivial to move to the config to allow translation/customization.
  2. The name of the template that uses routemap syntax[2]
    • This would be easy to move to the config if there is only one template per wiki that uses this syntax.
    • Is there only one template per wiki using this syntax?
  3. The name of the category that contains the {{BS*}} templates used with {{BS-map}} syntax[3]
    • For enwiki, it looks for any template in en:w:Category:Route diagram templates that start with BS.
    • Are similar conventions (all templates with a certain prefix in a category use this syntax) used on other projects? If not, this will be the hardest part.
The other issue is getting bot approval on non-English projects. — JJMC89 16:58, 10 April 2017 (UTC)
I think zhwiki uses the module in {{BS-map}} as well, not sure about any others (though most of the other projects just have copies of the English or Russian Routemap template/module). There are some projects where the templates are quite convoluted. For example, the French Wikipedia has a weird thing where there are a large number of hard-coded templates translating the icon names into French, diagrams which ignore that entirely and use the normal templates, and two diagrams which use these. Most of the other sites should have something simpler though.
As for approval, I thought about merging it into CommonsDelinker's tasks to ease the process, but not sure about that. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
04:43, 11 April 2017 (UTC)
@Jc86035: Added to my to-do list. I'll make some changes to the enwiki script before I port it. Is Category:Rail routemap templates the Commons equivalent of en:w:Category:Route diagram templates? I don't know how useful it will be on Commons – are there many route diagrams here? — JJMC89 17:31, 13 April 2017 (UTC)
Yes, that's the right category. I didn't realize the templates were only used on so few pages (about 20 to 30?), but it should be relatively trivial since the only change from enwiki is the category name.
It would also help if the replacement script changed {{bsq|icon name}} (or {{Bsn}}/{{Bso}}) to {{bsq|new icon name|alt=icon name}}, although it's usually easy to do it manually since most BSicon discussion is here and on enwiki and dewiki. Thanks for taking the time to do this! Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
18:20, 13 April 2017 (UTC)
@Jc86035: I've implemented changes for this. User:JJMC89 bot/config/BSiconsReplacer and w:en:User:JJMC89 bot/config/BSiconsReplacer need to have the correct list of templates added. Listing the templates was safer than trying to depend on a category with a naming scheme. — JJMC89 21:02, 23 April 2017 (UTC)
I've added the template list to enwiki, not sure if I did it correctly.
Another issue is that the BSe template (but only that template, for some reason) prefixes e to the icon name in |1= (but not any of the others). Why I do not know, but it may need to be taken into account. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
09:00, 25 April 2017 (UTC)
Any template that doesn't display the BSicon that exactly matches the specified parameter value requires special handling. I've removed the BSe family for now. — JJMC89 01:45, 26 April 2017 (UTC)

Transwikiing the BSicon replacement script

Moved from en:User talk:JJMC89

I'd like to implement the BSicon replacement script on several other wikis (the existing code should be sufficient). Should I run these myself, should you run them, should I join the Tool Labs account for your bot, or…? Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
11:59, 25 June 2017 (UTC)

@Jc86035: I'm happy to run it on other wikis. Just let me know which ones and where I can find the bot policy/approvals process. — JJMC89 18:44, 25 June 2017 (UTC)
Thanks. The list of all BRFA pages on other wikis is on Wikidata AFAIK. I think that should cover most of the wikis that should have the bot.
Start with zh, fr, es, de, hu, it, ja, ko, ru, no, pt and ca. I think any more of them should be the wikis which are linked to from here and here. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
00:51, 26 June 2017 (UTC)
@Jc86035: Since you're more familiar with the templates, please create configs (User:JJMC89 bot/config/BSiconsReplacer) on each of those. I started one on frwiki, which is probably wrong since frwiki has {{LCF ...}} inside some BS templates. I will probably need to add standard image syntax to handle replacement in the {{LCF ...}}. Example config:
{
    "repository": true,
    "redirects": "-links:User:JJMC89 bot/report/BSicons/redirects",
    "blacklist": [
        "-catr:Icons for railway descriptions/Exceptional permanent redirects"
    ],
    "replacement_map": "User:JJMC89 bot/config/BSiconsReplacer/replacementMap",
    "BS_templates": [
        "BS",
        "BS1",
        "BS2",
        "BS3",
        "BS4"
    ],
    "routemap_templates": "Routemap"
}
— JJMC89 04:48, 26 June 2017 (UTC)
We don't need to handle the LCF templates, since they're just images and CommonsDelinker can do those. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
04:58, 26 June 2017 (UTC)
Note that the German Wikipedia's Template:BSu and Template:BSue add the prefixes u and ue respectively to the icon name, so this should be handled in the script. (BS1e, BS1u and BS1ue might also need to be accepted as valid template names even if they don't necessarily exist.) Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
07:24, 26 June 2017 (UTC)

I am unable to create the jawiki page due to local userspace restrictions (it seems the bot account must be used to create it). The text is below. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
07:44, 26 June 2017 (UTC)

Japanese Wikipedia config
{
    "repository": true,
    "summary_prefix": "BSアイコンを置き換える",
    "redirects": "-links:User:JJMC89 bot/report/BSicons/redirects",
    "blacklist": [
        "-catr:Icons for railway descriptions/Exceptional permanent redirects"
    ],
    "replacement_map": "User:JJMC89 bot/config/BSiconsReplacer/replacementMap",
    "BS_templates": [
        "BS",
        "BS1",
        "BS-2",
        "BS-2-2",
        "BS-startCollapsible",
        "BS2",
        "BS2-2",
        "BS2-startCollapsible",
        "BS2-startCollapsible-2",
        "BS3",
        "BS3-2",
        "BS3-replace",
        "BS3-startCollapsible",
        "BS3-startCollapsible-2",
        "BS4",
        "BS4-2",
        "BS4-startCollapsible",
        "BS5",
        "BS5-2",
        "BS5-22",
        "BS5-startCollapsible",
        "BS6",
        "BS6-2",
        "BS6-startCollapsible",
        "BS6-startCollapsible-2",
        "BS7",
        "BS7-2",
        "BS7-2-2",
        "BS7-2text",
        "BS7-replace",
        "BS7-startCollapsible",
        "BS8",
        "BS8-2",
        "BS8-startCollapsible",
        "BS9",
        "BS9-2",
        "BS9-startCollapsible",
        "BS10",
        "BS10-2",
        "BS11",
        "BS11-2",
        "BS12",
        "BS12-2",
        "BS13",
        "BS13-2",
        "BS14",
        "BS14-2",
        "BS15",
        "BS15-2",
        "BS16",
        "BS16-2",
        "Percorso fer",
        "Percorso fer1",
        "Percorso fer2",
        "Percorso fer3",
        "Percorso fer4",
        "Percorso fer5",
        "Percorso fer6",
        "Percorso fer7"
    ],
    "routemap_templates": "Routemap"
}
I've implemented the change for {{BSu}} and {{BSue}}. I'll start on BRFAs next. zhwiki requires (auto)confirmed to be able to create the BRFA page. — JJMC89 04:41, 27 June 2017 (UTC)
Done the 12 above. Ping me when/if I should create more. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
10:19, 28 June 2017 (UTC)
If you're working on the BRFAs, it might be a good idea to add a note asking people to translate summary_prefix or check that it's correct. This would help especially where Google Translate is unreliable or can't translate a language. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
14:31, 30 June 2017 (UTC)
I've started BRFAs on eswiki and frwiki. — JJMC89 18:47, 4 July 2017 (UTC)
I did originally want to finish this by the end of the month so I could get on with other things instead of renaming files, but that would mean you would have to do three BRFAs every day for the next two weeks. If you're able to do that it would be very nice but I don't mind if you don't want to do it so quickly. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
08:16, 5 July 2017 (UTC)
@Jc86035: I can try to get them in this month, but I'm not making any promises. BRFAs started on huwiki and itwiki. Could you check the itwiki config. it:Template:Percorso fer1 and similar aren't included. — JJMC89 07:20, 6 July 2017 (UTC)
Thanks. I've added the Percorso fer templates to it, hu and ja (the one above). Does the pywikibot script handle underscores and redirects for template titles? Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
09:40, 6 July 2017 (UTC)
@Jc86035: Yes, redirects and underscores are handled for template titles. See this comment about the template list on huwiki. — JJMC89 16:25, 6 July 2017 (UTC)
I don't think the performance matters so much, since the script is restricted to one edit every ten seconds anyway. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
16:55, 6 July 2017 (UTC)
@Jc86035: I'm not worried about the performance either. BRFAs started on jawiki, kowiki, ruwiki, and nowiki. — JJMC89 08:43, 8 July 2017 (UTC)
@Jc86035: BRFAs started on ptwiki and cawiki. Please create zh:Wikipedia:机器人/申请/JJMC89 bot. I cannot since I'm not autoconfirmed there. It can be blank or whatever; I'll fill it in. I also need more configs created if it is needed on other projects not listed above. — JJMC89 21:49, 8 July 2017 (UTC)
Done. I'll translate some more of them this afternoon. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
05:37, 9 July 2017 (UTC)

Done ar, bn, bs, cs, da, dsb, eo, hi, hr, hsb, id, ka, lt. Note that some of these wikis will have all replacements done within the trial period, but might need a few further runs in the future. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
07:28, 10 July 2017 (UTC)

Also, the Scottish and Simple English Wikipedias should be able to use the global configuration without changes. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
08:02, 10 July 2017 (UTC)

@Jc86035: I'm caught up on all but ltwiki. I don't get any results when running on ltwiki. — JJMC89 17:57, 16 July 2017 (UTC)

Sorry for my absence. I'll add a few more configs and then the rest of them can be run using the default English settings if I don't have enough time.

The bot hasn't edited zh:Template:莆田站RDT for some reason, probably because pywikibot is confused by the noinclude tags. Could you fix this? Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
13:16, 1 August 2017 (UTC)

No worries. That is probably the issue. I use mwparserfromhell as the parser, so I'll see what I can do to work around the issue. — JJMC89 20:28, 5 August 2017 (UTC)
See #10 on GitHub for the issue/fix. — JJMC89 06:22, 6 August 2017 (UTC)

Could you make requests on nlwiki and ruwiki? For some reason I didn't list those. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
12:19, 5 August 2017 (UTC)

I've added one on nlwiki. I've had one open at ruwiki since 8 July. — JJMC89 20:28, 5 August 2017 (UTC)
Approved on nlwiki. — JJMC89 06:22, 6 August 2017 (UTC)

Thanks. I've created configurations on be, el, fi, nn, and pl. I am unable to create the one for rowiki; the summary text should be "Înlocuirea icoanelor BS" (no other settings). Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
09:06, 8 August 2017 (UTC)

These are done / pending approval. — JJMC89 23:56, 13 August 2017 (UTC)
Now done nlwikibooks, dewikivoyage, sv, tr, uk, yi and zh-yue. Everything else (basically, these and these) can be done without an edit summary in the language, since I've probably gone through every wiki which names their templates differently to enwiki, and there aren't many edits left to be made. If the bureaucrats on huwiki don't respond soon I think you should just run the script anyway because it's not really against their bot policy to do so without approval for "a few dozen edits per month". Jc86035 (talk) 12:41, 17 August 2017 (UTC)

Hi, please add Template:BSn to the jawiki config. For some reason I didn't add it earlier. Thanks, Jc86035 (talk) 15:19, 31 August 2017 (UTC)

✓ Done. — JJMC89 16:23, 31 August 2017 (UTC)