jenkins-bot merged this change.

View Change

Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
[cleanup] Reuse waMonthNames list

Change-Id: I831711c72ccead9f168f8ed092eb884d7ba334b2
---
M pywikibot/date.py
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/pywikibot/date.py b/pywikibot/date.py
index bf05fc8..8c4e1ab 100644
--- a/pywikibot/date.py
+++ b/pywikibot/date.py
@@ -28,6 +28,9 @@
enMonthNames = ['January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November',
'December']
+waMonthNames = ['djanvî', 'fevrî', 'måss', 'avri', 'may', 'djun', 'djulete',
+ 'awousse', 'setimbe', 'octôbe', 'nôvimbe', 'decimbe']
+
dayMnthFmts = ['Day_' + str(s) for s in enMonthNames] # e.g. 'Day_January'
yrMnthFmts = ['Year_' + str(s) for s in enMonthNames] # e.g. 'Year_January'

@@ -836,9 +839,7 @@
'vo': lambda v: slh(v, ['Yanul', 'Febul', 'Mäzul', 'Prilul', 'Mayul',
'Yunul', 'Yulul', 'Gustul', 'Setul', 'Tobul',
'Novul', 'Dekul']),
- 'wa': lambda v: slh(v, ['djanvî', 'fevrî', 'Måss (moes)', 'avri',
- 'may', 'djun', 'djulete', 'awousse', 'setimbe',
- 'octôbe', 'nôvimbe', 'decimbe']),
+ 'wa': lambda v: slh(v, waMonthNames),
'zh': lambda v: slh(v, makeMonthList('%d月')),
},

@@ -2030,8 +2031,6 @@

# Walloon names depend on the day number, thus we must generate various
# different patterns
-waMonthNames = ['djanvî', 'fevrî', 'måss', 'avri', 'may', 'djun', 'djulete',
- 'awousse', 'setimbe', 'octôbe', 'nôvimbe', 'decimbe']

# For month names beginning with a consonant...
for i in (0, 1, 2, 4, 5, 6, 8, 10, 11):

To view, visit change 513029. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I831711c72ccead9f168f8ed092eb884d7ba334b2
Gerrit-Change-Number: 513029
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: jenkins-bot (75)