Hello,
thanks a lot for great job!
AWB replaces [[AB|(AB]]) as ([[A]])) instead of expected ([[AB]])
Hello,
thanks a lot for great job!
AWB replaces [[AB|(AB]]) as ([[A]])) instead of expected ([[AB]])
Ok, so this probably isn't a bug in AWB, but a problem with your regex.
Unless you tell us what you're doing, we can't help.
Please read https://www.mediawiki.org/wiki/How_to_report_a_bug
How to reproduce.
AWB replaces [[Ермітаж|(Ермітаж]]) with ([[Ерміта]]))
Expected behaviour: ([[Ермітаж]])
One more case and even more interesting case:
. . .
. . .
AWB proposition is from [[Нью-Мексико|(Нью-Мексико]], to ([[Нью-Мексик]]),
So your reproduction can be simplified a lot...
How to reproduce.
Before:
[[Файл:Pygmalion and Galatea (Boucher).jpeg|ліворуч|міні|[[Франсуа Буше|Ф. Буше]] "Пігмаліон і Галатея « [[Ермітаж|(Ермітаж]])]]
After:
[[Файл:Pygmalion and Galatea (Boucher).jpeg|ліворуч|міні|[[Франсуа Буше|Ф. Буше]] "Пігмаліон і Галатея « ([[Ерміта]]))]]
We can create a simplified recreation criteria (rather than the whole page) using that text... But it's obviously not clear at this point if it's because it's embedded in an Image link or not...
We can simplify, and see that it isn't; https://uk.wikipedia.org/w/index.php?title=%D0%9A%D0%BE%D1%80%D0%B8%D1%81%D1%82%D1%83%D0%B2%D0%B0%D1%87%3AReedy%2FSandbox&type=revision&diff=37168023&oldid=37168000
Same for the other example...
before | after |
---|---|
[[Ермітаж|(Ермітаж]]) | ([[Ерміта]]) |
[[Нью-Мексико|(Нью-Мексико]] | ([[Нью-Мексик]]) |
I guess some of the link simplification code in the General Fixes is getting rather confused.
It's cutting off the last letter too, which is odd. Some weird off by one error?
It's Parsers.SimplifyLinks at fault...
// [[dog|(dog)]] --> ([[dog]]) if(lb.StartsWith("(") && ("(" + Tools.TurnFirstToUpperNoProjectCheck(lb.Trim("()".ToCharArray())) + ")").Equals("(" + Tools.TurnFirstToUpperNoProjectCheck(la) + ")")) articleText = articleText.Replace(pipedlink, "([[" + b.Substring(1, b.Length-2) + "]])");
It basically assumes there's the trailing ) in the link...
Ok, so https://sourceforge.net/p/autowikibrowser/code/12540/ improves both situations; it doesn't eat the trailing characters.
original | AWB pre update | currently | fixed? |
---|---|---|---|
[[Ермітаж|(Ермітаж]]) | ([[Ерміта]]) | ([[Ермітаж]])) | partial, not completely |
[[Нью-Мексико|(Нью-Мексико]] | ([[Нью-Мексик]]) | ([[Нью-Мексико]]) | ✔ |
So we now still result in a double )) on the first example