summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewt <devnull@localhost>1998-01-09 19:10:54 +0000
committerewt <devnull@localhost>1998-01-09 19:10:54 +0000
commitaf9aba223f6a49e9ecd96fb1fbc59ffdecf5b97c (patch)
treea4e5a228901c41210f0b8844f965b261bc966982
parentbee24b06ae463b921d91225867bc5a6831d06cfe (diff)
downloadlibrpm-tizen-af9aba223f6a49e9ecd96fb1fbc59ffdecf5b97c.tar.gz
librpm-tizen-af9aba223f6a49e9ecd96fb1fbc59ffdecf5b97c.tar.bz2
librpm-tizen-af9aba223f6a49e9ecd96fb1fbc59ffdecf5b97c.zip
added more i18n strings
CVS patchset: 1946 CVS date: 1998/01/09 19:10:54
-rw-r--r--CHANGES3
-rw-r--r--ftp.c23
-rw-r--r--lib/dbindex.c9
-rw-r--r--lib/depends.c12
-rw-r--r--lib/formats.c7
-rw-r--r--lib/header.c43
-rw-r--r--lib/messages.c6
-rw-r--r--lib/package.c5
-rw-r--r--lib/rebuilddb.c19
-rw-r--r--lib/rpmlead.c2
-rw-r--r--lib/rpmrc.c32
-rw-r--r--rpmio/messages.c6
-rw-r--r--url.c7
13 files changed, 95 insertions, 79 deletions
diff --git a/CHANGES b/CHANGES
index 7bb6d0d8e..68a6f778e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2.4.11 -> 2.5:
+ - added many more i18n strings
+
2.4.11 -> 2.4.12:
- intialize reserved portion of lead when writing packages
- fixed error messages displayed when opening the database
diff --git a/ftp.c b/ftp.c
index f23b7232b..a4bf3d4fa 100644
--- a/ftp.c
+++ b/ftp.c
@@ -48,6 +48,7 @@ extern int h_errno;
#include <arpa/inet.h>
#include "inet_aton.h" /* for systems too stupid to provide this */
+#include "intl.h"
#define TIMEOUT_SECS 60
#define BUFFER_SIZE 4096
@@ -441,38 +442,38 @@ void ftpClose(int sock) {
const char *ftpStrerror(int errorNumber) {
switch (errorNumber) {
case FTPERR_BAD_SERVER_RESPONSE:
- return ("Bad FTP server response");
+ return _("Bad FTP server response");
case FTPERR_SERVER_IO_ERROR:
- return("FTP IO error");
+ return _("FTP IO error");
case FTPERR_SERVER_TIMEOUT:
- return("FTP server timeout");
+ return _("FTP server timeout");
case FTPERR_BAD_HOST_ADDR:
- return("Unable to lookup FTP server host address");
+ return _("Unable to lookup FTP server host address");
case FTPERR_BAD_HOSTNAME:
- return("Unable to lookup FTP server host name");
+ return _("Unable to lookup FTP server host name");
case FTPERR_FAILED_CONNECT:
- return("Failed to connect to FTP server");
+ return _("Failed to connect to FTP server");
case FTPERR_FAILED_DATA_CONNECT:
- return("Failed to establish data connection to FTP server");
+ return _("Failed to establish data connection to FTP server");
case FTPERR_FILE_IO_ERROR:
- return("IO error to local file");
+ return _("IO error to local file");
case FTPERR_PASSIVE_ERROR:
- return("Error setting remote server to passive mode");
+ return _("Error setting remote server to passive mode");
case FTPERR_FILE_NOT_FOUND:
- return("File not found on server");
+ return _("File not found on server");
case FTPERR_UNKNOWN:
default:
- return("FTP Unknown or unexpected error");
+ return _("FTP Unknown or unexpected error");
}
}
diff --git a/lib/dbindex.c b/lib/dbindex.c
index 7f397547a..1be016a41 100644
--- a/lib/dbindex.c
+++ b/lib/dbindex.c
@@ -7,6 +7,7 @@
#include <string.h>
#include "dbindex.h"
+#include "intl.h"
#include "rpmlib.h"
dbiIndex * dbiOpenIndex(char * filename, int flags, int perms) {
@@ -18,7 +19,7 @@ dbiIndex * dbiOpenIndex(char * filename, int flags, int perms) {
if (!db->db) {
free(db->indexname);
free(db);
- rpmError(RPMERR_DBOPEN, "cannot open file %s: ", filename,
+ rpmError(RPMERR_DBOPEN, _("cannot open file %s: "), filename,
strerror(errno));
return NULL;
}
@@ -45,7 +46,7 @@ int dbiSearchIndex(dbiIndex * dbi, char * str, dbiIndexSet * set) {
rc = dbi->db->get(dbi->db, &key, &data, 0);
if (rc == -1) {
- rpmError(RPMERR_DBGETINDEX, "error getting record %s from %s",
+ rpmError(RPMERR_DBGETINDEX, _("error getting record %s from %s"),
str, dbi->indexname);
return -1;
} else if (rc == 1) {
@@ -73,14 +74,14 @@ int dbiUpdateIndex(dbiIndex * dbi, char * str, dbiIndexSet * set) {
rc = dbi->db->put(dbi->db, &key, &data, 0);
if (rc) {
- rpmError(RPMERR_DBPUTINDEX, "error storing record %s into %s",
+ rpmError(RPMERR_DBPUTINDEX, _("error storing record %s into %s"),
str, dbi->indexname);
return 1;
}
} else {
rc = dbi->db->del(dbi->db, &key, 0);
if (rc) {
- rpmError(RPMERR_DBPUTINDEX, "error removing record %s into %s",
+ rpmError(RPMERR_DBPUTINDEX, _("error removing record %s into %s"),
str, dbi->indexname);
return 1;
}
diff --git a/lib/depends.c b/lib/depends.c
index ebc2fb042..27c0bb71f 100644
--- a/lib/depends.c
+++ b/lib/depends.c
@@ -9,6 +9,7 @@
#include <stdlib.h>
#include <string.h>
+#include "intl.h"
#include "misc.h"
#include "rpmlib.h"
#include "messages.h"
@@ -378,8 +379,8 @@ int rpmdepCheck(rpmDependencies rpmdep,
h = rpmdbGetRecord(rpmdep->db, rpmdep->removedPackages[i]);
if (!h) {
rpmError(RPMERR_DBCORRUPT,
- "cannot read header at %d for dependency "
- "check", rpmdep->removedPackages[i]);
+ _("cannot read header at %d for dependency check"),
+ rpmdep->removedPackages[i]);
free(ps.problems);
return 1;
}
@@ -532,8 +533,9 @@ static int checkPackageSet(rpmDependencies rpmdep, struct problemsSet * psp,
h = rpmdbGetRecord(rpmdep->db, matches->recs[i].recOffset);
if (!h) {
- rpmError(RPMERR_DBCORRUPT, "cannot read header at %d for dependency "
- "check", rpmdep->removedPackages[i]);
+ rpmError(RPMERR_DBCORRUPT,
+ _("cannot read header at %d for dependency check"),
+ rpmdep->removedPackages[i]);
return 1;
}
@@ -817,7 +819,7 @@ static int addOrderedPack(rpmDependencies rpmdep,
strcat(errorString, " ");
}
- rpmError(RPMMESS_PREREQLOOP, "loop in prerequisite chain: %s",
+ rpmError(RPMMESS_PREREQLOOP, _("loop in prerequisite chain: %s"),
errorString);
return 1;
diff --git a/lib/formats.c b/lib/formats.c
index 836c0eb88..71afd721c 100644
--- a/lib/formats.c
+++ b/lib/formats.c
@@ -6,6 +6,7 @@
#include <sys/stat.h>
#include "header.h"
+#include "intl.h"
#include "rpmlib.h"
static char * permsFormat(int_32 type, const void * data,
@@ -88,7 +89,7 @@ static char * permsFormat(int_32 type, const void * data,
if (type != RPM_INT32_TYPE) {
val = malloc(20);
- strcpy(val, "(not a number)");
+ strcpy(val, _("(not a number)"));
} else {
val = malloc(15 + padding);
strcat(formatPrefix, "s");
@@ -108,7 +109,7 @@ static char * fflagsFormat(int_32 type, const void * data,
if (type != RPM_INT32_TYPE) {
val = malloc(20);
- strcpy(val, "(not a number)");
+ strcpy(val, _("(not a number)"));
} else {
buf[0] = '\0';
if (anint & RPMFILE_DOC)
@@ -140,7 +141,7 @@ static char * depflagsFormat(int_32 type, const void * data,
if (type != RPM_INT32_TYPE) {
val = malloc(20);
- strcpy(val, "(not a number)");
+ strcpy(val, _("(not a number)"));
} else {
*buf = '\0';
diff --git a/lib/header.c b/lib/header.c
index 92b56f972..a3c41758e 100644
--- a/lib/header.c
+++ b/lib/header.c
@@ -24,6 +24,7 @@
#include <netinet/in.h>
#include "header.h"
+#include "intl.h"
#include "tread.h"
#define INDEX_MALLOC_SIZE 8
@@ -1196,14 +1197,14 @@ static int parseExpression(struct sprintfToken * token, char * str,
while (*chptr && *chptr != '?') chptr++;
if (*chptr != '?') {
- *error = "? expected in expression";
+ *error = _("? expected in expression");
return 1;
}
*chptr++ = '\0';;
if (*chptr != '{') {
- *error = "{ exected after ? in expression";
+ *error = _("{ exected after ? in expression");
return 1;
}
@@ -1213,14 +1214,14 @@ static int parseExpression(struct sprintfToken * token, char * str,
&token->u.cond.numIfTokens, &end, PARSER_IN_EXPR, error))
return 1;
if (!*end) {
- *error = "} expected in expression";
+ *error = _("} expected in expression");
freeFormat(token->u.cond.ifFormat, token->u.cond.numIfTokens);
return 1;
}
chptr = end;
if (*chptr != ':' && *chptr != '|') {
- *error = ": expected following ? subexpression";
+ *error = _(": expected following ? subexpression");
freeFormat(token->u.cond.ifFormat, token->u.cond.numIfTokens);
return 1;
}
@@ -1233,7 +1234,7 @@ static int parseExpression(struct sprintfToken * token, char * str,
chptr++;
if (*chptr != '{') {
- *error = "{ exected after : in expression";
+ *error = _("{ exected after : in expression");
freeFormat(token->u.cond.ifFormat, token->u.cond.numIfTokens);
return 1;
}
@@ -1245,14 +1246,14 @@ static int parseExpression(struct sprintfToken * token, char * str,
error))
return 1;
if (!*end) {
- *error = "} expected in expression";
+ *error = _("} expected in expression");
freeFormat(token->u.cond.ifFormat, token->u.cond.numIfTokens);
return 1;
}
chptr = end;
if (*chptr != '|') {
- *error = "| expected at end of expression";
+ *error = _("| expected at end of expression");
freeFormat(token->u.cond.ifFormat, token->u.cond.numIfTokens);
freeFormat(token->u.cond.elseFormat, token->u.cond.numElseTokens);
return 1;
@@ -1346,7 +1347,7 @@ static int parseFormat(char * str, const struct headerTagTableEntry * tags,
chptr = start;
while (*chptr && *chptr != '{') chptr++;
if (!*chptr) {
- *error = "missing { after %";
+ *error = _("missing { after %");
freeFormat(format, numTokens);
return 1;
}
@@ -1374,7 +1375,7 @@ static int parseFormat(char * str, const struct headerTagTableEntry * tags,
next = start;
while (*next && *next != '}') next++;
if (!*next) {
- *error = "missing } after %{";
+ *error = _("missing } after %{");
freeFormat(format, numTokens);
return 1;
}
@@ -1386,7 +1387,7 @@ static int parseFormat(char * str, const struct headerTagTableEntry * tags,
if (*chptr) {
*chptr++ = '\0';
if (!*chptr) {
- *error = "empty tag format";
+ *error = _("empty tag format");
freeFormat(format, numTokens);
return 1;
}
@@ -1396,7 +1397,7 @@ static int parseFormat(char * str, const struct headerTagTableEntry * tags,
}
if (!*start) {
- *error = "empty tag name";
+ *error = _("empty tag name");
freeFormat(format, numTokens);
return 1;
}
@@ -1410,7 +1411,7 @@ static int parseFormat(char * str, const struct headerTagTableEntry * tags,
format[currToken].u.tag.ext = ext->u.tagFunction;
format[currToken].u.tag.extNum = ext - extensions;
} else {
- *error = "unknown tag";
+ *error = _("unknown tag");
freeFormat(format, numTokens);
return 1;
}
@@ -1436,7 +1437,7 @@ static int parseFormat(char * str, const struct headerTagTableEntry * tags,
}
if (!start) {
- *error = "] expected at end of array";
+ *error = _("] expected at end of array");
freeFormat(format, numTokens);
return 1;
}
@@ -1452,9 +1453,9 @@ static int parseFormat(char * str, const struct headerTagTableEntry * tags,
if ((*start == ']' && state != PARSER_IN_ARRAY) ||
(*start == '}' && state != PARSER_IN_EXPR)) {
if (*start == ']')
- *error = "unexpected ]";
+ *error = _("unexpected ]");
else
- *error = "unexpected }";
+ *error = _("unexpected }");
freeFormat(format, numTokens);
return 1;
}
@@ -1529,13 +1530,13 @@ static char * formatValue(struct sprintfTag * tag, Header h,
extCache + tag->extNum)) {
count = 1;
type = RPM_STRING_TYPE;
- data = "(none)";
+ data = _("(none)");
}
} else {
if (!headerGetEntry(h, tag->tag, &type, &data, &count)){
count = 1;
type = RPM_STRING_TYPE;
- data = "(none)";
+ data = _("(none)");
}
mayfree = 1;
@@ -1629,7 +1630,7 @@ static char * formatValue(struct sprintfTag * tag, Header h,
default:
val = malloc(20);
- strcpy(val, "(unknown type)");
+ strcpy(val, _("(unknown type)"));
}
return val;
@@ -1718,7 +1719,7 @@ static char * singleSprintf(Header h, struct sprintfToken * token,
if (numElements == -1) {
val = malloc(20);
- strcpy(val, "(none)");
+ strcpy(val, _("(none)"));
} else {
alloced = numElements * token->u.array.numTokens * 20;
val = malloc(alloced);
@@ -1819,7 +1820,7 @@ static char * octalFormat(int_32 type, const void * data,
if (type != RPM_INT32_TYPE) {
val = malloc(20);
- strcpy(val, "(not a number)");
+ strcpy(val, _("(not a number)"));
} else {
val = malloc(20 + padding);
strcat(formatPrefix, "o");
@@ -1839,7 +1840,7 @@ static char * realDateFormat(int_32 type, const void * data,
if (type != RPM_INT32_TYPE) {
val = malloc(20);
- strcpy(val, "(not a number)");
+ strcpy(val, _("(not a number)"));
} else {
val = malloc(50 + padding);
strcat(formatPrefix, "s");
diff --git a/lib/messages.c b/lib/messages.c
index eee2290e7..327a47645 100644
--- a/lib/messages.c
+++ b/lib/messages.c
@@ -48,19 +48,19 @@ void rpmMessage(int level, char * format, ...) {
break;
case RPMMESS_WARNING:
- fprintf(stderr, "warning: ");
+ fprintf(stderr, _("warning: "));
vfprintf(stderr, format, args);
fflush(stderr);
break;
case RPMMESS_ERROR:
- fprintf(stderr, "error: ");
+ fprintf(stderr, _("error: "));
vfprintf(stderr, format, args);
fflush(stderr);
break;
case RPMMESS_FATALERROR:
- fprintf(stderr, "fatal error: ");
+ fprintf(stderr, _("fatal error: "));
vfprintf(stderr, format, args);
fflush(stderr);
exit(1);
diff --git a/lib/package.c b/lib/package.c
index bde14bd8a..19378bc5d 100644
--- a/lib/package.c
+++ b/lib/package.c
@@ -10,6 +10,7 @@
#include "errno.h"
#include "header.h"
+#include "intl.h"
#include "misc.h"
#include "oldheader.h"
#include "rpmlead.h"
@@ -88,8 +89,8 @@ static int readPackageHeaders(int fd, struct rpmlead * leadPtr,
return 2;
}
} else {
- rpmError(RPMERR_NEWPACKAGE, "only packages with major numbers <= 3 are"
- " supported by this version of RPM");
+ rpmError(RPMERR_NEWPACKAGE, _("only packages with major numbers <= 3 "
+ "are supported by this version of RPM"));
return 2;
}
diff --git a/lib/rebuilddb.c b/lib/rebuilddb.c
index e359141b8..e71672b08 100644
--- a/lib/rebuilddb.c
+++ b/lib/rebuilddb.c
@@ -11,6 +11,7 @@
#include <alloca.h>
#endif
+#include "intl.h"
#include "messages.h"
#include "rpmdb.h"
#include "rpmlib.h"
@@ -26,7 +27,7 @@ int rpmdbRebuild(char * rootdir) {
dbpath = rpmGetVar(RPMVAR_DBPATH);
if (!dbpath) {
- rpmMessage(RPMMESS_DEBUG, "no dbpath has been set");
+ rpmMessage(RPMMESS_DEBUG, _("no dbpath has been set"));
return 1;
}
@@ -34,13 +35,13 @@ int rpmdbRebuild(char * rootdir) {
sprintf(newdbpath, "%s/%s/rebuilddb.%d", rootdir, dbpath, (int) getpid());
if (!access(newdbpath, F_OK)) {
- rpmError(RPMERR_MKDIR, "temporary database %s already exists",
+ rpmError(RPMERR_MKDIR, _("temporary database %s already exists"),
newdbpath);
}
rpmMessage(RPMMESS_DEBUG, "creating directory: %s\n", newdbpath);
if (mkdir(newdbpath, 0755)) {
- rpmError(RPMERR_MKDIR, "error creating directory %s: %s",
+ rpmError(RPMERR_MKDIR, _("error creating directory %s: %s"),
newdbpath, strerror(errno));
}
@@ -59,7 +60,8 @@ int rpmdbRebuild(char * rootdir) {
recnum = rpmdbFirstRecNum(olddb);
while (recnum > 0) {
if (!(h = rpmdbGetRecord(olddb, recnum))) {
- rpmError(RPMERR_INTERNAL, "cannot read database record at %d", recnum);
+ rpmError(RPMERR_INTERNAL, _("cannot read database record at %d"),
+ recnum);
failed = 1;
break;
}
@@ -71,14 +73,15 @@ int rpmdbRebuild(char * rootdir) {
headerIsEntry(h, RPMTAG_RELEASE) &&
headerIsEntry(h, RPMTAG_BUILDTIME)) {
if (rpmdbAdd(newdb, h)) {
- rpmError(RPMERR_INTERNAL, "cannot add record originally at %d",
- recnum);
+ rpmError(RPMERR_INTERNAL,
+ _("cannot add record originally at %d"), recnum);
failed = 1;
break;
}
} else {
- rpmError(RPMERR_INTERNAL, "record number %d in database is bad "
- "-- skipping it", recnum);
+ rpmError(RPMERR_INTERNAL,
+ _("record number %d in database is bad -- skipping it"),
+ recnum);
}
recnum = rpmdbNextRecNum(olddb, recnum);
}
diff --git a/lib/rpmlead.c b/lib/rpmlead.c
index 5599e7224..1c3bd2515 100644
--- a/lib/rpmlead.c
+++ b/lib/rpmlead.c
@@ -45,7 +45,7 @@ int writeLead(int fd, struct rpmlead *lead)
int readLead(int fd, struct rpmlead *lead)
{
if (timedRead(fd, lead, sizeof(*lead)) != sizeof(*lead)) {
- rpmError(RPMERR_READERROR, "read failed: %s (%d)", strerror(errno),
+ rpmError(RPMERR_READERROR, _("read failed: %s (%d)"), strerror(errno),
errno);
return 1;
}
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index b8be60858..a692aca4f 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -203,10 +203,10 @@ static int machCompatCacheAdd(char * name, char * fn, int linenum,
chptr = name;
while (*chptr && *chptr != ':') chptr++;
if (!*chptr) {
- rpmError(RPMERR_RPMRC, "missing second ':' at %s:%d", fn, linenum);
+ rpmError(RPMERR_RPMRC, _("missing second ':' at %s:%d"), fn, linenum);
return 1;
} else if (chptr == name) {
- rpmError(RPMERR_RPMRC, "missing architecture name at %s:%d", fn,
+ rpmError(RPMERR_RPMRC, _("missing architecture name at %s:%d"), fn,
linenum);
return 1;
}
@@ -343,18 +343,18 @@ static int addCanon(struct canonEntry **table, int *tableLen, char *line,
t->short_name = strtok(NULL, " \t");
s = strtok(NULL, " \t");
if (! (t->name && t->short_name && s)) {
- rpmError(RPMERR_RPMRC, "Incomplete data line at %s:%d", fn, lineNum);
+ rpmError(RPMERR_RPMRC, _("Incomplete data line at %s:%d"), fn, lineNum);
return RPMERR_RPMRC;
}
if (strtok(NULL, " \t")) {
- rpmError(RPMERR_RPMRC, "Too many args in data line at %s:%d",
+ rpmError(RPMERR_RPMRC, _("Too many args in data line at %s:%d"),
fn, lineNum);
return RPMERR_RPMRC;
}
t->num = strtoul(s, &s1, 10);
if ((*s1) || (s1 == s) || (t->num == ULONG_MAX)) {
- rpmError(RPMERR_RPMRC, "Bad arch/os number: %s (%s:%d)", s,
+ rpmError(RPMERR_RPMRC, _("Bad arch/os number: %s (%s:%d)"), s,
fn, lineNum);
return(RPMERR_RPMRC);
}
@@ -387,11 +387,12 @@ static int addDefault(struct defaultEntry **table, int *tableLen, char *line,
t->name = strtok(line, ": \t");
t->defName = strtok(NULL, " \t");
if (! (t->name && t->defName)) {
- rpmError(RPMERR_RPMRC, "Incomplete default line at %s:%d", fn, lineNum);
+ rpmError(RPMERR_RPMRC, _("Incomplete default line at %s:%d"),
+ fn, lineNum);
return RPMERR_RPMRC;
}
if (strtok(NULL, " \t")) {
- rpmError(RPMERR_RPMRC, "Too many args in default line at %s:%d",
+ rpmError(RPMERR_RPMRC, _("Too many args in default line at %s:%d"),
fn, lineNum);
return RPMERR_RPMRC;
}
@@ -481,7 +482,7 @@ int rpmReadRC(char * file) {
close(fd);
if (rc) return rc;
} else {
- rpmError(RPMERR_RPMRC, "Unable to open %s for reading: %s.",
+ rpmError(RPMERR_RPMRC, _("Unable to open %s for reading: %s."),
LIBRPMRC_FILENAME, strerror(errno));
return 1;
}
@@ -497,7 +498,7 @@ int rpmReadRC(char * file) {
close(fd);
if (rc) return rc;
} else if (file) {
- rpmError(RPMERR_RPMRC, "Unable to open %s for reading: %s.", file,
+ rpmError(RPMERR_RPMRC, _("Unable to open %s for reading: %s."), file,
strerror(errno));
return 1;
}
@@ -540,7 +541,7 @@ static int doReadRC(int fd, char * filename) {
fstat(fd, &sb);
next = buf = alloca(sb.st_size + 2);
if (read(fd, buf, sb.st_size) != sb.st_size) {
- rpmError(RPMERR_RPMRC, "Failed to read %s: %s.", filename,
+ rpmError(RPMERR_RPMRC, _("Failed to read %s: %s."), filename,
strerror(errno));
return 1;
}
@@ -570,7 +571,8 @@ static int doReadRC(int fd, char * filename) {
}
if (*chptr != ':') {
- rpmError(RPMERR_RPMRC, "missing ':' at %s:%d", filename, linenum);
+ rpmError(RPMERR_RPMRC, _("missing ':' at %s:%d"),
+ filename, linenum);
return 1;
}
@@ -585,7 +587,7 @@ static int doReadRC(int fd, char * filename) {
while (isspace(*start) && *start) start++;
if (! *start) {
- rpmError(RPMERR_RPMRC, "missing argument for %s at %s:%d",
+ rpmError(RPMERR_RPMRC, _("missing argument for %s at %s:%d"),
option->name, filename, linenum);
return 1;
}
@@ -596,7 +598,7 @@ static int doReadRC(int fd, char * filename) {
if (!*chptr) {
rpmError(RPMERR_RPMRC,
- "missing architecture for %s at %s:%d",
+ _("missing architecture for %s at %s:%d"),
option->name, filename, linenum);
return 1;
}
@@ -606,7 +608,7 @@ static int doReadRC(int fd, char * filename) {
while (isspace(*chptr) && *chptr) chptr++;
if (!*chptr) {
rpmError(RPMERR_RPMRC,
- "missing argument for %s at %s:%d",
+ _("missing argument for %s at %s:%d"),
option->name, filename, linenum);
return 1;
}
@@ -649,7 +651,7 @@ static int doReadRC(int fd, char * filename) {
}
if (!gotit) {
- rpmError(RPMERR_RPMRC, "bad option '%s' at %s:%d",
+ rpmError(RPMERR_RPMRC, _("bad option '%s' at %s:%d"),
start, filename, linenum);
}
}
diff --git a/rpmio/messages.c b/rpmio/messages.c
index eee2290e7..327a47645 100644
--- a/rpmio/messages.c
+++ b/rpmio/messages.c
@@ -48,19 +48,19 @@ void rpmMessage(int level, char * format, ...) {
break;
case RPMMESS_WARNING:
- fprintf(stderr, "warning: ");
+ fprintf(stderr, _("warning: "));
vfprintf(stderr, format, args);
fflush(stderr);
break;
case RPMMESS_ERROR:
- fprintf(stderr, "error: ");
+ fprintf(stderr, _("error: "));
vfprintf(stderr, format, args);
fflush(stderr);
break;
case RPMMESS_FATALERROR:
- fprintf(stderr, "fatal error: ");
+ fprintf(stderr, _("fatal error: "));
vfprintf(stderr, format, args);
fflush(stderr);
exit(1);
diff --git a/url.c b/url.c
index 7d76ed502..95e70481f 100644
--- a/url.c
+++ b/url.c
@@ -12,6 +12,7 @@
#endif
#include "ftp.h"
+#include "intl.h"
#include "messages.h"
#include "miscfn.h"
#include "rpmlib.h"
@@ -55,7 +56,7 @@ static char * getFtpPassword(char * machine, char * account, int mustAsk) {
free(pwCache[i].pw);
prompt = alloca(strlen(machine) + strlen(account) + 50);
- sprintf(prompt, "Password for %s@%s: ", account, machine);
+ sprintf(prompt, _("Password for %s@%s: "), account, machine);
pwCache[i].pw = strdup(getpass(prompt));
@@ -139,7 +140,7 @@ static int urlFtpLogin(char * url, char ** fileNamePtr) {
} else {
port = strtol(portStr, &endPtr, 0);
if (*endPtr) {
- fprintf(stderr, "error: ftpport must be a number\n");
+ fprintf(stderr, _("error: ftpport must be a number\n"));
return -1;
}
}
@@ -197,7 +198,7 @@ int urlGetFile(char * url, char * dest) {
fd = creat(dest, 0600);
if (fd < 0) {
- rpmMessage(RPMMESS_DEBUG, "failed to create %s\n", dest);
+ rpmMessage(RPMMESS_DEBUG, _("failed to create %s\n"), dest);
ftpClose(ftpconn);
free(fileName);
return FTPERR_UNKNOWN;