~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shelf_ui.py

(jr) Add gettext() to uses of note() (Jonathan Riddell)

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    ui,
35
35
    workingtree,
36
36
)
37
 
 
 
37
from bzrlib.i18n import gettext
38
38
 
39
39
class UseEditor(Exception):
40
40
    """Use an editor instead of selecting hunks."""
66
66
 
67
67
    def shelved_id(self, shelf_id):
68
68
        """Report the id changes were shelved to."""
69
 
        trace.note('Changes shelved with id "%d".' % shelf_id)
 
69
        trace.note(gettext('Changes shelved with id "%d".') % shelf_id)
70
70
 
71
71
    def changes_destroyed(self):
72
72
        """Report that changes were made without shelving."""
73
 
        trace.note('Selected changes destroyed.')
 
73
        trace.note(gettext('Selected changes destroyed.'))
74
74
 
75
75
    def selected_changes(self, transform):
76
76
        """Report the changes that were selected."""
77
 
        trace.note("Selected changes:")
 
77
        trace.note(gettext("Selected changes:"))
78
78
        changes = transform.iter_changes()
79
79
        delta.report_changes(changes, self.delta_reporter)
80
80
 
470
470
        cleanups = [self.tree.unlock]
471
471
        try:
472
472
            if self.read_shelf:
473
 
                trace.note('Using changes with id "%d".' % self.shelf_id)
 
473
                trace.note(gettext('Using changes with id "%d".') % self.shelf_id)
474
474
                unshelver = self.manager.get_unshelver(self.shelf_id)
475
475
                cleanups.append(unshelver.finalize)
476
476
                if unshelver.message is not None:
477
 
                    trace.note('Message: %s' % unshelver.message)
 
477
                    trace.note(gettext('Message: %s') % unshelver.message)
478
478
                change_reporter = delta._ChangeReporter()
479
479
                merger = unshelver.make_merger(None)
480
480
                merger.change_reporter = change_reporter
486
486
                    self.show_changes(merger)
487
487
            if self.delete_shelf:
488
488
                self.manager.delete_shelf(self.shelf_id)
489
 
                trace.note('Deleted changes with id "%d".' % self.shelf_id)
 
489
                trace.note(gettext('Deleted changes with id "%d".') % self.shelf_id)
490
490
        finally:
491
491
            for cleanup in reversed(cleanups):
492
492
                cleanup()