/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to branch.py

  • Committer: Vincent Ladeuil
  • Date: 2008-05-05 18:16:46 UTC
  • mto: (487.1.1 gtk)
  • mto: This revision was merged to the branch mainline in revision 490.
  • Revision ID: v.ladeuil+lp@free.fr-20080505181646-n95l8ltw2u6jtr26
Fix bug #187283 fix replacing _() by _i18n().

* genpot.sh 
Remove duplication. Add the ability to specify the genrated pot
file on command-line for debugging purposes.

* po/olive-gtk.pot:
Regenerated.

* __init__.py, branch.py, branchview/treeview.py, checkout.py,
commit.py, conflicts.py, diff.py, errors.py, initialize.py,
merge.py, nautilus-bzr.py, olive/__init__.py, olive/add.py,
olive/bookmark.py, olive/guifiles.py, olive/info.py,
olive/menu.py, olive/mkdir.py, olive/move.py, olive/remove.py,
olive/rename.py, push.py, revbrowser.py, status.py, tags.py:
Replace all calls to _() by calls to _i18n(), the latter being
defined in __init__.py and imported in the other modules from
there. This fix the problem encountered countless times when
running bzr selftest and getting silly error messages about
boolean not being callables.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from bzrlib.branch import Branch
30
30
import bzrlib.errors as errors
31
31
 
 
32
from bzrlib.plugins.gtk import _i18n
 
33
 
32
34
from dialog import error_dialog, info_dialog
33
35
 
34
36
from branchbox import BranchSelectionBox
47
49
        self.path = path
48
50
        
49
51
        # Create the widgets
50
 
        self._button_branch = gtk.Button(_("_Branch"), use_underline=True)
 
52
        self._button_branch = gtk.Button(_i18n("_Branch"), use_underline=True)
51
53
        self._remote_branch = BranchSelectionBox()
52
54
        self._button_revision = gtk.Button('')
53
 
        self._label_location = gtk.Label(_("Branch location:"))
 
55
        self._label_location = gtk.Label(_i18n("Branch location:"))
54
56
        self._label_location.set_alignment(0, 0.5)
55
 
        self._label_destination = gtk.Label(_("Destination:"))
56
 
        self._label_nick = gtk.Label(_("Branck nick:"))
57
 
        self._label_revision = gtk.Label(_("Revision:"))
58
 
        self._filechooser = gtk.FileChooserButton(_("Please select a folder"))
 
57
        self._label_destination = gtk.Label(_i18n("Destination:"))
 
58
        self._label_nick = gtk.Label(_i18n("Branck nick:"))
 
59
        self._label_revision = gtk.Label(_i18n("Revision:"))
 
60
        self._filechooser = gtk.FileChooserButton(_i18n("Please select a folder"))
59
61
        self._filechooser.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER)
60
62
        self._hbox_revision = gtk.HBox()
61
63
        self._entry_revision = gtk.Entry()
135
137
        """ Branch button clicked handler. """
136
138
        location = self._remote_branch.get_url()
137
139
        if location is '':
138
 
            error_dialog(_('Missing branch location'),
139
 
                         _('You must specify a branch location.'))
 
140
            error_dialog(_i18n('Missing branch location'),
 
141
                         _i18n('You must specify a branch location.'))
140
142
            return
141
143
        
142
144
        destination = self._filechooser.get_filename()
177
179
        finally:
178
180
            br_from.unlock()
179
181
                
180
 
        self._history.add_entry(location)
181
 
        info_dialog(_('Branching successful'),
182
 
                    _('%d revision(s) branched.') % revs)
 
182
        info_dialog(_i18n('Branching successful'),
 
183
                    _i18n('%d revision(s) branched.') % revs)
183
184
        
184
185
        self.response(gtk.RESPONSE_OK)
185
186
    
187
188
        """ We try to get the last revision if focus lost. """
188
189
        rev = self._get_last_revno()
189
190
        if rev is None:
190
 
            self._entry_revision.set_text(_('N/A'))
 
191
            self._entry_revision.set_text(_i18n('N/A'))
191
192
            self._button_revision.set_sensitive(False)
192
193
        else:
193
194
            self._entry_revision.set_text(str(rev))