Further clean up of error messages

This commit is contained in:
Robin Stuart 2020-11-08 08:32:05 +00:00
parent 8f6f8b2cf5
commit 9ca8bc3bc0
8 changed files with 47 additions and 57 deletions

View file

@ -1285,7 +1285,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], const siz
if (adjusted_length > data_maxsize) {
symbol->err_origin = 505;
strcpy(symbol->errtxt, _("Data too long for specified Aztec Code symbol size"));
strcpy(symbol->errtxt, _("Input too long for selected symbol size"));
return ZINT_ERROR_TOO_LONG;
}

View file

@ -1400,7 +1400,7 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l
if (length > 2990) {
symbol->err_origin = 446;
strcpy(symbol->errtxt, _("2D component input data too long"));
strcpy(symbol->errtxt, _("Input too long for selected 2D component"));
return ZINT_ERROR_TOO_LONG;
}

View file

@ -192,9 +192,9 @@ static void error_tag(char error_string[], int error_number, int err_origin) {
strcpy(error_buffer, error_string);
if (error_number >= ZINT_ERROR) {
sprintf(error_string, "Error %d: ", err_origin);
sprintf(error_string, _("Error %d: "), err_origin);
} else {
sprintf(error_string, "Warning %d: ", err_origin);
sprintf(error_string, _("Warning %d: "), err_origin);
}
strcat(error_string, error_buffer);

View file

@ -980,7 +980,7 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
if ((symbol->option_2 == 1) && (mclength > 20)) {
/* the user specified 1 column but the data doesn't fit - go to automatic */
symbol->err_origin = 469;
strcpy(symbol->errtxt, _("Specified symbol size too small for data"));
strcpy(symbol->errtxt, _("Input too long for selected symbol size"));
if (symbol->warn_level == WARN_FAIL_ALL) {
return ZINT_ERROR_INVALID_OPTION;
} else {
@ -992,7 +992,7 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
if ((symbol->option_2 == 2) && (mclength > 37)) {
/* the user specified 2 columns but the data doesn't fit - go to automatic */
symbol->err_origin = 470;
strcpy(symbol->errtxt, _("Specified symbol size too small for data"));
strcpy(symbol->errtxt, _("Input too long for selected symbol size"));
if (symbol->warn_level == WARN_FAIL_ALL) {
return ZINT_ERROR_INVALID_OPTION;
} else {
@ -1004,7 +1004,7 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
if ((symbol->option_2 == 3) && (mclength > 82)) {
/* the user specified 3 columns but the data doesn't fit - go to automatic */
symbol->err_origin = 471;
strcpy(symbol->errtxt, _("Specified symbol size too small for data"));
strcpy(symbol->errtxt, _("Input too long for selected symbol size"));
if (symbol->warn_level == WARN_FAIL_ALL) {
return ZINT_ERROR_INVALID_OPTION;
} else {

View file

@ -58,14 +58,14 @@ struct mainprog_info_type {
static void writepng_error_handler(png_structp png_ptr, png_const_charp msg) {
struct mainprog_info_type *graphic;
fprintf(stderr, _("writepng libpng error: %s (F30)\n"), msg);
fprintf(stderr, _("libpng error: %s\n"), msg);
fflush(stderr);
graphic = (struct mainprog_info_type*) png_get_error_ptr(png_ptr);
if (graphic == NULL) {
/* we are completely hosed now */
fprintf(stderr,
_("writepng severe error: jmpbuf not recoverable; terminating. (F31)\n"));
_("libpng error: jmpbuf not recoverable; terminating\n"));
fflush(stderr);
return;
}

View file

@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: LIBZINT 2.9.1\n"
"Project-Id-Version: libzint 2.9.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-11-07 19:17+0000\n"
"POT-Creation-Date: 2020-11-08 08:26+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -25,10 +25,6 @@ msgstr ""
msgid " in linear component"
msgstr ""
#: composite.c:1403
msgid "2D component input data too long"
msgstr ""
#: upcean.c:964
msgid "Add-on input wrong length"
msgstr ""
@ -90,14 +86,6 @@ msgstr ""
msgid "Data too long for reader initialisation symbol"
msgstr ""
#: ultra.c:940
msgid "Data too long for selected error correction capacity"
msgstr ""
#: aztec.c:1288
msgid "Data too long for specified Aztec Code symbol size"
msgstr ""
#: pdf417.c:653
msgid "Data too long for specified number of columns"
msgstr ""
@ -122,6 +110,11 @@ msgstr ""
msgid "Encoded data includes ECI"
msgstr ""
#: library.c:195
#, c-format
msgid "Error %d: "
msgstr ""
#: qr.c:2380
msgid "Error correction level H not available"
msgstr ""
@ -210,16 +203,17 @@ msgstr ""
msgid "Input too long"
msgstr ""
#: composite.c:1281 composite.c:1324
#: composite.c:1281 composite.c:1324 composite.c:1403
msgid "Input too long for selected 2D component"
msgstr ""
#: aztec.c:1116 hanxin.c:1484 qr.c:1596 qr.c:2949
#: aztec.c:1116 hanxin.c:1484 qr.c:1596 qr.c:2949 ultra.c:940
msgid "Input too long for selected error correction level"
msgstr ""
#: code1.c:1439 dmatrix.c:1242 gridmtx.c:1010 hanxin.c:1498 qr.c:1685 qr.c:2510
#: qr.c:2716 qr.c:3030
#: aztec.c:1288 pdf417.c:983 pdf417.c:995 pdf417.c:1007 code1.c:1439
#: dmatrix.c:1242 gridmtx.c:1010 hanxin.c:1498 qr.c:1685 qr.c:2510 qr.c:2716
#: qr.c:3030
msgid "Input too long for selected symbol size"
msgstr ""
@ -479,10 +473,6 @@ msgstr ""
msgid "Specified symbol size is too large"
msgstr ""
#: pdf417.c:983 pdf417.c:995 pdf417.c:1007
msgid "Specified symbol size too small for data"
msgstr ""
#: pdf417.c:959
msgid "Specified width out of range"
msgstr ""
@ -533,16 +523,21 @@ msgstr ""
msgid "Version M1 supports error correction level L only"
msgstr ""
#: library.c:197
#, c-format
msgid "Warning %d: "
msgstr ""
#: png.c:175
msgid "libpng error occurred"
msgstr ""
#: png.c:61
#, c-format
msgid "writepng libpng error: %s (F30)\n"
msgid "libpng error: %s\n"
msgstr ""
#: png.c:68
#, c-format
msgid "writepng severe error: jmpbuf not recoverable; terminating. (F31)\n"
msgid "libpng error: jmpbuf not recoverable; terminating\n"
msgstr ""

View file

@ -6,7 +6,7 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: LIBZINT 2.9.1\n"
"Project-Id-Version: libzint 2.9.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-11-07 21:47+0000\n"
"PO-Revision-Date: 2020-11-07 21:47+0000\n"
@ -25,10 +25,6 @@ msgstr ""
msgid " in linear component"
msgstr ""
#: composite.c:1403
msgid "2D component input data too long"
msgstr ""
#: upcean.c:964
msgid "Add-on input wrong length"
msgstr ""
@ -90,14 +86,6 @@ msgstr ""
msgid "Data too long for reader initialisation symbol"
msgstr "Данные слишком долго для читающего инициализирующего символа"
#: ultra.c:940
msgid "Data too long for selected error correction capacity"
msgstr ""
#: aztec.c:1288
msgid "Data too long for specified Aztec Code symbol size"
msgstr ""
#: pdf417.c:653
msgid "Data too long for specified number of columns"
msgstr ""
@ -122,6 +110,11 @@ msgstr ""
msgid "Encoded data includes ECI"
msgstr ""
#: library.c:195
#, c-format
msgid "Error %d: "
msgstr ""
#: qr.c:2380
msgid "Error correction level H not available"
msgstr "Уровень исправления ошибок H недоступен"
@ -210,16 +203,17 @@ msgstr ""
msgid "Input too long"
msgstr "Введено слишком много данных"
#: composite.c:1281 composite.c:1324
#: composite.c:1281 composite.c:1324 composite.c:1403
msgid "Input too long for selected 2D component"
msgstr "Слишком много данных для выбранного 2d-компонента"
#: aztec.c:1116 hanxin.c:1484 qr.c:1596 qr.c:2949
#: aztec.c:1116 hanxin.c:1484 qr.c:1596 qr.c:2949 ultra.c:940
msgid "Input too long for selected error correction level"
msgstr "Слишком длинный ввод для выбранного уровня коррекции ошибок"
#: code1.c:1439 dmatrix.c:1242 gridmtx.c:1010 hanxin.c:1498 qr.c:1685 qr.c:2510
#: qr.c:2716 qr.c:3030
#: aztec.c:1288 pdf417.c:983 pdf417.c:995 pdf417.c:1007 code1.c:1439
#: dmatrix.c:1242 gridmtx.c:1010 hanxin.c:1498 qr.c:1685 qr.c:2510 qr.c:2716
#: qr.c:3030
msgid "Input too long for selected symbol size"
msgstr "Слишком длинный ввод для выбранного размера символа"
@ -479,10 +473,6 @@ msgstr ""
msgid "Specified symbol size is too large"
msgstr ""
#: pdf417.c:983 pdf417.c:995 pdf417.c:1007
msgid "Specified symbol size too small for data"
msgstr ""
#: pdf417.c:959
msgid "Specified width out of range"
msgstr ""
@ -533,16 +523,21 @@ msgstr ""
msgid "Version M1 supports error correction level L only"
msgstr ""
#: library.c:197
#, c-format
msgid "Warning %d: "
msgstr ""
#: png.c:175
msgid "libpng error occurred"
msgstr ""
#: png.c:61
#, c-format
msgid "writepng libpng error: %s (F30)\n"
msgid "libpng error: %s\n"
msgstr ""
#: png.c:68
#, c-format
msgid "writepng severe error: jmpbuf not recoverable; terminating. (F31)\n"
msgid "libpng error: jmpbuf not recoverable; terminating\n"
msgstr ""

View file

@ -937,7 +937,7 @@ INTERNAL int ultracode(struct zint_symbol *symbol, const unsigned char source[],
total_cws = data_cw_count + qcc + 3; // 3 == TCC pattern + RSEC pattern + QCC pattern
if (total_cws > 282) {
symbol->err_origin = 591;
strcpy(symbol->errtxt, _("Data too long for selected error correction capacity"));
strcpy(symbol->errtxt, _("Input too long for selected error correction level"));
return ZINT_ERROR_TOO_LONG;
}