/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/frontend/gtk/branch.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-08-20 13:02:35 UTC
  • mto: (0.14.1 main) (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060820130235-62c9c5753f5d8774
Gettext support added.

2006-08-20  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * po/hu.po: added Hungarian traslation
    * Added gettext support to all files.
    * genpot.sh: added olive-gtk.pot generator script

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    def __init__(self, gladefile, comm, dialog):
36
36
        """ Initialize the Branch dialog. """
37
37
        self.gladefile = gladefile
38
 
        self.glade = gtk.glade.XML(self.gladefile, 'window_branch')
 
38
        self.glade = gtk.glade.XML(self.gladefile, 'window_branch', 'olive-gtk')
39
39
        
40
40
        # Communication object
41
41
        self.comm = comm
63
63
        entry_location = self.glade.get_widget('entry_branch_location')
64
64
        location = entry_location.get_text()
65
65
        if location is '':
66
 
            self.dialog.error_dialog('Missing branch location',
67
 
                                     'You must specify a branch location.')
 
66
            self.dialog.error_dialog(_('Missing branch location'),
 
67
                                     _('You must specify a branch location.'))
68
68
            return
69
69
        
70
70
        destination = self.filechooser.get_filename()
78
78
        try:
79
79
            revs = init.branch(location, destination, revno)
80
80
        except errors.NonExistingSource, errmsg:
81
 
            self.dialog.error_dialog('Non existing source',
82
 
                                     "The location (%s)\ndoesn't exist." % errmsg)
 
81
            self.dialog.error_dialog(_('Non existing source'),
 
82
                                     _("The location (%s)\ndoesn't exist.") % errmsg)
83
83
            self.comm.set_busy(self.window, False)
84
84
            return
85
85
        except errors.TargetAlreadyExists, errmsg:
86
 
            self.dialog.error_dialog('Target already exists',
87
 
                                     'Target directory (%s)\nalready exists. Please select another target.' % errmsg)
 
86
            self.dialog.error_dialog(_('Target already exists'),
 
87
                                     _('Target directory (%s)\nalready exists. Please select another target.') % errmsg)
88
88
            self.comm.set_busy(self.window, False)
89
89
            return
90
90
        except errors.NonExistingParent, errmsg:
91
 
            self.dialog.error_dialog("Non existing parent directory",
92
 
                                     "The parent directory (%s)\ndoesn't exist." % errmsg)
 
91
            self.dialog.error_dialog(_('Non existing parent directory'),
 
92
                                     _("The parent directory (%s)\ndoesn't exist.") % errmsg)
93
93
            self.comm.set_busy(self.window, False)
94
94
            return
95
95
        except errors.NonExistingRevision:
96
 
            self.dialog.error_dialog('Non existing revision',
97
 
                                     "The revision you specified doesn't exist.")
 
96
            self.dialog.error_dialog(_('Non existing revision'),
 
97
                                     _("The revision you specified doesn't exist."))
98
98
            self.comm.set_busy(self.window, False)
99
99
            return
100
100
        except errors.NotBranchError, errmsg:
101
 
            self.dialog.error_dialog('Location is not a branch',
102
 
                                     'The specified location has to be a branch')
 
101
            self.dialog.error_dialog(_('Location is not a branch'),
 
102
                                     _('The specified location has to be a branch.'))
103
103
            self.comm.set_busy(self.window, False)
104
104
            return
105
105
        except:
106
106
            raise
107
107
        
108
108
        self.close()
109
 
        self.dialog.info_dialog('Branching successful',
110
 
                                '%d revision(s) branched.' % revs)
 
109
        self.dialog.info_dialog(_('Branching successful'),
 
110
                                _('%d revision(s) branched.') % revs)
111
111
        self.comm.refresh_right()
112
112
 
113
113
    def close(self, widget=None):