/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/menu.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:
46
46
            # Check again
47
47
            if not os.path.exists(self.uifile):
48
48
                # Fail
49
 
                print "UI description file cannot be found."
 
49
                print _('UI description file cannot be found.')
50
50
                sys.exit(1)
51
51
        
52
52
        self.gladefile = gladefile
58
58
        
59
59
        self.actiongroup = gtk.ActionGroup('context')
60
60
        self.actiongroup.add_actions([('add', gtk.STOCK_ADD,
61
 
                                       'Add', None,
62
 
                                       'Add the selected file',
 
61
                                       _('Add'), None,
 
62
                                       _('Add the selected file'),
63
63
                                       self.add_file),
64
64
                                      ('remove', gtk.STOCK_REMOVE,
65
 
                                       'Remove', None,
66
 
                                       'Remove the selected file',
 
65
                                       _('Remove'), None,
 
66
                                       _('Remove the selected file'),
67
67
                                       self.remove_file),
68
68
                                      ('commit', None,
69
 
                                       'Commit', None,
70
 
                                       'Commit the changes',
 
69
                                       _('Commit'), None,
 
70
                                       _('Commit the changes'),
71
71
                                       self.commit),
72
72
                                      ('diff', None,
73
 
                                       'Diff', None,
74
 
                                       'Show the diff of the file',
 
73
                                       _('Diff'), None,
 
74
                                       _('Show the diff of the file'),
75
75
                                       self.diff),
76
76
                                      ('bookmark', None,
77
 
                                       'Bookmark', None,
78
 
                                       'Bookmark current location',
 
77
                                       _('Bookmark'), None,
 
78
                                       _('Bookmark current location'),
79
79
                                       self.bookmark),
80
80
                                      ('remove_bookmark', gtk.STOCK_REMOVE,
81
 
                                       'Remove', None,
82
 
                                       'Remove the selected bookmark',
 
81
                                       _('Remove'), None,
 
82
                                       _('Remove the selected bookmark'),
83
83
                                       self.remove_bookmark),
84
84
                                      ('diff_selected', None,
85
 
                                       'Selected...', None,
86
 
                                       'Show the differences of the selected file',
 
85
                                       _('Selected...'), None,
 
86
                                       _('Show the differences of the selected file'),
87
87
                                       self.diff_selected),
88
88
                                      ('diff_all', None,
89
 
                                       'All...', None,
90
 
                                       'Show the differences of all files',
 
89
                                       _('All...'), None,
 
90
                                       _('Show the differences of all files'),
91
91
                                       self.diff_all)
92
92
                                     ])
93
93
        
125
125
        filename = self.comm.get_selected_right()
126
126
            
127
127
        if filename is None:
128
 
            self.dialog.error_dialog('No file was selected',
129
 
                                     'Please select a file from the list,\nor choose the other option.')
 
128
            self.dialog.error_dialog(_('No file was selected'),
 
129
                                     _('Please select a file from the list,\nor choose the other option.'))
130
130
            return
131
131
        
132
132
        try:
133
133
            fileops.add([directory + '/' + filename])
134
134
        except errors.NotBranchError:
135
 
            self.dialog.error_dialog('Directory is not a branch',
136
 
                                     'You can perform this action only in a branch.')
 
135
            self.dialog.error_dialog(_('Directory is not a branch'),
 
136
                                     _('You can perform this action only in a branch.'))
137
137
            return
138
138
        except:
139
139
            raise
147
147
        filename = self.comm.get_selected_right()
148
148
        
149
149
        if filename is None:
150
 
            self.dialog.error_dialog('No file was selected',
151
 
                                     'Please select a file from the list,\nor choose the other option.')
 
150
            self.dialog.error_dialog(_('No file was selected'),
 
151
                                     _('Please select a file from the list,\nor choose the other option.'))
152
152
            return
153
153
        
154
154
        try:
155
155
            fileops.remove([directory + '/' + filename])
156
156
        except errors.NotBranchError:
157
 
            self.dialog.error_dialog('Directory is not a branch',
158
 
                                     'You can perform this action only in a branch.')
 
157
            self.dialog.error_dialog(_('Directory is not a branch'),
 
158
                                     _('You can perform this action only in a branch.'))
159
159
            return
160
160
        except errors.NotVersionedError:
161
 
            self.dialog.error_dialog('File not versioned',
162
 
                                     'The selected file is not versioned.')
 
161
            self.dialog.error_dialog(_('File not versioned'),
 
162
                                     _('The selected file is not versioned.'))
163
163
            return
164
164
        except:
165
165
            raise
181
181
    def bookmark(self, action):
182
182
        """ Right context menu -> Bookmark """
183
183
        if self.comm.pref.add_bookmark(self.comm.get_path()):
184
 
            self.dialog.info_dialog('Bookmark successfully added',
185
 
                                    'The current directory was bookmarked. You can reach\nit by selecting it from the left panel.')
 
184
            self.dialog.info_dialog(_('Bookmark successfully added'),
 
185
                                    _('The current directory was bookmarked. You can reach\nit by selecting it from the left panel.'))
186
186
        else:
187
 
            self.dialog.warning_dialog('Location already bookmarked'
188
 
                                       'The current directory is already bookmarked.\nSee the left panel for reference.')
 
187
            self.dialog.warning_dialog(_('Location already bookmarked'),
 
188
                                       _('The current directory is already bookmarked.\nSee the left panel for reference.'))
189
189
        
190
190
        self.comm.refresh_left()
191
191