~bzr/ubuntu/karmic/bzr-gtk/bzr-ppa

« back to all changes in this revision

Viewing changes to olive/frontend/gtk/push.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-08-20 13:02:35 UTC
  • mto: (0.27.1 main)
  • mto: This revision was merged to the branch mainline in revision 58.
  • 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:
76
76
    def display(self):
77
77
        """ Display the Push dialog. """
78
78
        if self.notbranch:
79
 
            self.dialog.error_dialog('Directory is not a branch',
80
 
                                     'You can perform this action only in a branch.')
 
79
            self.dialog.error_dialog(_('Directory is not a branch'),
 
80
                                     _('You can perform this action only in a branch.'))
81
81
            self.close()
82
82
        else:
83
83
            self.window.show()
119
119
                revs = commit.push(self.comm.get_path(),
120
120
                                   overwrite=self.check_overwrite.get_active())
121
121
            except errors.NotBranchError:
122
 
                self.dialog.error_dialog('Directory is not a branch',
123
 
                                         'You can perform this action only in a branch.')
 
122
                self.dialog.error_dialog(_('Directory is not a branch'),
 
123
                                         _('You can perform this action only in a branch.'))
124
124
                return
125
125
            except errors.NoLocationKnown:
126
 
                self.dialog.error_dialog('Push location is unknown',
127
 
                                         'Please specify a location manually.')
 
126
                self.dialog.error_dialog(_('Push location is unknown'),
 
127
                                         _('Please specify a location manually.'))
128
128
                return
129
129
            except errors.NonExistingParent, errmsg:
130
 
                self.dialog.error_dialog("Non existing parent directory",
131
 
                                         "The parent directory (%s)\ndoesn't exist." % errmsg)
 
130
                self.dialog.error_dialog(_('Non existing parent directory'),
 
131
                                         _("The parent directory (%s)\ndoesn't exist.") % errmsg)
132
132
                return
133
133
            except errors.DivergedBranchesError:
134
 
                self.dialog.error_dialog('Branches have been diverged',
135
 
                                         'You cannot push if branches have diverged. Use the\noverwrite option if you want to push anyway.')
 
134
                self.dialog.error_dialog(_('Branches have been diverged'),
 
135
                                         _('You cannot push if branches have diverged. Use the\noverwrite option if you want to push anyway.'))
136
136
                return
137
137
            except:
138
138
                raise
139
139
        elif radio_specific.get_active():
140
140
            location = self.entry_location.get_text()
141
141
            if location == '':
142
 
                self.dialog.error_dialog('No location specified',
143
 
                                         'Please specify a location or use the default.')
 
142
                self.dialog.error_dialog(_('No location specified'),
 
143
                                         _('Please specify a location or use the default.'))
144
144
                return
145
145
            
146
146
            try:
149
149
                                   self.check_overwrite.get_active(),
150
150
                                   self.check_create.get_active())
151
151
            except errors.NotBranchError:
152
 
                self.dialog.error_dialog('Directory is not a branch',
153
 
                                         'You can perform this action only in a branch.')
 
152
                self.dialog.error_dialog(_('Directory is not a branch'),
 
153
                                         _('You can perform this action only in a branch.'))
154
154
                self.comm.set_busy(self.window, False)
155
155
                return
156
156
            except errors.NonExistingParent, errmsg:
157
 
                self.dialog.error_dialog("Non existing parent directory",
158
 
                                         "The parent directory (%s)\ndoesn't exist." % errmsg)
 
157
                self.dialog.error_dialog(_('Non existing parent directory'),
 
158
                                         _("The parent directory (%s)\ndoesn't exist.") % errmsg)
159
159
                self.comm.set_busy(self.window, False)
160
160
                return
161
161
            except errors.DivergedBranchesError:
162
 
                self.dialog.error_dialog('Branches have been diverged',
163
 
                                         'You cannot push if branches have diverged. Use the\noverwrite option if you want to push anyway.')
 
162
                self.dialog.error_dialog(_('Branches have been diverged'),
 
163
                                         _('You cannot push if branches have diverged. Use the\noverwrite option if you want to push anyway.'))
164
164
                self.comm.set_busy(self.window, False)
165
165
                return
166
166
            except errors.PathPrefixNotCreated:
167
 
                self.dialog.error_dialog("Path prefix not created",
168
 
                                         "The path leading up to the specified location couldn't\nbe created.")
 
167
                self.dialog.error_dialog(_('Path prefix not created'),
 
168
                                         _("The path leading up to the specified location couldn't\nbe created."))
169
169
                self.comm.set_busy(self.window, False)
170
170
                return
171
171
            except:
175
175
            pass
176
176
        
177
177
        self.close()
178
 
        self.dialog.info_dialog('Push successful',
179
 
                                '%d revision(s) pushed.' % revs)
 
178
        self.dialog.info_dialog(_('Push successful'),
 
179
                                _('%d revision(s) pushed.') % revs)
180
180
    
181
181
    def close(self, widget=None):
182
182
        self.window.destroy()