User:Quiddity (WMF)/MassMessage fixes
Hi all. This error was partially my fault. I tried to fix it myself but ran into difficulties. I've now requested assistance, and the fix is currently being added. (all the technical details are below). I'm very embarrassed about this. My apologies to you all for the error and distraction, and the delay to resolving it. Quiddity (WMF) (talk) 07:03, 10 February 2017 (UTC)
- Trying to find more help to finish this... Quiddity (WMF) (talk) 23:57, 16 April 2017 (UTC)
MassMessage error fix
[edit]I made a mistake,[1] and would love help fixing it.
Essentially we need a bot/script-run to fix (with an edit like this) an error in a MassMessage post that went to a few thousand pages.
I couldn't find a page to specifically request this kind of help.[2] Many complaints were coming in, and the problem lingers.[3]
Specifically
[edit]- Change these 2 strings in each message, * from x ** to y. -- (It's just changing
<ref>
into<ref group=survey>
in each) - Add
<references group=survey />
to each section
Locations
[edit]Three groups, semi-ready for AWB/etc.
- large Wikipedias and Wikidata, ready to go
- other Wikipedias, lines need slight regex manipulation
- sister projects, lines need slight regex manipulation
(Alternatively, the original separated MessMessage lists are in these subpages: Community Engagement Insights/MassMessages/Lists/2016/ - some are a single wiki, and some combine targets at many wikis)
String variants
[edit]En:
- <ref>This survey is primarily meant to get feedback
- <ref group=survey>This survey is primarily meant to get feedback
- <ref>Legal stuff: No purchase necessary.
- <ref group=survey>Legal stuff: No purchase necessary.
Ar (RTL):
- <ref>هذا الاستطلاع موجه في المقام
- <ref group=survey>هذا الاستطلاع موجه في المقام
- <ref>أمور قانونية: لا يتطلب الأمر
- <ref group=survey>أمور قانونية: لا يتطلب الأمر
De:
- <ref>Diese Umfrage ist vor allem dazu gedacht
- <ref group=survey>Diese Umfrage ist vor allem dazu gedacht
- <ref>Rechtliches: Keine Kaufverpflichtung. Volljährigkeit erforderlich
- <ref group=survey>Rechtliches: Keine Kaufverpflichtung. Volljährigkeit erforderlich
Es:
- <ref>Esta encuesta está principalmente
- <ref group=survey>Esta encuesta está principalmente
- <ref>Cuestiones legales: No es necesario comprar nada
- <ref group=survey>Cuestiones legales: No es necesario comprar nada
Fr:
- <ref>Le principal objectif de l’enquête
- <ref group=survey>Le principal objectif de l’enquête
- <ref>Questions légales : pas d’achat nécessaire
- <ref group=survey>Questions légales : pas d’achat nécessaire
It:
- <ref>Questa inchiesta è sta principalmente pensata
- <ref group=survey>Questa inchiesta è sta principalmente pensata
- <ref>Problemi legali: Non ci sono acquisti previsti
- <ref group=survey>Problemi legali: Non ci sono acquisti previsti
Ja:
- <ref>この調査では、
- <ref group=survey>この調査では、
- <ref>法的事項: 購入の必要はありません
- <ref group=survey>法的事項: 購入の必要はありません
Pl:
- <ref>Ta ankieta dotyczy głównie opinii na temat
- <ref group=survey>Ta ankieta dotyczy głównie opinii na temat
- <ref>Kwestie prawne: Nie jest konieczne dokonanie zakupu
- <ref group=survey>Kwestie prawne: Nie jest konieczne dokonanie zakupu
Pt / Pt-br:
- <ref>Essa pesquisa foi projetada para receber
- <ref group=survey>Essa pesquisa foi projetada para receber
- <ref>Por questões legais: nenhuma compra necessária
- <ref group=survey>Por questões legais: nenhuma compra necessária
Uk:
- <ref>Це опитування перш за все має на меті отримати
- <ref group=survey>Це опитування перш за все має на меті отримати
- <ref>Юридичні примітки. Не потрібно нічого купувати
- <ref group=survey>Юридичні примітки. Не потрібно нічого купувати
Ru:
- (Not needed, TextworkerBot fixed it)
Zh:
- (Not needed, it was fixed before that batch was sent)
Fiwiki:
- (Not needed, Stryn fixed it with AWB)
Commons:
- (Not needed, SteinsplitterBot fixed it)
Bonus fix at Portuguese Wikipedia
[edit](If easy, could this be fixed at the same time...?)
I noticed there was a partial-translation version (just the heading) sent to the editors on this list, 20 minutes before the proper version: Community Engagement Insights/MassMessages/Lists/2016/07-AEPT (but not the other 3 lists of Ptwiki editors)
Perhaps the first version (in mostly English) could be removed entirely?
Footnotes
[edit]- ↑ I gave bad advice on formatting the message in Community Engagement Insights/MassMessages/2016 - First message whilst trying to wikify other parts, by neglecting to put a
<references />
in. Whilst it worked fine in previews (now filed as phab:T156167) and tests, we didn't check/remember what happens when a new section is added after the message (it puts the automatically-generated<references />
at the very bottom of the page, not within the specific section). - ↑ Is there a metawiki page for requests to *create/run* a bot for crosswiki fixes? (not permissions, that's Steward_requests/Bot_status, but someone to actually write/run the bot). I'm sure I've seen one before, but can't find it now. I searched various pages (and their talkpages, and SeeAlso sections), including Bot_policy, Tech, plus pages like Synchbot and more.)
- ↑ Complaints are at:
- https://meta.wikimedia.org/wiki/Meta:Babel#Fixing_of_messed_references
- Fiwiki has already been fixed by Strynbot (Thank you, Stryn!)
- Many sections of https://meta.wikimedia.org/wiki/User_talk:EGalvez_(WMF)
- https://meta.wikimedia.org/wiki/Talk:Community_Engagement_Insights#Message_should_include_.3Creferences.2F.3E_tag
- https://meta.wikimedia.org/wiki/Meta:Babel#Fixing_of_messed_references
PAWS attempts
[edit]I've tried learning how to fix this with wikitech:PAWS, but ran into some problems. Notes below, for posterity.
Extended content | |||
---|---|---|---|
command[edit]Current draft: pwb.py replace -simulate -fix:massmessagecor -file:targetpages
Questions:
My user-fixes.py[edit]Is this right? # -*- coding: utf-8 -*-
# fix massmessage strings.
fixes['massmessagecor'] = {
'regex': True,
'msg': { 'Fixing massmessage ref tags. Sorry for the error.', },
'replacements': [
(r'<!-- Message sent by User:EGalvez', r"<references group=survey />\n<!-- Message sent by User:EGalvez"), # fix-all
(r'<ref>Le principal objectif de l’enquête', r"<ref group=survey>Le principal objectif de l’enquête"), # fix-1-FR
(r'<ref>Questions légales : pas d’achat nécessaire', r"<ref group=survey>Questions légales : pas d’achat nécessaire"), #fix-2-FR
(r'<ref>Esta encuesta está principalmente', r"<ref group=survey>Esta encuesta está principalmente"), # fix-1-ES
(r'<ref>Cuestiones legales: No es necesario comprar nada', r"<ref group=survey>Cuestiones legales: No es necesario comprar nada"), #fix-2-ES
]
}
If yes, then here's the full version. (But I'm not sure if the Arabic RTL lines are formatted correctly...):
targetpages file[edit]This seems to work. (Note: Full URLs didn't. It was also failing on the w:fr:Discussion_utilisateur:Quiddity_(WMF)/Brouillon User_talk:Quiddity_(WMF)/sandbox m:User_talk:Quiddity_(WMF)/sandbox w:ar:User talk:Quiddity_(WMF)/ملعب
Current error[edit]
Do you want to accept these changes? ([y]es, [N]o, [e]dit, open in [b]rowser, [a]ll, [q]uit): y Traceback (most recent call last): File "/srv/paws/pwb/pwb.py", line 263, in <module> if not main(): File "/srv/paws/pwb/pwb.py", line 257, in main run_python_file(filename, [filename] + args, argvu, file_package) File "/srv/paws/pwb/pwb.py", line 121, in run_python_file main_mod.__dict__) File "/srv/paws/pwb/scripts/replace.py", line 1164, in <module> main() File "/srv/paws/pwb/scripts/replace.py", line 1155, in main bot.run() File "/srv/paws/pwb/scripts/replace.py", line 793, in run page.save(summary=self.generate_summary(applied), async=True, File "/srv/paws/pwb/scripts/replace.py", line 693, in generate_summary summary_messages.add(replacement.edit_summary) TypeError: unhashable type: 'set' <class 'TypeError'> CRITICAL: Closing network session. Quiddity_(WMF)@PAWS:~$ |