From fdda75deb8a813a9fd82fbb8d4e73177563c6aaa Mon Sep 17 00:00:00 2001 From: Jehan Date: Wed, 18 Mar 2026 17:57:23 +0100 Subject: [PATCH] app: localize some more strings. Also give a bit more accurate error message when possible, e.g. when we may have an error message from libarchive. --- app/core/gimppalette-load.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app/core/gimppalette-load.c b/app/core/gimppalette-load.c index 0fd94334bf..e7d09498e0 100644 --- a/app/core/gimppalette-load.c +++ b/app/core/gimppalette-load.c @@ -1396,10 +1396,12 @@ gimp_palette_load_sbz (GimpContext *context, r = archive_read_open_filename (a, name, 10240); if (r != ARCHIVE_OK) { + g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ, + _("Unable to read SBZ file: %s"), + archive_error_string (a)); + archive_read_free (a); - g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ, - _("Unable to read SBZ file")); return NULL; } @@ -1496,11 +1498,11 @@ gimp_palette_load_procreate (GimpContext *context, r = archive_read_open_filename (a, name, 10240); if (r != ARCHIVE_OK) { - archive_read_free (a); - - /* TODO: Translate after string freeze */ g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ, - "Unable to read Procreate swatches file"); + _("Unable to read Procreate swatches file: %s"), + archive_error_string (a)); + + archive_read_free (a); return NULL; } @@ -1717,9 +1719,8 @@ gimp_palette_load_procreate (GimpContext *context, } else { - /* TODO: Translate after string freeze */ g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ, - "Unable to read Procreate swatches file"); + _("Unable to read Procreate swatches file")); return NULL; }