mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* keyring.c: Make some strings translatable.
* exec.c, sign.c: Change "can't open file" to "can't open" and "can't create file" to "can't create" to be consistent with other strings so we don't have to translate both.
This commit is contained in:
parent
1976afce93
commit
d89c701acb
4 changed files with 34 additions and 25 deletions
|
@ -1,5 +1,11 @@
|
||||||
2004-10-27 David Shaw <dshaw@jabberwocky.com>
|
2004-10-27 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* keyring.c: Make some strings translatable.
|
||||||
|
|
||||||
|
* exec.c, sign.c: Change "can't open file" to "can't open" and
|
||||||
|
"can't create file" to "can't create" to be consistent with other
|
||||||
|
strings so we don't have to translate both.
|
||||||
|
|
||||||
* delkey.c, export.c, keyedit.c, pkclist.c, revoke.c, skclist.c:
|
* delkey.c, export.c, keyedit.c, pkclist.c, revoke.c, skclist.c:
|
||||||
Fix a few missed possible \"username\" quotes.
|
Fix a few missed possible \"username\" quotes.
|
||||||
|
|
||||||
|
|
|
@ -486,7 +486,7 @@ int exec_write(struct exec_info **info,const char *program,
|
||||||
(*info)->tochild=fopen((*info)->tempfile_in,binary?"wb":"w");
|
(*info)->tochild=fopen((*info)->tempfile_in,binary?"wb":"w");
|
||||||
if((*info)->tochild==NULL)
|
if((*info)->tochild==NULL)
|
||||||
{
|
{
|
||||||
log_error(_("can't create file `%s': %s\n"),
|
log_error(_("can't create `%s': %s\n"),
|
||||||
(*info)->tempfile_in,strerror(errno));
|
(*info)->tempfile_in,strerror(errno));
|
||||||
ret=G10ERR_WRITE_FILE;
|
ret=G10ERR_WRITE_FILE;
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
|
@ -371,10 +371,11 @@ keyring_get_keyblock (KEYRING_HANDLE hd, KBNODE *ret_kb)
|
||||||
return -1; /* no successful search */
|
return -1; /* no successful search */
|
||||||
|
|
||||||
a = iobuf_open (hd->found.kr->fname);
|
a = iobuf_open (hd->found.kr->fname);
|
||||||
if (!a) {
|
if (!a)
|
||||||
log_error ("can't open `%s'\n", hd->found.kr->fname);
|
{
|
||||||
|
log_error(_("can't open `%s'\n"), hd->found.kr->fname);
|
||||||
return G10ERR_KEYRING_OPEN;
|
return G10ERR_KEYRING_OPEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iobuf_seek (a, hd->found.offset) ) {
|
if (iobuf_seek (a, hd->found.offset) ) {
|
||||||
log_error ("can't seek `%s'\n", hd->found.kr->fname);
|
log_error ("can't seek `%s'\n", hd->found.kr->fname);
|
||||||
|
@ -656,10 +657,11 @@ prepare_search (KEYRING_HANDLE hd)
|
||||||
|
|
||||||
hd->current.eof = 0;
|
hd->current.eof = 0;
|
||||||
hd->current.iobuf = iobuf_open (hd->current.kr->fname);
|
hd->current.iobuf = iobuf_open (hd->current.kr->fname);
|
||||||
if (!hd->current.iobuf) {
|
if (!hd->current.iobuf)
|
||||||
log_error ("can't open `%s'\n", hd->current.kr->fname );
|
{
|
||||||
|
log_error(_("can't open `%s'\n"), hd->current.kr->fname );
|
||||||
return (hd->current.error = G10ERR_OPEN_FILE);
|
return (hd->current.error = G10ERR_OPEN_FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1193,12 +1195,13 @@ create_tmp_file (const char *template,
|
||||||
else
|
else
|
||||||
*r_fp = iobuf_create (tmpfname);
|
*r_fp = iobuf_create (tmpfname);
|
||||||
umask(oldmask);
|
umask(oldmask);
|
||||||
if (!*r_fp) {
|
if (!*r_fp)
|
||||||
log_error ("can't create `%s': %s\n", tmpfname, strerror(errno) );
|
{
|
||||||
|
log_error(_("can't create `%s': %s\n"), tmpfname, strerror(errno) );
|
||||||
m_free (tmpfname);
|
m_free (tmpfname);
|
||||||
m_free (bakfname);
|
m_free (bakfname);
|
||||||
return G10ERR_OPEN_FILE;
|
return G10ERR_OPEN_FILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
*r_bakfname = bakfname;
|
*r_bakfname = bakfname;
|
||||||
*r_tmpfname = tmpfname;
|
*r_tmpfname = tmpfname;
|
||||||
|
@ -1492,11 +1495,11 @@ do_copy (int mode, const char *fname, KBNODE root, int secret,
|
||||||
else
|
else
|
||||||
newfp = iobuf_create (fname);
|
newfp = iobuf_create (fname);
|
||||||
umask(oldmask);
|
umask(oldmask);
|
||||||
if( !newfp ) {
|
if( !newfp )
|
||||||
log_error (_("can't create `%s': %s\n"),
|
{
|
||||||
fname, strerror(errno));
|
log_error (_("can't create `%s': %s\n"), fname, strerror(errno));
|
||||||
return G10ERR_OPEN_FILE;
|
return G10ERR_OPEN_FILE;
|
||||||
}
|
}
|
||||||
if( !opt.quiet )
|
if( !opt.quiet )
|
||||||
log_info(_("%s: keyring created\n"), fname );
|
log_info(_("%s: keyring created\n"), fname );
|
||||||
|
|
||||||
|
@ -1516,11 +1519,12 @@ do_copy (int mode, const char *fname, KBNODE root, int secret,
|
||||||
return 0; /* ready */
|
return 0; /* ready */
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !fp ) {
|
if( !fp )
|
||||||
log_error ("can't open `%s': %s\n", fname, strerror(errno) );
|
{
|
||||||
|
log_error(_("can't open `%s': %s\n"), fname, strerror(errno) );
|
||||||
rc = G10ERR_OPEN_FILE;
|
rc = G10ERR_OPEN_FILE;
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create the new file. */
|
/* Create the new file. */
|
||||||
rc = create_tmp_file (fname, &bakfname, &tmpfname, &newfp);
|
rc = create_tmp_file (fname, &bakfname, &tmpfname, &newfp);
|
||||||
|
|
15
g10/sign.c
15
g10/sign.c
|
@ -775,8 +775,7 @@ sign_file( STRLIST filenames, int detached, STRLIST locusr,
|
||||||
else
|
else
|
||||||
out = iobuf_create( outfile );
|
out = iobuf_create( outfile );
|
||||||
if( !out ) {
|
if( !out ) {
|
||||||
log_error(_("can't create file `%s': %s\n"),
|
log_error(_("can't create `%s': %s\n"), outfile, strerror(errno) );
|
||||||
outfile, strerror(errno) );
|
|
||||||
rc = G10ERR_CREATE_FILE;
|
rc = G10ERR_CREATE_FILE;
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
@ -908,12 +907,13 @@ sign_file( STRLIST filenames, int detached, STRLIST locusr,
|
||||||
inp = NULL;
|
inp = NULL;
|
||||||
errno = EPERM;
|
errno = EPERM;
|
||||||
}
|
}
|
||||||
if( !inp ) {
|
if( !inp )
|
||||||
log_error(_("can't open file `%s': %s\n"),
|
{
|
||||||
sl->d, strerror(errno) );
|
log_error(_("can't open `%s': %s\n"),
|
||||||
|
sl->d, strerror(errno) );
|
||||||
rc = G10ERR_OPEN_FILE;
|
rc = G10ERR_OPEN_FILE;
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
handle_progress (&pfx, inp, sl->d);
|
handle_progress (&pfx, inp, sl->d);
|
||||||
if( opt.verbose )
|
if( opt.verbose )
|
||||||
fprintf(stderr, " `%s'", sl->d );
|
fprintf(stderr, " `%s'", sl->d );
|
||||||
|
@ -1032,8 +1032,7 @@ clearsign_file( const char *fname, STRLIST locusr, const char *outfile )
|
||||||
else
|
else
|
||||||
out = iobuf_create( outfile );
|
out = iobuf_create( outfile );
|
||||||
if( !out ) {
|
if( !out ) {
|
||||||
log_error(_("can't create file `%s': %s\n"),
|
log_error(_("can't create `%s': %s\n"), outfile, strerror(errno) );
|
||||||
outfile, strerror(errno) );
|
|
||||||
rc = G10ERR_CREATE_FILE;
|
rc = G10ERR_CREATE_FILE;
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue