/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 push.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:
30
30
from bzrlib.config import LocationConfig
31
31
import bzrlib.errors as errors
32
32
 
 
33
from bzrlib.plugins.gtk import _i18n
33
34
from dialog import error_dialog, info_dialog, question_dialog
34
35
 
35
36
from history import UrlHistory
49
50
        self.branch = branch
50
51
        
51
52
        # Create the widgets
52
 
        self._label_location = gtk.Label(_("Location:"))
 
53
        self._label_location = gtk.Label(_i18n("Location:"))
53
54
        self._combo = gtk.ComboBoxEntry()
54
 
        self._button_push = gtk.Button(_("_Push"), use_underline=True)
 
55
        self._button_push = gtk.Button(_i18n("_Push"), use_underline=True)
55
56
        self._hbox_location = gtk.HBox()
56
57
        
57
58
        # Set callbacks
94
95
        location = self._combo.get_child().get_text()
95
96
        revs = 0
96
97
        if self.branch is not None and self.branch.get_push_location() is None:
97
 
            response = question_dialog(_('Set default push location'),
98
 
                                       _('There is no default push location set.\nSet %r as default now?') % location)
 
98
            response = question_dialog(_i18n('Set default push location'),
 
99
                                       _i18n('There is no default push location set.\nSet %r as default now?') % location)
99
100
            if response == gtk.RESPONSE_OK:
100
101
                self.branch.set_push_location(location)
101
102
 
102
103
        try:
103
104
            revs = do_push(self.branch, location=location, overwrite=False)
104
105
        except errors.DivergedBranches:
105
 
            response = question_dialog(_('Branches have been diverged'),
106
 
                                       _('You cannot push if branches have diverged.\nOverwrite?'))
 
106
            response = question_dialog(_i18n('Branches have been diverged'),
 
107
                                       _i18n('You cannot push if branches have diverged.\nOverwrite?'))
107
108
            if response == gtk.RESPONSE_YES:
108
109
                revs = do_push(self.branch, location=location, overwrite=True)
109
110
        
110
111
        self._history.add_entry(location)
111
 
        info_dialog(_('Push successful'),
112
 
                    _("%d revision(s) pushed.") % revs)
 
112
        info_dialog(_i18n('Push successful'),
 
113
                    _i18n("%d revision(s) pushed.") % revs)
113
114
        
114
115
        self.response(gtk.RESPONSE_OK)
115
116
 
142
143
            relurl = transport.relpath(location_url)
143
144
            transport.mkdir(relurl)
144
145
        except errors.NoSuchFile:
145
 
            response = question_dialog(_('Non existing parent directory'),
146
 
                         _("The parent directory (%s)\ndoesn't exist. Create?") % location)
 
146
            response = question_dialog(_i18n('Non existing parent directory'),
 
147
                         _i18n("The parent directory (%s)\ndoesn't exist. Create?") % location)
147
148
            if response == gtk.RESPONSE_OK:
148
149
                _create_prefix(transport)
149
150
            else: