Xqt created this task.
Xqt added projects: Pywikibot, Pywikibot-i18n.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
**Steps to replicate the issue** (include links if applicable):
>>> import pywikibot
>>> from pywikibot import i18n
>>> i18n.twtranslate('en', 'unknown_package', fallback_prompt='foo')
>>> i18n.twtranslate('en', 'unknown_package', fallback_prompt='foo')
**What happens?**:
For `'en'`
Traceback (most recent call last):
File "<pyshell#12>", line 1, in <module>
i18n.twtranslate('en', 'unknown_package', fallback_prompt='foo')
File "D:\pwb\GIT\core\pywikibot\i18n.py", line 749, in twtranslate
raise pywikibot.exceptions.TranslationError(fill(
pywikibot.exceptions.TranslationError: No English translation has been
defined for TranslateWiki key
"unknown_package". It can happen due to lack of i18n submodule or
files or an outdated submodule. See
https://www.mediawiki.org/wiki/Manual:Pywikibot/i18n
For `'es'`:
Traceback (most recent call last):
File "<pyshell#13>", line 1, in <module>
i18n.twtranslate('es', 'unknown_package', fallback_prompt='foo')
File "D:\pwb\GIT\core\pywikibot\i18n.py", line 749, in twtranslate
raise pywikibot.exceptions.TranslationError(fill(
pywikibot.exceptions.TranslationError: No English translation has been
defined for TranslateWiki key
"unknown_package". It can happen due to lack of i18n submodule or
files or an outdated submodule. See
https://www.mediawiki.org/wiki/Manual:Pywikibot/i18n
**What should have happened instead?**:
The fallback_prompt should be returned:
`'foo'`
**Software version** (skip for WMF-hosted wikis like Wikipedia):
Pywikibot < 8 if i18n files are updated after 26th September 2022; maybe also
Pywikibot 8 if i18n files are older than 28th December 2021.
TASK DETAIL
https://phabricator.wikimedia.org/T326470
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Aklapper, pywikibot-bugs-list, Milicevic01, Amire80, Xqt, PotsdamLamb,
Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi,
Tbscho, MayS, Framawiki, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis,
mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]