Page MenuHomePhabricator

Allow different projects of the same language to have different configs in clean_sandbox.py
Closed, ResolvedPublic

Description

As discussed with @zhuyifei1999 on IRC, this https://github.com/wikimedia/pywikibot/blob/master/scripts/clean_sandbox.py script would benefit if sister projects that happen to use different sandbox settings could use it. Thanks.

Event Timeline

I was suggesting to switch content by dbname, but this can potentially break third-party wikis.

Xqt subscribed.

It can have different settings already. Just add it to the xdict L10N table „content“ like:

'wikisource': {'en': 'localized entry for wikisource:en', },

Xqt triaged this task as Low priority.Jul 16 2018, 6:11 AM

It can have different settings already. Just add it to the xdict L10N table „content“ like:

Ah, I see: The problem is the check inside initializer.

Change 445942 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] Allow different projects to have different L10N entries

https://gerrit.wikimedia.org/r/445942

Thanks for taking care of this bug. After this is fixed, could we have some instructions as to how to configure those projects on the clean_sandbox.py script code? Thanks.

could we have some instructions as to how to configure those projects on the clean_sandbox.py script code? Thanks.

See that sample given above:

'wikisource': {
    'en': 'localized entry for wikisource:en',
},

or file the localisations here and I'll implement them

Thank you.

For es.wikivoyage, their Sandbox pages do have:

<!--No borres este mensaje-->{{Zona de pruebas}}<!--Haz las pruebas debajo. Gracias-->

== Las pruebas en esta sección ==

Is that implementable?

Thanks!

Is that implementable?

Sure. I'll commit a new patch for it.

Change 446063 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [L10N] Add wikivoyage:es to the L10N xdict

https://gerrit.wikimedia.org/r/446063

Change 445942 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Allow different projects to have different L10N entries

https://gerrit.wikimedia.org/r/445942

Change 446063 merged by jenkins-bot:
[pywikibot/core@master] [L10N] Add wikivoyage:es to the L10N xdict

https://gerrit.wikimedia.org/r/446063

@zhuyifei1999 and @Xqt Tested and works. Although I'm manually overriding the Wikidata sandbox links as es.wikivoyage has multiple Sandbox subpages with the pageid param. I am also as well using -text:"{{subst:User:MABot/zdp}}" which will allow me to further customize the cleaning just in case. You can see here the config I am using for my bot right now. Thanks a ton for your help.