Build in safeguard for pofix to prevent duplicate msgids.
This commit is contained in:
parent
e88402c4a3
commit
770bd9a124
1 changed files with 4 additions and 1 deletions
|
@ -164,7 +164,10 @@ if __name__ == '__main__':
|
|||
after = before
|
||||
for (domain, fixes) in stringfixes.items():
|
||||
for (old, new) in fixes:
|
||||
after = after.replace(old, new)
|
||||
if new in after and old in after and old is not new:
|
||||
print "pofix: %s has a msgid \n\t\"%s\"\nand a typoed version \n\t\"%s\"\nthis needs handfixing for now." % (path, old, new)
|
||||
else:
|
||||
after = after.replace(old, new)
|
||||
if after != before:
|
||||
print "pofix: %s modified" % path
|
||||
modified += 1
|
||||
|
|
Loading…
Add table
Reference in a new issue