/usr/share/pyshared/packagekit/genums.py is in python-packagekit-gtk 3.4.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | """
Provides human readable strings, icon names and animations for internal
enumerations
This file was autogenerated from src/gpk-enum.c by msg-converter.py
"""
from packagekit.enums import *
import gettext
from gettext import gettext as _
gettext.textdomain("gnome-packagekit")
GPK_BUGZILLA_URL = "https://bugs.freedesktop.org/"
ICONS_INFO = {
INFO_UNKNOWN:'help-browser',
INFO_INSTALLED:'pk-package-installed',
INFO_AVAILABLE:'pk-package-available',
INFO_LOW:'pk-update-low',
INFO_NORMAL:'pk-update-normal',
INFO_IMPORTANT:'pk-update-high',
INFO_SECURITY:'pk-update-security',
INFO_BUGFIX:'pk-update-bugfix',
INFO_ENHANCEMENT:'pk-update-enhancement',
INFO_BLOCKED:'pk-package-blocked',
INFO_DOWNLOADING:'pk-package-download',
INFO_UPDATING:'pk-package-update',
INFO_INSTALLING:'pk-package-add',
INFO_REMOVING:'pk-package-delete',
INFO_OBSOLETING:'pk-package-cleanup',
INFO_CLEANUP:'pk-package-cleanup',
INFO_COLLECTION_INSTALLED:'pk-collection-installed',
INFO_COLLECTION_AVAILABLE:'pk-collection-available',
INFO_FINISHED:'dialog-information',
INFO_REINSTALLING:'dialog-information',
INFO_DOWNGRADING:'pk-package-update',
INFO_PREPARING:'dialog-information',
INFO_DECOMPRESSING:'dialog-information',
INFO_TRUSTED:'dialog-information',
INFO_UNTRUSTED:'dialog-information',
}
def get_info_icon_name_from_enum(enum):
if ICONS_INFO.has_key(enum):
return ICONS_INFO[enum]
else:
return None
ICONS_STATUS = {
STATUS_UNKNOWN:'help-browser',
STATUS_CANCEL:'pk-package-cleanup',
STATUS_CLEANUP:'pk-package-cleanup',
STATUS_COMMIT:'pk-setup',
STATUS_DEP_RESOLVE:'pk-package-info',
STATUS_DOWNLOAD_CHANGELOG:'pk-refresh-cache',
STATUS_DOWNLOAD_FILELIST:'pk-refresh-cache',
STATUS_DOWNLOAD_GROUP:'pk-refresh-cache',
STATUS_DOWNLOAD_PACKAGELIST:'pk-refresh-cache',
STATUS_DOWNLOAD:'pk-package-download',
STATUS_DOWNLOAD_REPOSITORY:'pk-refresh-cache',
STATUS_DOWNLOAD_UPDATEINFO:'pk-refresh-cache',
STATUS_FINISHED:'pk-package-cleanup',
STATUS_GENERATE_PACKAGE_LIST:'pk-refresh-cache',
STATUS_WAITING_FOR_LOCK:'pk-package-blocked',
STATUS_WAITING_FOR_AUTH:'gtk-dialog-authentication',
STATUS_INFO:'pk-package-info',
STATUS_INSTALL:'pk-package-add',
STATUS_LOADING_CACHE:'pk-refresh-cache',
STATUS_OBSOLETE:'pk-package-cleanup',
STATUS_QUERY:'pk-package-search',
STATUS_REFRESH_CACHE:'pk-refresh-cache',
STATUS_REMOVE:'pk-package-delete',
STATUS_REPACKAGING:'pk-package-cleanup',
STATUS_REQUEST:'pk-package-search',
STATUS_ROLLBACK:'pk-package-info',
STATUS_RUNNING:'pk-setup',
STATUS_SCAN_APPLICATIONS:'pk-package-search',
STATUS_SETUP:'pk-setup',
STATUS_SIG_CHECK:'pk-package-info',
STATUS_TEST_COMMIT:'pk-package-info',
STATUS_UPDATE:'pk-package-update',
STATUS_WAIT:'pk-wait',
STATUS_SCAN_PROCESS_LIST:'pk-package-info',
STATUS_CHECK_EXECUTABLE_FILES:'pk-package-info',
STATUS_CHECK_LIBRARIES:'pk-package-info',
STATUS_COPY_FILES:'pk-package-info',
}
def get_status_icon_name_from_enum(enum):
if ICONS_STATUS.has_key(enum):
return ICONS_STATUS[enum]
else:
return None
ICONS_ROLE = {
ROLE_UNKNOWN:'help-browser',
ROLE_ACCEPT_EULA:'pk-package-info',
ROLE_CANCEL:'process-stop',
ROLE_DOWNLOAD_PACKAGES:'pk-package-download',
ROLE_GET_CATEGORIES:'pk-package-info',
ROLE_GET_DEPENDS:'pk-package-info',
ROLE_GET_DETAILS:'pk-package-info',
ROLE_GET_DISTRO_UPGRADES:'pk-package-info',
ROLE_GET_FILES:'pk-package-search',
ROLE_GET_OLD_TRANSACTIONS:'pk-package-info',
ROLE_GET_PACKAGES:'pk-package-search',
ROLE_GET_REPO_LIST:'pk-package-sources',
ROLE_GET_REQUIRES:'pk-package-info',
ROLE_GET_UPDATE_DETAIL:'pk-package-info',
ROLE_GET_UPDATES:'pk-package-info',
ROLE_INSTALL_FILES:'pk-package-add',
ROLE_INSTALL_PACKAGES:'pk-package-add',
ROLE_INSTALL_SIGNATURE:'emblem-system',
ROLE_REFRESH_CACHE:'pk-refresh-cache',
ROLE_REMOVE_PACKAGES:'pk-package-delete',
ROLE_REPO_ENABLE:'pk-package-sources',
ROLE_REPO_SET_DATA:'pk-package-sources',
ROLE_RESOLVE:'pk-package-search',
ROLE_ROLLBACK:'pk-rollback',
ROLE_SEARCH_DETAILS:'pk-package-search',
ROLE_SEARCH_FILE:'pk-package-search',
ROLE_SEARCH_GROUP:'pk-package-search',
ROLE_SEARCH_NAME:'pk-package-search',
ROLE_UPDATE_PACKAGES:'pk-package-update',
ROLE_UPDATE_SYSTEM:'system-software-update',
ROLE_WHAT_PROVIDES:'pk-package-search',
ROLE_SIMULATE_INSTALL_FILES:'pk-package-add',
ROLE_SIMULATE_INSTALL_PACKAGES:'pk-package-add',
ROLE_SIMULATE_REMOVE_PACKAGES:'pk-package-delete',
ROLE_SIMULATE_UPDATE_PACKAGES:'pk-package-update',
ROLE_UPGRADE_SYSTEM:'system-software-update',
ROLE_SIMULATE_REPAIR_SYSTEM:'system-software-update',
ROLE_REPAIR_SYSTEM:'system-software-update',
}
def get_role_icon_name_from_enum(enum):
if ICONS_ROLE.has_key(enum):
return ICONS_ROLE[enum]
else:
return None
ICONS_GROUP = {
GROUP_UNKNOWN:'help-browser',
GROUP_ACCESSIBILITY:'preferences-desktop-accessibility',
GROUP_ACCESSORIES:'applications-accessories',
GROUP_ADMIN_TOOLS:'system-lock-screen',
GROUP_COLLECTIONS:'pk-collection-installed',
GROUP_COMMUNICATION:'folder-remote',
GROUP_DESKTOP_GNOME:'pk-desktop-gnome',
GROUP_DESKTOP_KDE:'pk-desktop-kde',
GROUP_DESKTOP_OTHER:'user-desktop',
GROUP_DESKTOP_XFCE:'pk-desktop-xfce',
GROUP_DOCUMENTATION:'x-office-address-book',
GROUP_EDUCATION:'utilities-system-monitor',
GROUP_ELECTRONICS:'video-display',
GROUP_FONTS:'preferences-desktop-font',
GROUP_GAMES:'applications-games',
GROUP_GRAPHICS:'applications-graphics',
GROUP_INTERNET:'applications-internet',
GROUP_LEGACY:'media-floppy',
GROUP_LOCALIZATION:'preferences-desktop-locale',
GROUP_MAPS:'applications-multimedia',
GROUP_MULTIMEDIA:'applications-multimedia',
GROUP_NETWORK:'network-wired',
GROUP_OFFICE:'applications-office',
GROUP_OTHER:'applications-other',
GROUP_POWER_MANAGEMENT:'battery',
GROUP_PROGRAMMING:'applications-development',
GROUP_PUBLISHING:'accessories-dictionary',
GROUP_REPOS:'system-file-manager',
GROUP_SCIENCE:'application-certificate',
GROUP_SECURITY:'network-wireless-encrypted',
GROUP_SERVERS:'network-server',
GROUP_SYSTEM:'applications-system',
GROUP_VIRTUALIZATION:'computer',
GROUP_VENDOR:'application-certificate',
GROUP_NEWEST:'dialog-information',
}
def get_group_icon_name_from_enum(enum):
if ICONS_GROUP.has_key(enum):
return ICONS_GROUP[enum]
else:
return None
ICONS_RESTART = {
RESTART_UNKNOWN:'help-browser',
RESTART_SYSTEM:'system-shutdown',
RESTART_SESSION:'system-log-out',
RESTART_APPLICATION:'emblem-symbolic-link',
RESTART_SECURITY_SYSTEM:'system-shutdown',
RESTART_SECURITY_SESSION:'system-log-out',
}
def get_restart_icon_name_from_enum(enum):
if ICONS_RESTART.has_key(enum):
return ICONS_RESTART[enum]
else:
return None
ICONS_RESTART_DIALOG = {
RESTART_UNKNOWN:'help-browser',
RESTART_NONE:'dialog-information',
RESTART_SYSTEM:'dialog-error',
RESTART_SESSION:'dialog-warning',
RESTART_APPLICATION:'dialog-warning',
RESTART_SECURITY_SYSTEM:'dialog-error',
RESTART_SECURITY_SESSION:'dialog-error',
}
def get_restart_dialog_icon_name_from_enum(enum):
if ICONS_RESTART_DIALOG.has_key(enum):
return ICONS_RESTART_DIALOG[enum]
else:
return None
ICONS_MESSAGE = {
MESSAGE_UNKNOWN:'help-browser',
MESSAGE_BROKEN_MIRROR:'dialog-error',
MESSAGE_CONNECTION_REFUSED:'dialog-error',
MESSAGE_PARAMETER_INVALID:'dialog-error',
MESSAGE_PRIORITY_INVALID:'dialog-error',
MESSAGE_BACKEND_ERROR:'dialog-error',
MESSAGE_DAEMON_ERROR:'dialog-error',
MESSAGE_CACHE_BEING_REBUILT:'dialog-information',
MESSAGE_UNTRUSTED_PACKAGE:'dialog-warning',
MESSAGE_NEWER_PACKAGE_EXISTS:'dialog-information',
MESSAGE_CONFIG_FILES_CHANGED:'dialog-information',
MESSAGE_PACKAGE_ALREADY_INSTALLED:'dialog-information',
MESSAGE_AUTOREMOVE_IGNORED:'dialog-information',
MESSAGE_REPO_METADATA_DOWNLOAD_FAILED:'dialog-warning',
MESSAGE_REPO_FOR_DEVELOPERS_ONLY:'dialog-warning',
MESSAGE_OTHER_UPDATES_HELD_BACK:'dialog-information',
}
def get_message_icon_name_from_enum(enum):
if ICONS_MESSAGE.has_key(enum):
return ICONS_MESSAGE[enum]
else:
return None
ANIMATIONS_STATUS = {
STATUS_UNKNOWN:'help-browser',
STATUS_CANCEL:'pk-action-cleanup',
STATUS_CLEANUP:'pk-action-cleanup',
STATUS_COMMIT:'pk-setup',
STATUS_DEP_RESOLVE:'pk-action-testing',
STATUS_DOWNLOAD_CHANGELOG:'pk-action-refresh-cache',
STATUS_DOWNLOAD_FILELIST:'pk-action-refresh-cache',
STATUS_DOWNLOAD_GROUP:'pk-action-refresh-cache',
STATUS_DOWNLOAD_PACKAGELIST:'pk-action-refresh-cache',
STATUS_DOWNLOAD:'pk-action-download',
STATUS_DOWNLOAD_REPOSITORY:'pk-action-refresh-cache',
STATUS_DOWNLOAD_UPDATEINFO:'pk-action-refresh-cache',
STATUS_FINISHED:'pk-package-cleanup',
STATUS_GENERATE_PACKAGE_LIST:'pk-action-searching',
STATUS_WAITING_FOR_LOCK:'pk-action-waiting',
STATUS_WAITING_FOR_AUTH:'pk-action-waiting',
STATUS_INFO:'process-working',
STATUS_INSTALL:'pk-action-installing',
STATUS_LOADING_CACHE:'pk-action-refresh-cache',
STATUS_OBSOLETE:'pk-package-cleanup',
STATUS_QUERY:'pk-action-searching',
STATUS_REFRESH_CACHE:'pk-action-refresh-cache',
STATUS_REMOVE:'pk-action-removing',
STATUS_REPACKAGING:'pk-package-info',
STATUS_REQUEST:'process-working',
STATUS_ROLLBACK:'pk-action-removing',
STATUS_RUNNING:'pk-setup',
STATUS_SCAN_APPLICATIONS:'pk-action-searching',
STATUS_SETUP:'pk-package-info',
STATUS_SIG_CHECK:'pk-package-info',
STATUS_TEST_COMMIT:'pk-action-testing',
STATUS_UPDATE:'pk-action-installing',
STATUS_WAIT:'pk-action-waiting',
STATUS_SCAN_PROCESS_LIST:'pk-package-info',
STATUS_CHECK_EXECUTABLE_FILES:'pk-package-info',
STATUS_CHECK_LIBRARIES:'pk-package-info',
STATUS_COPY_FILES:'pk-package-info',
}
def get_status_animation_name_from_enum(enum):
if ANIMATIONS_STATUS.has_key(enum):
return ANIMATIONS_STATUS[enum]
else:
return None
PAST_INFO = {
}
def get_info_localised_past_from_enum(enum):
if PAST_INFO.has_key(enum):
return PAST_INFO[enum]
else:
return None
PAST_ROLE = {
}
def get_role_localised_past_from_enum(enum):
if PAST_ROLE.has_key(enum):
return PAST_ROLE[enum]
else:
return None
PRESENT_INFO = {
}
def get_info_localised_present_from_enum(enum):
if PRESENT_INFO.has_key(enum):
return PRESENT_INFO[enum]
else:
return None
PRESENT_ROLE = {
}
def get_role_localised_present_from_enum(enum):
if PRESENT_ROLE.has_key(enum):
return PRESENT_ROLE[enum]
else:
return None
DESCS_ERROR = {
ERROR_UNKNOWN:_("Failed with unknown error code."),
ERROR_NO_NETWORK:_("There is no network connection available.\n"
"Please check your connection settings and try again."),
ERROR_NO_CACHE:_("The package list needs to be rebuilt.\n"
"This should have been done by the backend automatically."),
ERROR_OOM:_("The service that is responsible for handling user requests is out of memory.\n"
"Please restart your computer."),
ERROR_CREATE_THREAD_FAILED:_("A thread could not be created to service the user request."),
ERROR_NOT_SUPPORTED:_("The action is not supported by this backend.\n"
"Please report a bug in your distribution bug tracker as this should not have happened."),
ERROR_INTERNAL_ERROR:_("A problem that we were not expecting has occurred.\n"
"Please report this bug in your distribution bug tracker with the error description."),
ERROR_GPG_FAILURE:_("A security trust relationship could not be made with software source.\n"
"Please check your security settings."),
ERROR_PACKAGE_NOT_INSTALLED:_("The package that is trying to be removed or updated is not already installed."),
ERROR_PACKAGE_NOT_FOUND:_("The package that is being modified was not found on your system or in any software source."),
ERROR_PACKAGE_ALREADY_INSTALLED:_("The package that is trying to be installed is already installed."),
ERROR_PACKAGE_DOWNLOAD_FAILED:_("The package download failed.\n"
"Please check your network connectivity."),
ERROR_GROUP_NOT_FOUND:_("The group type was not found.\n"
"Please check your group list and try again."),
ERROR_GROUP_LIST_INVALID:_("The group list could not be loaded.\n"
"Refreshing your cache may help, although this is normally a software "
"source error."),
ERROR_DEP_RESOLUTION_FAILED:_("A package could not be found that allows the action to complete.\n"
"More information is available in the detailed report."),
ERROR_FILTER_INVALID:_("The search filter was not correctly formed."),
ERROR_PACKAGE_ID_INVALID:_("The package identifier was not well formed when sent to the server.\n"
"This normally indicates an internal error and should be reported."),
ERROR_TRANSACTION_ERROR:_("An unspecified transaction error has occurred.\n"
"More information is available in the detailed report."),
ERROR_REPO_NOT_FOUND:_("The remote software source name was not found.\n"
"You may need to enable an item in Software Sources."),
ERROR_CANNOT_REMOVE_SYSTEM_PACKAGE:_("Removing a protected system package is not allowed."),
ERROR_TRANSACTION_CANCELLED:_("The action was canceled successfully and no packages were changed."),
ERROR_PROCESS_KILL:_("The action was canceled successfully and no packages were changed.\n"
"The backend did not exit cleanly."),
ERROR_FAILED_CONFIG_PARSING:_("The native package configuration file could not be opened.\n"
"Please make sure configuration is valid."),
ERROR_CANNOT_CANCEL:_("The action cannot be canceled at this time."),
ERROR_CANNOT_INSTALL_SOURCE_PACKAGE:_("Source packages are not normally installed this way.\n"
"Check the extension of the file you are trying to install."),
ERROR_NO_LICENSE_AGREEMENT:_("The license agreement was not agreed to.\n"
"To use this software you have to accept the license."),
ERROR_FILE_CONFLICTS:_("Two packages provide the same file.\n"
"This is usually due to mixing packages from different software sources."),
ERROR_PACKAGE_CONFLICTS:_("Multiple packages exist that are not compatible with each other.\n"
"This is usually due to mixing packages from different software sources."),
ERROR_REPO_NOT_AVAILABLE:_("There was a (possibly temporary) problem connecting to a software source.\n"
"Please check the detailed error for further details."),
ERROR_FAILED_INITIALIZATION:_("Failed to initialize packaging backend.\n"
"This may occur if other packaging tools are being used simultaneously."),
ERROR_FAILED_FINALISE:_("Failed to close down the backend instance.\n"
"This error can normally be ignored."),
ERROR_CANNOT_GET_LOCK:_("Cannot get the exclusive lock on the packaging backend.\n"
"Please close any other legacy packaging tools that may be open."),
ERROR_NO_PACKAGES_TO_UPDATE:_("None of the selected packages could be updated."),
ERROR_CANNOT_WRITE_REPO_CONFIG:_("The repository configuration could not be modified."),
ERROR_LOCAL_INSTALL_FAILED:_("Installing the local file failed.\n"
"More information is available in the detailed report."),
ERROR_BAD_GPG_SIGNATURE:_("The package security signature could not be verified."),
ERROR_MISSING_GPG_SIGNATURE:_("The package security signature is missing and this package is untrusted.\n"
"This package was not signed when created."),
ERROR_REPO_CONFIGURATION_ERROR:_("Repository configuration was invalid and could not be read."),
ERROR_INVALID_PACKAGE_FILE:_("The package you are attempting to install is not valid.\n"
"The package file could be corrupt, or not a proper package."),
ERROR_PACKAGE_INSTALL_BLOCKED:_("Installation of this package prevented by your packaging system's configuration."),
ERROR_PACKAGE_CORRUPT:_("The package that was downloaded is corrupt and needs to be downloaded again."),
ERROR_ALL_PACKAGES_ALREADY_INSTALLED:_("All of the packages selected for install are already installed on the system."),
ERROR_FILE_NOT_FOUND:_("The specified file could not be found on the system.\n"
"Check the file still exists and has not been deleted."),
ERROR_NO_MORE_MIRRORS_TO_TRY:_("Required data could not be found on any of the configured software sources.\n"
"There were no more download mirrors that could be tried."),
ERROR_NO_DISTRO_UPGRADE_DATA:_("Required upgrade data could not be found in any of the configured software sources.\n"
"The list of distribution upgrades will be unavailable."),
ERROR_INCOMPATIBLE_ARCHITECTURE:_("The package that is trying to be installed is incompatible with this system."),
ERROR_NO_SPACE_ON_DEVICE:_("There is insufficient space on the device.\n"
"Free some space on the system disk to perform this operation."),
ERROR_MEDIA_CHANGE_REQUIRED:_("Additional media is required to complete the transaction."),
ERROR_NOT_AUTHORIZED:_("You have failed to provide correct authentication.\n"
"Please check any passwords or account settings."),
ERROR_UPDATE_NOT_FOUND:_("The specified update could not be found.\n"
"It could have already been installed or no longer available on the remote server."),
ERROR_CANNOT_INSTALL_REPO_UNSIGNED:_("The package could not be installed from untrusted source."),
ERROR_CANNOT_UPDATE_REPO_UNSIGNED:_("The package could not be updated from untrusted source."),
ERROR_CANNOT_GET_FILELIST:_("The file list is not available for this package."),
ERROR_CANNOT_GET_REQUIRES:_("The information about what requires this package could not be obtained."),
ERROR_CANNOT_DISABLE_REPOSITORY:_("The specified software source could not be disabled."),
ERROR_RESTRICTED_DOWNLOAD:_("The download could not be done automatically and should be done manually.\n"
"More information is available in the detailed report."),
ERROR_PACKAGE_FAILED_TO_CONFIGURE:_("One of the selected packages failed to configure correctly.\n"
"More information is available in the detailed report."),
ERROR_PACKAGE_FAILED_TO_BUILD:_("One of the selected packages failed to build correctly.\n"
"More information is available in the detailed report."),
ERROR_PACKAGE_FAILED_TO_INSTALL:_("One of the selected packages failed to install correctly.\n"
"More information is available in the detailed report."),
ERROR_PACKAGE_FAILED_TO_REMOVE:_("One of the selected packages failed to be removed correctly.\n"
"More information is available in the detailed report."),
ERROR_UPDATE_FAILED_DUE_TO_RUNNING_PROCESS:_("A program is running that has to be closed before the update can proceed.\n"
"More information is available in the detailed report."),
ERROR_PACKAGE_DATABASE_CHANGED:_("The package database was changed while the request was running."),
ERROR_PROVIDE_TYPE_NOT_SUPPORTED:_("The virtual provide type is not supported by this system."),
ERROR_INSTALL_ROOT_INVALID:_("The install root is invalid. Please contact your administrator."),
ERROR_CANNOT_FETCH_SOURCES:_("The list of software sources could not be downloaded."),
ERROR_CANCELLED_PRIORITY:_("The transaction has been canceled and will be retried when the system is idle."),
}
def get_error_description_from_enum(enum):
if DESCS_ERROR.has_key(enum):
return DESCS_ERROR[enum]
else:
return None
STRINGS_ERROR = {
ERROR_UNKNOWN:_("Failed with unknown error code"),
ERROR_NO_NETWORK:_("No network connection available"),
ERROR_NO_CACHE:_("No package cache is available."),
ERROR_OOM:_("Out of memory"),
ERROR_CREATE_THREAD_FAILED:_("Failed to create a thread"),
ERROR_NOT_SUPPORTED:_("Not supported by this backend"),
ERROR_INTERNAL_ERROR:_("An internal system error has occurred"),
ERROR_GPG_FAILURE:_("A security signature is not present"),
ERROR_PACKAGE_NOT_INSTALLED:_("The package is not installed"),
ERROR_PACKAGE_NOT_FOUND:_("The package was not found"),
ERROR_PACKAGE_ALREADY_INSTALLED:_("The package is already installed"),
ERROR_PACKAGE_DOWNLOAD_FAILED:_("The package download failed"),
ERROR_GROUP_NOT_FOUND:_("The group was not found"),
ERROR_GROUP_LIST_INVALID:_("The group list was invalid"),
ERROR_DEP_RESOLUTION_FAILED:_("Dependency resolution failed"),
ERROR_FILTER_INVALID:_("Search filter was invalid"),
ERROR_PACKAGE_ID_INVALID:_("The package identifier was not well formed"),
ERROR_TRANSACTION_ERROR:_("Transaction error"),
ERROR_REPO_NOT_FOUND:_("Repository name was not found"),
ERROR_CANNOT_REMOVE_SYSTEM_PACKAGE:_("Could not remove a protected system package"),
ERROR_TRANSACTION_CANCELLED:_("The action was canceled"),
ERROR_PROCESS_KILL:_("The action was forcibly canceled"),
ERROR_FAILED_CONFIG_PARSING:_("Reading the configuration file failed"),
ERROR_CANNOT_CANCEL:_("The action cannot be canceled"),
ERROR_CANNOT_INSTALL_SOURCE_PACKAGE:_("Source packages cannot be installed"),
ERROR_NO_LICENSE_AGREEMENT:_("The license agreement failed"),
ERROR_FILE_CONFLICTS:_("Local file conflict between packages"),
ERROR_PACKAGE_CONFLICTS:_("Packages are not compatible"),
ERROR_REPO_NOT_AVAILABLE:_("Problem connecting to a software source"),
ERROR_FAILED_INITIALIZATION:_("Failed to initialize"),
ERROR_FAILED_FINALISE:_("Failed to finalize"),
ERROR_CANNOT_GET_LOCK:_("Cannot get lock"),
ERROR_NO_PACKAGES_TO_UPDATE:_("No packages to update"),
ERROR_CANNOT_WRITE_REPO_CONFIG:_("Cannot write repository configuration"),
ERROR_LOCAL_INSTALL_FAILED:_("Local install failed"),
ERROR_BAD_GPG_SIGNATURE:_("Bad security signature"),
ERROR_MISSING_GPG_SIGNATURE:_("Missing security signature"),
ERROR_REPO_CONFIGURATION_ERROR:_("Repository configuration invalid"),
ERROR_INVALID_PACKAGE_FILE:_("Invalid package file"),
ERROR_PACKAGE_INSTALL_BLOCKED:_("Package install blocked"),
ERROR_PACKAGE_CORRUPT:_("Package is corrupt"),
ERROR_ALL_PACKAGES_ALREADY_INSTALLED:_("All packages are already installed"),
ERROR_FILE_NOT_FOUND:_("The specified file could not be found"),
ERROR_NO_MORE_MIRRORS_TO_TRY:_("No more mirrors are available"),
ERROR_NO_DISTRO_UPGRADE_DATA:_("No distribution upgrade data is available"),
ERROR_INCOMPATIBLE_ARCHITECTURE:_("Package is incompatible with this system"),
ERROR_NO_SPACE_ON_DEVICE:_("No space is left on the disk"),
ERROR_MEDIA_CHANGE_REQUIRED:_("A media change is required"),
ERROR_NOT_AUTHORIZED:_("Authorization failed"),
ERROR_UPDATE_NOT_FOUND:_("Update not found"),
ERROR_CANNOT_INSTALL_REPO_UNSIGNED:_("Cannot install from untrusted source"),
ERROR_CANNOT_UPDATE_REPO_UNSIGNED:_("Cannot update from untrusted source"),
ERROR_CANNOT_GET_FILELIST:_("Cannot get the file list"),
ERROR_CANNOT_GET_REQUIRES:_("Cannot get package requires"),
ERROR_CANNOT_DISABLE_REPOSITORY:_("Cannot disable source"),
ERROR_RESTRICTED_DOWNLOAD:_("The download failed"),
ERROR_PACKAGE_FAILED_TO_CONFIGURE:_("Package failed to configure"),
ERROR_PACKAGE_FAILED_TO_BUILD:_("Package failed to build"),
ERROR_PACKAGE_FAILED_TO_INSTALL:_("Package failed to install"),
ERROR_PACKAGE_FAILED_TO_REMOVE:_("Package failed to be removed"),
ERROR_UPDATE_FAILED_DUE_TO_RUNNING_PROCESS:_("Update failed due to running process"),
ERROR_PACKAGE_DATABASE_CHANGED:_("The package database was changed"),
ERROR_PROVIDE_TYPE_NOT_SUPPORTED:_("Virtual provide type is not supported"),
ERROR_INSTALL_ROOT_INVALID:_("Install root is invalid"),
ERROR_CANNOT_FETCH_SOURCES:_("Cannot fetch install sources"),
ERROR_CANCELLED_PRIORITY:_("Rescheduled due to priority"),
}
def get_error_string_from_enum(enum):
if STRINGS_ERROR.has_key(enum):
return STRINGS_ERROR[enum]
else:
return None
STRINGS_RESTART = {
RESTART_NONE:_("No restart is required."),
RESTART_SYSTEM:_("A restart is required."),
RESTART_SESSION:_("You need to log out and log back in."),
RESTART_APPLICATION:_("You need to restart the application."),
RESTART_SECURITY_SESSION:_("You need to log out and log back in to remain secure."),
RESTART_SECURITY_SYSTEM:_("A restart is required to remain secure."),
}
def get_restart_string_from_enum(enum):
if STRINGS_RESTART.has_key(enum):
return STRINGS_RESTART[enum]
else:
return None
STRINGS_MESSAGE = {
MESSAGE_BROKEN_MIRROR:_("A mirror is possibly broken"),
MESSAGE_CONNECTION_REFUSED:_("The connection was refused"),
MESSAGE_PARAMETER_INVALID:_("The parameter was invalid"),
MESSAGE_PRIORITY_INVALID:_("The priority was invalid"),
MESSAGE_BACKEND_ERROR:_("Backend warning"),
MESSAGE_DAEMON_ERROR:_("Daemon warning"),
MESSAGE_CACHE_BEING_REBUILT:_("The package list cache is being rebuilt"),
MESSAGE_UNTRUSTED_PACKAGE:_("An untrusted package was installed"),
MESSAGE_NEWER_PACKAGE_EXISTS:_("A newer package exists"),
MESSAGE_COULD_NOT_FIND_PACKAGE:_("Could not find package"),
MESSAGE_CONFIG_FILES_CHANGED:_("Configuration files were changed"),
MESSAGE_PACKAGE_ALREADY_INSTALLED:_("Package is already installed"),
MESSAGE_AUTOREMOVE_IGNORED:_("Automatic cleanup is being ignored"),
MESSAGE_REPO_METADATA_DOWNLOAD_FAILED:_("Software source download failed"),
MESSAGE_REPO_FOR_DEVELOPERS_ONLY:_("This software source is for developers only"),
MESSAGE_OTHER_UPDATES_HELD_BACK:_("Other updates have been held back"),
}
def get_message_string_from_enum(enum):
if STRINGS_MESSAGE.has_key(enum):
return STRINGS_MESSAGE[enum]
else:
return None
STRINGS_STATUS = {
}
def get_status_string_from_enum(enum):
if STRINGS_STATUS.has_key(enum):
return STRINGS_STATUS[enum]
else:
return None
STRINGS_INFO = {
}
def get_info_string_from_enum(enum):
if STRINGS_INFO.has_key(enum):
return STRINGS_INFO[enum]
else:
return None
STRINGS_GROUP = {
}
def get_group_string_from_enum(enum):
if STRINGS_GROUP.has_key(enum):
return STRINGS_GROUP[enum]
else:
return None
|