[MediaWiki-commits] [Gerrit] Disable cleanUpLinks in cosmetic_changes.py in Persian langu... - change (pywikibot/compat)
jenkins-bot has submitted this change and it was merged. Change subject: Disable cleanUpLinks in cosmetic_changes.py in Persian language wikis .. Disable cleanUpLinks in cosmetic_changes.py in Persian language wikis Community thinks this function has too many issues. I do this upon request of User:Yamaha5 The discussion is here: http://bit.ly/1KMVZ7J Also improving documentation of cleanUpLinks. Reinvent of I4f40c7a89a6fd698009a6290e18948e3924f4f78 Change-Id: I1a342e0f0311764009d67d073fce74ee91a897f9 --- M cosmetic_changes.py 1 file changed, 10 insertions(+), 2 deletions(-) Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified diff --git a/cosmetic_changes.py b/cosmetic_changes.py index b15c226..a13be5d 100644 --- a/cosmetic_changes.py +++ b/cosmetic_changes.py @@ -375,9 +375,13 @@ return text def cleanUpLinks(self, text): -# helper function which works on one link and either returns it -# unmodified, or returns a replacement. +Cleanup wiki links. + def handleOneLink(match): +Helper function for one link. + +Either returns it unmodified, or returns a replacement. + titleWithSection = match.group('titleWithSection') label = match.group('label') trailingChars = match.group('linktrail') @@ -483,6 +487,10 @@ # don't change anything return match.group() +if self.site.sitename() == u'wikipedia:fa': +# Per community discussion, this one is not allowed in fa.wp +return text # unmodified text + trailR = re.compile(self.site.linktrail()) # The regular expression which finds links. Results consist of four groups: # group newline depends whether the links starts with a new line. -- To view, visit https://gerrit.wikimedia.org/r/211139 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a342e0f0311764009d67d073fce74ee91a897f9 Gerrit-PatchSet: 3 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de Gerrit-Reviewer: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Ricordisamoa ricordisa...@openmailbox.org Gerrit-Reviewer: XZise commodorefabia...@gmx.de Gerrit-Reviewer: Xqt i...@gno.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable cleanUpLinks in cosmetic_changes.py in Persian langu... - change (pywikibot/compat)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/211139 Change subject: Disable cleanUpLinks in cosmetic_changes.py in Persian language wikis .. Disable cleanUpLinks in cosmetic_changes.py in Persian language wikis Community thinks this function has too many issues. I do this upon request of User:Yamaha5 The discussion is here: http://bit.ly/1KMVZ7J Reinvent of I4f40c7a89a6fd698009a6290e18948e3924f4f78 Change-Id: I1a342e0f0311764009d67d073fce74ee91a897f9 --- M cosmetic_changes.py 1 file changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/39/211139/1 diff --git a/cosmetic_changes.py b/cosmetic_changes.py index b15c226..9cdddaf 100644 --- a/cosmetic_changes.py +++ b/cosmetic_changes.py @@ -375,9 +375,13 @@ return text def cleanUpLinks(self, text): -# helper function which works on one link and either returns it -# unmodified, or returns a replacement. +Cleanup wiki links. + def handleOneLink(match): +Helper function for one link. + +Either returns it unmodified, or returns a replacement. + titleWithSection = match.group('titleWithSection') label = match.group('label') trailingChars = match.group('linktrail') @@ -483,6 +487,10 @@ # don't change anything return match.group() +if self.site.sitename() == u'wikipedia:fa': +# Per community discussion, this one is not allowed in fa.wp +return text # unmodified text + trailR = re.compile(self.site.linktrail()) # The regular expression which finds links. Results consist of four groups: # group newline depends whether the links starts with a new line. -- To view, visit https://gerrit.wikimedia.org/r/211139 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a342e0f0311764009d67d073fce74ee91a897f9 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable cleanUpLinks in cosmetic_changes.py in Persian langu... - change (pywikibot/compat)
jenkins-bot has submitted this change and it was merged. Change subject: Disable cleanUpLinks in cosmetic_changes.py in Persian language wikis .. Disable cleanUpLinks in cosmetic_changes.py in Persian language wikis Community thinks this function has too many issues. I do this upon request of User:Yamaha5 The discussion is here: http://bit.ly/1KMVZ7J Change-Id: I4f40c7a89a6fd698009a6290e18948e3924f4f78 --- M cosmetic_changes.py 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/cosmetic_changes.py b/cosmetic_changes.py index b15c226..4a9f528 100644 --- a/cosmetic_changes.py +++ b/cosmetic_changes.py @@ -377,6 +377,10 @@ def cleanUpLinks(self, text): # helper function which works on one link and either returns it # unmodified, or returns a replacement. +if self.site.sitename() != u'wikipedia:fa': +# Per community discussion, this one is not allowed in fa.wp +return + def handleOneLink(match): titleWithSection = match.group('titleWithSection') label = match.group('label') -- To view, visit https://gerrit.wikimedia.org/r/206775 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4f40c7a89a6fd698009a6290e18948e3924f4f78 Gerrit-PatchSet: 4 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Ricordisamoa ricordisa...@openmailbox.org Gerrit-Reviewer: XZise commodorefabia...@gmx.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable cleanUpLinks in cosmetic_changes.py in Persian langu... - change (pywikibot/compat)
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/206775 Change subject: Disable cleanUpLinks in cosmetic_changes.py in Persian language wikis .. Disable cleanUpLinks in cosmetic_changes.py in Persian language wikis Community thinks this function has too many issues. I do this upon request of User:Yamaha5 Change-Id: I4f40c7a89a6fd698009a6290e18948e3924f4f78 --- M cosmetic_changes.py 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/75/206775/1 diff --git a/cosmetic_changes.py b/cosmetic_changes.py index b15c226..4e7fba8 100644 --- a/cosmetic_changes.py +++ b/cosmetic_changes.py @@ -156,7 +156,9 @@ text = self.fixSelfInterwiki(text) text = self.standardizePageFooter(text) text = self.fixSyntaxSave(text) -text = self.cleanUpLinks(text) +if self.site.lang != 'fa': +# Per community discussion, this one is not allowed +text = self.cleanUpLinks(text) text = self.cleanUpSectionHeaders(text) text = self.putSpacesInLists(text) text = self.translateAndCapitalizeNamespaces(text) -- To view, visit https://gerrit.wikimedia.org/r/206775 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4f40c7a89a6fd698009a6290e18948e3924f4f78 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Ladsgroup ladsgr...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits