/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 olive/info.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:
25
25
 
26
26
import bzrlib.errors as errors
27
27
 
 
28
from bzrlib.plugins.gtk import _i18n
28
29
from bzrlib.plugins.gtk.dialog import error_dialog
29
30
from guifiles import GLADEFILENAME
30
31
 
108
109
 
109
110
    try:
110
111
        branch = a_bzrdir.open_branch()
 
112
        repository = branch.repository
 
113
        control = a_bzrdir
111
114
        branch.lock_read()
112
115
        try:
113
116
            ret['location'] = info_helper.get_location_info(repository, branch)
142
145
 
143
146
class OliveInfo:
144
147
    """ Display Informations window and perform the needed actions. """
145
 
    def __init__(self, wt):
 
148
    def __init__(self, branch):
146
149
        """ Initialize the Informations window. """
147
150
        self.glade = gtk.glade.XML(GLADEFILENAME, 'window_info', 'olive-gtk')
148
151
        
152
155
        # Check if current location is a branch
153
156
        self.notbranch = False
154
157
        try:
155
 
            self.ret = info(wt.basedir)
 
158
            self.ret = info(branch.base)
156
159
        except errors.NotBranchError:
157
160
            self.notbranch = True
158
161
            return
551
554
    def display(self):
552
555
        """ Display the Informations window. """
553
556
        if self.notbranch:
554
 
            error_dialog(_('Directory is not a branch'),
555
 
                         _('You can perform this action only in a branch.'))
 
557
            error_dialog(_i18n('Directory is not a branch'),
 
558
                         _i18n('You can perform this action only in a branch.'))
556
559
            self.close()
557
560
        else:
558
561
            self.window.show()