Tacsipacsi created this task.
Tacsipacsi added projects: Pywikibot, Pywikibot-i18n.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
Steps to Reproduce:
-------------------
In a Python shell in the Pywikibot root directory (i.e. `$ python3`), issue
the following commands:
>>> from pywikibot import date
>>> date.formats['MonthName']['hu']('január')
>>> date.formats['MonthName']['hu']('május')
Close the shell, open it again, and try again. Repeat it a few times.
Actual Results:
---------------
- The first one (`január`) returns a random number [1..12] (stable within one
shell run, but otherwise unpredictable).
- The second one raises `ValueError: 'május' is not in list`.
Expected Results:
-----------------
- The first one consistently returns `1`.
- The second one consistently returns `5`.
Notes:
------
- Both bugs were introduced in 54f223acc1ec
<https://phabricator.wikimedia.org/rPWBC54f223acc1ec00a3b2192b80333f68e18c829520>
by @Xqt.
- First bug: `site.mediawiki_messages()` returns a dictionary, and it looks
like `list(dict)` is not stable in Python.
- Second bug: it queries MediaWiki:may
<https://translatewiki.net/wiki/MediaWiki:May>, but that’s the abbreviation
(similar to MediaWiki:jan <https://translatewiki.net/wiki/MediaWiki:Jan>); it
should use MediaWiki:may_long
<https://translatewiki.net/wiki/MediaWiki:May_long> instead. Both the
abbreviation and the full name are `May` in English, but in Hungarian the
former is `máj`, while the latter is `május`.
(Yes, these are two separate bugs, but as they were introduced together,
easier to reproduce together, and probably also faster to fix together, I
decided to open one ticket for them. Feel free to make it two if you disagree.)
TASK DETAIL
https://phabricator.wikimedia.org/T273573
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Tacsipacsi
Cc: Tacsipacsi, Aklapper, Xqt, pywikibot-bugs-list, JohnsonLee01, SHEKH,
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89,
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs