mirror of
https://git.code.sf.net/p/zint/code
synced 2026-01-24 20:36:03 +00:00
First attempt at i18n using gettext
This commit is contained in:
@@ -40,11 +40,13 @@ INTERNAL int output_check_colour_options(struct zint_symbol *symbol) {
|
||||
int error_number;
|
||||
|
||||
if ((strlen(symbol->fgcolour) != 6) && (strlen(symbol->fgcolour) != 8)) {
|
||||
strcpy(symbol->errtxt, "651: Malformed foreground colour target");
|
||||
symbol->err_origin = 651;
|
||||
strcpy(symbol->errtxt, _("Malformed foreground colour target"));
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if ((strlen(symbol->bgcolour) != 6) && (strlen(symbol->bgcolour) != 8)) {
|
||||
strcpy(symbol->errtxt, "652: Malformed background colour target");
|
||||
symbol->err_origin = 652;
|
||||
strcpy(symbol->errtxt, _("Malformed background colour target"));
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
@@ -53,13 +55,15 @@ INTERNAL int output_check_colour_options(struct zint_symbol *symbol) {
|
||||
|
||||
error_number = is_sane(SSET, (unsigned char *) symbol->fgcolour, strlen(symbol->fgcolour));
|
||||
if (error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "653: Malformed foreground colour target");
|
||||
symbol->err_origin = 653;
|
||||
strcpy(symbol->errtxt, _("Malformed foreground colour target"));
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
error_number = is_sane(SSET, (unsigned char *) symbol->bgcolour, strlen(symbol->bgcolour));
|
||||
if (error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "654: Malformed background colour target");
|
||||
symbol->err_origin = 654;
|
||||
strcpy(symbol->errtxt, _("Malformed background colour target"));
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user