1
# -*- coding: utf-8 -*-
2
#####################################################################
3
# Rafael Proença <cypherbios@ubuntu.com>
4
# Laudeci Oliveira <laudeci@gmail.com>
6
# Copyright 2006 APTonCD DevTeam.
8
# This program is free software; you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published
10
# by the Free Software Foundation; version 2 only.
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#####################################################################
24
from APTonCD.core import enum
26
def get_path(default, destination):
28
if not utils.pathExists(destination):
29
return utils.normalizePath(default)
31
return utils.normalizePath(destination)
33
APP_ICON_NAME = 'aptoncd'
34
APP_VERSION = version.APP_VERSION
36
# Internationalization variables
38
I18N_DIR = "/usr/share/locale/"
41
locale.setlocale(locale.LC_ALL, '')
42
gettext.bindtextdomain(I18N_APP, I18N_DIR)
43
gettext.textdomain(I18N_APP)
47
gtk.glade.bindtextdomain(I18N_APP, I18N_DIR)
48
gtk.glade.textdomain(I18N_APP)
49
gettext.install(I18N_APP, I18N_DIR, unicode=1)
51
language = locale.setlocale(locale.LC_ALL, '')
52
end = language.find('.')
53
language = language[:end]
55
#Folder for configurarion file
56
CONFIG_DIR = utils.mkdir(os.path.expanduser('~/.aptoncd/'))
58
#configuration file name
59
CONFIG_FILE = os.path.join(CONFIG_DIR, 'config')
61
#Local base path, where aptoncd is located (runtime)
62
BASE_PATH = utils.normalizePath(os.curdir)
64
MAIN_GUI = get_path('/usr/share/aptoncd/glade/main_window.glade', os.path.join(BASE_PATH ,'data/glade/main_window.glade'))
65
CREATE_GUI = get_path('/usr/share/aptoncd/glade/create_window.glade', os.path.join(BASE_PATH ,'data/glade/create_window.glade'))
66
RESTORE_GUI = get_path('/usr/share/aptoncd/glade/restore_window.glade', os.path.join(BASE_PATH ,'data/glade/restore_window.glade'))
67
PROPERTY_GUI = get_path('/usr/share/aptoncd/glade/utils.glade', os.path.join(BASE_PATH ,'data/glade/utils.glade'))
68
BURNS_DATA = get_path('/usr/share/aptoncd/burners', os.path.join(BASE_PATH ,'data/burners'))
69
COPY_SCRIPT = get_path('/usr/share/aptoncd/restorefiles.py', os.path.join(BASE_PATH ,'restorefiles.py'))
70
MAIN_ANIMATION = get_path('/usr/share/aptoncd/loading.gif', os.path.join(BASE_PATH,'data/loading.gif'))
71
DESKTOP_FILE = get_path('/usr/share/applications/aptoncd.desktop', os.path.join(BASE_PATH,'data/aptoncd.desktop.in'))
72
# documentation directory
73
DOCDIR = get_path('doc/'+ language+ '/index.xml' , 'doc/'+ 'C/index.xml')
75
#Configuration constants
76
XML_FILE = os.path.join(CONFIG_DIR, 'conf.xml')
77
XML_CONTENTS_FILE = 'content.xml'
79
#Source folder for downloaded apt packages files
80
LOCAL_APT_FOLDER = "/var/cache/apt/archives/"
84
CD = 695 * 1024 * 1024
85
DVD = 4500 * 1024 * 1024
87
RESTORE_TYPE = enum.EnumClass('RESTORE_TYPE',('RESTORE_FROM_ISO','RESTORE_FROM_MEDIA','RESTORE_FROM_NONE'))
89
MESSAGE_0001 = _('Reading information of packages...')
90
MESSAGE_0002 = _('Building list of packages')
91
MESSAGE_0003 = _('Reading all packages from your cache, this could take\na long time, depending on number and size of packages.')
92
MESSAGE_0004 = _('Package')
93
MESSAGE_0005 = _('<b>Warning.</b>\n\nThe following package(s) is already in the list.')
94
MESSAGE_0006 = _('Error')
95
#TRANSLATOR: the statusbar message while listing packages
96
MESSAGE_0007 = _('<small>Total: %s/%s . Selected: %s/%s . Custom: %s/%s</small>')
97
MESSAGE_0008 = _('Are you sure you want to remove the package below from the list?\n\n<b>%s</b>')
98
#TRANSLATOR: mark all checkboxes in the list
99
MESSAGE_0009 = _('Check All')
100
#TRANSLATOR: unmark all checkboxes in the list
101
MESSAGE_0010 = _('Uncheck All')
102
MESSAGE_0011 = _('Invert selections')
103
MESSAGE_0012 = _('Show Properties')
104
MESSAGE_0013 = _('Select Package')
105
MESSAGE_0014 = _('Select Folder')
106
MESSAGE_0015 = _('Debian Packages')
107
MESSAGE_0016 = _("APTonCD couldn't read the following package(s).\n"
109
'The file is probably corrupted.\n'
110
'These packages will be listed but not marked to copy.\n'
111
'You can try to copy packages manually later.')
112
#TRANSLATOR: the packages was ignored and not listed
113
MESSAGE_0017 = _('<b>Some packages are already in the list</b>\nThe following packages were skipped:\n')
114
MESSAGE_0018 = _('The destination directory is not writable.\nPlease, select another destination directory and try again.')
115
#TRANSLATOR: creating the headers (Packages.gz) based on the packages information
116
MESSAGE_0019 = _('Scanning and cataloguing packages...')
117
MESSAGE_0020 = _('Copying packages')
118
MESSAGE_0021 = _('Scanning packages')
119
MESSAGE_0022 = _('Making the .iso image')
120
#TRANSLATOR: removing temporary packages and files
121
MESSAGE_0023 = _('Cleaning session')
122
MESSAGE_0024 = _("Creating APTonCD")
123
MESSAGE_0025 = _('The installation disc is being created.\nYou can cancel this operation at any time.')
124
MESSAGE_0026 = _('Version')
125
#TRANSLATOR: the user has cancelled the operation
126
MESSAGE_0027 = _('Process canceled.')
128
MESSAGE_0029 = _('Processing file %s')
129
MESSAGE_0030 = _('<b><i>The metapackage could not be created.</i></b>\nThe reported error is shown below:\n%s')
130
MESSAGE_0031 = _('<b><i>Error compressing Packages..</i></b>\nThe reported error is shown below:\n%s')
131
MESSAGE_0032 = _('Making .iso for')
133
#TRANSLATOR: write the files created into a CD or DVD
134
MESSAGE_0035 = _('<b>Do you want to burn it now?</b>')
136
MESSAGE_0044 = _('Processing installed packages, please wait.')
137
MESSAGE_0045 = _("Checking package's versions")
138
MESSAGE_0046 = _('Version: %s')
139
MESSAGE_0047 = _('File Size: %s')
141
MESSAGE_0048 = MESSAGE_0004 + ': '
142
MESSAGE_0049 = _('Summary: ')
144
MESSAGE_0050 = _('Error loading package data.')
145
MESSAGE_0051 = _('READ ERROR')
146
MESSAGE_0052 = _("Processing...")
147
MESSAGE_0053 = _('This process could take a long time.')
148
MESSAGE_0054 = _('Please wait...')
149
MESSAGE_0055 = _('remaining %i of %i packages')
150
MESSAGE_0056 = _('Packages')
151
MESSAGE_0057 = _('Folder')
152
MESSAGE_0058 = _('Installed')
153
MESSAGE_0059 = _('Not Installed')
154
MESSAGE_0060 = _('Yes')
155
MESSAGE_0061 = _('No')
156
MESSAGE_0062 = _('Install')
157
MESSAGE_0063 = _('Warning')
158
MESSAGE_0064 = _("No help viewer is installed.\n"
159
"Install the GNOME help viewer (yelp) to view the APTonCD manual.")
161
MESSAGE_0065 = _('You must specify the full path.')
162
MESSAGE_0066 = _('Ready')
163
MESSAGE_0067 = _("The CD/DVD is empty or it isn't a valid APTonCD medium. \nInsert an APTonCD medium into the drive.")
164
MESSAGE_0068 = _('CD image file')
165
MESSAGE_0069 = _("You need to select one source to restore files from.")
166
MESSAGE_0070 = _("This media was created in an %s %s system, and is not suitable for your running system (%s %s).\nUsually might be a problem trying to install software that was not made for your distribution version.")
167
MESSAGE_0071 = _("Are you sure want to continue?")
169
#TRANSLATOR: refers to properties of package X, as in "foo Properties"
170
MESSAGE_0072 = _("Properties")
172
MESSAGE_0073 = _("Restoring files")
173
MESSAGE_0074 = _("The packages are being copied back to your cache.\nIt will not install any packages on your system.")
175
#TRANSLATOR: the window title shown as "APTonCD - Create"
176
MESSAGE_0075 = _("Create")
178
#TRANSLATOR: the window title shown as "APTonCD - Restore"
179
MESSAGE_0076 = _("Restore")
180
MESSAGE_0077 = _("<b>No space available in the disk</b>\n\nBefore continue, please make sure you have enough space on %s and %s")