jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/387108 )
Change subject: noreferences: frwiki configuration
......................................................................
noreferences: frwiki configuration
for section in i18n.translate(self.site, placeBeforeSections):
# Find out where to place the new section
sectionR = re.compile(r'\r?\n(?P<ident>=+) *%s *(?P=ident)
*\r?\n'
% section)
As I read this code I can use regexes to manage plurals (but leave correctly the first
occurrence that will be added). Is it good ?
Change-Id: I5cfcbd6f1c48f6c9849e7d774fc7a8987f58e187
---
M scripts/noreferences.py
1 file changed, 6 insertions(+), 5 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/scripts/noreferences.py b/scripts/noreferences.py
index 504c638..85fb7c4 100755
--- a/scripts/noreferences.py
+++ b/scripts/noreferences.py
@@ -227,6 +227,7 @@
# Titles of sections where a reference tag would fit into.
# The first title should be the preferred one: It's the one that
# will be used when a new section has to be created.
+# Except for the first, others are tested as regexes.
referencesSections = {
'ar': [ # not sure about which ones are preferred.
u'مراجع',
@@ -287,11 +288,11 @@
u'Viitteet',
],
'fr': [ # [[fr:Aide:Note]]
- u'Notes et références',
- u'Références',
- u'References',
- 'Notes',
- 'Sources',
+ 'Notes et références',
+ 'Notes? et r[ée]f[ée]rences?',
+ 'R[ée]f[ée]rences?',
+ 'Notes?',
+ 'Sources?',
],
'he': [
u'הערות שוליים',
--
To view, visit
https://gerrit.wikimedia.org/r/387108
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5cfcbd6f1c48f6c9849e7d774fc7a8987f58e187
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Framawiki <framawiki(a)tools.wmflabs.org>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>