jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/994332?usp=email )

Change subject: [bugfix] Add hy to special languages in TimeStripper
......................................................................

[bugfix] Add hy to special languages in TimeStripper

Also hy needs to check both upper and lower case for months.

Bug: T356175
Change-Id: Ibc7982084102735ffa87fd8d97f6a2813c7176ca
---
M pywikibot/textlib.py
1 file changed, 20 insertions(+), 5 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index 75c3d87..788df3a 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -1,6 +1,6 @@
 """Functions for manipulating wiki-text."""
 #
-# (C) Pywikibot team, 2008-2023
+# (C) Pywikibot team, 2008-2024
 #
 # Distributed under the terms of the MIT license.
 #
@@ -1985,10 +1985,13 @@
         self.site = pywikibot.Site() if site is None else site

         self.origNames2monthNum = {}
-        # use first_lower/first_upper for 'vi' language because monthsnames
-        # were changed: T324310
-        functions = [first_upper,
-                     first_lower] if self.site.lang == 'vi' else [str]
+        # use first_lower/first_upper for those language where month names
+        # were changed: T324310, T356175
+        if self.site.lang in ('hy', 'vi'):
+            functions = [first_upper, first_lower]
+        else:
+            functions = [str]
+
         for n, (long, short) in enumerate(self.site.months_names, start=1):
             for func in functions:
                 self.origNames2monthNum[func(long)] = n

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/994332?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ibc7982084102735ffa87fd8d97f6a2813c7176ca
Gerrit-Change-Number: 994332
Gerrit-PatchSet: 1
Gerrit-Owner: Mpaa <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to