Page MenuHomePhabricator

autotranslate bug in interwiki.py with -wiktionary
Closed, ResolvedPublic

Description

pwb.py interwiki.py -family:wiktionary -force -wiktionary březen -lang:cs

-wiktionary parameter means that bot is searching only for same-named pages on other wiktionaries

březen means March

TitleTranslate: březen was recognized as MonthName with value 3
Retrieving 1 pages from wiktionary:cs.
Retrieving 2 pages from wiktionary:lb.
NOTE: [[lb:březen]] does not exist. Skipping.
NOTE: Ignoring [[af:Maart]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[an:marzo]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ang:Hrethmonath]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ar:mars]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ast:marzu]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[bg:mart]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[br:Meurzh]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[bs:mart]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ca:març]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[co:marzu]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[csb:strumiannik]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[cy:Mawrth]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[da:marts]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[de:März]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[el:Mártios]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[en:March]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[es:Marzo]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[et:märts]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[eu:Mäerz]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[fa:mars]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[fi:maaliskuu]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[fr:Mäerz]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[fy:maart]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ga:Márta]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[gl:marzo]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[hi:maarfnc]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[hr:ožujak]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[hu:március]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[id:Maret]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[io:Marzo]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[it:marzo]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ka:marti]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[kn:maar?ci]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ku:adar]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[la:Martius]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[lt:Kovas]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[mg:Mäerz]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ms:Mac]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[nl:maart]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[no:mars]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[oc:març]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[pl:marzec]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[pt:Março]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ro:martie]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ru:mart]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[scn:marzu]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[simple:March]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[sk:marec]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[sl:marec]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[sr:mart]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[sv:mars]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[te:maartsi]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[th:mi:nakhm]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[tl:Marso]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[uk:berezen']] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[vi:tháng ba]] for [[cs:březen]] in wiktionary mode
Retrieving 2 pages from wiktionary:sq.
NOTE: [[sq:Marsi (muaj)]] does not exist. Skipping.
NOTE: [[sq:březen]] does not exist. Skipping.
Retrieving 2 pages from wiktionary:hu.
NOTE: Ignoring [[af:Maart]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[an:marzo]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ang:Hrethmonath]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ar:mars]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ast:marzu]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[az:március]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[bg:mart]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[br:Meurzh]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[bs:mart]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ca:març]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[co:marzu]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[csb:strumiannik]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[cy:Mawrth]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[da:marts]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[de:März]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[el:Mártios]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[en:March]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[es:Marzo]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[et:märts]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[eu:március]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[fa:mars]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[fi:maaliskuu]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[fr:március]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[fy:maart]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ga:Márta]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[gl:marzo]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[hi:maarfnc]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[hr:ožujak]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[id:Maret]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[io:Marzo]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[it:marzo]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ka:marti]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[kn:maar?ci]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ko:március]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ku:adar]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[la:Martius]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[lb:Mäerz]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[lo:március]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[lt:Kovas]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[mg:március]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[mn:március]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ms:Mac]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[nl:maart]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[no:mars]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[oc:març]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[pl:marzec]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[pt:Março]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ro:martie]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[ru:mart]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[scn:marzu]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[simple:March]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[sk:marec]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[sl:marec]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[sr:mart]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[sv:mars]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[te:maartsi]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[th:mi:nakhm]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[tl:Marso]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[tr:március]] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[uk:berezen']] for [[cs:březen]] in wiktionary mode
NOTE: Ignoring [[vi:tháng ba]] for [[cs:březen]] in wiktionary mode
Retrieving 2 pages from wiktionary:kw.
NOTE: [[kw:březen]] does not exist. Skipping.
NOTE: [[kw:Mys Merth]] does not exist. Skipping.
Retrieving 2 pages from wiktionary:bn.
....
NOTE: [[tn:březen]] does not exist. Skipping.
======Post-processing [[cs:březen]]======
ERROR: Found more than one link for wiktionary:lt
ERROR: Found more than one link for wiktionary:et
ERROR: Found more than one link for wiktionary:id
ERROR: Found more than one link for wiktionary:nl
ERROR: Found more than one link for wiktionary:hu
ERROR: Found more than one link for wiktionary:uk
ERROR: Found more than one link for wiktionary:oc
ERROR: Found more than one link for wiktionary:csb
ERROR: Found more than one link for wiktionary:sk
ERROR: Found more than one link for wiktionary:pl
ERROR: Found more than one link for wiktionary:el
ERROR: Found more than one link for wiktionary:pt
ERROR: Found more than one link for wiktionary:fi
ERROR: Found more than one link for wiktionary:de
ERROR: Found more than one link for wiktionary:sv
ERROR: Found more than one link for wiktionary:en
ERROR: Found more than one link for wiktionary:ru
ERROR: Found more than one link for wiktionary:hr
ERROR: Found more than one link for wiktionary:ro
ERROR: Found more than one link for wiktionary:it
ERROR: Found more than one link for wiktionary:no
ERROR: Found more than one link for wiktionary:es
==============================
Links to wiktionary:lt
  (1) Found link to [[lt:Kovas]] in:
        Given as a hint.
  (2) Found link to [[lt:březen]] in:
        Given as a hint.
        [[az:březen]]
        [[cs:březen]]
        [[csb:březen]]
        [[de:březen]]
        [[el:březen]]
        [[en:březen]]
        [[es:březen]]
        [[et:březen]]
        [[eu:březen]]
        [[fi:březen]]
        [[fr:březen]]
        [[hr:březen]]
        [[hu:březen]]
        [[id:březen]]
        [[io:březen]]
        [[it:březen]]
        [[ko:březen]]
        [[lo:březen]]
        [[mg:březen]]
        [[nl:březen]]
        [[no:březen]]
        [[oc:březen]]
        [[pl:březen]]
        [[pt:březen]]
        [[ro:březen]]
        [[ru:březen]]
        [[sk:březen]]
        [[sv:březen]]
        [[tg:březen]]
        [[tr:březen]]
        [[uk:březen]]
Which variant should be used? (<number> [1-3], [n]one, [g]ive up, [q]uit):

See https://cs.wiktionary.org/w/index.php?title=b%C5%99ezen&diff=633394&oldid=624551
See also T91906

Details

Related Gerrit Patches:

Event Timeline

JAnD created this task.Aug 13 2015, 6:05 AM
JAnD raised the priority of this task from to High.
JAnD updated the task description. (Show Details)
JAnD added a subscriber: JAnD.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptAug 13 2015, 6:05 AM
Hydriz added a comment.EditedAug 16 2015, 10:39 AM

Interestingly, my bot fixed itself in this, this and this edit.

I am not exactly sure if this bug is easily reproducible in different scenarios. However, the examples I cited above seems to keep the [[simple:March]] wikilink.

It seems to depend on the -auto switch.
In manual mode, translation does not occur.

My guess is that in the several calls such as:

[......] titletranslate.translate(
    [......]
    auto=globalvar.auto,
    [......])

where

auto=globavar.auto

should be

auto=(globalvar.auto and globalvar.same != 'wiktionary')

to prevent automatic translation in -wiktionary mode.

I posted too soon. It's happening now in both auto and manual mode. I don't know what I did different before.
Maybe the fix is just to skip translation altogether for -wiktionary mode.

Change 238435 had a related patch set uploaded (by Malafaya):
[FIX] Skip auto translations for -wiktionary mode

https://gerrit.wikimedia.org/r/238435

Change 238435 merged by jenkins-bot:
[FIX] Skip auto translations for -wiktionary mode

https://gerrit.wikimedia.org/r/238435

Malafaya closed this task as Resolved.Sep 21 2015, 11:03 AM
Malafaya claimed this task.
Malafaya set Security to None.

@JAnD, it should be fixed. Please confirm. Thanks.

JAnD added a comment.Sep 21 2015, 1:30 PM

Seems to works as expected

Thanks for this fix! Will deploy this change out on Thursday