Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/error.c
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2006-05-15 02:19:57 +0000
committerJudd Vinet <judd@archlinux.org>2006-05-15 02:19:57 +0000
commitbb787e26ee01f961c76fbe4e568275a66e80009f (patch)
tree6b16de3f1d21f018ea1f2a0e53fc38562c4e89b1 /lib/libalpm/error.c
parent3d3a29a80849f2aaa0baff93c1ae4478276e2b54 (diff)
first stage of i18n stuff from VMiklos
Diffstat (limited to 'lib/libalpm/error.c')
-rw-r--r--lib/libalpm/error.c76
1 files changed, 39 insertions, 37 deletions
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c
index 336b7152..24ca7476 100644
--- a/lib/libalpm/error.c
+++ b/lib/libalpm/error.c
@@ -19,6 +19,8 @@
* USA.
*/
+#include <libintl.h>
+#include "util.h"
#include "alpm.h"
char *alpm_strerror(int err)
@@ -26,91 +28,91 @@ char *alpm_strerror(int err)
switch(err) {
/* System */
case PM_ERR_MEMORY:
- return "out of memory!";
+ return _("out of memory!");
case PM_ERR_SYSTEM:
- return "unexpected error";
+ return _("unexpected error");
case PM_ERR_BADPERMS:
- return "insufficient privileges";
+ return _("insufficient privileges");
case PM_ERR_WRONG_ARGS:
- return "wrong or NULL argument passed";
+ return _("wrong or NULL argument passed");
case PM_ERR_NOT_A_FILE:
- return "could not find or read file";
+ return _("could not find or read file");
/* Interface */
case PM_ERR_HANDLE_NULL:
- return "library not initialized";
+ return _("library not initialized");
case PM_ERR_HANDLE_NOT_NULL:
- return "library already initialized";
+ return _("library already initialized");
case PM_ERR_HANDLE_LOCK:
- return "unable to lock database";
+ return _("unable to lock database");
/* Databases */
case PM_ERR_DB_OPEN:
- return "could not open database";
+ return _("could not open database");
case PM_ERR_DB_CREATE:
- return "could not create database";
+ return _("could not create database");
case PM_ERR_DB_NULL:
- return "database not initialized";
+ return _("database not initialized");
case PM_ERR_DB_NOT_NULL:
- return "database already registered";
+ return _("database already registered");
case PM_ERR_DB_NOT_FOUND:
- return "could not find database";
+ return _("could not find database");
case PM_ERR_DB_WRITE:
- return "could not update database";
+ return _("could not update database");
case PM_ERR_DB_REMOVE:
- return "could not remove database entry";
+ return _("could not remove database entry");
/* Configuration */
case PM_ERR_OPT_LOGFILE:
case PM_ERR_OPT_DBPATH:
case PM_ERR_OPT_LOCALDB:
case PM_ERR_OPT_SYNCDB:
case PM_ERR_OPT_USESYSLOG:
- return "could not set parameter";
+ return _("could not set parameter");
/* Transactions */
case PM_ERR_TRANS_NULL:
- return "transaction not initialized";
+ return _("transaction not initialized");
case PM_ERR_TRANS_NOT_NULL:
- return "transaction already initialized";
+ return _("transaction already initialized");
case PM_ERR_TRANS_DUP_TARGET:
- return "duplicate target";
+ return _("duplicate target");
case PM_ERR_TRANS_NOT_INITIALIZED:
- return "transaction not initialized";
+ return _("transaction not initialized");
case PM_ERR_TRANS_NOT_PREPARED:
- return "transaction not prepared";
+ return _("transaction not prepared");
case PM_ERR_TRANS_ABORT:
- return "transaction aborted";
+ return _("transaction aborted");
case PM_ERR_TRANS_TYPE:
- return "operation not compatible with the transaction type";
+ return _("operation not compatible with the transaction type");
/* Packages */
case PM_ERR_PKG_NOT_FOUND:
- return "could not find or read package";
+ return _("could not find or read package");
case PM_ERR_PKG_INVALID:
- return "invalid or corrupted package";
+ return _("invalid or corrupted package");
case PM_ERR_PKG_OPEN:
- return "cannot open package file";
+ return _("cannot open package file");
case PM_ERR_PKG_LOAD:
- return "cannot load package data";
+ return _("cannot load package data");
case PM_ERR_PKG_INSTALLED:
- return "package already installed";
+ return _("package already installed");
case PM_ERR_PKG_CANT_FRESH:
- return "package not installed or lesser version";
+ return _("package not installed or lesser version");
case PM_ERR_PKG_INVALID_NAME:
- return "package name is not valid";
+ return _("package name is not valid");
/* Groups */
case PM_ERR_GRP_NOT_FOUND:
- return "group not found";
+ return _("group not found");
/* Dependencies */
case PM_ERR_UNSATISFIED_DEPS:
- return "could not satisfy dependencies";
+ return _("could not satisfy dependencies");
case PM_ERR_CONFLICTING_DEPS:
- return "conflicting dependencies";
+ return _("conflicting dependencies");
case PM_ERR_FILE_CONFLICTS:
- return "conflicting files";
+ return _("conflicting files");
/* Miscellaenous */
case PM_ERR_USER_ABORT:
- return "user aborted";
+ return _("user aborted");
case PM_ERR_INTERNAL_ERROR:
- return "internal error";
+ return _("internal error");
default:
- return "unexpected error";
+ return _("unexpected error");
}
}