From d4efc5b9730fd1bf1bb923c793555910500d9067 Mon Sep 17 00:00:00 2001 From: GenevensiS <66968533+G-e-n-e-v-e-n-s-i-S@users.noreply.github.com> Date: Thu, 7 May 2026 11:34:15 +0200 Subject: [PATCH] improve blending error messages --- data/ch-s.mse-locale/locale | 4 +++- data/ch-t.mse-locale/locale | 4 +++- data/da.mse-locale/locale | 4 +++- data/de.mse-locale/locale | 3 ++- data/en.mse-locale/locale | 3 ++- data/es.mse-locale/locale | 4 +++- data/fr.mse-locale/locale | 3 ++- data/it.mse-locale/locale | 3 ++- data/jp.mse-locale/locale | 4 +++- data/ko.mse-locale/locale | 4 +++- data/pl.mse-locale/locale | 4 +++- data/pt-br.mse-locale/locale | 3 ++- data/ru.mse-locale/locale | 4 +++- src/gfx/blend_image.cpp | 15 ++++++++------- src/gfx/combine_image.cpp | 7 ++++--- 15 files changed, 46 insertions(+), 23 deletions(-) diff --git a/data/ch-s.mse-locale/locale b/data/ch-s.mse-locale/locale index e2e5f782..da86cd23 100644 --- a/data/ch-s.mse-locale/locale +++ b/data/ch-s.mse-locale/locale @@ -1132,7 +1132,9 @@ error: # image stuff coordinates for blending overlap: 坐标混合重叠 #TODO: Localize - blending different sizes: Images used for blending must have the same size in function '%s' + blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s) + #TODO: Localize + blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s) #TODO: Localize negative image width: Image with zero or negative width created in function '%s' #TODO: Localize diff --git a/data/ch-t.mse-locale/locale b/data/ch-t.mse-locale/locale index 0fabcd2c..9b35efe1 100644 --- a/data/ch-t.mse-locale/locale +++ b/data/ch-t.mse-locale/locale @@ -1130,7 +1130,9 @@ error: # image stuff coordinates for blending overlap: 坐標混合重疊 #TODO: Localize - blending different sizes: Images used for blending must have the same size in function '%s' + blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s) + #TODO: Localize + blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s) #TODO: Localize negative image width: Image with zero or negative width created in function '%s' #TODO: Localize diff --git a/data/da.mse-locale/locale b/data/da.mse-locale/locale index aa6a4979..87893d72 100644 --- a/data/da.mse-locale/locale +++ b/data/da.mse-locale/locale @@ -1156,7 +1156,9 @@ error: #TODO: Localize coordinates for blending overlap: Coordinates for blending overlap. Space them out. #TODO: Localize - blending different sizes: Images used for blending must have the same size in function '%s' + blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s) + #TODO: Localize + blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s) #TODO: Localize negative image width: Image with zero or negative width created in function '%s' #TODO: Localize diff --git a/data/de.mse-locale/locale b/data/de.mse-locale/locale index c7791033..dded9ae9 100644 --- a/data/de.mse-locale/locale +++ b/data/de.mse-locale/locale @@ -1048,7 +1048,8 @@ error: # image stuff coordinates for blending overlap: Die Koordinaten für die Überblendung überlappen sich. - blending different sizes: Die für die Überblendung verwendeten Bilder müssen in der Funktion '%s' die gleiche Größe haben. + blending different sizes: Die für die Überblendung verwendeten Bilder müssen in der Funktion '%s' die gleiche Größe haben. (Eines ist %s, das andere ist %s) + blending different mask: Bild und Maske, die zum Überblenden verwendet werden, müssen in der Funktion '%s' die gleiche Größe haben. (Bild ist %s, Maske ist %s) negative image width: Bild mit Breite Null oder negativer Breite, erstellt in der Funktion '%s' negative image height: Bild mit Höhe Null oder negativer Höhe, erstellt in der Funktion '%s' can't load image: Bild konnte nicht geladen werden. Stelle sicher, dass das tatsächliche Format des Bildes mit der gespeicherten Dateiendung übereinstimmt. diff --git a/data/en.mse-locale/locale b/data/en.mse-locale/locale index 35b0cc10..33fef9f4 100644 --- a/data/en.mse-locale/locale +++ b/data/en.mse-locale/locale @@ -1049,7 +1049,8 @@ error: # image stuff coordinates for blending overlap: Coordinates for blending overlap. Space them out. - blending different sizes: Images used for blending must have the same size in function '%s' + blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s) + blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s) negative image width: Image with zero or negative width created in function '%s' negative image height: Image with zero or negative height created in function '%s' can't load image: Failed to load image. Ensure the image's actual format matches its saved extension. diff --git a/data/es.mse-locale/locale b/data/es.mse-locale/locale index 7d78a655..5e740278 100644 --- a/data/es.mse-locale/locale +++ b/data/es.mse-locale/locale @@ -1133,7 +1133,9 @@ error: # image stuff coordinates for blending overlap: Coordenadas para la mezcla (blending) solapada #TODO: Localize - blending different sizes: Images used for blending must have the same size in function '%s' + blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s) + #TODO: Localize + blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s) #TODO: Localize negative image width: Image with zero or negative width created in function '%s' #TODO: Localize diff --git a/data/fr.mse-locale/locale b/data/fr.mse-locale/locale index d198cf0a..87af83c2 100644 --- a/data/fr.mse-locale/locale +++ b/data/fr.mse-locale/locale @@ -1048,7 +1048,8 @@ error: # image stuff coordinates for blending overlap: Les coordonnées pour le mélange sont superposées. Espacez-les. - blending different sizes: Les images utilisées pour le mélange doivent avoir la même taille dans la fonction '%s'. + blending different sizes: Les images utilisées pour le mélange doivent avoir la même taille dans la fonction '%s'. (L'une est %s, l'autre est %s) + blending different mask: L'image et le masque utilisés pour le mélange doivent avoir la même taille dans la fonction '%s'. (L'image est %s, le masque est %s) negative image width: Image de largeur nulle ou négative créée par la fonction '%s' negative image height: Image de hauteur nulle ou négative créée par la fonction '%s' can't load image: Échec du chargement de l'image. Assurez-vous que le format réel de l'image corresponde à son extension enregistrée. diff --git a/data/it.mse-locale/locale b/data/it.mse-locale/locale index 06a19ce8..c230839f 100644 --- a/data/it.mse-locale/locale +++ b/data/it.mse-locale/locale @@ -1048,7 +1048,8 @@ error: # image stuff coordinates for blending overlap: Le coordinate per la fusione si sovrappongono. - blending different sizes: Le immagini utilizzate per la fusione devono avere le stesse dimensioni nella funzione '%s'. + blending different sizes: Le immagini utilizzate per la fusione devono avere le stesse dimensioni nella funzione '%s'. (Una è %s, l'altra è %s) + blending different mask: L'immagine e la maschera utilizzate per la fusione devono avere le stesse dimensioni nella funzione '%s'. (L'immagine è %s, la maschera è %s) negative image width: Immagine con larghezza zero o negativa creata nella funzione '%s'. negative image height: Immagine con altezza zero o negativa creata nella funzione '%s'. can't load image: Impossibile caricare l'immagine. Assicurarsi che il formato effettivo dell'immagine corrisponda all'estensione salvata. diff --git a/data/jp.mse-locale/locale b/data/jp.mse-locale/locale index 579057ac..04c13d7a 100644 --- a/data/jp.mse-locale/locale +++ b/data/jp.mse-locale/locale @@ -1133,7 +1133,9 @@ error: # image stuff coordinates for blending overlap: オーバーラップを混ぜることのための座標 #TODO: Localize - blending different sizes: Images used for blending must have the same size in function '%s' + blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s) + #TODO: Localize + blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s) #TODO: Localize negative image width: Image with zero or negative width created in function '%s' #TODO: Localize diff --git a/data/ko.mse-locale/locale b/data/ko.mse-locale/locale index 3aba463c..2de9a13e 100644 --- a/data/ko.mse-locale/locale +++ b/data/ko.mse-locale/locale @@ -1139,7 +1139,9 @@ error: # image stuff coordinates for blending overlap: 블렌딩 오버랩을 위한 좌표 #TODO: Localize - blending different sizes: Images used for blending must have the same size in function '%s' + blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s) + #TODO: Localize + blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s) #TODO: Localize negative image width: Image with zero or negative width created in function '%s' #TODO: Localize diff --git a/data/pl.mse-locale/locale b/data/pl.mse-locale/locale index 8549edf2..df3e3e9c 100644 --- a/data/pl.mse-locale/locale +++ b/data/pl.mse-locale/locale @@ -1189,7 +1189,9 @@ error: # image stuff coordinates for blending overlap: Współrzędne scalania (blending) nachodzą na siebie #TODO: Localize - blending different sizes: Images used for blending must have the same size in function '%s' + blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s) + #TODO: Localize + blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s) #TODO: Localize negative image width: Image with zero or negative width created in function '%s' #TODO: Localize diff --git a/data/pt-br.mse-locale/locale b/data/pt-br.mse-locale/locale index b7fa5ffd..46b1b585 100644 --- a/data/pt-br.mse-locale/locale +++ b/data/pt-br.mse-locale/locale @@ -1049,7 +1049,8 @@ error: # image stuff coordinates for blending overlap: As coordenadas para a mistura se sobrepõem. - blending different sizes: As imagens usadas para mesclagem devem ter o mesmo tamanho na função '%s'. + blending different sizes: As imagens usadas para mesclagem devem ter o mesmo tamanho na função '%s'. (Uma é %s, a outra é %s) + blending different mask: A imagem e a máscara usadas para mesclagem devem ter o mesmo tamanho na função '%s' (Imagem é %s, máscara é %s) negative image width: Imagem com largura zero ou negativa criada na função '%s' negative image height: Imagem com altura zero ou negativa criada na função '%s' can't load image: Falha ao carregar a imagem. Verifique se o formato real da imagem corresponde à extensão salva. diff --git a/data/ru.mse-locale/locale b/data/ru.mse-locale/locale index dc7997d5..7a94d3b5 100644 --- a/data/ru.mse-locale/locale +++ b/data/ru.mse-locale/locale @@ -1184,7 +1184,9 @@ error: #TODO: Localize coordinates for blending overlap: Coordinates for blending overlap. Space them out. #TODO: Localize - blending different sizes: Images used for blending must have the same size in function '%s' + blending different sizes: Images used for blending must have the same size in function '%s' (one is %s, the other is %s) + #TODO: Localize + blending different mask: Image and mask used for blending must have the same size in function '%s' (image is %s, mask is %s) #TODO: Localize negative image width: Image with zero or negative width created in function '%s' #TODO: Localize diff --git a/src/gfx/blend_image.cpp b/src/gfx/blend_image.cpp index 3e276278..c131d45a 100644 --- a/src/gfx/blend_image.cpp +++ b/src/gfx/blend_image.cpp @@ -19,7 +19,7 @@ template inline T sqr(T x) { return x * x; } void linear_blend(Image& img1, const Image& img2, double x1,double y1, double x2,double y2) { int width = img1.GetWidth(), height = img1.GetHeight(); if (img2.GetWidth() != width || img2.GetHeight() != height) { - throw Error(_ERROR_1_("blending different sizes", "linear_blend")); + throw Error(_ERROR_3_("blending different sizes", "linear_blend", String()<