/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/mkdir.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:
36
36
    def __init__(self, gladefile, comm, dialog):
37
37
        """ Initialize the Make directory dialog. """
38
38
        self.gladefile = gladefile
39
 
        self.glade = gtk.glade.XML(self.gladefile, 'window_mkdir')
 
39
        self.glade = gtk.glade.XML(self.gladefile, 'window_mkdir', 'olive-gtk')
40
40
        
41
41
        # Communication object
42
42
        self.comm = comm
64
64
        dirname = entry.get_text()
65
65
        
66
66
        if dirname == "":
67
 
            self.dialog.error_dialog('No directory name given',
68
 
                                     'Please specify a desired name for the new directory.')
 
67
            self.dialog.error_dialog(_('No directory name given'),
 
68
                                     _('Please specify a desired name for the new directory.'))
69
69
            return
70
70
        
71
71
        newdir = self.comm.get_path() + '/' + dirname
75
75
            try:
76
76
                fileops.mkdir(newdir)
77
77
            except errors.DirectoryAlreadyExists:
78
 
                self.dialog.error_dialog('Directory already exists',
79
 
                                         'Please specify another name to continue.')
 
78
                self.dialog.error_dialog(_('Directory already exists'),
 
79
                                         _('Please specify another name to continue.'))
80
80
                return
81
81
            except errors.NotBranchError:
82
 
                self.dialog.warning_dialog('Directory is not in a branch',
83
 
                                           'You can only create a non-versioned directory.')
 
82
                self.dialog.warning_dialog(_('Directory is not in a branch'),
 
83
                                           _('You can only create a non-versioned directory.'))
84
84
        else:
85
85
            # Just a simple directory
86
86
            try:
87
87
                os.mkdir(newdir)
88
88
            except OSError, e:
89
89
                if e.errno == 17:
90
 
                    self.dialog.error_dialog('Directory already exists',
91
 
                                             'Please specify another name to continue.')
 
90
                    self.dialog.error_dialog(_('Directory already exists'),
 
91
                                             _('Please specify another name to continue.'))
92
92
                    return
93
93
 
94
94
        self.close()