comparison mercurial/commands.py @ 17892:ba0a1701c81a stable

i18n: add "i18n" comment to column positioning messages of "hg summary" This comment makes it easier to distinguish such messages from others for message translators.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 31 Oct 2012 03:59:28 +0900
parents 0e2846b2482c
children c8709ff57ff2 35ba170c0f82
comparison
equal deleted inserted replaced
17891:8f85151ce201 17892:ba0a1701c81a
5462 marks = [] 5462 marks = []
5463 5463
5464 for p in parents: 5464 for p in parents:
5465 # label with log.changeset (instead of log.parent) since this 5465 # label with log.changeset (instead of log.parent) since this
5466 # shows a working directory parent *changeset*: 5466 # shows a working directory parent *changeset*:
5467 # i18n: column positioning for "hg summary"
5467 ui.write(_('parent: %d:%s ') % (p.rev(), str(p)), 5468 ui.write(_('parent: %d:%s ') % (p.rev(), str(p)),
5468 label='log.changeset changeset.%s' % p.phasestr()) 5469 label='log.changeset changeset.%s' % p.phasestr())
5469 ui.write(' '.join(p.tags()), label='log.tag') 5470 ui.write(' '.join(p.tags()), label='log.tag')
5470 if p.bookmarks(): 5471 if p.bookmarks():
5471 marks.extend(p.bookmarks()) 5472 marks.extend(p.bookmarks())
5479 ui.status(' ' + p.description().splitlines()[0].strip() + '\n', 5480 ui.status(' ' + p.description().splitlines()[0].strip() + '\n',
5480 label='log.summary') 5481 label='log.summary')
5481 5482
5482 branch = ctx.branch() 5483 branch = ctx.branch()
5483 bheads = repo.branchheads(branch) 5484 bheads = repo.branchheads(branch)
5485 # i18n: column positioning for "hg summary"
5484 m = _('branch: %s\n') % branch 5486 m = _('branch: %s\n') % branch
5485 if branch != 'default': 5487 if branch != 'default':
5486 ui.write(m, label='log.branch') 5488 ui.write(m, label='log.branch')
5487 else: 5489 else:
5488 ui.status(m, label='log.branch') 5490 ui.status(m, label='log.branch')
5489 5491
5490 if marks: 5492 if marks:
5491 current = repo._bookmarkcurrent 5493 current = repo._bookmarkcurrent
5494 # i18n: column positioning for "hg summary"
5492 ui.write(_('bookmarks:'), label='log.bookmark') 5495 ui.write(_('bookmarks:'), label='log.bookmark')
5493 if current is not None: 5496 if current is not None:
5494 try: 5497 try:
5495 marks.remove(current) 5498 marks.remove(current)
5496 ui.write(' *' + current, label='bookmarks.current') 5499 ui.write(' *' + current, label='bookmarks.current')
5552 cleanworkdir = True 5555 cleanworkdir = True
5553 elif pnode not in bheads: 5556 elif pnode not in bheads:
5554 t += _(' (new branch head)') 5557 t += _(' (new branch head)')
5555 5558
5556 if cleanworkdir: 5559 if cleanworkdir:
5560 # i18n: column positioning for "hg summary"
5557 ui.status(_('commit: %s\n') % t.strip()) 5561 ui.status(_('commit: %s\n') % t.strip())
5558 else: 5562 else:
5563 # i18n: column positioning for "hg summary"
5559 ui.write(_('commit: %s\n') % t.strip()) 5564 ui.write(_('commit: %s\n') % t.strip())
5560 5565
5561 # all ancestors of branch heads - all ancestors of parent = new csets 5566 # all ancestors of branch heads - all ancestors of parent = new csets
5562 new = [0] * len(repo) 5567 new = [0] * len(repo)
5563 cl = repo.changelog 5568 cl = repo.changelog
5571 for a in cl.ancestors([p.rev() for p in parents]): 5576 for a in cl.ancestors([p.rev() for p in parents]):
5572 new[a] = 0 5577 new[a] = 0
5573 new = sum(new) 5578 new = sum(new)
5574 5579
5575 if new == 0: 5580 if new == 0:
5581 # i18n: column positioning for "hg summary"
5576 ui.status(_('update: (current)\n')) 5582 ui.status(_('update: (current)\n'))
5577 elif pnode not in bheads: 5583 elif pnode not in bheads:
5584 # i18n: column positioning for "hg summary"
5578 ui.write(_('update: %d new changesets (update)\n') % new) 5585 ui.write(_('update: %d new changesets (update)\n') % new)
5579 else: 5586 else:
5587 # i18n: column positioning for "hg summary"
5580 ui.write(_('update: %d new changesets, %d branch heads (merge)\n') % 5588 ui.write(_('update: %d new changesets, %d branch heads (merge)\n') %
5581 (new, len(bheads))) 5589 (new, len(bheads)))
5582 5590
5583 if opts.get('remote'): 5591 if opts.get('remote'):
5584 t = [] 5592 t = []
5616 diff = set(lmarks) - set(rmarks) 5624 diff = set(lmarks) - set(rmarks)
5617 if len(diff) > 0: 5625 if len(diff) > 0:
5618 t.append(_('%d outgoing bookmarks') % len(diff)) 5626 t.append(_('%d outgoing bookmarks') % len(diff))
5619 5627
5620 if t: 5628 if t:
5629 # i18n: column positioning for "hg summary"
5621 ui.write(_('remote: %s\n') % (', '.join(t))) 5630 ui.write(_('remote: %s\n') % (', '.join(t)))
5622 else: 5631 else:
5632 # i18n: column positioning for "hg summary"
5623 ui.status(_('remote: (synced)\n')) 5633 ui.status(_('remote: (synced)\n'))
5624 5634
5625 @command('tag', 5635 @command('tag',
5626 [('f', 'force', None, _('force tag')), 5636 [('f', 'force', None, _('force tag')),
5627 ('l', 'local', None, _('make the tag local')), 5637 ('l', 'local', None, _('make the tag local')),