1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-01-27 13:55:57 +00:00

First attempt at i18n using gettext

This commit is contained in:
Robin Stuart
2020-11-07 19:26:10 +00:00
parent 44923349f3
commit 06058d7518
45 changed files with 1236 additions and 356 deletions

View File

@@ -314,14 +314,16 @@ INTERNAL int gif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
if ((symbol->output_options & BARCODE_STDOUT) != 0) {
#ifdef _MSC_VER
if (-1 == _setmode(_fileno(stdout), _O_BINARY)) {
strcpy(symbol->errtxt, "610: Can't open output file");
symbol->err_origin = 610;
strcpy(symbol->errtxt, _("Can't open output file"));
return ZINT_ERROR_FILE_ACCESS;
}
#endif
gif_file = stdout;
} else {
if (!(gif_file = fopen(symbol->outfile, "wb"))) {
strcpy(symbol->errtxt, "611: Can't open output file");
symbol->err_origin = 611;
strcpy(symbol->errtxt, _("Can't open output file"));
return ZINT_ERROR_FILE_ACCESS;
}
}
@@ -414,7 +416,8 @@ INTERNAL int gif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
RGBCur[0] = 0; RGBCur[1] = 0; RGBCur[2] = 0;
break;
default: /* error case - return */
strcpy(symbol->errtxt, "611: unknown pixel colour");
symbol->err_origin = 611;
strcpy(symbol->errtxt, _("Unknown pixel colour"));
return ZINT_ERROR_INVALID_DATA;
}
/* Search, if RGB value is already present */