Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1277442?usp=email )
Change subject: Fix: Add Devanagari numerals to NON_ASCII_DIGITS ...................................................................... Fix: Add Devanagari numerals to NON_ASCII_DIGITS Also fix timeznR in textlib.TimeStripper to match any timezone outside ASCII characters like CEST|UTC that special timezones can be found like नेपाली समय. The regex change also solves the expected failure for ar-wiki in TestArchiveBot.test_archivebot. Bug: T424467 Change-Id: I84b5bc468406a90aa99e501a30f005b24b22f4e5 Signed-off-by: Xqt <[email protected]> --- M pywikibot/textlib.py M pywikibot/userinterfaces/transliteration.py M tests/archivebot_tests.py 3 files changed, 5 insertions(+), 16 deletions(-) Approvals: Xqt: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index 269f43e..0186bbe 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -2261,7 +2261,7 @@ timeR = (r'(?P<time>(?P<hour>([0-1]\d|2[0-3]))[:\.h]' r'(?P<minute>[0-5]\d))') - timeznR = r'\((?P<tzinfo>[A-Z]+)\)' + timeznR = r'\((?P<tzinfo>[^(){}\[\]:;#\t\n\r\f\v+-]+)\)' yearR = r'(?P<year>(19|20)\d\d)(?:{})?'.format('\ub144') # if months have 'digits' as names, they need to be # removed; will be handled as digits in regex, adding d+{1,2}\.? diff --git a/pywikibot/userinterfaces/transliteration.py b/pywikibot/userinterfaces/transliteration.py index 7d1c38d..779370e 100644 --- a/pywikibot/userinterfaces/transliteration.py +++ b/pywikibot/userinterfaces/transliteration.py @@ -24,6 +24,7 @@ 'kn': '೦೧೨೩೪೫೬೭೮೯', 'lo': '໐໑໒໓໔໕໖໗໘໙', 'ml': '൦൧൨൩൪൫൬൭൮൯', + 'ne': '०१२३४५६७८९', 'or': '୦୧୨୩୪୫୬୭୮୯', 'pa': '੦੧੨੩੪੫੬੭੮੯', 'te': '౦౧౨౩౪౫౬౭౮౯', diff --git a/tests/archivebot_tests.py b/tests/archivebot_tests.py index 7680ec6..088c3cd 100755 --- a/tests/archivebot_tests.py +++ b/tests/archivebot_tests.py @@ -121,7 +121,9 @@ sites = {code: {'family': 'wikipedia', 'code': code} for code in THREADS} cached = True - expected_failures = ['ar', 'scn', 'th'] + expected_failures = ['scn', 'th'] + # FIXME: see TestArchiveBotAfterDateUpdate() + # 'th': year is 2552 while regex assumes 19..|20.., might be fixed def test_archivebot(self, code=None) -> None: """Test archivebot for one site.""" @@ -153,20 +155,6 @@ self.assertIsInstance(thread.content, str) self.assertIsInstance(thread.timestamp, datetime) - # FIXME: see TestArchiveBotAfterDateUpdate() - # 'ar': Uses Arabic acronym for TZ - # 'eo': changed month name setting in wiki from Sep to sep - # Localisation updates from https://translatewiki.net. - # Change-Id: I3d9b14ae3a5d77fea9694ef113b0180e5677c39e - # ref: mediawiki languages/i18n/eo.json - # for new entries it should work - # 'pdc': changed month name setting in wiki over time (?) - # in old posts in talk page, February is "Feb.", site message gives - # <message name="feb" xml:space="preserve">Han.</message>. - # for new entries it should work - # 'th': year is 2552 while regex assumes 19..|20.., might be fixed - # 'uz': changed month name for October (T370501) - class TestArchiveBotAfterDateUpdate(TestCase): -- To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1277442?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: I84b5bc468406a90aa99e501a30f005b24b22f4e5 Gerrit-Change-Number: 1277442 Gerrit-PatchSet: 11 Gerrit-Owner: Xqt <[email protected]> Gerrit-Reviewer: Saroj <[email protected]> Gerrit-Reviewer: Thiemo Kreuz (WMDE) <[email protected]> Gerrit-Reviewer: Xqt <[email protected]> Gerrit-Reviewer: jenkins-bot
_______________________________________________ Pywikibot-commits mailing list -- [email protected] To unsubscribe send an email to [email protected]
