Page MenuHomePhabricator

Have a way to import a list of languages or a list of wikis to target in CentralNotice
Open, LowestPublic

Description

At the moment, Special:CentralNotice only allows a manual selection of languages or wikis.

A nice addition would be to have a way to import a list of languages, defined in a certain format.

There is an example with T220080. This task is about creating a banner that would be displayed on 889 wikis. A list of languages and wikis is provided. For now, I have to manually select al the languages I need. So have a simpler way to import them to the CentralNotice system would be really great.

The current system works like this:

  1. select a wiki (like, for instance, Wikinews)
  2. select ar
  3. select bg
  4. select bs
  5. select ca
  6. select cs
  7. select de
  8. select el
  9. select en
  10. select eo
  11. select es
  12. select fa
  13. select fi
  14. select fr
  15. select he
  16. select hu
  17. select it
  18. select ja
  19. select ko
  20. select li
  21. select nl
  22. select no
  23. select pl
  24. select pt
  25. select ro
  26. select ru
  27. select sd
  28. select sq
  29. select sr
  30. select sv
  31. select ta
  32. select th
  33. select tr
  34. select uk
  35. select zh
  36. save

(It is a short list and I haven't counted scrolls in steps. 😛 )

The system after improvement would work like this:

  1. select a wiki (like, for instance, Wikinews)
  2. import a CSV list: ar, bg, bs, ca, cs, de, el, en, eo, es, fa, fi, fr, he, hu, it, ja, ko, li, nl, no, pl, pt, ro, ru, sd, sq, sr, sv, ta, th, tr, uk, zh
  3. save

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 8 2019, 1:55 PM
Jseddon triaged this task as Lowest priority.Apr 8 2019, 8:52 PM
Elitre added a subscriber: Elitre.Sep 23 2019, 2:41 PM
Trizek-WMF updated the task description. (Show Details)Sep 23 2019, 3:15 PM

Ciao @Jseddon, I asked Trizek to update the task description to explain better how cumbersome the process currently is. He's having to manually input hundreds wikis manually, and that's just insane.
I'd like to add, if that helps, that the Translate extension offers a system to select languages, when marking a page for translation, that may come handy - it's a box where you can simply add a comma-separated list of language codes.
Please LMK how we can help getting this prioritized or who I can talk to about it. TYVM!

The system on Extension:Translate:

Elitre awarded a token.Oct 7 2019, 2:49 PM

(@JKatzWMF , this is one of the topics we discussed about today. Just an FYI since you were curious!)

Base added a subscriber: Base.Fri, Oct 25, 9:29 PM

As a quick win probably a simple userscript can be created providing such a feature.

As a quick win probably a simple userscript can be created providing such a feature.

If you can help there, you are more than welcomed! :D

Here's a super hacky script you can use in the browser console, or base a userscript on. It won't update the control display, but it will change the languages when you click Submit.

var targetLangs = ['aa', 'cy', 'en'],
    select = document.getElementById('project_languages');

for ( var i = 0; i < select.options.length; i++ ) {
    if ( targetLangs.indexOf( select.options[i].value ) !== -1 ) {
        select.options[i].selected = true;
    } else {
        select.options[i].selected = false;
    }
}
Trizek-WMF added a comment.EditedWed, Oct 30, 4:14 PM

Thank you, @Pcoombe! I'll try it soon.