Mercurial > molko
diff librpg/rpg/tileset-file.c @ 241:76afe639fd72
misc: add support for NLS, closes #22510 @4h
While here cleanup the path functions in sys.c/sys.h
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 28 Nov 2020 18:00:05 +0100 |
parents | b30c3af37a01 |
children |
line wrap: on
line diff
--- a/librpg/rpg/tileset-file.c Fri Nov 27 21:34:07 2020 +0100 +++ b/librpg/rpg/tileset-file.c Sat Nov 28 18:00:05 2020 +0100 @@ -32,6 +32,7 @@ #include <core/image.h> #include <core/util.h> +#include "rpg_p.h" #include "tileset-file.h" #include "tileset.h" @@ -129,7 +130,7 @@ parse_tilewidth(struct context *ctx, const char *line) { if (sscanf(line, "tilewidth|%u", &ctx->tilewidth) != 1 || ctx->tilewidth == 0) - return errorf("tilewidth is null"); + return errorf(_("tilewidth is null")); return true; } @@ -138,7 +139,7 @@ parse_tileheight(struct context *ctx, const char *line) { if (sscanf(line, "tileheight|%u", &ctx->tileheight) != 1 || ctx->tileheight == 0) - return errorf("tileheight is null"); + return errorf(_("tileheight is null")); return true; } @@ -235,9 +236,9 @@ char *p; if (ctx->tilewidth == 0 || ctx->tileheight == 0) - return errorf("missing tile dimensions before image"); + return errorf(_("missing tile dimensions before image")); if (!(p = strchr(line, '|'))) - return errorf("could not parse image"); + return errorf(_("could not parse image")); if (!image_open(&ctx->tf->image, pprintf("%s/%s", ctx->basedir, p + 1))) return false; @@ -294,7 +295,7 @@ check(const struct tileset *tileset) { if (!tileset->sprite) - return errorf("missing tileset image"); + return errorf(_("missing tileset image")); return true; }