mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +01:00
WRaster: Made a few messages translatable
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
70f89fd9c5
commit
e5f7ef23a6
@@ -454,7 +454,7 @@ static void gatherconfig(RContext * context, int screen_n)
|
|||||||
if (ptr) {
|
if (ptr) {
|
||||||
float g1, g2, g3;
|
float g1, g2, g3;
|
||||||
if (sscanf(ptr, "%f/%f/%f", &g1, &g2, &g3) != 3 || g1 <= 0.0F || g2 <= 0.0F || g3 <= 0.0F) {
|
if (sscanf(ptr, "%f/%f/%f", &g1, &g2, &g3) != 3 || g1 <= 0.0F || g2 <= 0.0F || g3 <= 0.0F) {
|
||||||
printf("wrlib: invalid value(s) for gamma correction \"%s\"\n", ptr);
|
fprintf(stderr, _("wrlib: invalid value \"%s\" for %s\n"), ptr, "WRASTER_GAMMA");
|
||||||
} else {
|
} else {
|
||||||
context->attribs->flags |= RC_GammaCorrection;
|
context->attribs->flags |= RC_GammaCorrection;
|
||||||
context->attribs->rgamma = g1;
|
context->attribs->rgamma = g1;
|
||||||
@@ -466,7 +466,7 @@ static void gatherconfig(RContext * context, int screen_n)
|
|||||||
if (ptr) {
|
if (ptr) {
|
||||||
int i;
|
int i;
|
||||||
if (sscanf(ptr, "%d", &i) != 1 || i < 2 || i > 6) {
|
if (sscanf(ptr, "%d", &i) != 1 || i < 2 || i > 6) {
|
||||||
printf("wrlib: invalid value for color resolution \"%s\"\n", ptr);
|
fprintf(stderr, _("wrlib: invalid value \"%s\" for %s\n"), ptr, "WRASTER_COLOR_RESOLUTION");
|
||||||
} else {
|
} else {
|
||||||
context->attribs->flags |= RC_ColorsPerChannel;
|
context->attribs->flags |= RC_ColorsPerChannel;
|
||||||
context->attribs->colors_per_channel = i;
|
context->attribs->colors_per_channel = i;
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ static void init_cache(void)
|
|||||||
if (RImageCacheSize > 0) {
|
if (RImageCacheSize > 0) {
|
||||||
RImageCache = malloc(sizeof(RCachedImage) * RImageCacheSize);
|
RImageCache = malloc(sizeof(RCachedImage) * RImageCacheSize);
|
||||||
if (RImageCache == NULL) {
|
if (RImageCache == NULL) {
|
||||||
printf("wrlib: out of memory for image cache\n");
|
fprintf(stderr, _("wrlib: out of memory for image cache\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
memset(RImageCache, 0, sizeof(RCachedImage) * RImageCacheSize);
|
memset(RImageCache, 0, sizeof(RCachedImage) * RImageCacheSize);
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ RImage *RLoadWEBP(const char *file_name)
|
|||||||
free(raw_data);
|
free(raw_data);
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
fprintf(stderr, "wrlib: Failed to decode WEBP from file \"%s\"\n", file_name);
|
fprintf(stderr, _("wrlib: failed to decode WebP from file \"%s\"\n"), file_name);
|
||||||
RErrorCode = RERR_BADIMAGEFILE;
|
RErrorCode = RERR_BADIMAGEFILE;
|
||||||
RReleaseImage(image);
|
RReleaseImage(image);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
26
wrlib/misc.c
26
wrlib/misc.c
@@ -204,44 +204,44 @@ const char *RMessageForError(int errorCode)
|
|||||||
{
|
{
|
||||||
switch (errorCode) {
|
switch (errorCode) {
|
||||||
case RERR_NONE:
|
case RERR_NONE:
|
||||||
return "no error";
|
return _("no error");
|
||||||
|
|
||||||
case RERR_OPEN:
|
case RERR_OPEN:
|
||||||
return "could not open file";
|
return _("could not open file");
|
||||||
|
|
||||||
case RERR_READ:
|
case RERR_READ:
|
||||||
return "error reading from file";
|
return _("error reading from file");
|
||||||
|
|
||||||
case RERR_WRITE:
|
case RERR_WRITE:
|
||||||
return "error writing to file";
|
return _("error writing to file");
|
||||||
|
|
||||||
case RERR_NOMEMORY:
|
case RERR_NOMEMORY:
|
||||||
return "out of memory";
|
return _("out of memory");
|
||||||
|
|
||||||
case RERR_NOCOLOR:
|
case RERR_NOCOLOR:
|
||||||
return "out of color cells";
|
return _("out of color cells");
|
||||||
|
|
||||||
case RERR_BADIMAGEFILE:
|
case RERR_BADIMAGEFILE:
|
||||||
return "invalid or corrupted image file";
|
return _("invalid or corrupted image file");
|
||||||
|
|
||||||
case RERR_BADFORMAT:
|
case RERR_BADFORMAT:
|
||||||
return "the image format in the file is not supported and can't be loaded";
|
return _("image format is not supported");
|
||||||
|
|
||||||
case RERR_BADINDEX:
|
case RERR_BADINDEX:
|
||||||
return "image file does not contain requested image index";
|
return _("file does not contain requested image index");
|
||||||
|
|
||||||
case RERR_BADVISUALID:
|
case RERR_BADVISUALID:
|
||||||
return "request for an invalid visual ID";
|
return _("request for an invalid Visual ID");
|
||||||
|
|
||||||
case RERR_STDCMAPFAIL:
|
case RERR_STDCMAPFAIL:
|
||||||
return "failed to create standard colormap";
|
return _("failed to create X standard colormap");
|
||||||
|
|
||||||
case RERR_XERROR:
|
case RERR_XERROR:
|
||||||
return "internal X error";
|
return _("internal X error");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
case RERR_INTERNAL:
|
case RERR_INTERNAL:
|
||||||
return "internal error";
|
return _("internal error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ RImage *RCreateImageFromDrawable(RContext * context, Drawable drawable, Pixmap m
|
|||||||
assert(drawable != None);
|
assert(drawable != None);
|
||||||
|
|
||||||
if (!XGetGeometry(context->dpy, drawable, &baz, &foo, &foo, &w, &h, &bar, &bar)) {
|
if (!XGetGeometry(context->dpy, drawable, &baz, &foo, &foo, &w, &h, &bar, &bar)) {
|
||||||
printf("wrlib: invalid window or pixmap passed to RCreateImageFromDrawable\n");
|
fprintf(stderr, _("wrlib: invalid window or pixmap passed to RCreateImageFromDrawable\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
pimg = XGetImage(context->dpy, drawable, 0, 0, w, h, AllPlanes, ZPixmap);
|
pimg = XGetImage(context->dpy, drawable, 0, 0, w, h, AllPlanes, ZPixmap);
|
||||||
|
|||||||
Reference in New Issue
Block a user