aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-01-08 11:20:38 +0200
committerSergey Poznyakoff <gray@gnu.org>2021-01-08 11:26:51 +0200
commitc42044e7eda48707809c4176a9bb5f6e479fdc92 (patch)
tree25150579e24a65ab4f9bb1cc79443f56ea36e9d2
parent8443608e77e244621b6da059d3aec1c1ff4bd874 (diff)
downloadgdbm-c42044e7eda48707809c4176a9bb5f6e479fdc92.tar.gz
gdbm-c42044e7eda48707809c4176a9bb5f6e479fdc92.tar.bz2
Reword some messages and add translator comments.
* src/gdbmtool.c: Avoid duplicating the GDBM_BAD_AVAIL message. Add translator comments. * src/gdbmerrno.c: Add translator comments. * src/util.c: Likewise.
-rw-r--r--src/gdbmerrno.c1
-rw-r--r--src/gdbmtool.c6
-rw-r--r--src/util.c1
3 files changed, 5 insertions, 3 deletions
diff --git a/src/gdbmerrno.c b/src/gdbmerrno.c
index efda7a4..0fa667a 100644
--- a/src/gdbmerrno.c
+++ b/src/gdbmerrno.c
@@ -130,12 +130,13 @@ const char * const gdbm_errlist[_GDBM_MAX_ERRNO+1] = {
130 [GDBM_ERR_FILE_MODE] = N_("Failed to restore file mode"), 130 [GDBM_ERR_FILE_MODE] = N_("Failed to restore file mode"),
131 [GDBM_NEED_RECOVERY] = N_("Database needs recovery"), 131 [GDBM_NEED_RECOVERY] = N_("Database needs recovery"),
132 [GDBM_BACKUP_FAILED] = N_("Failed to create backup copy"), 132 [GDBM_BACKUP_FAILED] = N_("Failed to create backup copy"),
133 [GDBM_DIR_OVERFLOW] = N_("Bucket directory overflow"), 133 [GDBM_DIR_OVERFLOW] = N_("Bucket directory overflow"),
134 [GDBM_BAD_BUCKET] = N_("Malformed bucket header"), 134 [GDBM_BAD_BUCKET] = N_("Malformed bucket header"),
135 [GDBM_BAD_HEADER] = N_("Malformed database file header"), 135 [GDBM_BAD_HEADER] = N_("Malformed database file header"),
136 /* TRANSLATORS: avail_block is a field name. Don't translate it. */
136 [GDBM_BAD_AVAIL] = N_("Malformed avail_block"), 137 [GDBM_BAD_AVAIL] = N_("Malformed avail_block"),
137 [GDBM_BAD_HASH_TABLE] = N_("Malformed hash table"), 138 [GDBM_BAD_HASH_TABLE] = N_("Malformed hash table"),
138 [GDBM_BAD_DIR_ENTRY] = N_("Invalid directory entry"), 139 [GDBM_BAD_DIR_ENTRY] = N_("Invalid directory entry"),
139 [GDBM_FILE_CLOSE_ERROR] = N_("Error closing file"), 140 [GDBM_FILE_CLOSE_ERROR] = N_("Error closing file"),
140 [GDBM_FILE_SYNC_ERROR] = N_("Error synchronizing file"), 141 [GDBM_FILE_SYNC_ERROR] = N_("Error synchronizing file"),
141 [GDBM_FILE_TRUNCATE_ERROR] = N_("Error truncating file") 142 [GDBM_FILE_TRUNCATE_ERROR] = N_("Error truncating file")
diff --git a/src/gdbmtool.c b/src/gdbmtool.c
index 8a17c29..d736411 100644
--- a/src/gdbmtool.c
+++ b/src/gdbmtool.c
@@ -308,13 +308,13 @@ _gdbm_print_avail_list (FILE *fp, GDBM_FILE dbf)
308 /* Print the block! */ 308 /* Print the block! */
309 fprintf (fp, _("\nblock = %d\nsize = %d\ncount = %d\n"), temp, 309 fprintf (fp, _("\nblock = %d\nsize = %d\ncount = %d\n"), temp,
310 av_stk->size, av_stk->count); 310 av_stk->size, av_stk->count);
311 if (gdbm_avail_block_validate (dbf, av_stk) == 0) 311 if (gdbm_avail_block_validate (dbf, av_stk) == 0)
312 av_table_display (av_stk->av_table, av_stk->count, fp); 312 av_table_display (av_stk->av_table, av_stk->count, fp);
313 else 313 else
314 terror (_("invalid avail_block")); 314 terror ("%s", gdbm_strerror (GDBM_BAD_AVAIL));
315 temp = av_stk->next_block; 315 temp = av_stk->next_block;
316 } 316 }
317 free (av_stk); 317 free (av_stk);
318} 318}
319 319
320void 320void
@@ -1232,13 +1232,13 @@ struct command command_tab[] = {
1232 { S(next), T_CMD, 1232 { S(next), T_CMD,
1233 checkdb_begin, nextkey_handler, NULL, 1233 checkdb_begin, nextkey_handler, NULL,
1234 { { N_("[KEY]"), GDBM_ARG_DATUM, DS_KEY }, 1234 { { N_("[KEY]"), GDBM_ARG_DATUM, DS_KEY },
1235 { NULL } }, 1235 { NULL } },
1236 FALSE, 1236 FALSE,
1237 REPEAT_NOARG, 1237 REPEAT_NOARG,
1238 N_("nextkey") }, 1238 N_("continue iteration: get next key and datum") },
1239 { S(store), T_CMD, 1239 { S(store), T_CMD,
1240 checkdb_begin, store_handler, NULL, 1240 checkdb_begin, store_handler, NULL,
1241 { { N_("KEY"), GDBM_ARG_DATUM, DS_KEY }, 1241 { { N_("KEY"), GDBM_ARG_DATUM, DS_KEY },
1242 { N_("DATA"), GDBM_ARG_DATUM, DS_CONTENT }, 1242 { N_("DATA"), GDBM_ARG_DATUM, DS_CONTENT },
1243 { NULL } }, 1243 { NULL } },
1244 FALSE, 1244 FALSE,
@@ -1246,13 +1246,13 @@ struct command command_tab[] = {
1246 N_("store") }, 1246 N_("store") },
1247 { S(first), T_CMD, 1247 { S(first), T_CMD,
1248 checkdb_begin, firstkey_handler, NULL, 1248 checkdb_begin, firstkey_handler, NULL,
1249 { { NULL } }, 1249 { { NULL } },
1250 FALSE, 1250 FALSE,
1251 REPEAT_NEVER, 1251 REPEAT_NEVER,
1252 N_("firstkey") }, 1252 N_("begin iteration: get first key and datum") },
1253 { S(reorganize), T_CMD, 1253 { S(reorganize), T_CMD,
1254 checkdb_begin, reorganize_handler, NULL, 1254 checkdb_begin, reorganize_handler, NULL,
1255 { { NULL } }, 1255 { { NULL } },
1256 FALSE, 1256 FALSE,
1257 REPEAT_NEVER, 1257 REPEAT_NEVER,
1258 N_("reorganize") }, 1258 N_("reorganize") },
diff --git a/src/util.c b/src/util.c
index 25daeed..aa56dc4 100644
--- a/src/util.c
+++ b/src/util.c
@@ -92,12 +92,13 @@ vgetyn (const char *prompt, va_list ap)
92 case 'Y': 92 case 'Y':
93 return 1; 93 return 1;
94 case 'n': 94 case 'n':
95 case 'N': 95 case 'N':
96 return 0; 96 return 0;
97 default: 97 default:
98 /* TRANSLATORS: Please, don't translate 'y' and 'n'. */
98 fprintf (stdout, "%s\n", _("Please, reply 'y' or 'n'")); 99 fprintf (stdout, "%s\n", _("Please, reply 'y' or 'n'"));
99 } 100 }
100 /* fall through */ 101 /* fall through */
101 } 102 }
102 else 103 else
103 break; 104 break;

Return to:

Send suggestions and report system problems to the System administrator.