Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/merge.py @ 29242:4d075bf28702
merge: make messages translatable
These messages have been overlooked by check-code, because they start
with non-alphabet character (' ').
Making these messages translatable seems reasonable, because all other
'ui.note()'-ed messages in calculateupdates() are already
translatable.
This is also a part of preparation for making "missing _() in ui
message" detection of check-code more exact.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Thu, 26 May 2016 01:57:34 +0900 |
parents | ead25aa27a43 |
children | 0d83ad967bf8 |
comparison
equal
deleted
inserted
replaced
29241:269f7ea08983 | 29242:4d075bf28702 |
---|---|
987 # bids is a mapping from action method to list af actions | 987 # bids is a mapping from action method to list af actions |
988 # Consensus? | 988 # Consensus? |
989 if len(bids) == 1: # all bids are the same kind of method | 989 if len(bids) == 1: # all bids are the same kind of method |
990 m, l = bids.items()[0] | 990 m, l = bids.items()[0] |
991 if all(a == l[0] for a in l[1:]): # len(bids) is > 1 | 991 if all(a == l[0] for a in l[1:]): # len(bids) is > 1 |
992 repo.ui.note(" %s: consensus for %s\n" % (f, m)) | 992 repo.ui.note(_(" %s: consensus for %s\n") % (f, m)) |
993 actions[f] = l[0] | 993 actions[f] = l[0] |
994 continue | 994 continue |
995 # If keep is an option, just do it. | 995 # If keep is an option, just do it. |
996 if 'k' in bids: | 996 if 'k' in bids: |
997 repo.ui.note(" %s: picking 'keep' action\n" % f) | 997 repo.ui.note(_(" %s: picking 'keep' action\n") % f) |
998 actions[f] = bids['k'][0] | 998 actions[f] = bids['k'][0] |
999 continue | 999 continue |
1000 # If there are gets and they all agree [how could they not?], do it. | 1000 # If there are gets and they all agree [how could they not?], do it. |
1001 if 'g' in bids: | 1001 if 'g' in bids: |
1002 ga0 = bids['g'][0] | 1002 ga0 = bids['g'][0] |
1003 if all(a == ga0 for a in bids['g'][1:]): | 1003 if all(a == ga0 for a in bids['g'][1:]): |
1004 repo.ui.note(" %s: picking 'get' action\n" % f) | 1004 repo.ui.note(_(" %s: picking 'get' action\n") % f) |
1005 actions[f] = ga0 | 1005 actions[f] = ga0 |
1006 continue | 1006 continue |
1007 # TODO: Consider other simple actions such as mode changes | 1007 # TODO: Consider other simple actions such as mode changes |
1008 # Handle inefficient democrazy. | 1008 # Handle inefficient democrazy. |
1009 repo.ui.note(_(' %s: multiple bids for merge action:\n') % f) | 1009 repo.ui.note(_(' %s: multiple bids for merge action:\n') % f) |