Jump to content

User:Alai/replace-diffs

From Wikipedia, the free encyclopedia
29a30
> -doAll       - Replacements to be do done on an "all or nothing" basis
603a605,607
> # replacements to be "all or nothing"?
> doAll = False
>
681a686
>         ok = True
683a689
>             old_text = new_text
685c691,696
<         return new_text
---
>             if old_text == new_text and doAll:
>                 ok = False
>         if ok:
>             return new_text
>         else:
>             return original_text
735a747
>     global doAll
783a796,797
>         elif arg == '-doAll':
>             doAll = True
846a861,865
>     elif (len(commandline_replacements) == 3 and fix == None):
>         replacements.append((commandline_replacements[0], commandline_replacements[2]))
>         replacements.append((commandline_replacements[1], ''))
>         wikipedia.setAction(wikipedia.translate(wikipedia.getSite(), msg ) % ' (-' + commandline_replacements[0] + ' +' + commandline_replacements[1] + ' +' + commandline_replacements[2] + ')')
>         doAll = True