MarcoAurelio created this task.
MarcoAurelio added projects: Pywikibot-i18n, Pywikibot-archivebot.py, I18n.
Restricted Application added subscribers: pywikibot-bugs-list, Liuxinyu970226,
Aklapper.
Restricted Application added a project: Pywikibot.
TASK DESCRIPTION
Could we make pywikibot use `en` when no `ga` translation is avalaible?
I keep getting, on ga.wiktionary:
$ pwb.py archivebot User:MABot/config -family:wiktionary -lang:ga -v
-simulate
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit
(AMD64)]
Fetching template transclusions...
Found 1 wiktionary:ga processes running, including this one.
Processing [[ga:Vicífhoclóir:Halla Baile]]
148 thread(s) found on [[ga:Vicífhoclóir:Halla Baile]]
Looking for: {{Úsáideoir:MABot/config}} in [[ga:Vicífhoclóir:Halla Baile]]
Processing 148 threads
ERROR: Error occurred while processing page [[ga:Vicífhoclóir:Halla Baile]]
ERROR: IndexError: language "ga" requires 5 plural variants for "$1" but
only 1 ("$1 lá") provided
Traceback (most recent call last):
File ".\scripts\archivebot.py", line 792, in main
archiver.run()
File ".\scripts\archivebot.py", line 658, in run
whys = self.analyze_page()
File ".\scripts\archivebot.py", line 620, in analyze_page
why = t.should_be_archived(self)
File ".\scripts\archivebot.py", line 395, in should_be_archived
duration = str2localized_duration(archiver.site, re_t.group(1))
File ".\scripts\archivebot.py", line 176, in str2localized_duration
exp = i18n.translate(site.code, template, {'$1': int(duration)})
File "H:\MABot\pywikibot\i18n.py", line 641, in translate
trans = _extract_plural(code, trans, plural_parameters)
File "H:\MABot\pywikibot\i18n.py", line 520, in _extract_plural
return re.sub(PLURAL_PATTERN, replace_plural, message)
File "C:\Python37\lib\re.py", line 192, in sub
return _compile(pattern, flags).sub(repl, string, count)
File "H:\MABot\pywikibot\i18n.py", line 506, in replace_plural
'", "'.join(plural_entries)))
IndexError: language "ga" requires 5 plural variants for "$1" but only 1
("$1 lá") provided
Dropped throttle(s).
Closing network session.
Network session closed.
This will let the bots run as well as start using Irish translations when
they're avalaible.
`IndexError: language "ga" requires 5 plural variants for "$1" but only 1
("$1 lá") provided` makes me wonder too where this is being defined. I made
`git grep -i "lá"` but got no results.
Thank you.
TASK DETAIL
https://phabricator.wikimedia.org/T219097
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: MarcoAurelio
Cc: Aklapper, Dvorapa, Liuxinyu970226, MarcoAurelio, pywikibot-bugs-list,
MattLongCT, Wenyi, Jayprakash12345, Tbscho, MayS, Mdupont, JJMC89, Avicennasis,
Srdjan_m, MuhammadShuaib, LNDDYL, Psychoslave, mys_721tx, Gryllida, jayvdb,
Shizhao, Dalba, Masti, Arrbee, Alchimista, Rxy, Jay8g
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs