~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
from bzrlib.inventory import Inventory, InventoryEntry, make_entry
73
73
from bzrlib import symbol_versioning
74
74
from bzrlib.urlutils import unescape_for_display
75
 
 
 
75
from bzrlib.i18n import gettext
76
76
 
77
77
class NullCommitReporter(object):
78
78
    """I report on progress of a commit."""
113
113
        note(format, *args)
114
114
 
115
115
    def snapshot_change(self, change, path):
116
 
        if path == '' and change in ('added', 'modified'):
 
116
        if path == '' and change in (gettext('added'), gettext('modified')):
117
117
            return
118
118
        self._note("%s %s", change, path)
119
119
 
127
127
                                   "to started.", DeprecationWarning,
128
128
                                   stacklevel=2)
129
129
            location = ''
130
 
        self._note('Committing%s', location)
 
130
        self._note(gettext('Committing%s'), location)
131
131
 
132
132
    def completed(self, revno, rev_id):
133
 
        self._note('Committed revision %d.', revno)
 
133
        self._note(gettext('Committed revision %d.'), revno)
134
134
        # self._note goes to the console too; so while we want to log the
135
135
        # rev_id, we can't trivially only log it. (See bug 526425). Long
136
136
        # term we should rearrange the reporting structure, but for now
139
139
        mutter('Committed revid %s as revno %d.', rev_id, revno)
140
140
 
141
141
    def deleted(self, path):
142
 
        self._note('deleted %s', path)
 
142
        self._note(gettext('deleted %s'), path)
143
143
 
144
144
    def missing(self, path):
145
 
        self._note('missing %s', path)
 
145
        self._note(gettext('missing %s'), path)
146
146
 
147
147
    def renamed(self, change, old_path, new_path):
148
148
        self._note('%s %s => %s', change, old_path, new_path)
468
468
                self.master_branch.tags)
469
469
            if tag_conflicts:
470
470
                warning_lines = ['    ' + name for name, _, _ in tag_conflicts]
471
 
                note("Conflicting tags in bound branch:\n" +
472
 
                    "\n".join(warning_lines))
 
471
                note( gettext("Conflicting tags in bound branch:\n{0}".format(
 
472
                    "\n".join(warning_lines))) )
473
473
 
474
474
        # Make the working tree be up to date with the branch. This
475
475
        # includes automatic changes scheduled to be made to the tree, such
706
706
                    if new_path is None:
707
707
                        reporter.deleted(old_path)
708
708
                    elif old_path is None:
709
 
                        reporter.snapshot_change('added', new_path)
 
709
                        reporter.snapshot_change(gettext('added'), new_path)
710
710
                    elif old_path != new_path:
711
 
                        reporter.renamed('renamed', old_path, new_path)
 
711
                        reporter.renamed(gettext('renamed'), old_path, new_path)
712
712
                    else:
713
713
                        if (new_path or 
714
714
                            self.work_tree.branch.repository._format.rich_root_data):
715
715
                            # Don't report on changes to '' in non rich root
716
716
                            # repositories.
717
 
                            reporter.snapshot_change('modified', new_path)
 
717
                            reporter.snapshot_change(gettext('modified'), new_path)
718
718
            self._next_progress_entry()
719
719
        # Unversion IDs that were found to be deleted
720
720
        self.deleted_ids = deleted_ids
943
943
            self.reporter.renamed(change, old_path, path)
944
944
            self._next_progress_entry()
945
945
        else:
946
 
            if change == 'unchanged':
 
946
            if change == gettext('unchanged'):
947
947
                return
948
948
            self.reporter.snapshot_change(change, path)
949
949
            self._next_progress_entry()